SPC577 Lecture 05 Fall 2024
SPC577 Lecture 05 Fall 2024
Lecture 05
Introduction to linear programming Problems
Dr. Mohannad Draz
Assistant Professor
Zewail City of Science, Technology and Innovation
[email protected]
Lecture o Introduction
o Two-Variables LP Model
Contents o Example 1
o LP Model in Equation Form (The
Simplex Method)
o Transition From Graphical to Algebraic
Solution
1
10/31/2024
Introduction
Real-Life Application—Frontier Airlines Purchases Fuel Economically
The fueling of an aircraft can take place at any of the stopovers along a flight
route.
Fuel price varies among the stopovers, and potential savings can be realized by
tankering
(loading) extra fuel at a cheaper location for use on subsequent flight legs.
The disadvantage is that the extra weight of tanker fuel will result in higher
gasoline burn. Linear programming (LP) and heuristics are used to determine the
optimum amount of tinkering that balances the cost of excess burn against the
savings in fuel cost.
The study in 1981 resulted in net savings of about $350,000 per year. With the
significant rise in the cost of fuel, many airlines are using LP-based tankering
software to purchase fuel.
Two-Variables LP model
Reddy Mikks produces both interior and exterior paints from two raw materials,
M1 and M2.
The following table provides the basic data of the problem:
The daily demand for interior paint cannot exceed that for exterior paint by more than
one ton.
The maximum daily demand for interior paint is two tons.
Reddy Mikks wants to determine the optimum (best) product mix of interior and
exterior paints that maximizes the total daily profit.
2
10/31/2024
Solution
All OR models, LP included, consist of three basic components:
3. Constraints
3.1 The daily usage of raw material M1 is 6 tons per ton of exterior paint and 4 tons per
ton of interior paint. Thus,
3.2 The maximum daily availability of raw materials M1 is 24 and for M2 is 6 tons.
3
10/31/2024
3.3 The first restriction on product demand stipulates that the daily production of
interior paint cannot exceed that of exterior paint by more than one ton,:
x2 - x1 ≤ 1 → Market limit
3.4 The maximum daily demand for interior paint is two tons.
x2 ≤ 2 →Demand limit2
3.5 An implicit (or “understood-to-be”) restriction requires (all) the variables, x1 and x2,
to assume zero or positive values only.
The restrictions are referred to as nonnegativity constraints.
x1 ≥ 0
x2 ≥ 0
Subjected to(Constraints):
Any values of x1 and x2 that satisfy all constraints constitute a feasible solution.
Otherwise, the solution is infeasible.
The goal of the problem is to find the optimum, the best feasible solution that maximizes
the total profit z.
4
10/31/2024
Note that. The objective and the constraint function in all LPs must be linear.
Additionally, all the parameters (coefficients of the objective and constraint functions)
of the model are known with certainty.
Solving Graphically
The graphical solution includes two steps:
2. Determination of the optimum solution from among all the points in the solution
space.
10
5
10/31/2024
11
x1 + x2 ≥ 800 → x1 + x2 - S1 = 800, S1 ≥ 0
12
6
10/31/2024
The answer is that, in all nontrivial LPs, the number of equations m is always
less than the number of variables n,
13
14
7
10/31/2024
Basic solutions correspond to the corner points in the graphical solution space.
They are determined by setting n - m variables equal to zero and solving the m equations
for the remaining m variables,
Corner points are the basic feasible solutions that completely define the candidates for
the optimum solution in the algebraic solutions space.
15
Example
Consider the following LP with two variables:
subject to
16
8
10/31/2024
Solution (Graphically)
17
Solution Algebraic
Algebraically, the solution space of the LP is represented by the following m = 2
equations and n = 4 variables:
For example, if we set x1 = 0 and x2 = 0, the equations provide the unique basic solution.
s1 = 4, s2 = 5
18
9
10/31/2024
Solution Algebraic
Another point can be determined by setting s1 = 0 and s2 = 0 and then solving the
resulting two equations
2x1 + x2 = 4
x1 + 2x2 = 5
Consider all combinations in which n - m variables equal zero and solve the
resulting equations.
Once done, the optimum solution is the feasible basic solution (corner point) with the
best objective value. (the maximum number of corner points is
Looking at the Figure , we can spot the four corner points A, B, C, and D.
So, where are the remaining two? In fact, points E and F also are corner points. But,
they are infeasible, and, hence, are not candidates for the optimum.
19
The zero n – m variables are known as nonbasic variables. The remaining m variables
are called basic variables, and their solution (obtained by solving the m equations) is
referred to as basic solution. The following table provides all the basic and nonbasic
solutions of the current example.
20
10
10/31/2024
We can see from the preceding illustration that, as the size of the problem increases,
enumerating all the corner points becomes a prohibitive task. For example, for m = 10
and n = 20, it is necessary to solve C2010= 184,7562 sets of 10 * 10 equations, a
staggering task, particularly when we realize that a 110 * 202-LP is a very small size
(real-life LPs can include thousands of variables and constraints).
21
THANK
YOU
22
11