Académique Documents
Professionnel Documents
Culture Documents
Linear Programming
9/8/09
CVEN689
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
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
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
x1, x2, , xn
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
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
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
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
x1
9/8/09 CVEN689 19
x1
9/8/09 CVEN689 20
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
9/8/09
CVEN689
24