lingo 代码Variables:x1~the number of acres of cornx2~the numbe

lingo 代码
Variables:x1~the number of acres of corn
x2~the number of acres of tomatoes
x3~the number of acres of beans
x4~the number of acres of peas
x5~the number of acres of carrots
x6~the number of acres of unused land
x7~the number of borrowed amount
1 xi>0
yi=
0 xi=0
Maximize:95x1+1300x2+275x3+345x4+435x5-3000-x7-0.03x7
Subject to
20x1+200x2+55x3+40x4+75x5+(5x1+120x2+25x3+35x4+40x5)7.25+9x6=3000+x7
5x1+120x2+25x3+35x4+40x5+2x6≤1800
x1+x2+x3+x4+x5+x6=100
x7≤12000
xi25yi
xi≥0 and integral for i=1,…,7
0≤yi≤1 and integral
以上是条件限制,求好心大神转换成lingo代码.
bbzh0616 1年前 已收到1个回答 举报

端迎 幼苗

共回答了18个问题采纳率:83.3% 举报

max=95*x1+1300*x2+275*x3+345*x4+435*x5-3000-x7-0.03*x7;
20*x1+200*x2+55*x3+40*x4+75*x5+(5*x1+120*x2+25*x3+35*x4+40*x5)*7.25+9*x6=3000+x7;
5*x1+120*x2+25*x3+35*x4+40*x5+2*x6=25*y2;x3>=25*y3;x4>=25*y4;x5>=25*y5;x6>=25*y6;x7>=25*y7;
@gin(x1);@bin(y1);
@gin(x2);@bin(y2);
@gin(x3);@bin(y3);
@gin(x4);@bin(y4);
@gin(x5);@bin(y5);
@gin(x6);@bin(y6);
@gin(x7);@bin(y7);

1年前 追问

3

bbzh0616 举报

sorry 我少给了一个条件 要所有的y加起来大于2
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 17 q. 1.640 s. - webmaster@yulucn.com