# dmor linear programming. unconstrained optimization constrained optimization – linear programming...

Post on 18-Dec-2015

231 views

Embed Size (px)

TRANSCRIPT

- Slide 1
- DMOR Linear Programming
- Slide 2
- Unconstrained optimization Constrained optimization Linear programming Non-linear programming programming arch. planning Constrained optimization elements: 1.decision variables 2.objective function 3.constraints 4.variable bounds
- Slide 3
- Bike company Bike company produces: Mountain bikes Race bikes Wants to maximize profit by setting quantities of each bike produced No demand restrictions Two teams produce two kinds of bikes: Mountain bike team can produce up to 2 bikes per day Race bike team can produce up to 3 bikes per day Equal amount of time using metal finishing machine is needed for both kinds of bikes. Up to 4 bikes can go through the machine daily The acountant estimates profits for each bike Mountain $15 Race $10
- Slide 4
- Solution Intuitive solution We produce as many mountain bikes as possible (max 2) and whats left goes for race bikes (2). Generated Profit: $30+$20=$50. Linear programming Decision variables: Number of mountain x 1 and race x 2 bikes Nonnegative: x 1 0, x 2 0 Objective function: max daily profit: max Z=15x 1 +10x 2 (in $/day) Constraints: Daily mountain bike production limit: x 1 2 (in bikes/day) Daily race bike production limit: x 2 3 (in bikes/day) Metal finishing machine limit: x 1 +x 2 4 (in bikes/day)
- Slide 5
- Corners are important feasible region Isoprofit lines are parallel Profit increases the most for the gradient direction Corners stick outside the most Optimum is a corner or a an edge together with two endpoint (neighbouring) corners If two corners are optimal then the line between them is also
- Slide 6
- Linear programming assumptions Linear in decision variables Additivity and proportionality Excludes curves, step-functions, interaction factors, e.g. 5x 1 x 2, start-up costs Decision variables are real-valued And not integer-valued Programming in general assumes knowledge of all the parameters Nevertheless we can do sensitivity analysis
- Slide 7
- An LP problem in standard form Features: Objective is to maximze Constraints only Non-negative constraints RHS Decision variables are nonnegative Algebraic formulation: Objective function: m functional constraints: Variable bounds
- Slide 8
- Definitions solution cornerpoint solution feasible cornerpoint solution adjacent cornerpoint solutions
- Slide 9
- Key properties 1.Optimal cornerpoint solution is always a feasible cornerpoint solution 2.If objective function value for a given feasible cornerpoint solution is not less than the objective function value for all feasible adjacent cornerpoint solution, then this solution is optimal 3.There is finite number of feasible cornerpoint solutions Implications 1.Search the cornerpoints 2.Easy to say which cornerpoint is optimal 3.Algorithm will stop after finite number of iterations
- Slide 10
- Simplex method Two phases: 1.Start-up find any feasible cornerpoint solution Standard form is good because the orgin is always a feasible cornerpoint solution If not in standard form, we need additional procedure (to be described later) 2.Iterations move to adjacent feasible cornerpoint solutions such that each time you improve the objective function value Stop when no improvement possible
- Slide 11
- Algebraic method Millions of decision variables in real applications Graphical method not possible Algebraic method works fine Inequality constraints changed into equality constraints Solving a system of equations being a subset of all constraints Subset since commonly not all equalities mey hold at the same time We need a way to remember which equalities are in the subset (active constraints) We introduce slack variables e.g. x 1 2 changed into x 1 + s 1 = 2, where s 1 0 is a slack variable
- Slide 12
- Bike company Two dimensional problem becomes now five-dimesional Slack variable is positive only if the corresponding constraint is active More concepts: augmented solution: values given for all variables, e.g. extended optimal cornersolution for Bike company is x 1,x 2,s 1,s 2,s 3 = (2,2,0,1,0) basic solution: extended cornerpoint solution (feasible or infeasible), e.g. (2,3,0,0,-1) is basic infeasible solution basic feasible solution: feasible cornerpoint solution e.g. (0,3,2,0,1)
- Slide 13
- Setting variable values degrees of freedom df df = (number of variables) - (number of independent equalities) Simplex method automatically assigns zero value (corresponding constraint active) to df out of all variables and then determines the other values x 1 =0 means that constraint x 1 0 is active x 2 =0 means that constraint x 2 0 is active s 1 =0 means that constraint x 1 2 is active s 2 =0 means that constraint x 2 3 is active s 3 =0 means that constraint x 1 +x 2 4 is active In our example df=2, hence two variables will be assigned a zero value
- Slide 14
- More terminology nonbasic variable: variable which currently is assigned a zero value basic variable: variable which is currently NOT assigned a zero value In standard form positive Zero in special cases basis: the set of current basic variables MANTRA: Nonbasic, value zero, constraint active We can guess the basis but we have to be careful We can get infeasible cornerpoint solution (previous picture) No cornerpoint at all (below)
- Slide 15
- Moving to a better adjacent feasible cornerpoint solution Adjacent cornerpoint solution is a good choice because: In two adjacent cornerpoints the basic and nonbasic set are identical but for one element Example Point A: nonbasic set = {s 2,s 3 }, basic set = {x 1,x 2,s 1 } Point B: nonbasic set = {s 1,s 2 }, basic set = {x 1,x 2,s 3 } This is necessary yet not sufficient condition for adjacency (vide (0,4) and (4,0))
- Slide 16
- Three conditions for moving to a new cornerpoint solution Have to be adjacent Have to be feasible The new solution have to be better than the old one Two steps: 1.Determine a nonbasic variable which improves the objective function most. Move this variable into basic set (entering basic variable) 2.Increase value of entering basic variable up to the moment one of the basic variables reaches zero. Move this variable into nonbasic set (leaving basic variable) x 1 improves objective function most Constraint x 1 0 ceases to be active Only x 1 increases so we know the movement direction The constraint which will be crossed over first is x 1 2.
- Slide 17
- Algebraically In the origin the situation is the following: Basic variables: s 1,s 2,s 3 Nonbasic variables: x 1,x 2 Basic entering variable: x 1 In a new cornerpoint solution, which is located at the intersection of the edges of two constraints x 2 0 and x 1 2 (point (2,0)), we have: Basic variables: x 1,s 2,s 3 Nonbasic variables: x 2,s 1 We exchanged x 1 for s 1
- Slide 18
- Minimum ratio test In order to find basci leaving variable we have to find the smallest value for the following ratio: In our example, the denominator is always 1. Generally it doesnt have to be that way. Two special cases: Entering basic variable coefficient is 0 (the constraints do not intersect) Entering basic variable coefficient is negative (the constraints intersect but the entering basic variable increases in the opposite direction in relation to the intersection point)
- Slide 19
- Finding a new basic feasible solution We found a new basis what then? We can suibstitute zero into all nonbasic variables and solve the resulting system of m x m equations by Gaussian elimination More effective is to perform only a part of Gaussian elimination in each step When to stop iterating? (Joke about a computer scientist) When we cannot find basic entering variable
- Slide 20
- Simplex method
- Slide 21
- Simplex tableau Starting point Tableau in proper form One basic variable for each equality Basic variable coefficient always +1 and coefficients above and below are zero Z is treated as a basic variable of the objective function The advantage of the proper form is taht we cann read current solution directly from the tableau.
- Slide 22
- 2.1 Are we done? No, we have 2 negative coefficients in the first raw 2.2 Choose basic entering variable Most negative coefficient is for x1 2.3 Choose basic leaving variable Minimal ratio test: If there is 0 or negative number in the pivot column write no limit The smallest value is 2: the corresponding raw is called the pivot raw Pivot element
- Slide 23
- 2.4 Update the tableau a)In basic variable column exchange basic leaving variable with basic entering variable b)If pivot element is not equal to 1, divide all pivot raw coefficients by pivot element value c)But for the pivot element, we make all the coefficients in the pivot column equal to zero
- Slide 24
- Continued New solution (x 1,x 2,s 1,s 2,s 3 )=(2,0,0,3,2), Objective function value Z=30 2.1 We are not optimal yet 2.2, 2.3 A new basic entering and leaving variable 2.4 Back to proper form
- Slide 25
- Special cases A draw when choosing basic entering variable, e.g. Z = 15x 1 +15x 2 A draw when choosing basic leaving variable choose the one you want the corner will the same anyway A variable which was not chosen for the basic leaving variable will remain basic but will have a calcula

Recommended