Lecture 2: The LP model - an example and its graphical solution
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University
December 2017 Example: Paint factory
A paint factory produces interior and exterior paint from raw
materials M1 and M2. The maximum demand of interior paint is 2 tons/day. The maximum demand of interior paint is also at most 1 ton/day more than that of exterior paint. The paint factory wants to maximize its total daily profit.
MS-C2105 Introduction to Optimization 2/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Variables and objective function
The objective function and constraints are linear, so the example is
a linear optimization or linear programming (LP) model.
MS-C2105 Introduction to Optimization 5/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Graphical solution
The feasible region of the
LP model (yellow) consists of the points that satisfy all of the constraints (1)-(4) and the non-negativity constraints.
MS-C2105 Introduction to Optimization 6/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Graphical solution
The gradient of the objective
function: ∇z = [ ∂∂xz1 , ∂∂xz2 ]T = [5, 4]T . The gradient is orthogonal to any line z = 5x1 + 4x2 = constant. The gradient indicates the direction in which the objective function z increases. The optimum is the corner point C.
MS-C2105 Introduction to Optimization 7/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Graphical solution
If the objective function is
minimized, we follow the negative gradient −∇z to find the minimum. Note that minimizing z is equivalent to maximizing −z. In this picture, min x1 + 4x2 is equivalent to max −x1 − 4x2 .
MS-C2105 Introduction to Optimization 8/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Graphical sensitivity analysis
The corner point C remains
optimal as long as the slope of z lies between those of constraints (1) and (2). If z = c1 x1 + c2 x2 , this condition is 46 ≤ cc12 ≤ 21 , or 1 c1 equivalently, 2 ≤ c2 ≤ 64 .
MS-C2105 Introduction to Optimization 9/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Value of resource M1 at optimal solution
Let the availability of raw
material M1 vary between 20-36 tons. The optimum at corner point C ’slides’ along line DG. If the availability of M1 is not on this range, the intersection of (1) and (2) is no longer in the feasible region and the solution is changed.
MS-C2105 Introduction to Optimization 10/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Value of resource M1 at optimal solution
Denote M1 = 6x1 + 4x2 ;
D = (2, 2); G = (6, 0). Then define z (D )−z (G) y1 = ∆∆M1 z = M1(D )−M1(G) . 5·2+4·2−(5·6+4·0) = 20−36 −12000 e = −16 ton = 750 e/ton. A change of 1 ton in M1, in the interval 20 ≤ M1 ≤ 36, makes a change of 750 e to the optimal z-value.
MS-C2105 Introduction to Optimization 11/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Value of resource M2 in optimal solution
Similarly, now the availability
of M2 = x1 + 2x2 varies. The optimum at corner point C moves along line HB. We may calculate y2 = ∆∆M2 z = M2z ((H H )−z (B ) )−M2(B ) =500 e/ton. This holds in the region 4 ≤ M2 ≤ 20/3.
MS-C2105 Introduction to Optimization 12/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University Dual variables
We have obtained y1 = 750 e/ton and y2 = 500 e/ton.
For all other constraints (including non-negativity constraints), we get y3 , y4 , y5 , y6 = 0. Thus they are not active constraints at the optimal solution. Coefficients yi are called sensitivity coefficients, or dual variables (more in Lecture 4). In Lecture 9 we show that yi is the Lagrange variable associated with constraint i.
MS-C2105 Introduction to Optimization 13/13
H. Ehtamo / M. Mattila Systems Analysis Laboratory Aalto University