Presentation is loading. Please wait.

Presentation is loading. Please wait.

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


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:

1 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”

2 Mathematical model of the production problem Objective function 4 x 1 +4,5 x 2 max profit Decision variables CH, PI  R x 1, x 2  R constraints x 1 + 1,5 x 2 budget x 1 + x 2 hours x 1, x 2 LINEAR PROGRAMMING (LP)

3 Linear Programming (LP) Both objective function and constraints are linear expressions Proportionality When the level of ony activity is multiplied by a constant factor, then any contribution to the objective function or to any of the constraints is multiplied by the same factor Additivity The value of the objective function and of the constraints is the sum of contribution from the various activity Divisibility Both integer and fractional levels of the activities allowed

4 Final feasible region The best value for (CH,PI)* among the feasible ones is (6,8) which corresponds to the profit P TOT= 4  CH + 4,5  PI = 60 1  CH + 1,5  PI = 18 CH PI 14 12 2 4 6 8 10 16 14246810121618 1  CH + 1  PI = 14 F

5 Production problem with Excel Let us consider the Excel table Objective function c6*c8+d6*d8 Cost: c5*c8+d5*d8 Hours: c7*d8+d7*d8 Equation of the Constraints data Real decision variables c8,d8

6 Mathematical model for Capital budgeting Objective function 12 x 1 +8 x 2 +7 x 3 max earnings Decision variables xi=xi= 1 if project i is selected 0 if project i is not selected i=1,2,3 constraints 8 x 1 +6 x 2 +5 x 3 budget x 1, x 2, x 3 INTEGER LINEAR PROGRAMMING (ILP)

7 Integer Linear Programming (ILP) Both objective function and constraints are linear expressions Proportionality When the level of ony activity is multiplied by a constant factor, then any contribution to the objective function or to any of the constraints is multiplied by the same factor Additivity The value of the objective function and of the constraints is the sum of contribution from the various activity Indivisibility Only integer levels of the activities allowed

8 Capital Budget with Excel Objective C5*C7+D5*D7+E5*E 7 Integer decision variables c7,d7,e7 Constraint C4*C7+D4*D7+E4*E7 data

9 Solution of mathematical models We use Excel Solver (www.frontsys.com) http://www.frontsys.com/ Graphical solution (of LP) can be applied only when the number of variables is two Real problems has usually more than two variables Many standard software exist to solve LP problems of different level of complexity Computer must be used as a tool to tackle large quantities of data and arithmetic

10 Excel: an easy platform to optimization Excel has an optimization toolbox: Solver Solver Add-ins Tool s

11 Solving PL with Excel In the main menù select Tools (Strumenti) and then Solver (solutore)

12 Solving PL with Excel It will appear a dialog window like below Objective function Tipo di problema (max o min) Decision variablesConstraints Let now fill in

13 Setting the objective function Objective function P TOT = c9 The value can be set easily by clicking the corresponding cell (it puts the address $c$)

14 Setting the initial guess We need to give an initial value (also zero is feasible) = guess Cells C8 and D8 contains the value of the variables. At the end of the optimization process they contain the optimal value

15 Setting the constraints Clich Add (Aggiungi) Window of constraints

16 Setting the constraints ItalianEnglish Address of the cell or a constant Address of the cell Constraint can be of the type A    B A Int (integer value) A bin (binary value 0,1)

17 Setting the options We must Assume Linear Model (use simplex method) and non- negative variables (in alternative we can define the additional constraints c8, d8  0). Clicking Options (Opzioni) the window of parameters appears

18 Setting the options Maximum time allowed to obtain a solution Maximum iterations of the algorithm to obtain a solution It uses an algorithm for linear problems (simplex) More complex models (non linear)

19 Solve LP con Excel We can start optimization Click the button Solve (Risolvi)

20 Final result with Excel Guess initial values have been substituted by the optimal ones The “algorithmic” solution is the same obtained with the graphical solution

21 Changing the options for LP Reducing timeReducing iterationsReducing or increasing tolerance Same solution

22 Changing the options for LP Same solution Change the model In general this is not true

23 Solving Capital Budget with Excel Objective function

24 Solving Capital Budget with Excel Variables (b6,c6,d6) are 0-1

25 Solving Capital Budget with Excel x 1 x 2 x 3 = 0 x 1 x 2 x 3 int

26 italian english Solving Capital Budget with Excel

27

28 Changing the options for ILP Reducing timeReducing iterations same solution but the Solver is not able to certify optimality

29 Changing the options for ILP Increasing Tolerance SOLUTION CHANGES Optimality declared, but it is not true

30 Is LP behavior different from ILP ? For LP problems optimality can always be certified For LP problems sub-optimal solutions do not exist For ILP problems optimality is difficult to be certified For ILP problems many sub-optimal solution may exist

31 Another production problem An engineering factory can produce five type of products PROD1, PROD2, PROD3, PROD4, PROD5 Two production process must be used: grinding and drilling Each unit of product requires a certain time on each process The factory has 3 grinding machines and 2 drilling machines that works a 6-day week with 2 shifts of 8 hours each day

32 Another production problem Final assembly of each unit of product uses 20 hours of a workman’s time How much to make of each product so to maximize the total profit ? Objective function 8 man are employed in assembly each working one shift a day After deducing raw material costs, each unit of product yields the following profit

33 Mathematical model The five type of products are the decision variables Objective function is the profit to be maximize PROD1 = x 1, PROD2 = x 2, PROD3 = x 3, PROD4 = x 4, PROD5 = x 5 max (2.5 x 1 + 6 x 2 + 3.5 x 3 + 4 x 4 + 2 x 5 )*100 x 1, x 2, x 3, x 4, x 5 >= 0 Constraints: Only 8 man * 1 shift * 6 days for assembly 20 x 1 + 20 x 2 + 20 x 3 + 20 x 4 + 20 x 5 <= 384 Hours assembly for unit

34 Mathematical model (2) Constraints: Only 3 machines * 2 shift * 6 days 12 x 1 + 20 x 2 + 25 x 4 + 15 x 5 <= 288 Technological constraints Grinding process Only 2 machines * 2 shift * 6 days 10 x 1 + 8 x 2 + 16 x 3 <= 192 Drilling process

35 Mathematical model (3) max 2.5 x 1 + 6 x 2 + 3.5 x 3 + 4 x 4 + 2 x 5 20 x 1 + 20 x 2 + 20 x 3 + 20 x 4 + 20 x 5 12 x 1 + 20 x 2 + 25 x 4 + 15 x 5 10 x 1 + 8 x 2 + 16 x 3 x 1, x 2, x 3, x 4, x 5 x 1, x 2, x 3, x 4, x 5 integer

36 Production problem with Excel 384=8 men * 8 hours *6days 288= 3 machines * 16 hours * 6days 192= 2 machines * 16 hours * 6days data

37 Model LP con Excel constraints (Real) decision variables Objective function

38 Solve LP con Excel Fractional solution We need to insert the integer constraint

39 We can approximate the fraction solution to an integer value Approximating the solution Is the optimal solution ?

40 Model ILP con Excel constraints Integer decision variables

41 Solve ILP con Excel Integer solution The solution obtained is better than the “approximating one”


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


Ads by Google