lingo无法给变量赋值
model:sets:level/1..4/:p,z,goal;variable/1..27/:x;h_con_num/1..19/:b;s_con_num/1..19/...
model:
sets:
level/1..4/:p,z,goal;
variable/1..27/:x;
h_con_num/1..19/:b;
s_con_num/1..19/:g,dplus,dminus;
h_con(h_con_num,variable):a;
s_con(s_con_num,variable):c;
obj(level,s_con_num)/1 1,1 2,1 3,1 4,1 5,1 6,2 7,2 8,2 9,2 10,2 11,2 12,3 13,3 14,3 15,3 16,3 17,3 18,4 19/:wplus,wminus;
endsets
data:
t=?;
b=?;
enddata
end
运行无错误,但无法给t赋值,运行后直接显示给b赋值,调着只要把
h_con_num/1..19/:b;
s_con_num/1..19/:g,dplus,dminus;
的数调小点就能给t赋值了,比如
h_con_num/1..3/:b;
s_con_num/1..4/:g,dplus,dminus;
怎么回事呢? 展开
sets:
level/1..4/:p,z,goal;
variable/1..27/:x;
h_con_num/1..19/:b;
s_con_num/1..19/:g,dplus,dminus;
h_con(h_con_num,variable):a;
s_con(s_con_num,variable):c;
obj(level,s_con_num)/1 1,1 2,1 3,1 4,1 5,1 6,2 7,2 8,2 9,2 10,2 11,2 12,3 13,3 14,3 15,3 16,3 17,3 18,4 19/:wplus,wminus;
endsets
data:
t=?;
b=?;
enddata
end
运行无错误,但无法给t赋值,运行后直接显示给b赋值,调着只要把
h_con_num/1..19/:b;
s_con_num/1..19/:g,dplus,dminus;
的数调小点就能给t赋值了,比如
h_con_num/1..3/:b;
s_con_num/1..4/:g,dplus,dminus;
怎么回事呢? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询