Practical aspects of formulating, solving, and interpreting an LP is presented through an example. Modeling of different types of problems is discussed in Sec- tion 4.4.
Structural Design Problem
Consider the platform support system shown inFig. 4.1used for scaffolding. Cable 1 can support 120 lb, cable 2 can support 160 lb, and cables 3 and 4 can support 100 lb each. Determine the maximum total load that the system can support.
Formulation
Using free-body diagrams and static equilibrium equations, a weight ofWacting at afrom left support andbfrom the right support will cause reactions ofWb/(a+b) andWa/(a+b) respectively. Applying this principle and simplifying, we obtain the constraints
W2 ≤2S3,4 4W1+3W2≤8S2 4W1+W2≤8S1
4.3 Problem Illustrating Modeling, Solution, Solution Interpretation 133 8 ft
Cable 1 Cable 2
Cable 3 W1
W2
Cable 4
4 ft 4 ft 4 ft
Figure 4.1. Platform support problem.
whereSrepresents cable strength. Simplifying, we obtain maximize f =W1+W2
subject to
W2≤200 (Cables 3 and 4) 4W1+3W2≤1280 (Cable2) 4W1+W2≤960 (Cable1) W1≥0, W2≥0
(4.2)
We can model large-scale scaffolding problems using the same ideas. Graphical solution is given in the following as well as use of EXCEL SOLVER. Graphical solutions were discussed in Chapter 1. The variables areW1andW2. First step is to identify the feasible region. This can be done by plotting, in variable space with W1as thex-axis andW2as they-axis, the line defined by each constraint, and then determining which side of this line is feasible. Thus, we plot lines corresponding to W2=200,4W1+3W2=1280, 4W1+W2=960, and consider the first quadrant only. After obtaining , plot contours of the objective function by plotting lines W1+W2=cfor various values ofc. The optimum is defined by the highest value contour passing through. FromFig. 4.2, it is clear that the optimum point lies at the intersection of theactive(orbinding) constraints “cable 2,” and “cables 3 and 4.”
Thus, solving the two equationsW2=200 and 4W1+3W2=1280 gives the optimum solutionW1∗ =170,W2∗ =200, and objective f∗ =370.
Uniquenessof the optimum point is evident from Fig 4.2 since the objective function contour with value f =370 passes thru avertex. If this contour had been parallel to the constraint boundary, then any point on that boundary line, including the two vertices at its ends, would have the same optimum value of 370. Further, an
1000
900 800
700 600
500 400 300
00 50 100 150
optimum point
W1 W2 Cables 3&4 Cable 2 Cable 1
200 250 300 350 400
100 200
Figure 4.2. Plot of structural design problem showing feasible region and objective function contours (dotted lines).
LP problem isconvex, which implies that there do not exist local optima. Geomet- rical concepts are described in more detail in Section 4.5.
Physical Interpretation of Optimum Solution
Constraints associated with cables 3,4 and cable 2 are active, which means that these cables are stressed to their respective limits. However, cable 1 has an 80 lb slack. Per- haps, this cable can be made of cheaper material with a lower strength, within limits, although a multitude of cables with differing strengths increases manufacturing cost and chance of making errors during assembly.
Computer Solution
Codes given in the attached CD-ROM, based on the theory discussed later in this chapter, may be used to obtain the solution to the above problem. In the follow- ing, we show how to use EXCEL SOLVER and MATLAB (LINPROGroutine), respectively.
4.3 Problem Illustrating Modeling, Solution, Solution Interpretation 135
Excel Solver
First, the formulas for objective, and constraints and initial guesses for variables are defined on the Excel spreadsheet in cells A1-F2 as:
Cable Cable Cable
W1 W2 OBJ 3, 4 2 1
1 1 2 1 7 5
Then, SOLVER window is opened under Tools menu (if not visible, click “Add- ins”), and the optimization problem is defined as shown below:
Set Target Cell: $C$2 Equal to: ‘‘Max’’
By Changing Cells: $A$2:$B$2 Subject to the Constraints:
$A$2:$B$2 ≥ 0
$D$2 ≤ 200
$E$2 ≤ 1280
$F$2 ≤ 960
Solving (and also choosing additional answer sheets) we get W1 W2 OBJ Cable 3, 4 Cable 2 Cable 1
170 200 370 200 1280 880
Constraints
Cell Name Final value Lagrange multiplier
$D$2 Cable 3, 4 200 0.25
$E$2 Cable 2 1280 0.25
$F$2 Cable 1 880 0
Significance of Lagrange Multipliers
For nondegenerate problems wherein active constraints have corresponding nonzero Lagrange multipliers, a Lagrange multiplier λi, associated with a con- straintgi, represents the sensitivity of the optimum objective function value to a
relaxation in the constraint limit. Specifically, if gi(x)≤ci is relaxed to gi(x)≤ ci+ei, then
λi = d f∗ dei
ei=0
for a maximization problem λi = − d f∗
dei
ei=0
for a minimization problem (4.3)
In this example, say, the strength limit of cables 3,4 is relaxed from current value of 200 to 202. Resolving the problem, we obtain f∗=370.5. Thus,d f∗/dei = (370.5−370)/2=0.25 as obtained by SOLVER above. However, it is not necessary to resolve the problem to obtain λi. (Why is the Lagrange multiplier associated with cable 1 constraint equal to zero?)
More practical understanding ofλiis obtained by writing the sensitivity relation λi =d fdei∗
ei=0 asf∗=λiei, from which we can state that λiequals the improve- ment in objective for aunitchange in resourcei.λi are also known asdual prices (see Duality in Section 4.7) and as shadow pricesin economics. We may say that λi reflects return on unit additional investment with respect to resourcei. They are not prices as such, but can be used to set prices. For instance, if a constraint limits the amount of labor available to 40 hours per week, the shadow priceλi will tell us how much we would be willing to pay for an additional hour of labor. Ifλi =$10 for the labor constraint, we should pay no more than $10 an hour for overtime. Labor costs of less than $10/hour will increase the objective value, labor costs of more than
$10/hour will decrease the objective value, and labor costs of exactly $10 will cause the objective function value to remain the same.
MATLAB (using the Optimization Toolbox) function [] = LP()
close all; clear all;
f=[-1 -1]; %max f <--> min. -f A=[0 1; 4 3; 4 1];
b=[200 1280 960]’;
XLB=[0 0]; %lower bounds on variables
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA] = LINPROG(f,A,b,[],[],XLB) X =
170.0000 200.0000 FVAL = -370.0000