[原创]谁是高手谁进来!
<P>小弟请进来的高手帮忙把下面的程序用MATLAB 或LINDO编出来(请附上结果),小弟刚学数模没几天,还请多多照顾!</P><P>题目如下:</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<=8</FONT></P>
<P ><FONT face="Times New Roman">x12+x22<=7</FONT></P>
<P ><FONT face="Times New Roman">x13+x23<=9</FONT></P>
<P ><FONT face="Times New Roman">x14+x24<=6</FONT></P>
<P ><FONT face="Times New Roman">x15+x25<=6</FONT></P>
<P ><FONT face="Times New Roman">x16+x26<=4</FONT></P>
<P ><FONT face="Times New Roman">x17+x27<=8</FONT></P>
<P ><FONT face="Times New Roman">2x11+3x12+x12+0.5x14+4x15+2x16+x17<=40</FONT></P>
<P ><FONT face="Times New Roman">2x21+3x22+x22+0.5x24+4x25+2x26+x27<=40</FONT></P>
<P ><FONT face="Times New Roman">0.487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17<=10.2</FONT></P>
<P ><FONT face="Times New Roman">0.487x21+0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27<=10.2</FONT></P>
<P ><FONT face="Times New Roman">0.487x15+0.52x16+0.64x17<=3.027</FONT></P>
<P ><FONT face="Times New Roman">0.487x25+0.52x26+0.64x27<=3.027</FONT></P>
<P >x11至x27都为整数</P>
<P > </P>
<P >若能尽快给出结果将感激不尽!</P> <P>LIND</P>
<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>
<P><FONT face="Times New Roman">st</FONT></P>
<P><FONT face="Times New Roman">x11+x21<=8</FONT></P>
<P><FONT face="Times New Roman">x12+x22<=7</FONT></P>
<P><FONT face="Times New Roman">x13+x23<=9</FONT></P>
<P><FONT face="Times New Roman">x14+x24<=6</FONT></P>
<P><FONT face="Times New Roman">x15+x25<=6</FONT></P>
<P><FONT face="Times New Roman">x16+x26<=4</FONT></P>
<P><FONT face="Times New Roman">x17+x27<=8</FONT></P>
<P><FONT face="Times New Roman">2x11+3x12+x13+0.5x14+4x15+2x16+x17<=40</FONT></P>
<P><FONT face="Times New Roman">2x21+3x22+x23+0.5x24+4x25+2x26+x27<=40</FONT></P>
<P><FONT face="Times New Roman">0.487x11+0.52x12+0.613x13+0.72x14+0.487x15+0.52x16+0.64x17<=10.2</FONT></P>
<P><FONT face="Times New Roman">0.487x21+0.52x22+0.613x23+0.72x24+0.487x25+0.52x26+0.64x27<=10.2</FONT></P>
<P><FONT face="Times New Roman">0.487x15+0.52x16+0.64x17<=3.027</FONT></P>
<P><FONT face="Times New Roman">0.487x25+0.52x26+0.64x27<=3.027</FONT></P>
<P>end </P>
<P>gin 14</P>
<br>
<P>程序改好了,自己运行去吧,如果是做为整人用的,别在这寻开心!</P>
算出的结果不是整数 怎么办啊?哪个GIN 14 有什么用吗? <P>先谢了,我回去就运行,如果有问题,还请再指导一下!</P> <P>可以运行,但求不出答案?</P>
<P>LINGO程序:</P>
<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<=8;</P>
<P>x12+x22<=7;</P>
<P>x13+x23<=9;</P>
<P>x14+x24<=6;</P>
<P>x15+x25<=6;</P>
<P>x16+x26<=4;</P>
<P>x17+x27<=8;</P>
<P>2*x11+3*x12+x12+0.5*x14+4*x15+2*x16+x*17<=40;</P>
<P>2*x21+3*x22+x22+0.5*x24+4*x25+2*x26+x27<=40;</P>
<P>0.487*x11+0.52*x12+0.613*x13+0.72*x14+0.487*x15+0.52*x16+0.64*x17<=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<=10.2;</P>
<P>0.487*x15+0.52*x16+0.64*x17<=3.027;</P>
<P>0.487*x25+0.52*x26+0.64*x27<=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> 但我不是高手,这是低手所做的题目,而且我没有LINDO软件,只有LINGO软件,那个人所说的GIN14其实是这十四个变量,这也看不懂,我为你悲哀啊! <P>各位豪杰,我现在请教几道问题,如果你们谁现在线上,请恢复一下,我想请教一下有关线性规划的问题</P>
页:
[1]