很简单的线性规划 lingo 提示错误invalid error

2024-11-03 02:21:43
推荐回答(2个)
回答(1):

model:
max=0.043*x1+0.027*x2+0.025*x3+0.022*x4+0.045*x5;
x1+x2+x3+x4+x5=1000;
[ave] 2*x1+2*x2+x3+x4+5*x5<1400;
[duration] 9*x1+15*x2+4*x3+3*x4+2*x5<5000;
[partial_quotas]x3+x4+x2>400;
end

回答(2):

max=(228.5-x1)*2.125/43.7+(84.08-x2)*0.5625/47.04+(137.6-x3)*1.0625/34.7;
x1>=184.8;
x1<=228.5;
x2>=37.04;
x2<=84.08;
x3>=102.9;
x3<=137.6;
x1+x2<=272.34;
x2+x3<=190.44;
x1+x3<=338.2;
x1+x2+x3<=375.24;
end