如何使用lingo软件编程解决线性规划问题?问题如补充所示。
答案:1 悬赏:50 手机版
解决时间 2021-04-02 01:51
- 提问者网友:藍了天白赴美
- 2021-04-01 18:05
如何使用lingo软件编程解决线性规划问题?问题如补充所示。
最佳答案
- 五星知识达人网友:不想翻身的咸鱼
- 2021-04-01 18:39
根据你提供的资料,lingo程序如下:
min =Z1+Z2+Z3;
Z1=5*X11+7*X21+5*X31+4*X41+6*X51+5*X61+5*X71+3*X81+P1;
Z2=5*X12+7*X22+5*X32+4*X42+6*X52+5*X62+5*X72+3*X82+P2;
Z3=5*X13+7*X23+5*X33+4*X43+6*X53+5*X63+5*X73+3*X83+P3;
Z1<=60;Z2<=60; Z3<=60;
N1=25*X11+36*X21+32*X31+15*X41+31*X51+28*X61+22*X71+12*X81;
N2=25*X12+36*X22+32*X32+15*X42+31*X52+28*X62+22*X72+12*X82+25*X11*0.9+36*X21*0.9+32*X31*0.9+15*X41*0.9+31*X51*0.9+28*X61*0.9+22*X71*0.9+12*X81*0.9;
N3=25*X13+36*X23+32*X33+15*X43+31*X53+28*X63+22*X73+12*X83+25*X12*0.9+36*X22*0.9+32*X32*0.9+15*X42*0.9+31*X52*0.9+28*X62*0.9+22*X72*0.9+12*X82*0.9+25*X11*0.81+ 36*X21*0.81+32*X31*0.81+15*X41*0.81+31*X51*0.81+28*X61*0.81+22*X71*0.81+12*X81*0.81;
N4=N3*0.9;
N5=N3*0.81;
W1=43.4754+N1;
W2=31.7983+N2;
W3=24.0045+N3;
W4=20.7178+N4+Q;
W5=17.4312+N5+Q;
W1>=150;W2>=160;W3>=170; W4>=180;W5>=190;
L1+L2+L3 >= 20;
P1=0.66*Q^0.51*L1;
P2=0.66*Q^0.51*L2;
P3=0.66*Q^0.51*L3;
@gin(P1);@gin(P2);@gin(P3);
但个人觉得似乎不太对,有可能的话用原题重新提问追问上传的时候缺乏这样的约束0-1整数规划:由于第i号井只能在三年中的某一年打造或者不打造,故应有
x11+x12+x13<=1;
X21+X22+X23<=1;
X31+X32+X33<=1;
X41+X42+X43<=1;
X51+X52+X53<=1;
X61+X62+X63<=1;
X71+X72+X73<=1;
X81+X82+X83<=1;
min =Z1+Z2+Z3;
Z1=5*X11+7*X21+5*X31+4*X41+6*X51+5*X61+5*X71+3*X81+P1;
Z2=5*X12+7*X22+5*X32+4*X42+6*X52+5*X62+5*X72+3*X82+P2;
Z3=5*X13+7*X23+5*X33+4*X43+6*X53+5*X63+5*X73+3*X83+P3;
Z1<=60;Z2<=60; Z3<=60;
N1=25*X11+36*X21+32*X31+15*X41+31*X51+28*X61+22*X71+12*X81;
N2=25*X12+36*X22+32*X32+15*X42+31*X52+28*X62+22*X72+12*X82+25*X11*0.9+36*X21*0.9+32*X31*0.9+15*X41*0.9+31*X51*0.9+28*X61*0.9+22*X71*0.9+12*X81*0.9;
N3=25*X13+36*X23+32*X33+15*X43+31*X53+28*X63+22*X73+12*X83+25*X12*0.9+36*X22*0.9+32*X32*0.9+15*X42*0.9+31*X52*0.9+28*X62*0.9+22*X72*0.9+12*X82*0.9+25*X11*0.81+ 36*X21*0.81+32*X31*0.81+15*X41*0.81+31*X51*0.81+28*X61*0.81+22*X71*0.81+12*X81*0.81;
N4=N3*0.9;
N5=N3*0.81;
W1=43.4754+N1;
W2=31.7983+N2;
W3=24.0045+N3;
W4=20.7178+N4+Q;
W5=17.4312+N5+Q;
W1>=150;W2>=160;W3>=170; W4>=180;W5>=190;
L1+L2+L3 >= 20;
P1=0.66*Q^0.51*L1;
P2=0.66*Q^0.51*L2;
P3=0.66*Q^0.51*L3;
@gin(P1);@gin(P2);@gin(P3);
但个人觉得似乎不太对,有可能的话用原题重新提问追问上传的时候缺乏这样的约束0-1整数规划:由于第i号井只能在三年中的某一年打造或者不打造,故应有
x11+x12+x13<=1;
X21+X22+X23<=1;
X31+X32+X33<=1;
X41+X42+X43<=1;
X51+X52+X53<=1;
X61+X62+X63<=1;
X71+X72+X73<=1;
X81+X82+X83<=1;
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯