纸浆离散优化

问题描述

我正在用纸浆写一个离散问题。 我的代码如下:

from pulp import *

ind = [1,2,3,4,5,6,7,8,9]

opt_model = LpProblem("Model",LpMinimize)

x_vars  = {(i): LpVariable(cat = LpInteger,lowBound = 0,name="x_{0}".format(i)) for i in ind}

x_vars  = {1: x_1,2: x_2,3: x_3,4: x_4,5: x_5,6: x_6,7: x_7,8: x_8,9: x_9}

如何让 x_i 取列表 [0,10] 的一个值?

x_i : [0,10] for i in ind

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)