# Question 1: You are in charge of loading Cargo ships in Newcastle port. An agricultural commodities dealer wants to transport the following products aboard a ship: Commodity Amount available Volume...

Question 1:

You are in charge of loading Cargo ships in Newcastle port. An agricultural commodities dealer wants to transport the following products aboard a ship:

Commodity Amount available Volume per ton Profits per ton (\$)

(tons) (cubic feet)

1 48 4 7

2 30 2.5 5

3 15 3 6

4 18 4.5 8

You can select to load any and/or all of the available commodities. However, the ship has three cargo holds with the following capacity restrictions:

Cargo hold Weigh capacity (tons) Volume capacity

(cubic feet)

Forward 32 180

Center 58 210

Rear 40 160

Only one type of commodity can be placed in any cargo hold (note that you can load the same commodity in different cargos). However, because of balance considerations, the weight in the forward cargo hold must be within 10% of the weight in the rear cargo hold (this means that if the weight in the rear cargo is 10 tons, then that of the front cargo has to be between 9 and 11 tons). In addition, the center cargo hold must be between 40% and 60% of the total weight on board.

Formulate an ILP model for the problem and solve it using Python.

## Answer To: Question 1: You are in charge of loading Cargo ships in Newcastle port. An agricultural commodities...

David answered on Nov 30 2019
# Problem 3
import numpy as np
min = np.inf
for X11 in range(450+1):
for X12 in range(450+1):
for X13 in range(450+1):
for X21 in range(350+1):
for X22 in range(350+1):
for X23 in range(350+1):
for X31 in range(250+1):
for X32 in range(250+1):
for X33...
SOLUTION.PDF