我试图解决温斯顿问题的交通问题。问题如下:
Huntco在五种不同的植物上生产番茄酱。容量 每种植物的(以吨计)在表40中给出。番茄酱是 存放在三个仓库中的一个。柏林成本(数百 在每个工厂生产番茄酱并运送到 每个仓库在表41中给出.Huntco有四个客户。该 从每个仓库向每个客户运送大量酱油的成本 如表42所示。每个客户必须交付金额 (以吨计)表43中给出的酱油。
TAB L E 41
To
From Warehouse 1 Warehouse 2 Warehouse 3
Plant 1 8 10 12
Plant 2 7 5 7
Plant 3 8 6 5
Plant 4 5 6 7
Plant 5 7 6 5
TAB L E 42
To
From Customer 1 Customer 2 Customer 3 Customer 4
Warehouse 1 40 80 90 50
Warehouse 2 70 70 60 80
Warehouse 3 80 30 50 60
TAB L E 43
Customer 1 2 3 4
Demand 200 300 150 250
我的求解器解决方案
Objective function:Min total annual cost
Decision variable:
Changing cells in solver: There are four sets of changing cells – two sets for amounts to ship and two sets of binary variables for which plants and warehouses
as use variable
Constrains:
Plant upper bounds: The constraint ShippedOut1<=UpBounds1 gives the 1st inequality.
Warehouse upper bounds: The constraint ShippedOut2_Col<=UpBounds2 operationalizes the 2nd inequality.
Warehouse balance: The constraint ShippedIn1=ShippedOut2_ (shipped 1 =shipped 2)
Demand constraints: The constraint ShippedIn2>=Demands ensures that each customer received the required amount.
使用植物和使用船只都是二元变量
当我在求解器中进行表达和运行时,它会不断给出多个解决方案并且它会被卡住。怎么在求解器中做到?