2024-05-21 22:35:49 发布
网友
我在做一个规划优化的线性整数规划。我们正在计划在12周内进行多阶段操作的多产品生产:
6 products 4 stages 12 weeks
这是我们的限制之一。在
我们收到一条错误消息“keyrerror(5,0,0)”,这意味着我们的模型不能在s和ts中迭代
我该怎么做?在
KeyError表示P内没有元组(i,s,t)。您可以使用
P
(i,s,t)
model.addVars(products, stages, time_periods, ...)
参考号:http://www.gurobi.com/documentation/current/refman/py_model_addvars.html
KeyError表示
P
内没有元组(i,s,t)
。您可以使用参考号:http://www.gurobi.com/documentation/current/refman/py_model_addvars.html
相关问题 更多 >
编程相关推荐