03 - LP Introduction and Graphical Method MOO
03 - LP Introduction and Graphical Method MOO
1
Operations Research –Linear Programming
What is Linear Programming ?
-Daily demand for interior paint cannot exceed that of exterior paint by more than 1 ton
- Maximum daily demand of interior paint is 2 tons
-Reddy Mikks wants to determine the optimum product mix of interior and
exterior paints that maximizes the total daily profit
Formulation – Mathematical model
Let x1 = tons produced daily of exterior paint
x2 = tons produced daily of interior paint
Let z represent the total daily profit (in thousands of rupees)
Objective function : Maximize z = f(x , x ) = 5 x + 4 x
1 2 1 2
(Usage of a raw material by both paints) < (Maximum raw material availability)
Usage of raw material M1 per day = 6x1 + 4x2 tons
Usage of raw material M2 per day = 1x1 + 2x2 tons
- daily availability of raw material M1 is 24 tons
- daily availability of raw material M2 is 6 tons
6x1 + 4x2 < 24 (raw material M1)
x1 + 2x2 < 6 (raw material M2)
Difference of daily demand of interior (x2) and exterior (x1) paints does not exceed 1 ton,
x2 - x1 < 1
-Maximum daily demand of interior paint is 2 tons,
x2 < 2
- Decision variables x1 and x2 cannot be negative values, so x1 > 0 , x2 > 0
(Implicit Constraints )
Formulation – Mathematical model
Assumptions of LP
Complete Reddy Mikks problem In short an LP must have a linear objective
function and must have linear constraints
Implicitly this translates to:
x2 - x1 < 1 x2 - x1 = 1 4
4
x2 < 2 x2 = 2 5
5
x1 > 0 x1 = 0 6
6
x2 > 0 x2 = 0
Plot graphs of x1 = 0 and x2 = 0 GRAPHICAL LP SOLUTION
Plot graph of 6x1 + 4x2 = 24 by using
the coordinates of the equation
Plot graph of x1 + 2x2 = 6 by using
the coordinates of the equation
Plot graph of x2 - x1 = 1 by using
the coordinates of the equation
Plot graph of x2 = 2 by using
the coordinates of the equation
- Now include the inequality of all the 6 equations
- Inequality divides the (x1, x2) plane into two half
spaces , one on each side of the graphed line
- Only one of these two halves satisfies the inequality
- To determine the correct side , choose (0,0) as a
reference point
- If (0,0) coordinate satisfies the inequality, then the
side in which (0,0) coordinate lies is the feasible
half-space , otherwise the other side is • Feasible solution = a solution for which all
- If the graph line happens to pass through the origin constraints are satisfied. The set of all feasible
(0,0) , then any other point can be used to find the solutions create the feasible region.
feasible half-space
Step 2: GRAPHICAL LP SOLUTION
2) Determination of the optimum solution from among
all the feasible points in the solution space:
- After finding out all the feasible half-spaces of all
the 6 equations, feasible space is obtained by
the line segments joining all the corner points A,
B, C, D ,E and F
- Any point within or on the boundary of the
- Evolutionary Multi-
objective Optimization
(EMO) Algorithms
Pareto-Optimal Fronts
Multi-objective Linear programming problem Pareto - optimal solutions
Total cost Minimize Z1= f1(x) = 2000x1 + 500x2 Function space
f2
Total time Minimize Z2= f2(x) = x1 + 2x2 Objective space
Subject to 2x1 + 2x2 ≥ 16 (1) If there is only one point that Criterion Space
minimize both cost and time,
x1 + 5x2 ≥ 28 (2) obviously that would be the A (4000, 16)
solution; but often, there are C
D
Variable space different optimal points for
Decision space each objective. B (8500, 13)
x2
Design Space f1
Line segment AB
Z1 time16h Line segment AB in function
between the two optimal
(optimal cost) Z2 cost = Rs.8500 points represents Non space is ‘Pareto front’
Z1 =cost = Rs.4000 (optimal time) dominant solutions. Any point on this front is
Z2=Time=13h
x1 x2 f1 f2 considered “Pareto optimal”.
A (0, 8) C By moving along the curve,
D A 0 8 4000 16
B(3, 5) you could minimize cost at the
x1 C ? ? 5500 15 expense of time, or minimize
time at the expense of cost,
D ? ? 7000 14 but you can not improve both
(1) 3 5 8500 13 at once.
(2) B
Example: Single objective NL
constrained Optimization Subject to -x1 - x2 + 10 ≤ 0 (1)
GRAPHICAL SOLUTION
-2x1 + 3x2 -10 ≤ 0 (2)
Solution:
Figure is a graphical representation of
the problem. The feasible set S is
convex, as shown in the figure.
f1 =16.25
f1
Multi-objective Optimization
Multi-objective Optimization Posteriori approach Solutions
f1 =16.25
f1
Multi-objective Optimization
Multi-objective Optimization
OPTIMIZATION PROBLEMS - CLASSIFICATION
ample:
The Local bag manufacturing Company manufactures standard school and office bags.
Products require.(1) cutting of material (Outer and inner) and (2) stitching and finishing.
The following is the formulated product mix LP model
Maximize profit z =
GRAPHICAL
5 LP SOLUTION
0
X
X2
1 40 –
Optimal Solution at Point A
+
X1 = 0 School bags 30 –
X2 = 20 Office bags 1
Profits = Rs. 2,400 2
0 20 – Profit Line for 50X1 + 120X2
A(0, 20) (Passes through Point A)
X
2
B
10 –
Subject to
| | | | | |
0– 10 20 30 40 50 60 X1
C
Sensitivity Analysis
Optimal solutions to LP problems have been found under what are called deterministic assumptions
This means that we assume complete certainty in the data and relationships of a problem
But in the real world, conditions are dynamic and changing
We can analyze how sensitive a deterministic solution is to changes in the assumptions of the model
This is called sensitivity analysis , postoptimality analysis or parametric programming
| | C | | | |
0– 10 20 30 40 50 60 X1
Software in sensitivity analysis also provide Windows and Changes in Objective Function
Coefficients
Sensitivity Analysis
Changes in the Constraint Coefficients
If the amount of resources needed to produce a product changes, coefficients
in the constraint equations change
This does not change the objective function, but it can produce a significant
change in the shape of the feasible region
This may cause a change in the optimal solution
40 – 40 – 40 –
Optimal Optimal Optimal
Solution unchanged Solution
20 – 20 – 2X1 + 4X2 ≤ 80 20 –
16
2X1 + 4X2 ≤ 80 2X1 + 5 X2 ≤ 80
| | | | | | | | | | |
0– 20 30 40 X1 0– 20 40 X1 0– 20 30 40 X1
Sensitivity Analysis
Changes in Resources or Right-Hand-Side Values Constraint
Coefficients :
The right-hand-side values of the constraints often represent resources available
If additional resources were available, a higher total profit could be realized
Sensitivity analysis about resources will help answer questions such as:
How much should the company be willing to pay for additional hours?
Is it profitable to have some cutting work overtime?
Should we be willing to pay for more titching and finishing time?
If the right-hand side of a constraint is changed, the feasible region will change
(unless the constraint is redundant) and often the optimal solution will change
The amount of change (increase or decrease) in the objective function value that
results from a unit change in one of the resources available is called the dual price
or dual value
Sensitivity Analysis
Changes in Resources or Right-Hand-Side Values Constraint
Coefficients :
However, the amount of possible increase in the right-hand side of a resource is
limited
If the number of hours increases beyond the upper bound (or decreases below
the lower bound), then the objective function would no longer increase
(decrease) by the dual price.
There may be excess (slack) hours of a resource or the objective function
may change by an amount different from the dual price.
Thus, the dual price is relevant only within limits.
If the dual value of a constraint is zero
The slack is positive, indicating unused resource
Additional amount of resource will simply increase the amount of slack.
The upper limit of infinity indicates that adding more hours would simply
increase the amount of slack.
Sensitivity Analysis
Changes in Resources or Right-Hand-Side Values Constraint Coefficients :
Cutting is a binding constraint; increasing the resource will Shadow price represents change in
increase the solution space and move the optimal point. the objective function value per one-
Stitching is a nonbinding constraint; increasing the resource will unit increase in the RHS of the
increase the solution space and but will not move the optimal point. constraint. In a business application, a
The cutting hours are changed from 80 to 100, the X2
X2 new optimal solution is (0,25) with profit of 3,000.
shadow price is the maximum price
The extra 20 hours resulted in an increase in profit that we can pay for an extra unit of a
60 – of 600 or 30/hour 60 – given limited resource.Right Hand Side
Max. z =
5 (RHS).
0 – Max. z =
X 5
40 –
A(0,25) Constraint 60 Hours 40 – 0
1
Profit Line for 50X1 + 120X2 A = (0,20) X
a
25 – (Passes through Point A) + – 1
Max. z = Max. z =
60 – 5 60 – 5
0 0
X – X
Constraint 1 1
40 – Representing 60 40 –
Hours + A (0,20) +
Profit Line for 50X1 + 120X2 – Profit Line for 50X1 + 120X2
A(0,15)
(Passes through Point A) 1 (Passes through Point A) 1
Changed Constraint 2 20 – 2
20 ––
15 Representing 60 0
0
Hours X 10 – X
2
| | | 2 | | | | | |
s.t.40 0–
10 20
s.t.
30 40 50 60
0– 20 60 X1 X1
2 2
Sensitivity Analysis
Changes in Resources or Right-Hand-Side Values Constraint Coefficients :
If total cutting time was increased to
Max. z = 240, the optimal solution would be
5 (0,60) with a profit of 7,200. This is
0 2,400 (the original solution) + 30 (dual
A(0,60) X price)*160 hours(240-80)
1 If the hours increases beyond 240,
Changed Constraint
60 – Representing 240 Hours
+ then the optimal solution would
still be (0,60) and profit would not
Profit Line for 50X1 + 120X2
1
(Passes through Point A)
increase. The extra time is slack
2 during which the cutting are not
40 – 0 working
X
Constraint
2
Representing
s.t. 60 Hours
20 – 2
X
1
| | | | | |
0
– 20 40 60 + 80 100 120
4
Linear Programming problem
General characteristics and Terminology
In an ‘n’ dimensional space, described by variables x 1, … , xn,
have a “feasible region” which is a “polytope” which mean a
region whose boundaries are defined by linear constraints.
In two dimensions, a polytope is a polygon, (which can be
unbounded) and linear constraints as equalities are straight lines .
The points in n dimensional space that obey linear constraints as equalities, define a
hyperplane. In three dimensions a hyperplane is just a plane, and in fact a hyperplane is
the generalization of a plane in 3D to higher dimensions. A hyperplane actual forms part of
the boundary of the feasible region is called an n-1 face of that region.
The points that obey two constraints lie on the intersection of the hyperplanes the n-2
dimensional region of the boundary of the feasible region they form an n-2 face of it. And we
have similar definitions for the intersection of k of the constraints that form part of the
boundary of the feasible region: these are called n-k faces of it.
A zero face of the feasible region, also called a vertex of it, is a point which lies on the
intersection of n (linearly independent) constraints and is on the boundary of the feasible
region. The intersection of the n-1 shared constraints is a 1-face that is called the edge joining
them.
Linear Programming problem
General characteristics of LP problem
• Feasible region is convex set
– Convex region: given any two points from the region, the line segment
between them is part of the region
– Each constraint generates at most one edge in the feasible region
input parameters.
• Why is a polynomial-time algorithm better than
an exponential-time one? And strongly preferred
because it can handle arbitrarily large data.
Exponential time algorithms have an explosive
growth rate in terms of computations.
Polynomial and Exponential run time Algorithms
• Let’s see some common functions, ordered by how fast they grow.
• Computer Scientists divide these functions into
two classes:
Polynomial functions: Any function that is O(nk), i.e.
bounded from above by nk for some constant k.
E.g. O(1), O(log n), O(n), O(n × log n), O(n2), O(n3)
Exponential functions: The remaining functions. E.g.
O(2n), O(n!), O(nn)
The growth of functions is usually described using the big-O
notation.
This is really a different definition of the word ‘polynomial’. We defined ‘polynomial’ to be any
function of the form aknk + ak−1nk−1 + . . . + a1n + a0.
But here the word ‘polynomial’ is used to lump together functions that are bounded from above
by polynomials. So, log n and n × log n, which are not polynomials in original sense, are
polynomials by alternative definition, because they are bounded from above by, e.g., n and n 2
respectively.
• Why have we lumped functions together into these two broad classes?
The next two
Polynomial and Exponential run time Algorithms
On the basis of this
classification of
functions into
polynomial and
exponential, we can
classify algorithms:
Is this solution Optimal ? What is the Optimality condition - Test for Optimality?
For a maximization problem, In objective function row (z- row), if the coefficients
of all the Non Basic variable are non negative then the solution is Optimal.
(For a minimization problem, In objective function row (z- row), if the coefficients
of all the Non Basic variable are non positive then the solution is Optimal.)
If this solution is not optimal – One of the Variable from Non Basic selected and
put in to the Basic category and against the One variable from Basic category is
selected and put into the Non Basic category.
Simplex Which Non basic variable to
Methodology applied to the Reddy Mikks problem select as a entering variable ?
Algorithm One with Most negative Coff.
This rule is known as Simplex
Optimality condition.
Which Basic variable to select
as leaving variable ?
Compute the ratios of Solutions
to corresponding Entering
variable column Positive
constraint coeff. Smallest
(Minimum) Non-negative ratio
selected as leaving variable
This rule is known as Simplex
feasibility condition.
The New solution is determined
by Swapping the Leaving
variable S1 and the Entering
variable X1 in the Next Simplex
Table. (Solution by Gauss-
Jordan Method)
Simplex Methodology applied to the Reddy Mikks problem
Algorithm
Entering Variable
Leaving Variable
Basis Z X1 X2 S1 S2 S3 S4 Sol. Ratio
Z 1 -5 -4 0 0 0 0 0
S1 0 6 4 1 0 1 0 24 24/6 =4 Select
S2 0 1 3 0 1 0 0 6 6/1 = 6 Minimum Non negative
S3 0 -1 1 0 0 1 0 1 1/-1 = -
S4 0 0 1 0 0 0 1 2 1 Negative and Infinity
2/0 = α (Division by Zero)
Ignore
‘m’ Basic Selected next
‘m’ equations Variables based on ratio Solve by
Leaving Variable Gauss-
‘n’ variables.
‘n-m’ Jordan
(m < n.) Non Basic Selected first Method
Variables Entering variable
Swapping of variables
Simplex Methodology applied to the Reddy Mikks problem
The New solution by Gauss-Jordan Method:
Algorithm
Simplex Applied to the Reddy Mikks problem
The New solution by Gauss-Jordan Method:
Algorithm
Simplex Applied to the Reddy Mikks problem
Algorithm
Simplex Applied to the Reddy Mikks problem
Algorithm
The New solution by Gauss-Jordan Method:
Simplex Applied to the Reddy Mikks problem
Algorithm
Based on the Optimality condition, None of the Z- row coeff. are negative.
So This is an Optimal solution Tableau.
The optimal solution can be read as follow, from the Simplex Tableau.
1. Degeneracy
2. Alternative optima
3. Unbounded solution
4. Nonexisting (infeasible) solution
Some Special cases in Linear Programming problem
Tie for the Entering Basic Variable
The first step of each iteration selects the non basic variable having most negative
coeff. in Z row as the entering variable. Now suppose two or more non basic
variables are having same largest negative value in z row.
Say in Reddy Mikks example, the objective function is changed to Z=5X1+5x2.
Now the Z row will be Z- 5X1-5x2=0
There is a tie for entering bvariable. How this tie be broken ?
The answer is that the selection between these contenders may be made
arbitrarily
The optimal solution will be reached eventually, regardless of the tied
variable chosen.
Some Special cases in Linear Programming problem
Tie Breaking in the Simplex Method
Tie for the Leaving Variable - Degeneracy
If two or more basic variables tie for being the leaving basic variable, choose any
one of the tied basic variables to be the leaving basic variable. One or more tied
basic variables not chosen to be the leaving basic variable will have a value of
zero.
If a basic variable has a value of zero, it is called degenerate.
Z -3 -9 0 0 0 --
S1 1 4 1 0 8 2 S1 and s2 tie for the leaving variable,
Tie
S2 1 2 0 1 4 2 leading to degeneracy in next iteration
because the basic variable S2 has zero
Z -3/4 0 2/4 0 18
value. The optimal is reached in
X2 1/4 1 1/4 0 2 2 additional iteration.
Zero
S2 1/2 0 -1/2 1 0 0 From theoretical standpoint it leads
Z 0 0 3/2 3/2 18 to cycling. The solution does not
Degenerate
improve.
X2 0 1 1/2 -1/2 2 Optimal
X1 1 0 -1 2 0
Special cases in L P problems Degeneracy Example:
Special cases in L P problems Unbounded solution Example:
No Leaving Basic Variable – Unbounded Z Graphical Solution
Objective Unbounded
If every coefficient in the pivot column of the simplex value optimal
tableau is either negative or zero, there is no leaving basic solution
variable. This case has an unbound objective function Z because the
Max Z = X1+ 2X2 Max Z = X1+ 2X2 value of can be
s.t. s.t. increased
X1 – X2 ≤10 indefinetely in
X1 – X2 + S1= 10
region. 𝑍 will
the feasible
2X1 ≤ 40 2X1 + S2= 40
X1, X2 ≥0 X1, X2,S1,S2 ≥0 be unbounded.
Basic X1 X2 S1 S2 Sol. Ratio
Z -1 -2 0 0 -1 --
S1 1 -1 1 0 1
No one Unbounded feasible solution region
2 0 0 1 2 Qualifies
S2 Unbounded optimal solution
Unbounded (depends on the objective function
All value if x2( nonbasic variable) either optimal Which direction it optimize ?
zero or negative. solution Unbounded or Bounded
Special cases in L P problems Unbounded solution space:
Max Z = 2X1- X2 Max Z = 2X1- X2 Graphical Solution
s.t. s.t.
X1 – X2 ≤ 10 X1 – X2 + S1= 10
2X1 ≤ 40 2X1 + S2= 40
1-X2
X1, X2 ≥0 X1, X2,S1,S2 ≥0 Objective
2X
value
Z=
Basic X1 X2 S1 S2 Sol. Ratio
NOTE: Optimizes
Z -2 +1 0 0 0 -- Unbounded feasible
S1 1 -1 1 0 10 10 solution region
Do not imply
S2 2 0 0 1 40 20 (20,10)
Unbounded solution. Optimal
Z 0 -1 3 0 30
X1 1 -1 1 0 10
Unbounded feasible solution region
S2 0 2 -2 1 20 10
Optimal solution as usual
Z 0 0 2 1/2 30 Optimal (depends on the objective function
X1 1 0 0 1/2 20 (X1=20, Which direction it optimize ?)
X2 0 1 --1 1/2 10 X2=10) Unbounded or Bounded
Special cases in L P problems Unboundness of solution space
NOTE:
Unbounded feasible
solution region
Do not imply
Unbounded solution.
(depends on the objective
function Which direction it
optimize ?)
Unbounded or Bounded
C (2,6)
E
(4,3)