Un problema multi impianto Un’azienda dispone di due fabbriche A e B. Ciascuna fabbrica produce due prodotti: standard e deluxe Ogni unità di prodotto da luogo ad un profitto unitario riportato in tabella standard deluxe profitto unitario 10 15 Ogni fabbrica, A e B, gestisce due processi produttivi: smerigliatura (grinding) e lucidatura (polishing) Un problema multi impianto I tempi di smerigliatura e lucidatura (espressi in ore per unitá di ogni tipo di prodotto) nelle due fabbriche sono diversi e riportati in tabella smerigliatura lucidatura factory A standard deluxe 4 2 2 5 factory B standard deluxe 5 5 3 6 La fabbrica A ha macchinari per la smerigliatura con capacità di 80 ore settimanali e per la lucidatura con capacità di 60 ore settimanali La fabbrica B ha macchinari per la smerigliatura con capacità di 60 ore settimanali e per la lucidatura con capacità di 75 ore settimanali Un problema multi impianto Disponibilitá di materiale grezzo Ogni prodotto (standard o deluxe) richiede 4 kg di materiale grezzo L’azienda dispone di 120 kg di materiale grezzo a settimana Determinare il livello di produzione ottimo (ovvero che massimizza il profitto) Un problema multi impianto Disponibilitá di materiale grezzo A possible scenario 75 Kg sono assegnati alla Fabbrica A 120 kg. 45 Kg sono assegnati alla Fabbrica B Fabbrica A Dunque abbiamo due modelli matematici Fabbrica B Modello Matematico per la fabbrica A Le variabili di decisione per la fabbrica A sono le quantità di ciascun tipo di prodotti standard = x1, deluxe = x2 x1 , x2 >= 0 La funzione obiettivo è il profitto che deve essere massimizzato (max) max 10 x1 + 15 x2 Profitto di un’unità di prodotto standard Vincoli: Profitto di un’unità di prodotto deluxe Disponibilità di materiale grezzo 4 x1 + 4 x2 <= 75 Kg of raw material for unit of standard product Kg of raw material for unit of deluxe product Modello Matematico per la fabbrica A (2) Ulteriori vincoli: Vincoli di processo Grinding process 4 x1 + 2 x2 <= 80 Polishing process 2 x1 + 5 x2 <= 60 max 10 x1 + 15 x2 4 x1 + 4 x2 <= 75 4 x1 + 2 x2 <= 80 2 x1 + 5 x2 <= 60 x1 , x2 >= 0 Modello completo per la fabbrica A Soluzione geometrica: insieme amissibile Grafico l’insieme F delle possibile soluzioni ammissibili x2 45 40 I punti non negativi indicati con costituiscono la regione ammissibile 40 35 The constraint 4 x1 + 2 x2 = 80 does not play any role in defining the feasible region: removing it does not change F 30 25 20 15 10 5 5 10 15 20 25 30 35 40 40 45 x1 Bad use of resources ! Soluzione geometrica: profitto Fabbrica A In the plane (x1, x2 ), draw the equation of the profit PTOT for increasing values =0 x2 45 40 PTOT = 10 x1 + 15 x2 =150 40 35 They are parallel lines =300 30 Find the value of PTOT such that the corresponding line “touch” the points 25 20 15 10 PTOT =300 does not touch any point in F 5 5 10 15 20 25 30 35 40 40 45 x1 Soluzione geometrica: In the plane (x1, x2 ), draw the parallel lines to the equation PTOT = 10 x1 + 15 x2 =0 until the last point is found that “touches” the feasible region x2 45 40 40 35 Optimal solution 2 x1 + 5 x2 = 60 Ore lavoro 4 x1 + 4 x2 = 75 materiale 30 25 11.25 7.5 20 15 10 5 5 10 15 20 25 30 35 40 40 45 x1 PTOT = 10 x1 + 15 x2 = 112.5 + 112.5 = 225 Foglio Excel per analisi di scenario fabbrica A A 2 3 4 5 6 7 8 9 10 11 12 13 B unit profit raw material grinding polishing production PROFIT raw constraint grinding constraint polishing constraint C D E factory A standard deluxe 10 15 4 4 4 2 2 5 10 250 80 60 70 data Decision variables = level of production x1=C9, x2 =D9 10 Profit = C4*C9+D4*D9 75 raw availability 80 max grinding 60 max polishing Raw constraint = C5*C9+D5*D9 Grinding constraint = C6*C9+D6*D9 Polishing constraint = C7*C9+D7*D9 Using the Solver Objective function = profit Decision variables constraints Modello Matematico per la fabbrica B The two type of products are the decision variables for FACTORY B standard = x3, deluxe = x4 x3 , x4 >= 0 Objective function is the profit to be maximize max 10 x3 + 15 x4 Constraints: Availability of raw material 4 x3 + 4 x4 <= 45 Modello Matematico per la fabbrica B (2) Constraints: Technological constraints Grinding process 5 x3 + 3 x4 <= 60 Polishing process 5 x3 + 6 x4 <= 75 max 10 x3 + 15 x3 4 x3 + 4 x3 <= 45 5 x3 + 3 x4 <= 60 5 x3 + 6 x4 <= 75 x3 , x3 >= 0 Overall model for factory B Soluzione geometrica: insieme amissibile Let draw the set F of the feasible solutions for factory B In the plane (x3, x4 ), draw the equations of the constraints x4 All non negative points constitutes the 50 Feasible region 40 30 20 15 Two constraints 5 x3 + 6 x4 = 75 and 5 x3 + 3 x4 = 60 do not play any role in defining the feasible region: removing them does not change F 10 5 Bad use of resources ! 5 10 15 20 30 40 50 x3 Soluzione geometrica In the plane (x3, x4 ), draw the parallel equations of the profit PTOT for increasing values =0 x4 PTOT = 10 x3 + 15 x4 50 =100 40 Find the value of PTOT such that the corresponding line “touch” the points 30 11.25 Optimal solution = 0 20 15 10 x3 = 0 Raw 4 x3 + 4 x4 = 45 material 5 5 10 20 30 40 50 x3 PTOT = 112.5 Foglio Excel per analisi di scenario fabbrica B A 2 3 4 5 6 7 8 9 10 11 12 13 B unit profit raw material grinding polishing production PROFIT raw constraint grinding constraint polishing constraint C D E factory B standard deluxe 10 15 4 4 5 3 5 6 0 168,75 45 33,75 67,5 11,25 Raw constraint = C5*C9+D5*D9 Decision variables = level of production data x3=C9, x4 =D9 Profit = C4*C9+D4*D9 45 raw availability 60 max grinding 75 max polishing Note: the excel formulae are the same for factory A Grinding constraint = C6*C9+D6*D9 and B. The model is Polishing constraint = C7*C9+D7*D9 independent from data Uno sguardo “globale” sull’azienda in questo scenario production PROFIT COMPANY standard deluxe 11,25 18,75 393,75 Overall production = sum of the production of factory A and factory B Profit of the company = sum of the profits of factory A and factory B This solution has been obtained with arbitrary allocation of resources Changing the scenario The solution has been obtained with arbitrary allocation of raw material, we can see what happens when allocation change Total raw material Factory A is allocated 90 Kg 120 kg. Factory B is allocated 30 Kg Changing the scenario: geometric view x2 50 45 40 x4 50 Factory A 40 30 30 20 15 10 5 20 15 Factory B 5 5 10 1520 30 40 50 x1 x2 20 15 10 5 5 10 1520 30 40 50 x3 x4 new optimum for A 17.5 5 5 10 1520 x1 PTOT = 250 20 15 10 5 new optimum for B 0 7 .5 5 10 1520 x3 P = 112.5 TOT Changing the scenario: excel view unit profit raw material grinding polishing factory A standard deluxe 10 15 4 4 4 2 2 5 production PROFIT raw constraint grinding constraint polishing constraint 17,5 250 90 80 60 Factory B Profit is lower than the preceding scenario Factory A Profit is higher than the preceding scenario 5 90 raw availability 80 max grinding 60 max polishing unit profit raw material grinding polishing production PROFIT raw constraint grinding constraint polishing constraint factory B standard deluxe 10 15 4 4 5 3 5 6 0 112,5 30 22,5 45 7,5 30 raw availability 60 max grinding 75 max polishing Look at the company in the new scenario production PROFIT COMPANY standard deluxe 17,5 12,5 362,5 Overall production = sum of the production of factory A and factory B Profit of the company = sum of the profits of factory A and factory B This solution is worst than the preceding one Mathematical model for the company The two type of products produced in FACTORY A and B are the decision variables standard in factory A= x1, deluxe in factory A = x2 standard in factory B= x3, deluxe in factory B= x4 x1 , x2 , x3 , x4 >= 0 Objective function is the overall profit to be maximize max 10 x1 + 15 x2 + 10 x3 + 15 x4 Mathematical model for the company (2) Constraints: Technological constraints 4 x1 + 2 x2 <= 80 Factory A 5 x3 + 3 x4 <= 60 Factory B Polishing process 2 x1 + 5 x2 <= 60 Factory A 5 x3 + 6 x4 <= 75 Factory B Grinding process Constraints: Availability of raw material 4 x1 + 4 x2 + 4 x3 + 4 x4 <= 120 Common constraint Mathematical model for the company max 10 x1 + 15 x2 + 10 x3 + 15 x4 4 x1 + 2 x2 <= 80 5 x3 + 3 x 4 2 x1 + 5 x2 <= 60 <= 60 5 x3 + 6 x 4 4 x1 + 4 x2 + 4 x3 + 4 x4 <= 75 <= 120 x1 , x2 , x3 , x4 >= 0 More than two variables: we can solve it with the Solver Excel table for the company A B C 2 COMPANY 3 standard 4 unit profit 10 5 raw material 4 6 factory B 7 grinding 5 8 polishing 5 9 standard 10 company production 0 11 COMPANY PROFIT 418,75 12 factory B 13 grinding constraint 33,75 14 polishing constraint 67,5 15 16 raw constraint 125 D E F deluxe 15 4 data for the company factory A 3 4 6 2 deluxe standard deluxe 11,25 10 max grinding max polishing 2 data for the factories 5 10 factory A 60 grinding constraint 75 polishing constraint 60 max grinding 80 70 max polishing 60 120 raw availability Decision variables = level of production x1=C10, x2 =D10, x3=E10, x4 =F10 Profit = C4*(C10+E10)+D4*(D10+F10) Raw constraint = C5*(C10+ E10 )+D5*(D10+F10) Setting the solver Optimal solution for the company A B 2 3 4 unit profit 5 raw material 6 7 grinding 8 polishing 9 10 company production 11 COMPANY PROFIT 12 13 grinding constraint 14 polishing constraint 15 16 raw constraint C COMPANY standard 10 4 factory B 5 5 standard 0 404,16667 factory B 37,5 75 120 D E F deluxe 15 4 deluxe data for the company factory A 3 4 2 data for the factories 6 2 5 standard deluxe 12,5 9,166667 8,333333333 max grinding max polishing factory A 60 grinding constraint 53 max grinding 80 75 polishing constraint 60 max polishing 60 120 raw availability Optimal production: deluxe = 20.8, standard = 9.17 Profit = 404.16 Better than 393.75 obtained with the arbitrary allocation