Vous êtes sur la page 1sur 24

Lecture 3

Linear Programming

9/8/09

CVEN689

System modeling for decision making

9/8/09

CVEN689

Math Programming
Math 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)
CVEN689 3

9/8/09

Models characteristics
Models 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 Time Static Randomness Deterministic Variables Discrete
9/8/09

Prescriptive

Dynamic

Probabilistic (Stochastic)

Continuous
CVEN689 4

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]

9/8/09

CVEN689

Assumptions of LP
Linearity: 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)

9/8/09

CVEN689

General Optimization Models


Max/min Subject to:
descriptive models

Z = f(x1, x2, , xn)

Objective Function (OF)

g1(x1, x2, , xn) >=< b1 g2(x1, x2, , xn) >=< b2 .. x1, x2, , xn

Constraints

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)
9/8/09 CVEN689 7

Linear Programming (LP) Model


Max/min Z = f() = c1x1 + c2x2 + + cnxn Objective Function (OF) Subject to: g1() = a11x1 + a12x2 + + g2() = a21x1 + a22x2 + + . gm() = am1x1 + am2x2 + +

a1nxn >=< b1 a2nxn >=< b2 Constraints 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
9/8/09 CVEN689 8

Careful about Linearity


x2 <=> b x <=> b2 x1x2 <=> b x1x2 - x1(a+x2) <=> b x1/x2 <=> b not linear Linear! (b is not a variable) not linear Linear! (x1x2 cancel) Linear! (x1-bx2 <=> 0)

9/8/09

CVEN689

LP Example
A 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.
9/8/09 CVEN689 10

Model
Max Z= 3x1 + 5x2 Subject to: x1 2x2 3x1 + 2x2 and x1 >= 0, x2 >= 0 <= 4 <= 12 <= 18

9/8/09

CVEN689

11

Graphical solution
Drawing Constraints to produce the FEASIBLE REAGION 3x1 + 2x2 <= 18

x1 = 0 -> x2 = 9 x2 = 0 -> x1 = 6 draw the equality line where does (x1, x2) = (0,0) stays? It satisfies the constraint, so choose that part of the plane if (x1, x2) = (0,0) is ON the constraint line, just choose another point

9/8/09

CVEN689

12

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

9/8/09

CVEN689

13

Convexity
Convex Set: A straight line between two arbitrary points of the feasible region will always and entirely be within the feasible region as well. NOT Convex Convex

Feasible Regions for LP are ALWAYS CONVEX SETS.


9/8/09 CVEN689 14

Graphical solution
To find the optimal Z, youll need to evaluate it in all the feasible region. But the Z is a linear function, its 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).

9/8/09

CVEN689

15

Finding the Optimal Solution


The 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) solution An 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)

9/8/09

CVEN689

16

Graphical solution
x2 Z = 36 Z = 27 Z = 15 Z=0 Feasible region 3x1 + 2x2 = 18 x1 = 4 Optimal: x1 = 2 x2 = 6 2x2 = 12

x1
9/8/09 CVEN689 17

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)

9/8/09

CVEN689

18

Corner-Point Feasible (CPF) Solutions


x2 x1 = 4

2x2 = 12 Feasible region 3x1 + 2x2 = 18

x1
9/8/09 CVEN689 19

Multiple Optimal Solutions


x2 x1 = 4 If Z = 3x1 + 2x2 2x2 = 12 Feasible region 3x1 + 2x2 = 18 Optimal solutions

x1
9/8/09 CVEN689 20

Unbounded feasible region and Z


x2 If the only constraint is x1 <= 4 . x1 = 4

Feasible region

x1
9/8/09 CVEN689 21

Questions to answer
1. 2. 3. 4. 5. 6. 7. 8. Plot the feasible region Is this an unfeasible problem? Identify the corner points Is this an unbounded feasible region? Plot some of the O.F. Zs Find the optimal solution graphically Is this an unbounded problem? Do we have a unique or multiple optima?

9/8/09

CVEN689

22

Some Terminology
Solution: a set of values for all xj Feasible solution: a solution which satisfies ALL the constraints Infeasible solution: a solution violating at least one constraint Feasible region: the collection of all feasible solutions (a convex set) Infeasible problem: a problem with no feasible region Corner 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 region Optimal 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 directions Unbounded problem: a problem with an infinite Z (it requires an unbounded feasible region)
9/8/09 CVEN689 23

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

9/8/09

CVEN689

24

Vous aimerez peut-être aussi