大家看看我这个线性规划能不能通过lingo求得最优解啊,变量有点多:(能的话给出代码,感激不尽) 50
max=2*m1+4*m2+3.5*m3+2.5*m4+5*m5+4*m6+5*m7+4*m8+7*m9+6*m10+3*m11+2.5*m12+4.5*m13+4*m1...
max=2*m1+4*m2+3.5*m3+2.5*m4+5*m5+4*m6+5*m7+4*m8+7*m9+6*m10+3*m11+2.5*m12+4.5*m13+4*m14+5*m15+6*m16+2.5*m17+
3*(m18+m19+m20+m21)+
2.5*(m22+m23+m24+m25)+4*m26+4.5*m27+4.5*m28+4*m29+4*m30+5*m31
可行域为
m1,m2,m3,m4,……m31>=0
m1+m2<=10
m3+m4<=6
m5+m6+m7+m8<=5
m9+m10<=3
m11+m17+m18+m19+m20+m21<=2
m12+m17+m22+m23+m24+m25<=2
m13+m18+m22+m26+m27+m28<=1
m14+m19+m23+m26+m27+m29+m31<=1
m15+m20+m24+m27+m29+m31<=1
m16+m21+m25+m28+m30+m31<=1 展开
3*(m18+m19+m20+m21)+
2.5*(m22+m23+m24+m25)+4*m26+4.5*m27+4.5*m28+4*m29+4*m30+5*m31
可行域为
m1,m2,m3,m4,……m31>=0
m1+m2<=10
m3+m4<=6
m5+m6+m7+m8<=5
m9+m10<=3
m11+m17+m18+m19+m20+m21<=2
m12+m17+m22+m23+m24+m25<=2
m13+m18+m22+m26+m27+m28<=1
m14+m19+m23+m26+m27+m29+m31<=1
m15+m20+m24+m27+m29+m31<=1
m16+m21+m25+m28+m30+m31<=1 展开
展开全部
这个用lingo最好了,呵呵。一下是代码:
max=2*m1+4*m2+3.5*m3+2.5*m4+5*m5+4*m6+5*m7+4*m8+7*m9+6*m10+3*m11+2.5*m12+4.5*m13+4*m14+5*m15+6*m16+2.5*m17+
3*m18+3*m19+3*m20+3*m21+
2.5*m22+2.5*m23+2.5*m24+2.5*m25+4*m26+4.5*m27+4.5*m28+4*m29+4*m30+5*m31;
m1+m2<=10;
m3+m4<=6;
m5+m6+m7+m8<=5;
m9+m10<=3;
m11+m17+m18+m19+m20+m21<=2;
m12+m17+m22+m23+m24+m25<=2;
m13+m18+m22+m26+m27+m28<=1;
m14+m19+m23+m26+m27+m29+m31<=1;
m15+m20+m24+m27+m29+m31<=1;
m16+m21+m25+m28+m30+m31<=1;
max=2*m1+4*m2+3.5*m3+2.5*m4+5*m5+4*m6+5*m7+4*m8+7*m9+6*m10+3*m11+2.5*m12+4.5*m13+4*m14+5*m15+6*m16+2.5*m17+
3*m18+3*m19+3*m20+3*m21+
2.5*m22+2.5*m23+2.5*m24+2.5*m25+4*m26+4.5*m27+4.5*m28+4*m29+4*m30+5*m31;
m1+m2<=10;
m3+m4<=6;
m5+m6+m7+m8<=5;
m9+m10<=3;
m11+m17+m18+m19+m20+m21<=2;
m12+m17+m22+m23+m24+m25<=2;
m13+m18+m22+m26+m27+m28<=1;
m14+m19+m23+m26+m27+m29+m31<=1;
m15+m20+m24+m27+m29+m31<=1;
m16+m21+m25+m28+m30+m31<=1;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询