LINEAR PROGRAMMING 1
LINEAR PROGRAMMING 1
LINEAR PROGRAMMING
It can be recalled from the Two Mines example that the conditions for a mathematical
model to be a linear program (LP) were:
all variables continuous (i.e. can take fractional values)
a single objective (minimize or maximize)
the objective and constraints are linear i.e. any term is either a constant or a
constant multiplied by an unknown.
LP's are important - this is because:
many practical problems can be formulated as LP's
there exists an algorithm (called the simplex algorithm) which enables us to
solve LP's numerically relatively easily
We will return later to the simplex algorithm for solving LP's but for the moment we
will concentrate upon formulating LP's.
Some of the major application areas to which LP can be applied are:
Work scheduling
Production planning & Production process
Capital budgeting
Financial planning
Blending (e.g. Oil refinery management)
Farm planning
Distribution
Multi-period decision problems
o Inventory model
o Financial models
o Work scheduling
Note that the key to formulating LP's is practice. However, a useful hint is that
common objectives for LP's are maximize profit/minimize cost.
There are four basic assumptions in LP:
Proportionality
o The contribution to the objective function from each decision variable is
proportional to the value of the decision variable (The contribution to
the objective function from making four soldiers (4$3=$12) is exactly
four times the contribution to the objective function from making one
soldier ($3))
o The contribution of each decision variable to the LHS of each constraint
is proportional to the value of the decision variable (It takes exactly
three times as many finishing hours (2hrs3=6hrs) to manufacture
three soldiers as it takes to manufacture one soldier (2 hrs))
Additivity
o The contribution to the objective function for any decision variable is
independent of the values of the other decision variables (No matter
what the value of train (x2), the manufacture of soldier (x1) will always
contribute 3x1 dollars to the objective function)
o The contribution of a decision variable to LHS of each constraint is
independent of the values of other decision variables (No matter what
the value of x1, the manufacture of x2 uses x2 finishing hours and x2
carpentry hours)
1st implication: The value of objective function is the sum of the
contributions from each decision variables.
2nd implication: LHS of each constraint is the sum of the
contributions from each decision variables.
Divisibility
o Each decision variable is allowed to assume fractional values. If we
actually cannot produce a fractional number of decision variables, we
use IP (It is acceptable to produce 1.69 trains)
Certainty
o Each parameter is known with certainty
1.1 FORMULATING LP
Answer
The decision variables:
x1: number of brownies eaten daily
x2: number of scoops of chocolate ice cream eaten daily
x3: bottles of cola drunk daily
x4: pieces of pineapple cheesecake eaten daily
The objective function (the total cost of the diet in cents):
min w = 50x1 + 20x2 + 30x3 + 80x4
Constraints:
400x1 + 200x2 + 150x3 + 500x4 > 500 (daily calorie intake)
3x1 + 2x2 > 6 (daily chocolate intake)
2x1 + 2x2 + 4x3 + 4x4 > 10 (daily sugar intake)
2x1 + 4x2 + x3 + 5x4 > 8 (daily fat intake)
xi ≥ 0, i = 1, 2, 3, 4 (Sign restrictions!)
Report
The minimum cost diet incurs a daily cost of 90 cents by eating 3 scoops of chocolate
and drinking 1 bottle of cola (w = 90, x2 = 3, x3 = 1)
1.2 SOLVING LP
Example 1. Giapetto
Since the Giapetto LP has two variables, it may be solved graphically.
Answer
The feasible region is the set of all points satisfying the constraints.
max z = 3x1 + 2x2
s.t. 2x1 + x2 ≤ 100 (Finishing constraint)
x1 + x2 ≤ 80 (Carpentry constraint)
x1 ≤ 40 (Demand constraint)
x1, x2 ≥ 0 (Sign restrictions)
The set of points satisfying the LP is bounded by the five sided polygon DGFEH. Any
point on or in the interior of this polygon (the shade area) is in the feasible region.
Having identified the feasible region for the LP, a search can begin for the optimal
solution which will be the point in the feasible region with the largest z-value
(maximization problem).
To find the optimal solution, a line on which the points have the same z-value is
graphed. In a max problem, such a line is called an isoprofit line while in a min
problem, this is called the isocost line. (The figure shows the isoprofit lines for z =
60, z = 100, and z = 180).
X2
B
100
D
80
demand constraint
60
z = 100
carpentry constraint
40
20
F
z = 180
z = 60
E A C
H
10 20 40 50 60 80 X1
In the unique optimal solution case, isoprofit line last hits a point (vertex - corner)
before leaving the feasible region.
The optimal solution of this LP is point G where (x1, x2) = (20, 60) giving z = 180.
A constraint is binding (active, tight) if the left-hand and right-hand side of the
constraint are equal when the optimal values of the decision variables are substituted
into the constraint.
A constraint is nonbinding (inactive) if the left-hand side and the right-hand side of
the constraint are unequal when the optimal values of the decision variables are
substituted into the constraint.
In Giapetto LP, the finishing and carpentry constraints are binding. On the other hand
the demand constraint for wooden soldiers is nonbinding since at the optimal solution
x1 < 40 (x1 = 20).
Example 2. Advertisement
Since the Advertisement LP has two variables, it may be solved graphically.
Answer
The feasible region is the set of all points satisfying the constraints.
min z = 50x1 + 100x2
s.t. 7x1 + 2x2 ≥ 28 (high income women)
2x1 + 12x2 ≥ 24 (high income men)
x1, x2 ≥ 0
X2
14 X2 B
z = 600
4 6 z = 320
z = 600
High-income men constraint
4 z = 320
2 E
D
High-income men constraint
A C
2 E
D 2 4 6 8 10 12 14 X1
A C
2 4 6 8 10 12 14 X1
Since Dorian wants to minimize total advertising costs, the optimal solution to the
problem is the point in the feasible region with the smallest z value.
An isocost line with the smallest z value passes through point E and is the optimal
solution at x1 = 3.6 and x2 = 1.4 giving z = 320.
Both the high-income women and high-income men constraints are satisfied, both
constraints are binding.
Example 3. Two Mines
min 180x + 160y
st 6x + y ≥ 12
3x + y ≥ 8
4x + 6y ≥ 24
x≤5
y≤5
x, y ≥ 0
Answer
Optimal sol’n is 765.71. 1.71 days mine X and 2.86 days mine Y are operated.