Question: code this optmisation problem Each processing facility has maximum daily capacity ( litres ) but also requires a minimum amount of processing ( litres )

code this optmisation problem
Each processing facility has maximum daily capacity (litres) but also requires a minimum amount of processing (litres) to keep it running, as shown in the file.
We want to optimise the use of our tanker trucks to collect milk from the farms and transport it to the processing facilities. The travel costs are $2 per km empty and $3 per km with milk on board, so that a round-trip costs $5 times the one-way distance. You can assume that trucks average 60 km/h so that the round-trip travel times are 2 times the one-way distance.
We want to assign each farm to one processing facility so that all supply in processed each day. Please provide us with the minimum total cost of collections.
We have realised that we need to plan the scheduling of specific vehicles since a tanker can only be used for at most 10 hours per day.
Each processing facility can have a fleet of up to 5 tankers. Due to shared maintenance costs, the first tanker at a facility costs $500 per day to run while the second costs $470, the third costs $440, and so on. Based on this, please provide us with the minimum total cost of collections.
the code provided
from gurobipy import *
##Sets
Farms =['Cowbell', 'Creamy Acres', 'Milky Way', 'Happy Cows', 'Udder Delight', 'Fresh Pail', 'Cowabunga', 'Utopia', 'Moo Meadows', 'Bluebell', 'Harmony', 'Velvet Valley', 'Moonybrook', 'Cloven Hills', 'Midnight Moo', 'Willows Bend', 'Moosa Heads', 'Dreamy Dairies', 'Happy Hooves', 'Highlands']
n_farms = len(Farms)
##Data
Supply =[9100,6100,6500,9400,6800,6900,4300,3000,5000,4700,3600,3000,3700,3300,3300,3200,4700,3400,4000,3400]
Distance =[
[37,91,99],
[26,86,98],
[22,83,101],
[54,85,85],
[35,69,76],
[71,91,67],
[34,51,56],
[52,67,50],
[51,63,42],
[28,49,103],
[27,36,85],
[80,95,50],
[87,99,39],
[83,92,29],
[102,113,39],
[61,24,61],
[70,64,21],
[88,45,43],
[99,75,23],
[93,33,70]
]
PMin =[19000,25000,19000]
PMax =[35000,43000,43000]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!