Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda

Similar presentations


Presentation on theme: "Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda"— Presentation transcript:

1 Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda jlmiranda@estgp.pt http://tiny.cc/jlm_estg ; http://tiny.cc/jlm_ist

2 24-Apr-2012Linear Programming2 Linear Programming (LP) Basics LP typical problems LP general model LP Simplex method Tableau and matrix Simplex approaches Duality Sensitivity analysis

3 24-Apr-2012Linear Programming3 LP basics The typical LP application addresses the rational allocation of limited resources onto different activities, which are competing among them in order to obtain the best possible allocation (the optimal solution). The mathematical modeling of LP only uses linear functions to both formulate the objective function and the restrictions.

4 24-Apr-2012Linear Programming4 (…) LP basics Usually, the LP model considers: –Objective Function: linear function to be optimized (maximized or minimized); –Restrictions: linear constraints to be satisfied by the optimal solution; –Non-negativity Conditions: the variables must be positive or zero (!?).

5 24-Apr-2012Linear Programming5 (…) LP basics LP model: Or:

6 24-Apr-2012Linear Programming6 (…) LP basics Implicitly, a LP model supposes: Proportionality: the contribution of each activity onto the objective and the restrictions is proportional to the own level of the activity; Additivity: the global value, for the objective or the utilization of resources, results from the addition of the individual contribution of all the activities; Continuity or divisibility: the decision variables can present non-integer values, e.g., the variables can be considered continuous, real and non-negative variables.

7 24-Apr-2012Linear Programming7 (…) LP basics Feasible solution: solution satisfying all the restrictions ; Feasible region: region considering all the feasible solutions; Infeasible solution: solution that is not satisfying, at least, one of the restrictions; Optimal solution: feasible solution corresponding to the best value (“optimal”) of the objective function.

8 24-Apr-2012Linear Programming8 (…) LP basics Multiple optimal solutions: the various and infinite solutions that present the same optimal value of the objective function; Adjacent solutions: pair of the feasible corner points that are sharing the same restriction line, that is, this corners are connected by a line segment that represents a linear restriction; Edge: the referred line segment that is bounding the feasible region.

9 24-Apr-2012Linear Programming9 (…) LP basics Consider a LP problem with feasible solutions within a bounded search region, corner points, and a optimal solution. Then: –The “best” corner point of the feasible region must be an optimal solution; –If the optimal solution is one and only one, then it is a feasible corner point; –If the optimal solution is multiple, it considers two corner points and the edge/line segment between them.

10 24-Apr-2012Linear Programming10 A LP problem with n variables and m restrictions can be represented as: (…) LP basics

11 24-Apr-2012Linear Programming11 An optimization problem occurs when n>m : it corresponds to a linear system of equations that requires to first define (n-m) values, and only then the other m variables can be calculated. Non-basic variables: the (n-m) variables that are estimated as zero value; Basic variables: the other m variables that can assume non-zero values; Basic solution: non-negative values that are obtained for the basic variables, after the non-basic variables are assumed zero; Degenerate solution: at least one of the basic variables presents zero value. (…) LP basics

12 24-Apr-2012Linear Programming12 LP typical problems Product mix; Assignment, allocation; Diet, blending, covering; Production planning; Network models; Transportation and special cases; Game theory; Parameters estimation.

13 24-Apr-2012Linear Programming13 A furniture factory builds Tables ( t ) at a profit of 4 Euros per Table, and Chairs ( c ) at a profit of 3 Euros per Chair). Suppose that only 8 short ( s ) pieces and 6 large ( l ) pieces are available for building purposes, what combination of Tables and Chairs do you need to build to make the most profit?. If the availability of the short pieces is 8008 and the availability of the large pieces is 6007, how many Tables and Chairs do you need to build to make the most profit? Tables & Chairs

14 24-Apr-2012Linear Programming14 Note: modeling is based in the proportionality, aditivity and divisibility between the produced quantities of t and c and profit and utilization of l and s components.. Tables & Chairs

15 24-Apr-2012Linear Programming15 Note: modeling is based in the proportionality, aditivity and divisibility between the produced quantities of t and c and profit and utilization of l and s components. Tables & Chairs

16 24-Apr-2012Linear Programming16 LP Simplex method The Simplex algorithm... –is a powerful, efficient and robust method; –considers simple algebraic procedures; –corresponds to a geometric representation; –is developed in tableau form; –is developed in matrix form; –provides useful information that allow sensitivity analysis.

17 24-Apr-2012Linear Programming17 (…) LP Simplex method It only focuses the solutions corresponding to corner points of the feasible region; After the initialization phase, the algorithm considers a cycle of optimality testing and new basic solution searching; Whenever possible, the initialization step selects the “origin” corner as first basic solution; It searches to improve each solution by evaluating only the adjacent corners, following the edges lines that connect them; The edge selection aims to improve the objective function the most; The optimality test verifies if some of the edges that connect the present corner point may (or not) improve the objective function.

18 24-Apr-2012Linear Programming18 (…) LP Simplex method Previous step: LP in canonic form Initialization: obtain a first feasible basic solution, by assuming zero for the (n-m) values of the non-basic variables; Optimality test: verify if the present feasible basic solution is optimal, checking if all the objective function coefficients (in term of the non-basic variables) are positive;

19 24-Apr-2012Linear Programming19 (…) LP Simplex method Iterative cycle: 1) Direction of search: select the non-basic variable that is entering the basic solution, choosing the negative coefficient of the objective function with largest absolute value; 2) Length of movement: select the basic variable that is leaving the (basic) solution, choosing the variable that first reaches zero by application of the minimum ratio test; 3) Calculation of the new basic solution: use the known Gauss elimination, obtaining the identity vector in the column corresponding to the new basic variable.

20 24-Apr-2012Linear Programming20 Tableau form of LP Simplex In tableau form, the Simplex algorithm is only saving the main information, namely: the coefficients of restrictions and objective function; The parameters (RHS) of the restrictions; The basic variable in each equation. For instance,

21 24-Apr-2012Linear Programming21 LP Simplex specificities –Slack variables –Excess/surplus variables –Artificial variables –Inversion of restriction –Limited variables –Non-constrained variables (+ or -) –Minimization vs. maximization –Degenerate solution –Multiple optimal solutions –Unbounded objective function

22 24-Apr-2012Linear Programming22 Matrix form of LP Simplex Note: LP in augmented form Sequentially:

23 24-Apr-2012Linear Programming23 (...) Matrix form of LP Simplex When minimizing, consider the opposite in step 7) : the solution is optimal if there are only positive coefficients; else, select the negative coefficient with largest absolute value to define the entering variable.

24 24-Apr-2012Linear Programming24 Inverse matrix updating The inversion of the basic matrix B is efficiently computed by updating the inverse matrix from last iteration:

25 24-Apr-2012Linear Programming25 Tableau form of LP Simplex (revisited) The tableaus in each iteration:

26 24-Apr-2012Linear Programming26 (...) Tableau form of LP Simplex (revisited) At the ending step, for instance (S 0 =I): Using the coefficients of the slack variables in each equation, after each iteration, it can be observed how this equation was obtained from the initial equations!

27 24-Apr-2012Linear Programming27 Duality In close relation with each LP problem, the primal problem, there is other problem called the dual problem:

28 24-Apr-2012Linear Programming28 Then, Primal-dual transformation

29 24-Apr-2012Linear Programming29 Duality properties Weak duality: for any feasible solutions, primal x and dual y, Strong duality: at the optimal solution, Complementary of feasible solutions: at each iteration of the Simplex algorithm, feasible and complementing solutions are found, Complementary of optimal solutions: at the final iteration of Simplex, optimal and complementing solutions are found,

30 24-Apr-2012Linear Programming30 Sensitivity analysis Usually, the values used as parameters or coefficients are just (rough) estimates; Some parameters can be manipulated, they result from internal policies or strategic decisions, and they can be revised if it can be advantageous; It is important to identify the parameters that drive the most the optimal solution, and their variation range too.

31 24-Apr-2012Linear Programming31 Sensitivity analysis procedures 1) Review the LP model; 2) Review the Simplex final tableau; 3) Apply Gauss elimination and convert the tableau to the “standard” form; 4) Test the feasibility of the new solution (if it still stands in the feasible region); 5) Test the optimality of the new solution; 6) Re-optimize, if the new solution is not an optimal and feasible solution.

32 24-Apr-2012Linear Programming32 (...) variation at the objective function, c’ There is no change in the solution basis if the new solution is satisfying the optimality test:

33 24-Apr-2012Linear Programming33 (...) variation at the RHS parameters, b’ There is no change on the solution basis if the new solution is satisfying the feasibility test:

34 24-Apr-2012Linear Programming34 (...) variation in non-basic coefficients The new solution remains optimal if:

35 24-Apr-2012Linear Programming35 (...) introduction of new variables Introducing a new variable, index (n+1), the basic solution remains optimal if:

36 24-Apr-2012Linear Programming36 (...) variation in basic coefficients In despite of the optimal solution can present different values, the basis remains unchanged if the new solution is satisfying the feasibility and optimality tests: Nevertheless, the tableau is updated as in the former situation (introducing new variable) and the Gauss elimination procedure is performed.

37 24-Apr-2012Linear Programming37 (...) introduction of new restriction It must be directly checked if the optimal solution satisfies, or not, the new restriction; If positive, obviously, the optimal solution remains feasible; If negative, re-optimize using the Simplex Dual algorithm.

38 24-Apr-2012Linear Programming38 Parametric Analysis: b1

39 24-Apr-2012Linear Programming39 Parametric Analysis: b1

40 24-Apr-2012Linear Programming40 Parametric Analysis: b1

41 24-Apr-2012Linear Programming41 Parametric Analysis: b1

42 24-Apr-2012Linear Programming42 Parametric Analysis: C1

43 24-Apr-2012Linear Programming43 Parametric Analysis: C1

44 24-Apr-2012Linear Programming44 Parametric Analysis: C1

45 24-Apr-2012Linear Programming45 Parametric Analysis: C1

46 24-Apr-2012Linear Programming46 Linear Programming (LP synthesis ) Basics LP typical problems LP general model LP Simplex method tableau and matrix Simplex approaches Duality Sensitivity analysis


Download ppt "Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda"

Similar presentations


Ads by Google