早教吧 育儿知识 作业答案 考试题库 百科 知识分享

这段lindo的代码有什么问题么~min=100X1+100X2+40Y1+40Y2+40Y3+40Y4+40Y5STX1+X2+Y1>=4X1+X2+Y1+Y2>=3X1+X2+Y1+Y2+Y3>=4X2+Y1+Y2+Y3+Y4>=6X1+Y2+Y3+Y4+Y5>=5X1+X2+Y3+Y4+Y5>=6X1+X2+Y4+Y5>=8X1+X2+Y5>=8Y1+Y2+Y3+Y4+Y5=0@gin(x1)@gin(x2)@gin(y1)@gin(y2)@

题目详情
这段lindo的代码有什么问题么~
min = 100X1+100X2+40Y1+40Y2+40Y3+40Y4+40Y5
ST
X1+X2+Y1>=4
X1+X2+Y1+Y2>=3
X1+X2+Y1+Y2+Y3>=4
X2+Y1+Y2+Y3+Y4>=6
X1+Y2+Y3+Y4+Y5>=5
X1+X2+Y3+Y4+Y5>=6
X1+X2+Y4+Y5>=8
X1+X2+Y5>=8
Y1+Y2+Y3+Y4+Y5=0
@gin(x1)
@gin(x2)
@gin(y1)
@gin(y2)
@gin(y3)
@gin(y4)
@gin(y5)
end
▼优质解答
答案和解析
修改如下:
min 100X1+100X2+40Y1+40Y2+40Y3+40Y4+40Y5
ST
X1+X2+Y1>=4
X1+X2+Y1+Y2>=3
X1+X2+Y1+Y2+Y3>=4
X2+Y1+Y2+Y3+Y4>=6
X1+Y2+Y3+Y4+Y5>=5
X1+X2+Y3+Y4+Y5>=6
X1+X2+Y4+Y5>=8
X1+X2+Y5>=8
Y1+Y2+Y3+Y4+Y5=0
end
gin 7