IniziaInizia gratis

Solving the model case study exercise

Continue the case study of the Capacitated Plant Location model of a car manufacture. The PuLP model has been completed and solved for you. It is stored in the variable model.

The decision variables x and y respectively represent the production quantities of the different regions, and if a production plant is opened. Additionally, two python lists loc and size have also been created, containing the different locations, and the two types of plant capacities. Finally, the input data for the model has been printed to the console for reference.

Questo esercizio fa parte del corso

Supply Chain Analytics in Python

Visualizza il corso

Istruzioni dell'esercizio

  • Print the values of how much is produced and shipped from one region to another.
  • Next, print the status value of the different regional plants of low and high capacity.
  • Finally, print the objective value.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Print the Production Quantities
o = [{'prod':'{} to {}'.format(i,j), 'quantity':x[(i,j)].____} 
     for i in ____ for j in ____]
print(pd.DataFrame(o))

# Print the Plant Values of the different regions
o = [{'lowCap':y[(i,size[0])].____, 'highCap':y[(i,size[1])].____}
     for i in ____]
print(pd.DataFrame(o, index=loc))

# Print the Objective Value
print('Objective = ', ____)
Modifica ed esegui il codice