# Corso MAE Metodi Quantitativi per il Management Quantitative methods for Management Roma, 18 settembre - 24 ottobre 2003 Prof. Gianni Di Pillo Prof. Laura.

## Presentation on theme: "Corso MAE Metodi Quantitativi per il Management Quantitative methods for Management Roma, 18 settembre - 24 ottobre 2003 Prof. Gianni Di Pillo Prof. Laura."— Presentation transcript:

Corso MAE Metodi Quantitativi per il Management Quantitative methods for Management Roma, 18 settembre - 24 ottobre 2003 Prof. Gianni Di Pillo Prof. Laura Palagi Dipartimento di Informatica e Sistemistica Universita` di Roma “La Sapienza”

Blending problems A food is manufactured by refining row oils and blending them together. VEG1, VEG2 cost (per tons) respectively 110 € and 120 € OIL1,OIL2,OIL3 cost (per tons) respectively 130 €, 110 € and 115 € Production costs The final food is sold at 150 € per ton.Selling price How much the food manufacturer make his product so to maximize his profit ? Objective function The raw oils came in two categories: vegetables (VEG1, VEG2) and Non-vegetables oils (OIL1,OIL2,OIL3)

Mathematical model The decision variables represents the quantities of oils to be blended togheter We assume that there is no loss of weight in the refining process and blending VEG1 = x 1, VEG2 = x 2, OIL1 = x 3, OIL2 = x 4, OIL3 = x 5 Total product = x 1 + x 2 + x 3 + x 4 + x 5 x 1, x 2, x 3, x 4, x 5 >= 0 Objective function: maximize profit = selling price - costs

Mathematical model Selling price = 150 * total product= 150 * (x 1 + x 2 + x 3 + x 4 + x 5 ) Max 40 x 1 + 30 x 2 + 20 x 3 + 40 x 4 + 35 x 5 x 1, x 2, x 3, x 4, x 5 >= 0 Unit cost of VEG1 Costs = 110 x 1 + 120 x 2 + 130 x 3 + 110 x 4 + 115 x 5 Overall problem

Excel table =SOMMA(C7:G7) cost=C5*C7+D5*D7+E5*E7+F5*F7+G5*G7 Selling price = C10*E10 data

Setting the Solver in Excel Only non negative constraints

Final result with Excel There is no optimal solution (the algorithm does not converge) Unboundedness The model is not well defined !

Refining the model of blending problem In any month it is not possible to refine more than 200 tons of VEGETABL OILS and 250 tons of NON-VEGETABL OILS Availability

Mathematical model Availability constraints Max 40 x 1 + 30 x 2 + 20 x 3 + 40 x 4 + 35 x 5 x 1 + x 2 <= 200 x 3 + x 4 + x 5 <= 250 x 1, x 2, x 3, x 4, x 5 >= 0 VEG1 + VEG2 <= 200 OIL1 + OIL2 + OIL3 <= 250 The new problem

Excel table new data x 1 +x 2 = C8+D8=C9 x 3 +x 4 +x 5 = E8+F8+G8=F9

Setting the Solver constraints Objective function = profit

Final result with Excel

Adding hardness constraint Technological restriction on the hardness of the final product. In the percentage it must lie between 3 and 6. It is assumed that hardness behaves linearly In blending problem there is a typical constraint on the “quality” of the final product new data = hardness % of raw oils

Modelling hardness constraint Hardness constraints: 8.8 VEG1 + 6.1 VEG2 + 2 OIL1 + 4.2 OIL2 +5 OIL3 Contribution in “hardness” of the raw oils Requirement in hardness of the total product 6 (VEG1 + VEG2 + OIL1 + OIL2 + OIL3)max 3 (VEG1 + VEG2 + OIL1 + OIL2 + OIL3)min

Hardness constraints Hardness constraints: 8.8 x 1 + 6.1 x 2 + 2 x 3 + 4.2 x 4 + 5 x 5 <= 6(x 1 + x 2 + x 3 + x 4 + x 5 ) 8.8 x 1 + 6.1 x 2 + 2 x 3 + 4.2 x 4 + 5 x 5 >= 3(x 1 + x 2 + x 3 + x 4 + x 5 ) but it is not linear ! These constraints can be written also in the form Hardness in % of the final product

Mathematical model Max 40 x 1 + 30 x 2 + 20 x 3 + 40 x 4 + 35 x 5 x 1 + x 2 <= 200 x 3 + x 4 + x 5 <= 250 8.8 x 1 + 6.1 x 2 + 2 x 3 + 4.2 x 4 + 5 x 5 <= 6(x 1 + x 2 + x 3 + x 4 + x 5 ) 8.8 x 1 + 6.1 x 2 + 2 x 3 + 4.2 x 4 + 5 x 5 >= 3(x 1 + x 2 + x 3 + x 4 + x 5 ) x 1, x 2, x 3, x 4, x 5 >= 0 The final blendig mathematical model

Excel table Hardness constraints Data on the final product

Setting the Solver constraints Objective function = profit

Final result with Excel Final food features

A multi plant problem A company consists of two factories A and B. Each factory makes two products: standard and deluxe Each factory use two processes, grinding and polishing for producing its product Each unit of product yields the following profit

A multi plant problem The grinding and polishing times in hours for a unit of each type of product in each factory are Factory A has a grinding capacities of 80 hours per week and polishing capacity of 60 hours per week Factory B has a grinding capacities of 60 hours per week and polishing capacity of 75 hours per week

A multi plant problem Availability of raw material Each product (standard or deluxe) requires 4 kg of a raw material The company has 120 kg of raw material per week 120 kg. Factory A is allocated 75 Kg Factory B is allocated 45 Kg A possible scenario

Mathematical model for factory A The two type of products are the decision variables for FACTORY A Objective function is the profit to be maximize standard = x 1, deluxe = x 2 max 10 x 1 + 15 x 2 x 1, x 2 >= 0 Constraints:Availability of raw material 4 x 1 + 4 x 2 <= 75 Kg of raw material for unit of standard product Kg of raw material for unit of deluxe product Unit profit of standard product Unit profit of standard deluxe

Mathematical model for factory A (2) Constraints: 4 x 1 + 2 x 2 <= 80 Technological constraints Grinding process 2 x 1 + 5 x 2 <= 60 Polishing process max 10 x 1 + 15 x 2 4 x 1 + 4 x 2 <= 75 4 x 1 + 2 x 2 <= 80 2 x 1 + 5 x 2 <= 60 x 1, x 2 >= 0 Overall model for factory A

4 x 1 + 4 x 2 = 75 Geometric representation of F Let draw the set F of the feasible solutions for factory A In the plane ( x 1, x 2 ), draw the equations of the constraints 5 10 15 20 25 30 35 40 45 510152025303540 45 x1x1 x2x2 The constraint 4 x 1 + 2 x 2 = 80 does not play any role in defining the feasible region: removing it does not change F 2 x 1 + 5 x 2 = 60 4 x 1 + 2 x 2 = 80 Bad use of resources ! Feasible region All non negative pointsconstitutes the

4 x 1 + 4 x 2 = 75 Geometric representation of the profit In the plane ( x 1, x 2 ), draw the equation of the profit P TOT for increasing values 510152025303540 45 x1x1 5 10 15 20 25 30 35 40 45 x2x2 2 x 1 + 5 x 2 = 60 P TOT = 10 x 1 + 15 x 2 =0 =150 =300 P TOT =0 P TOT = 150 P TOT = 300 They are parallel lines Find the value of P TOT such that the corresponding line “touch” the points P TOT =300 does not touch any point in F

4 x 1 + 4 x 2 = 75 Geometric solution In the plane ( x 1, x 2 ), draw the parallel lines to the equation P TOT = 10 x 1 + 15 x 2 =0 until the last point is found that “touches” the feasible region 510152025303540 45 x1x1 5 10 15 20 25 30 35 40 45 x2x2 2 x 1 + 5 x 2 = 60 P TOT =0 Raw material hours 2 x 1 + 5 x 2 = 60 4 x 1 + 4 x 2 = 75 Optimal solution P TOT = 10 x 1 + 15 x 2 = 112.5 + 112.5 = 225

Excel table for factory A data x 1 =C9, x 2 =D9 Decision variables = level of production Profit = C4*C9+D4*D9 Raw constraint = C5*C9+D5*D9 Grinding constraint = C6*C9+D6*D9 Polishing constraint = C7*C9+D7*D9

Using the Solver constraints Objective function = profit Decision variables

Mathematical model for factory B The two type of products are the decision variables for FACTORY B Objective function is the profit to be maximize standard = x 3, deluxe = x 4 max 10 x 3 + 15 x 4 x 3, x 4 >= 0 Constraints: Availability of raw material 4 x 3 + 4 x 4 <= 45

Mathematical model for factory B (2) Constraints: Technological constraints 5 x 3 + 3 x 4 <= 60 Grinding process 5 x 3 + 6 x 4 <= 75 Polishing process max 10 x 3 + 15 x 3 4 x 3 + 4 x 3 <= 45 5 x 3 + 3 x 4 <= 60 5 x 3 + 6 x 4 <= 75 x3, x 3 >= 0 Overall model for factory B

Geometric representation of F Let draw the set F of the feasible solutions for factory B In the plane ( x 3, x 4 ), draw the equations of the constraints 5 x 3 + 3 x 4 = 60 5101520304050 x3x3 5 10 15 20 30 40 50 x4x4 4 x 3 + 4 x 4 = 45 5 x 3 + 6 x 4 = 75 Feasible region All non negative pointsconstitutes the Two constraints 5 x 3 + 6 x 4 = 75 and 5 x 3 + 3 x 4 = 60 do not play any role in defining the feasible region: removing them does not change F Bad use of resources !

Geometric solution 51020304050 x3x3 5 10 15 20 30 40 50 x4x4 4 x 3 + 4 x 4 = 45 In the plane ( x 3, x 4 ), draw the parallel equations of the profit P TOT for increasing values P TOT = 10 x 3 + 15 x 4 =0 =100 Find the value of P TOT such that the corresponding line “touch” the points P TOT =0 P TOT = 100 Raw material x 3 = 0 4 x 3 + 4 x 4 = 45 P TOT = 112.5 Optimal solution =

Excel table for factory B data x 3 =C9, x 4 =D9 Decision variables = level of production Profit = C4*C9+D4*D9 Raw constraint = C5*C9+D5*D9 Grinding constraint = C6*C9+D6*D9 Polishing constraint = C7*C9+D7*D9 Note: the excel formulae are the same for factory A and B. The model is independent from data

Look at the company in this scenario 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 Factory A is allocated 90 Kg Factory B is allocated 30 Kg The solution has been obtained with arbitrary allocation of raw material, we can see what happens when allocation change 120 kg. Total raw material

Changing the scenario: geometric view 51015203040 50 x3x3 5 15 20 30 40 50 x4x4 5101520304050 x1x1 4 x 1 + 4 x 2 = 90 5 10 15 20 30 40 45 50 x2x2 2 x 1 + 5 x 2 = 60 4 x 1 + 2 x 2 = 80 Factory A Factory B 5 x 3 + 3 x 4 = 60 4 x 3 + 4 x 4 = 30 5 x 3 + 6 x 4 = 75 5101520 x1x1 5 10 15 20 x2x2 5101520 x3x3 5 10 15 20 x4x4 new optimum for A new optimum for B P TOT = 250 P TOT = 112.5

Changing the scenario: excel view Factory A Profit is higher than the preceding scenario Factory B Profit is lower than the preceding scenario

Look at the company in the new scenario 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 Objective function is the overall profit to be maximize max 10 x 1 + 15 x 2 + 10 x 3 + 15 x 4 standard in factory A= x 1, deluxe in factory A = x 2 standard in factory B= x 3, deluxe in factory B= x 4 x 1, x 2, x 3, x 4 >= 0

Mathematical model for the company (2) Constraints: 4 x 1 + 2 x 2 <= 80 5 x 3 + 3 x 4 <= 60 Technological constraints Grinding process 2 x 1 + 5 x 2 <= 60 5 x 3 + 6 x 4 <= 75 Polishing process Constraints:Availability of raw material Factory A Factory B Factory A 4 x 1 + 4 x 2 + 4 x 3 + 4 x 4 <= 120 Common constraint

Mathematical model for the company max 10 x 1 + 15 x 2 + 10 x 3 + 15 x 4 4 x 1 + 2 x 2 <= 80 5 x 3 + 3 x 4 <= 60 2 x 1 + 5 x 2 <= 60 5 x 3 + 6 x 4 <= 75 4 x 1 + 4 x 2 +4 x 3 + 4 x 4 <= 120 x 1, x 2, x 3, x 4 >= 0 More than two variables: we can solve it with the Solver

Excel table for the company x 1 =C10, x 2 =D10, x 3 =E10, x 4 =F10 Decision variables = level of production Profit = C4*(C10+E10)+D4*(D10+F10) Raw constraint = C5*(C10+ E10 )+D5*(D10+F10)

Setting the solver

Optimal solution for the company Optimal production: deluxe = 20.8, standard = 9.17 Profit = 404.16 Better than 393.75 obtained with the arbitrary allocation

References H.P. Williams, Model building in mathematical programming, John Wiley, 1999 W. L Winston and S. C. Albright, Practical Management Science, Duxbury Press, 1997 L. Palagi, Electronic version of the lectures (2004) http://www.dis.uniroma1.it/~palagi

Download ppt "Corso MAE Metodi Quantitativi per il Management Quantitative methods for Management Roma, 18 settembre - 24 ottobre 2003 Prof. Gianni Di Pillo Prof. Laura."

Similar presentations