Question: Could you please write a Python code using only the Gurobipy package? 1. Consider the transportation model in which we want to meet the demand

Could you please write a Python code using only the Gurobipy package?

 Could you please write a Python code using only the Gurobipy

1. Consider the transportation model in which we want to meet the demand of destinations using the supply capacity of sources with minimal total cost of direct shipments. minz=i=1mj=1ncijxijs.t.j=1nxijsi,i=1,,mi=1mxijdj,j=1,,nxij0i=1,,m,j=1,,n Here: - m is the number of sources, - n is the number of destinations, - i is the source index (i=1,,m), - j is the destination index (j=1,,n), - cij is the unit transportation cost from source i to destination j, - si is the supply capacity of source i that can not be exceeded, - dj is the demand amount of destination j that should be met, - xij is the shipment size from source i to destination j. In order to have a feasible solution to the problem, we assume that: i=1msij=1ndj the total supply capacity of sources is no less than the total demand amount of destinations. We consider a problem where m=20 and n=80. In "unit_transportation_costs.csv" file, we have the cost of shipping a single unit of good from each source to each destination as an mn matrix. In "supply_capacities.csv" file, we have the supply capacity of each source as a row vector of size m. In "destination_demands.csv" file, we have the demand amount of each destination as a row vector of size n. Read these parameters from aforementioned data files and use GurobiPy package to solve this problem. Your program should print first the optimal shipment sizes from sources to destinations, and then, the minimal total cost of transportation

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 General Management Questions!