设变量: Xij = 1,如果机器人 i 用于出货处 j 运输 Xij = 0,否则 Minimize: 4X11 + 4X12 + 7X13 + 6X21 + 5X22 + 3X23 + 2X31 + 3X32 + 2X33 + 6X41 + 5X42 + 5X43 + 3X51 + 4X52 + 5X53 Subject to: X11 + X12 + X13 <= 50 (机器人 1 运输量限制) X21 + X22 + X23 <= 48 (机器人 2 运输量限制) X31 + X32 + X33 <= 49 (机器人 3 运输量限制) X41 + X42 + X43 <= 46 (机器人 4 运输量限制) X51 + X52 + X53 <= 50 (机器人 5 运输量限制) X11 + X21 + X31 + X41 + X51 >= 2 (出厂检修限制) X12 + X22 + X32 + X42 + X52 >= 2 (出厂检修限制) Xij >= 0 (非负限制) Subject to: X11 + X12 + X13 >= 35 (出货处 1 运输量要求) X21 + X22 + X23 >= 50 (出货处 2 运输量要求) X31 + X32 + X33 >= 40 (出货处 3 运输量要求)用lingo写出
时间: 2023-09-04 17:08:42 浏览: 88
以下是用Lingo语言编写的线性规划模型:
```lingo
MIN = 4*X11 + 4*X12 + 7*X13 + 6*X21 + 5*X22 + 3*X23 + 2*X31 + 3*X32 + 2*X33 + 6*X41 + 5*X42 + 5*X43 + 3*X51 + 4*X52 + 5*X53
STORAGE1: X11 + X12 + X13 <= 50
STORAGE2: X21 + X22 + X23 <= 48
STORAGE3: X31 + X32 + X33 <= 49
STORAGE4: X41 + X42 + X43 <= 46
STORAGE5: X51 + X52 + X53 <= 50
MAINTENANCE1: X11 + X21 + X31 + X41 + X51 >= 2
MAINTENANCE2: X12 + X22 + X32 + X42 + X52 >= 2
NON_NEGATIVE: X11 >= 0, X12 >= 0, X13 >= 0, X21 >= 0, X22 >= 0, X23 >= 0, X31 >= 0, X32 >= 0, X33 >= 0, X41 >= 0, X42 >= 0, X43 >= 0, X51 >= 0, X52 >= 0, X53 >= 0
SHIPMENT1: X11 + X21 + X31 + X41 + X51 >= 35
SHIPMENT2: X12 + X22 + X32 + X42 + X52 >= 50
SHIPMENT3: X13 + X23 + X33 + X43 + X53 >= 40
```
其中,变量Xij表示机器人i用于出货处j运输的量;目标函数是最小化总运输成本;STORAGEi是表示机器人i的运输量不超过限制;MAINTENANCEi是出厂检修的限制;NON_NEGATIVE是非负限制;SHIPMENTi是运输量要求的限制。
此模型可以在Lingo求解器中求解,得到最优解。
阅读全文