lecture 3

24
9/8/09 CVEN689 1 Lecture 3 Linear Programming

Upload: solitarymonk

Post on 26-Oct-2014

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 3

9/8/09 CVEN689 1

Lecture 3

Linear Programming

Page 2: Lecture 3

9/8/09 CVEN689 2

System modeling for decision making

Page 3: Lecture 3

9/8/09 CVEN689 3

Math ProgrammingMath programming is a general term referring to as the technique used to construct optimization/prescriptive models.

The term “programming” does not mean coding, but more planning.

[However, solving math programs may require a great deal of coding and coding skills certainly can be useful for the model formulation step]

Math Programming is roughly divided in these subcategories:

• Linear Programming (continuous variables, linear OF and constraints, deterministic parameters)

• Integer Programming (integer variables)

• Nonlinear programming (nonlinear OF or constraints)

• Stochastic programming (stochastic/probabilistic parameters)

Page 4: Lecture 3

9/8/09 CVEN689 4

Models’ characteristicsModels are built to represent the dynamics and interactions of the components within the system. Depending on the nature of the system we can have the following characteristics:

Purpose

Descriptive Prescriptive

Time

Static Dynamic

Randomness

Deterministic Probabilistic (Stochastic)

Variables

Discrete Continuous

Page 5: Lecture 3

9/8/09 CVEN689 5

What is Linear Programming (LP)?It is the most widely used type of modeling for decision making, because of:

its simplicity

its versatility in representing numerous real problems in virtually any domain.

the availability of very efficient and fast solution methods to solve it.

[Unfortunately, not all systems’ decision making problems can be modeled as LPs]

Page 6: Lecture 3

9/8/09 CVEN689 6

Assumptions of LPLinearity:• variables xj can have ONLY exponent 1 in all the constraints and the objective

function (NEVER xjh, with h ≠ 1)

• NEVER multiply xjxk in any constraint or the objective function

Continuity:• variables xj are CONTINUOUS: all values must be allowed in their feasible

range. Integer or binary (0-1) variables are not allowed.

Deterministic environment:• the parameters are CONSTANT and KNOWN (or are assumed to be so)

Page 7: Lecture 3

9/8/09 CVEN689 7

Max/min Z = f(x1, x2, …, xn) Objective Function (OF)

Subject to:g1(x1, x2, …, xn) >=< b1g2(x1, x2, …, xn) >=< b2 Constraints………………………..

x1, x2, …, xn Decision Variables

The Parameters are embedded in the Constraints and the Objective function relationships (b1, b2,… and any of the coefficient multiplying the variables xi)

descriptivemodels

General Optimization Models

Page 8: Lecture 3

9/8/09 CVEN689 8

Linear Programming (LP) ModelMax/min Z = f(…) = c1x1 + c2x2 + … + cnxn Objective Function (OF)

Subject to:g1(…) = a11x1 + a12x2 + … + a1nxn >=< b1g2(…) = a21x1 + a22x2 + … + a2nxn >=< b2…………………………………. Constraintsgm(…) = am1x1 + am2x2 + … + amnxn >=< bm

x1, x2, …, xn Decision Variables (Continuous)

The Parameters (bj, aij, ci) are embedded in the Constraints and the Objective Function relationships and are known and constant

Page 9: Lecture 3

9/8/09 CVEN689 9

Careful about Linearityx2 <=> b not linear

x <=> b2 Linear! (b is not a variable)

x1x2 <=> b not linear

x1x2 - x1(a+x2) <=> b Linear! (x1x2 cancel)

x1/x2 <=> b Linear! (x1-bx2 <=> 0)

Page 10: Lecture 3

9/8/09 CVEN689 10

LP ExampleA company produces glass products and own 3 plants. The management decides to produce two new products.

Each ton of Product 1 requires 1 hour of production time in Plant 1 and 3 hours in Plant 3 and will generate $3,000 profit.

Each ton of Product 2 requires 2 hours of production time in Plant 2 and 2 hours in Plant 3 and will generate $5,000 profit.

The production times available per week for each plant are 4, 12 and 18 hours respectively for Plant 1, 2 and 3.

Page 11: Lecture 3

9/8/09 CVEN689 11

ModelMax Z = 3x1 + 5x2

Subject to:x1 <= 4

2x2 <= 123x1 + 2x2 <= 18

andx1 >= 0, x2 >= 0

Page 12: Lecture 3

9/8/09 CVEN689 12

Graphical solutionDrawing Constraints to produce the FEASIBLE REAGION

3x1 + 2x2 <= 18

x1 = 0 -> x2 = 9x2 = 0 -> x1 = 6draw the equality line

where does (x1, x2) = (0,0) stays? It satisfies the constraint, so choose that part of the planeif (x1, x2) = (0,0) is ON the constraint line, just choose another point

Page 13: Lecture 3

9/8/09 CVEN689 13

ConvexityConvex functions: A straight line between two arbitrary points of the function will always and entirely lay above the function.

NOT ConvexConvex

Page 14: Lecture 3

9/8/09 CVEN689 14

ConvexityConvex Set: “A straight line between two arbitrary points of the feasible region will always and entirely be within the feasible region as well.”

Feasible Regions for LP are ALWAYS CONVEX SETS.

NOT ConvexConvex

Page 15: Lecture 3

9/8/09 CVEN689 15

Graphical solution

To find the optimal Z, you’ll need to evaluate it in all the feasible region.But the Z is a linear function, it’s a plane and we can draw its projected level curves on the x1/x2 chart, which are parallel Z lines.

To draw the Z lines, select a point on an axis which is not (0; 0).Ex. @(5; 0) Z = 15. Then, for Z = 15, @x1 = 0 we find x2 = 3. And you can draw one Z line between (5; 0) and (0; 3).

All the others Z lines are parallel, linear and monotonic. @(0; 0) Z = 0.

Thus, in this example, the value of Z is increasing NE (NorthEast).

Page 16: Lecture 3

9/8/09 CVEN689 16

Finding the Optimal SolutionThe optimal solution is found at the point within the feasible region where the parallel Z line passing through it has the best possible value of Z

Can we have an optimal point which is not at the border of the feasible region? No

An optimal solution will always be at a corner point feasible (CPF) solutionAn infinite set of optimal solutions might also be at an edge of the feasible region (between two corner points)

Since the optimal solution will always be at a corner point, you can also “try” the Z value in all corner points to find the optimal (instead of drawing the parallel Z)

Page 17: Lecture 3

9/8/09 CVEN689 17

Graphical solution

2x2 = 12

x1 = 4

Feasibleregion

x1

x2

Z = 15

3x1 + 2x2 = 18

Z = 27

Z = 36 Optimal:x1 = 2x2 = 6

Z = 0

Page 18: Lecture 3

9/8/09 CVEN689 18

What if?

min Z, instead of max ?

x1 >= 2 or x2 >=2 ?

Add x1 <= 10? (redundant constraint)

We add a min profit constraint, Z >= 40 ? (infeasible)

Page 19: Lecture 3

9/8/09 CVEN689 19

Corner-Point Feasible (CPF) Solutions

2x2 = 12

x1 = 4

Feasibleregion

x1

x2

3x1 + 2x2 = 18

Page 20: Lecture 3

9/8/09 CVEN689 20

Multiple Optimal Solutions

If Z = 3x1 + 2x2…

2x2 = 12

x1 = 4

Feasibleregion

x1

x2

3x1 + 2x2 = 18

Optimalsolutions

Page 21: Lecture 3

9/8/09 CVEN689 21

Unbounded feasible region and Z

x1 = 4

Feasibleregion

x1

x2

If the only constraint isx1 <= 4 ….

Z

Page 22: Lecture 3

9/8/09 CVEN689 22

Questions to answer1. Plot the feasible region2. Is this an unfeasible problem?3. Identify the corner points4. Is this an unbounded feasible region?5. Plot some of the O.F. Zs6. Find the optimal solution graphically7. Is this an unbounded problem?8. Do we have a unique or multiple optima?

Page 23: Lecture 3

9/8/09 CVEN689 23

Some TerminologySolution: a set of values for all xjFeasible solution: a solution which satisfies ALL the constraintsInfeasible solution: a solution violating at least one constraintFeasible region: the collection of all feasible solutions (a convex set)Infeasible problem: a problem with no feasible regionCorner Point (CP) solution: a solution that lies at an intersection among constraints (can be infeasible)Corner Point Feasible (CPF) solution: a feasible solution that lies at a “corner” of the feasible regionOptimal solution: a feasible solution with the best possible Z (can be unique at a CPF or multiple along an edge)Unbounded feasible region: a feasible region which is not a closed set and goes to infinity in one or more directionsUnbounded problem: a problem with an infinite Z (it requires an unbounded feasible region)

Page 24: Lecture 3

9/8/09 CVEN689 24

Some more terminology on constraints

Redundant constraint: a constraint that, if added/removed does not modify the shape of the feasible region

Binding Constraint: a constraint which reaches equality at optimality

Not-binding Constraint: a constraint which does not reaches equality at optimality

RHS (Right hand side): are the bi of the constraints