数模论坛

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

[原创]谁是高手谁进来!

[复制链接]
发表于 2005-8-26 05:01:54 | 显示全部楼层 |阅读模式
<>小弟请进来的高手帮忙把下面的程序用MATLAB 或LINDO编出来(请附上结果),小弟刚学数模没几天,还请多多照顾!</P>
<>题目如下:</P>
< ><FONT face="Times New Roman">Max F=0.487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17+0.487x21+ 0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27</FONT></P>
<P ><FONT face="Times New Roman">S.T.</FONT></P>
<P ><FONT face="Times New Roman">x11+x21&lt;=8</FONT></P>
<P ><FONT face="Times New Roman">x12+x22&lt;=7</FONT></P>
<P ><FONT face="Times New Roman">x13+x23&lt;=9</FONT></P>
<P ><FONT face="Times New Roman">x14+x24&lt;=6</FONT></P>
<P ><FONT face="Times New Roman">x15+x25&lt;=6</FONT></P>
<P ><FONT face="Times New Roman">x16+x26&lt;=4</FONT></P>
<P ><FONT face="Times New Roman">x17+x27&lt;=8</FONT></P>
<P ><FONT face="Times New Roman">2x11+3x12+x12+0.5x14+4x15+2x16+x17&lt;=40</FONT></P>
<P ><FONT face="Times New Roman">2x21+3x22+x22+0.5x24+4x25+2x26+x27&lt;=40</FONT></P>
<P ><FONT face="Times New Roman">0.487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17&lt;=10.2</FONT></P>
<P ><FONT face="Times New Roman">0.487x21+0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27&lt;=10.2</FONT></P>
<P ><FONT face="Times New Roman">0.487x15+0.52x16+0.64x17&lt;=3.027</FONT></P>
<P ><FONT face="Times New Roman">0.487x25+0.52x26+0.64x27&lt;=3.027</FONT></P>
<P >x11至x27都为整数</P>
<P > </P>
<P >若能尽快给出结果将感激不尽!</P>
发表于 2005-8-26 05:14:37 | 显示全部楼层
<>LIND</P>
<><FONT face="Times New Roman">max .487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17+0.487x21+ 0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27</FONT></P>
<><FONT face="Times New Roman">st</FONT></P>
<P><FONT face="Times New Roman">x11+x21&lt;=8</FONT></P>
<P><FONT face="Times New Roman">x12+x22&lt;=7</FONT></P>
<P><FONT face="Times New Roman">x13+x23&lt;=9</FONT></P>
<P><FONT face="Times New Roman">x14+x24&lt;=6</FONT></P>
<P><FONT face="Times New Roman">x15+x25&lt;=6</FONT></P>
<P><FONT face="Times New Roman">x16+x26&lt;=4</FONT></P>
<P><FONT face="Times New Roman">x17+x27&lt;=8</FONT></P>
<P><FONT face="Times New Roman">2x11+3x12+x13+0.5x14+4x15+2x16+x17&lt;=40</FONT></P>
<P><FONT face="Times New Roman">2x21+3x22+x23+0.5x24+4x25+2x26+x27&lt;=40</FONT></P>
<P><FONT face="Times New Roman">0.487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17&lt;=10.2</FONT></P>
<P><FONT face="Times New Roman">0.487x21+0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27&lt;=10.2</FONT></P>
<P><FONT face="Times New Roman">0.487x15+0.52x16+0.64x17&lt;=3.027</FONT></P>
<P><FONT face="Times New Roman">0.487x25+0.52x26+0.64x27&lt;=3.027</FONT></P>
<P>end </P>
<P>gin 14</P>
<br>
<P>程序改好了,自己运行去吧,如果是做为整人用的,别在这寻开心!</P>
发表于 2005-8-26 19:13:45 | 显示全部楼层
算出的结果不是整数 怎么办啊?哪个GIN 14 有什么用吗?
 楼主| 发表于 2005-8-29 02:24:47 | 显示全部楼层
<>先谢了,我回去就运行,如果有问题,还请再指导一下!</P>
 楼主| 发表于 2005-9-1 06:12:49 | 显示全部楼层
<>可以运行,但求不出答案?</P>
发表于 2005-9-4 17:21:52 | 显示全部楼层

<>LINGO程序:</P>
<>max=0.487*x11+0.52*x12+0.613*x13+0.72*x14+0.487*x15+0.52*x16+0.64*x17+0.487*x21+ 0.52*x22+0.613*x23+0.72*x24+0.487*x25+0.52*x26+0.64*x27;<BR>x11+x21&lt;=8;</P>
<>x12+x22&lt;=7;</P>
<P>x13+x23&lt;=9;</P>
<P>x14+x24&lt;=6;</P>
<P>x15+x25&lt;=6;</P>
<P>x16+x26&lt;=4;</P>
<P>x17+x27&lt;=8;</P>
<P>2*x11+3*x12+x12+0.5*x14+4*x15+2*x16+x*17&lt;=40;</P>
<P>2*x21+3*x22+x22+0.5*x24+4*x25+2*x26+x27&lt;=40;</P>
<P>0.487*x11+0.52*x12+0.613*x13+0.72*x14+0.487*x15+0.52*x16+0.64*x17&lt;=10.2;</P>
<P>0.487*x21+0.52*x22+0.613*x23+0.72*x24+0.487*x25+0.52*x26+0.64*x27&lt;=10.2;</P>
<P>0.487*x15+0.52*x16+0.64*x17&lt;=3.027;</P>
<P>0.487*x25+0.52*x26+0.64*x27&lt;=3.027;</P>
<P>@gin(x11);<BR>@gin(x12);<BR>@gin(x13);<BR>@gin(x14);<BR>@gin(x15);<BR>@gin(x16);<BR>@gin(x17);<BR>@gin(x21);<BR>@gin(x22);<BR>@gin(x23);<BR>@gin(x24);<BR>@gin(x25);<BR>@gin(x26);<BR>@gin(x27);</P>
<P>结果:20.4<BR>  Global optimal solution found at iteration:        267576<BR>  Objective value:                                 20.40000</P>
<P><BR>                       Variable           Value        Reduced Cost<BR>                            X11        6.000000          -0.4870000<BR>                            X12        2.000000          -0.5200000<BR>                            X13        6.000000          -0.6130000<BR>                            X14        0.000000          -0.7200000<BR>                            X15        0.000000          -0.4870000<BR>                            X16        0.000000          -0.5200000<BR>                            X17        4.000000          -0.6400000<BR>                            X21        2.000000          -0.4870000<BR>                            X22        5.000000          -0.5200000<BR>                            X23        2.000000          -0.6130000<BR>                            X24        5.000000          -0.7200000<BR>                            X25        0.000000          -0.4870000<BR>                            X26        1.000000          -0.5200000<BR>                            X27        2.000000          -0.6400000<BR>                              X        0.000000            0.000000</P>
<P>                            Row    Slack or Surplus      Dual Price<BR>                              1        20.40000            1.000000<BR>                              2        0.000000            0.000000<BR>                              3        0.000000            0.000000<BR>                              4        1.000000            0.000000<BR>                              5        1.000000            0.000000<BR>                              6        6.000000            0.000000<BR>                              7        3.000000            0.000000<BR>                              8        2.000000            0.000000<BR>                              9        20.00000            0.000000<BR>                             10        9.500000            0.000000<BR>                             11        0.000000            0.000000<BR>                             12        0.000000            0.000000<BR>                             13       0.4670000            0.000000<BR>                             14        1.227000            0.000000<BR></P>
发表于 2005-9-4 17:25:21 | 显示全部楼层
但我不是高手,这是低手所做的题目,而且我没有LINDO软件,只有LINGO软件,那个人所说的GIN14其实是这十四个变量,这也看不懂,我为你悲哀啊!
发表于 2005-12-11 03:50:04 | 显示全部楼层
<>各位豪杰,我现在请教几道问题,如果你们谁现在线上,请恢复一下,我想请教一下有关线性规划的问题</P>
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

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

GMT+8, 2024-4-19 19:48 , Processed in 0.059578 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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