资源描述:
《运筹学实例分析及lingo求解教学文案.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、精品好文档,推荐学习交流运筹学实例分析及lingo求解一、线性规划某公司有6个仓库,库存货物总数分别为60、55、51、43、41、52,现有8个客户各要一批货,数量分别为35,37,22,32,41,32,43,38。各供货仓库到8个客户处的单位货物运输价见表V1V2V3V4V5V6V7V8W162674258W249538582W352197433W476739271W523957265W655228143试确定各仓库到各客户处的货物调运数量,使总的运输费用最小。解:设表示从第个仓库到第个客户的货物运量。表示从第个仓库到第个客户的单位货物运价
2、,表示第个仓库的最大供货量,表示第个客户的订货量。目标函数是使总运输费用最少,约束条件有三个:1、各仓库运出的货物总量不超过其库存数2、各客户收到的货物总量等于其订货数量3、非负约束数学模型为:编程如下:model:Sets:Wh/w1..w6/:ai;Vd/v1..v8/:dj;仅供学习与交流,如有侵权请联系网站删除谢谢15精品好文档,推荐学习交流links(wh,vd):c,x;endsetsData:ai=60,55,51,43,41,52;dj=35,37,22,32,41,32,43,38;c=6,2,6,7,4,2,5,94,9,5,
3、3,8,5,8,25,2,1,9,7,4,3,37,6,7,3,9,2,7,12,3,9,5,7,2,6,55,5,2,2,8,1,4,3;EnddataMin=@sum(links(i,j):c(i,j)*x(i,j));@for(wh(i):@sum(vd(j):x(i,j))<=ai(i));@for(vd(j):@sum(wh(i):x(i,j))=dj(j));endGlobaloptimalsolutionfound.Objectivevalue:664.0000Totalsolveriterations:0VariableValue
4、ReducedCostAI(W1)60.000000.000000AI(W2)55.000000.000000AI(W3)51.000000.000000AI(W4)43.000000.000000AI(W5)41.000000.000000AI(W6)52.000000.000000DJ(V1)35.000000.000000DJ(V2)37.000000.000000DJ(V3)22.000000.000000DJ(V4)32.000000.000000DJ(V5)41.000000.000000DJ(V6)32.000000.000000D
5、J(V7)43.000000.000000DJ(V8)38.000000.000000C(W1,V1)6.0000000.000000C(W1,V2)2.0000000.000000C(W1,V3)6.0000000.000000C(W1,V4)7.0000000.000000C(W1,V5)4.0000000.000000C(W1,V6)2.0000000.000000C(W1,V7)5.0000000.000000仅供学习与交流,如有侵权请联系网站删除谢谢15精品好文档,推荐学习交流C(W1,V8)9.0000000.000000C(W2,V
6、1)4.0000000.000000C(W2,V2)9.0000000.000000C(W2,V3)5.0000000.000000C(W2,V4)3.0000000.000000C(W2,V5)8.0000000.000000C(W2,V6)5.0000000.000000C(W2,V7)8.0000000.000000C(W2,V8)2.0000000.000000C(W3,V1)5.0000000.000000C(W3,V2)2.0000000.000000C(W3,V3)1.0000000.000000C(W3,V4)9.0000000.
7、000000C(W3,V5)7.0000000.000000C(W3,V6)4.0000000.000000C(W3,V7)3.0000000.000000C(W3,V8)3.0000000.000000C(W4,V1)7.0000000.000000C(W4,V2)6.0000000.000000C(W4,V3)7.0000000.000000C(W4,V4)3.0000000.000000C(W4,V5)9.0000000.000000C(W4,V6)2.0000000.000000C(W4,V7)7.0000000.000000C(W4,V
8、8)1.0000000.000000C(W5,V1)2.0000000.000000C(W5,V2)3.0000000.000000C(