Linear Programming Formulations
Linear Programming Formulations
LINEAR PROGRAMMING
FORMULATIONS
Revision LP Assumptions Formulation Examples
ASSUMPTIONS
1. Proportionality
2. Additivity
For example, the total cost 18x1 + 16x2 which is the sum of
the individual costs 18x1 and 16x2 .
Revision LP Assumptions Formulation Examples
Steps Involved
A Carpenter Problem
Example 1
A carpenter manufactures chairs and tables. He has 100m2 of woods
and 40 hours of production time per week. Total production cannot
exceed 70 items per week and the number of chairs cannot exceed the
number of tables by more than 35. A chair requires 2m2 of wood and
1 hour labor per chair. A table requires 1m2 of wood and 2 hours
labor per table. The carpenter makes profit of TZS 8,000 and TZS
5,000 for each chair and table, respectively. He is seeking a
production schedule that will maximize his profit.
Revision LP Assumptions Formulation Examples
Solution
Solution, cont..
4. Lower bounds
We cannot have negation production, thus we have:
x1 , x2 ≥ 0 (non − negative)
Revision LP Assumptions Formulation Examples
Solution, cont...
Advertisement
Example 2
Dorian makes luxury cars and jeeps for high-income men and women.
It wishes to advertise with 1 minute spots in comedy shows and
football games. Each comedy spot costs £50K and is seen by 7M
high-income women and 2M high-income men. Each football spot
costs £100K and is seen by 2M high-income women and 12M
high-income men. How can Dorian reach 28M high-income women
and 24M high-income men at the least cost.
Revision LP Assumptions Formulation Examples
Solution
Solution, cont
...
3. Identify the Constraints
We have the following constraints
4. Lower bounds
We cannot have negation number of slots, thus we have:
x1 , x2 ≥ 0
Revision LP Assumptions Formulation Examples
Solution, cont...
ISA
Problem formulation
Solution
Identify decision variables
ISA
Problem formulation
Subject to
x1 + x2 + x7 ≤ 480 (kgs of Sangara produced)
x3 + x4 + x8 ≤ 400 (kgs of Sato produced)
x5 + x6 + x9 ≤ 230 (kgs of Kamongo produced)
x1 + x3 + x5 ≤ 420 (Total kgs Smoked on regular time)
x2 + x4 + x6 ≤ 250 (Total kgs Smoked on over time)
x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ≥ 0
ISA
Problem formulation
Alpha Limited
Alpha Limited produces and sells 2 different products under the brand
name black & white. The profit per unit on these products is TZS 5,000
& TZS 4,000 respectively. Both black & white employ the same
manufacturing process which has a fixed total capacity of 50,000
man-hours. As per the estimates of the marketing research department
of Alpha Limited, there is a market demand for maximum 8,000 units of
Black & 10,000 units of white. Subject to the overall demand, the
products can be sold in any possible combination. If it takes 3 hours to
produce one unit of black & 2 hours to produce one unit of white,
formulate the problem as a linear programming model.
ISA
Problem formulation
Solution
Decision variables: Let
Constraints:
ISA
Problem formulation
Solution cont.
Non-negative constraints:
x1 , x2 ≥ 0
ISA
Problem formulation
Chemical processes
The management of Chemical company is considering the optimal mix of
two possible processes. The values of input & output for both these
process are given as follows:
Units–inputs Units–outputs
Process I1 I2 O1 O2
X 2 6 3 7
Y 4 8 5 9
ISA
Problem formulation
Solution cont.
3) Market requirement is to produce at least 5000 units of O1
3x1 + 5x2 ≥ 5000
4) Market requirement is to produce at least 7000 units of O2
7x1 + 9x2 ≥ 7000
5) Non-negative constraints x1 , x2 ≥ 0
Finally, LP Problem
GRAPHICAL SOLUTION
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Introduction
An LP with two decision variables can be solved graphically.
The method consists of two phases
Finding the values of the decision variables for which all the
constraints are met. That is, we find feasible region of the
solution space
Determining the optimal solution from all the points in the feasible
region.
We use the following steps to find the Feasible Region
1. Use the axis in a 2-dimensional graph to represent the values that
the decision variables can take
2. For each constraint, replace the inequalities with equations and
graph the resulting straight line on the 2-dimensional graph
3. For the inequality constraints, find the side (half-space) of the
graph meeting the original conditions (evaluate whether the
inequality is satisfied at the origin)
4. Find the intersection of all feasible regions defined by all the
constraints. The resulting region is the (overall) feasible region.
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Example
consider the following problem
Example
Figure
Figure :
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Iso-profit method
Figure
Figure :
Special Cases
The previous LP problem had a unique optimal solution. We now
discuss other three types of LPs that do not have unique optimal
solution.
These are:
LP has many solutions
LP has no solution
LP is unbounded.
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Many Solution
Example
Solve the following
Many Solution
Figure :
We note that last point in the feasible region to intersect an isoprofit
line is the entire line segment AE.
This mean that any point on the line segment AE is optimal. Hence,
this problem has infinite number of optimal solutions.
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Infeasible LP
Condider the following LP.
Example
Figure
Figure :
No point satisfy all constraints in the problem. This implies that the
problem has an empty feasible region, and is an infeasible LP.
Consequently, it has no solution.
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Unbounded
For a max problem, an unbounded LP occurs if it is possible to
find points in the feasible region with arbitrary large z-values.
For a min problem, an LP is unbounded if there are points in the
feasible region with an arbitrary small z-values.
Graphically, we can spot an unbounded LP as follows: A max
problem (min problem) is unbounded if, when move parallel to
the original isoprofit (isocost) line in the direction of increasing
(decreasing) z, we never entirely leave the feasible region.
Consider the following problem.
Example
Max z = 2x1 − x2
S.t x1 − x2 ≤ 1
2x1 + x2 ≥ 6
x1 , x2 ≥ 0
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Figure
Figure :
This feasible region is unbounded. Thus there are points in the
feasible region that have arbitrary large z-value.
Introduction Isoprofit Line Method Extreme Point Method Special Cases
Summary
From the above discussion, we see that every LP with two variables
must fall into one of the following four cases:
Convex set
A set of points S is convex set if given any two points; x1 and x2 in S, then
λx1 + (1 − λ)x2 ∈ S for any λ ∈ [0, 1]. Interpretation: Definition above
implies that a set of points S is a convex set if any line segment joining a
pair of two points in S is wholly contained in S.
Examples of convex sets are
ISA
Non-convex
Examples of non-convex sets are
Extreme point
Let S be a convex set. A point x0 ∈ S is extreme point of S if there are
no points x1 and x2 (x1 6= x0 or x2 6= x0 ) so that x0 = λx1 + (1 − λ)x2
for some λ ∈ (0, 1).
ISA
Extreme point cont.
Interpretation: Implies that for any convex set S, a point P in S is an
extreme point (or corner point) if each line segment that lies completely
in S and contains the point P has P as an end point of the line segment.
Remarks
It is an easy task to verify that the feasible region for any LP is a
convex
Theorem
If a linear programming problem has a solution, then it must occur at an
extreme point of the feasible region associated with the problem
ISA
Extreme point method steps
The theorem gives us an alternative method to solve an LP problem.
The Method proceeds as follows
1 Graph the feasible set.
2 Find the coordinates of all extreme point (corner points) of the
feasible region.
3 Evaluate the objective function at each extreme point.
4 Find the vertex that renders the objective function a maximum
(minimum). If there is only one such vertex, then this extreme point
constitutes a unique solution to the problem. If the objective
function is maximized (minimized) at two adjacent extreme of S,
there are infinitely many optimal solutions given by the points on
the line segment determined by these two vertices.
ISA
Example 1
A company makes two products (X and Y) using two machines (A and
B). Each unit of X that is produced requires 50 minutes processing time
on machine A and 30 minutes processing time on machine B. Each unit
of Y that is produced requires 24 minutes processing time on machine A
and 33 minutes processing time on machine B. At the start of the
current week there are 30 units of X and 90 units of Y in stock.
Available processing time on machine A is forecast to be 40 hours and on
machine B is forecast to be 35 hours. The demand for X in the current
week is forecast to be 75 units and for Y is forecast to be 95 units.
Company policy is to maximize the combined sum of the units of X and
the units of Y in stock at the end of the week.
Formulate the problem as linear programming problem and solve by using
the Graphical method using both isoprofit/isocost line and extreme point
methods
ISA
Solution
Example 2
A firm produces two components which are then assembled into a final
product. The cost per unit of these components is 0.60 and 1.00
respectively. The minimum amount of the various grades of raw material
required for the manufacturing process are as follows:
Due to the requirement for a better quality product, the minimum usage
value of the raw materials should be 20 units, 20 units & 12 units
respectively. Formulate as a LP problem & solve graphically.
ISA
Introduction Terminology The Simplex Algorithm
SIMPLEX METHOD
Introduction Terminology The Simplex Algorithm
Introduction
Example
Solution
max z = 20x1 + 15x2
s.t. x1 +s1 = 100
x2 +s2 = 100
50x1 + 35x2 +s3 = 6000
20x1 + 15x2 −e4 = 2000
x1 , x2 , s1 , s2 , s3 , e4 ≥ 0
Solution
Min z = c1 x1 + c2 x2 + ··· cn xn
s.t. a11 x1 + a12 x2 + ··· a1n xn −y1 = b1
a21 x1 + a22 x2 + ··· a2n xn −y2 = b2
..
.
am1 x1 + am2 x2 + ··· amn xn −ym = bm
x1 , x2 , . . . , xn ≥ 0
y1 , y2 , . . . , ym ≥ 0
Introduction Terminology The Simplex Algorithm
x1
a11 a12 ··· a1n x2 b1
a21 a22 ··· a2n b2
Let A = , x = , b = .. , then
.. .. ..
. . . .. .
.
am1 am2 · · · amn bm
xn
the equation constraints of the LP can be written in matrix form as
Ax = b.
Introduction Terminology The Simplex Algorithm
Definition
A basic solution to the system of equations Ax = b is obtained by
1 setting n − m variables equal to 0,
2 solving for the m remaining variables, and
3 confirming that the solution for these m remaining variables is
unique.
Definition
A nonnegative basic solution is a called a basic feasible solution
(bfs) since it is feasible to Ax = b, xi ≥ 0. In other words, a feasible
Solution is a solution for which all the constraints are satisfied.
Definition
An Optimal Solution is a feasible solution that has the most
favourable value of the objective function.
Introduction Terminology The Simplex Algorithm
Example
Solve
max z = 60x1 + 30x2 + 20x3
s.t 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
x2 ≤ 5
x1 , x2 , x3 , x4 ≥ 0
The Simplex Algorithm
Example
Solve
max z = 60x1 + 30x2 + 20x3
s.t 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
x2 ≤ 5
x1 , x2 , x3 , x4 ≥ 0
The Simplex Algorithm
Now we must rewrite the system so the values of the basic variables
can be read off.
The new pivot equation (R3 /2) is
We obtain;