I am currently trying to solve a problem where I need to minimise transport cost through the choice of vehicle (and how many of each choice) subject to a given demand.
The problem:
There are currently 3 vehicle sizes corresponding to their haulage capacity, an associated daily cost, and a daily demand.
I need an objective function that minimises the cost through the choice of vehicle whilst satisfying the sales demand, however, I do not know how to define an expression that is based on the number of vehicles used * the cost per day, as it depends on the weight.
Data:
# Vehicle capacity
truck_capacity_dict = {
'7.5T': {'capacity': 7500},
'12T': {'capacity': 12000},
'44T': {'capacity': 44000}
}
# Vehicle daily costs
truck_capacity_dict = {
'7.5T': {'rate': 350},
'12T': {'rate': 660},
'44T': {'rate': 2000}
}
# Daily demand
sales_demand_tonnes = {
'2020-01-01': 300,
'2020-01-02': 293,
'2020-01-03': 176
}
Mathematically, this is similar to the below expression where the OF is to minimise the costs based on the choice of vehicle:
$$\min \sum V_{t, v} \cdot C_{t, v} \forall t \subset T, v \subset V$$
However, I do not know how to formulate an expression in python that determines how many vehicles are chosen, as this depends on the weight.