数模论坛

 找回密码
 注-册-帐-号
搜索
热搜: 活动 交友 discuz
查看: 1972|回复: 2

帮忙lingo程序

[复制链接]
发表于 2005-9-12 06:44:49 | 显示全部楼层 |阅读模式
<>各位兄弟,小弟有个lingo程序请大家帮忙解一下,我的软件报错</P>
<>Unexpected  fall though newton  loop;contact  lindo systems for  patch  availability</P>
<>model:<BR>title cumcm-2003b-01;<BR>sets:<BR>cai/1..10/:crate,cnum,cy,ck,flag;<BR>xie/1..5/:xsubject,xnum;<BR>link(xie,cai):distance,lsubject,number,che,b;<BR>endsets<BR>data:<BR>crate=30 28 29 32 31 33 32 31 33 31;<BR>xsubject=1.2 1.3 1.3 1.9 1.3;<BR>distance=5.26 5.19 4.21 4.00 2.95 2.74 2.46 1.90 0.64 1.27<BR>         1.90 0.99 1.90 1.13 1.27 2.25 1.48 2.04 3.09 3.51<BR>         5.89 5.61 5.61 4.56 3.51 3.65 2.46 2.46 1.06 0.57<BR>         0.64 1.76 1.27 1.83 2.74 2.60 4.21 3.72 5.05 6.10<BR>         4.42 3.86 3.72 3.16 2.25 2.81 0.78 1.62 1.27 0.50;<BR>cy=1.25 1.10 1.35 1.05 1.15 1.35 1.05 1.15 1.35 1.25;<BR>ck=0.95 1.05 1.00 1.05 1.10 1.25 1.05 1.30 1.35 1.25;<BR>enddata<BR><a href="mailtmin=@sum(cai(i" target="_blank" >min=@sum(cai(i</A>):<BR>         @sum(xie(j):<BR>           number(j,i)*154*distance(j,i)));<BR><a href="mailt!max=@sum(link(i,j):number(i,j" target="_blank" >!max=@sum(link(i,j):number(i,j</A>));<BR>!max=xnum(3)+xnum(4)+xnum(1)+xnum(2)+xnum(5);<BR><a href="mailt!min=@sum(cai(i" target="_blank" >!min=@sum(cai(i</A>):<BR>          @sum(xie(j):<BR>                number(j,i)*154*distance(j,i)));<BR>!xnum(1)+xnum(2)+xnum(5)=340;<BR>!xnum(1)+xnum(2)+xnum(5)=341;<BR>!xnum(3)=160;<BR>!xnum(4)=160;<BR>!卡车每一条线路上最多可以运行的次数;<BR>@for(link(i,j):<BR>    b(i,j)=@floor((8*60-(@floor((distance(i,j)/28*60*2+3+5)/5)-1)*5)/(distance(i,j)/28*60*2+3+5)));<BR>!b(i,j)=@floor(8*60/(distance(i,j)/28*60*2+3+5));<BR>!t(i,j)=@floor((distance(i,j)/28*60*2+3+5)/5);<BR>!b(i,j)=@floor((8*60-(@floor((distance(i,j)/28*60*2+3+5)/5)-1)*5)/(distance(i,j)/28*60*2+3+5)));<BR>!每一条线路上最大车次的计算;<BR>@for(link(i,j):<BR>      lsubject(i,j)=(@floor((distance(i,j)/28*60*2+3+5)/5))*b(i,j));<BR>!计算各个铲位的总产量;<BR>@for(cai(j):<BR>     cnum(j)=@sum(xie(i):number(i,j)));<BR>!计算各个卸点的总产量;<BR>@for(xie(i):<BR>     xnum(i)=@sum(cai(j):number(i,j)));<BR>!道路能力的约束;<BR>@for(link(i,j):<BR>     number(i,j)&lt;=lsubject(i,j));<BR>!电铲能力的约束;<BR>@for(cai(j):<BR>     cnum(j)&lt;=flag(j)*8*60/5);<BR>!电铲数量约;<BR>@sum(cai(j):flag(j))&lt;=7;<BR>!卸点能力约束;<BR>@for(xie(i):<BR>    xnum(i)&lt;=8*20);<BR>!铲位产量约束;<BR>@for(cai(i):number(1,i)+number(2,i)+number(5,i)&lt;=ck(i)*10000/154);<BR>@for(cai(i):number(3,i)+number(4,i)&lt;=cy(i)*10000/154);<BR>!产量任务约束;<BR>@for(xie(i):<BR>     xnum(i)&gt;=xsubject(i)*10000/154);<BR>!铁含量约束;<BR>@sum(cai(j):<BR>    number(1,j)*(crate(j)-30.5))&lt;=0;<BR>@sum(cai(j):<BR>    number(2,j)*(crate(j)-30.5))&lt;=0;<BR>@sum(cai(j):<BR>    number(5,j)*(crate(j)-30.5))&lt;=0;<BR>@sum(cai(j):<BR>    number(1,j)*(crate(j)-28.5))&gt;=0;<BR>@sum(cai(j):<BR>     number(2,j)*(crate(j)-28.5))&gt;=0;<BR>@sum(cai(j):<BR>     number(5,j)*(crate(j)-28.5))&gt;=0;<BR>!关于车辆的具体分配;<BR>@for(link(i,j):<BR>     che(i,j)=number(i,j)/b(i,j));<BR>!各个路线所需卡车数简单加和;<BR><a href="mailthehe=@sum(link(i,j):che(i,j" target="_blank" >hehe=@sum(link(i,j):che(i,j</A>));<BR>!整数约束;<BR>@for(link(i,j)gin(number(i,j)));<BR>@for(cai(j)bin(flag(j)));<BR>!车辆能力约束;<BR>hehe&lt;=20;<BR><a href="mailtccnum=@sum(cai(j):cnum(j" target="_blank" >ccnum=@sum(cai(j):cnum(j</A>));<BR>end<BR></P>
发表于 2005-9-12 18:52:08 | 显示全部楼层
<>没有错!</P>
<>我的可以运行出结果</P>
<>Global optimal solution found at iteration:          1147<BR>  Objective value:                                 85628.62</P>
<P><BR><BR> </P>
发表于 2005-9-14 05:14:42 | 显示全部楼层
软件问题,程序不错
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

小黑屋|手机版|Archiver|数学建模网 ( 湘ICP备11011602号 )

GMT+8, 2024-11-29 12:35 , Processed in 0.054517 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表