全部版块 我的主页
论坛 新商科论坛 四区(原工商管理论坛) 商学院 运营管理(物流与供应链管理)
1474 2
2017-12-21
新手  遇到点麻烦,望大神帮忙 看一下,谢谢
附件列表

Untitled_11.txt

大小:1.11 KB

 马上下载

求大神帮忙看一下

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2017-12-21 19:43:15
原书上的代码:
$Title The Transportation Problem of Linear Programming

Sets
    i canning plants /Seattle,SanDiego/
    j markets /NewYork,Chicago,Detroit/;

Parameters
    a(i) capacity of plant i in cases
         /Seattle 350
         SanDiego 600/
    b(j) demand at market j in cases
         /NewYork 325
          Chicago 300
          Detroit 275/;
Table d(i,j) distance in thousands of miles
                     NewYork    Chicago    Detroit
          Seattle     2.5          1.7        1.8
          SanDiego    2.5          1.8        1.4

Scalar f in dollars per thousand miles /90/;

Parameter c(i,j) transpor cost in 1000s of dollars per cases;
          c(i,j) = f*d(i,j)/1000;

Variables
         x(i,j) shipment quantities in cases
         z total transportation costs in 1000s of dollars;

Positive Variable x;

Equation
         cost define objective function
         supply(i) observe supply limit at plant i
         demand(j) satisly demand at market j;
cost.. z =e= sum((i,j),c(i,j)*x(i,j));
supply(i)..   sum(j,x(i,j)) =l= a(i);
demand(j)..  sum(i,x(i,j)) =g= b(j);

Model transport /all/;
solve transport using lp minimizing z;
display x.l,x.m;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2017-12-21 22:41:17
谢谢啦!!我最后一个求和公式里面错了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群