Introduction to operations research and mathematical modeling. Development of linear programming mathematical model. Solving linear mathematical models using the graphical method and simplex method. Integer programming and solving integer models using branch and bound method.
3. INTRODUCTION:
Course Description:
This course will give the student an introduction to operations research and mathematical
modeling of Engineering Systems. In addition, student will learn different techniques for
solving linear programming models, some transportation problems, and assignment
problems.
Course Purpose:
This course is a requirement for undergraduate Transportation Engineering students. This
course is especially valuable for students with future interest in the field of logistics and
supply chain management.
Fall 2021 TTE 451 OPERATION RESEARCH / ELDESSOUKI 3
4. INTRODUCTION:
Course Learning Outcomes:
1. Understand the fundamental concepts of optimizing an engineering system,
2. Synthesis a linear programming mathematical models for common problems arise in
Transportation Systems;
3. Solve linear programming models, graphically, mathematically, and using available
optimization software solvers,
4. Understand the concept of Graph Theory (Networks), and how it could be utilized to
represent different Transportation Engineering problems,
5. Understand and apply common graph theory algorithms, such as Shortest Path Method,
Minimum Spanning Tree, and using available optimization software solvers
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 4
5. INTRODUCTION:
Course Contents:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 5
Course Calendar
List of Topics No. of Weeks Contact Hours
Fundamentals Of Mathematical Modeling 1 3
Developing Linear Programming Math. Models 2 3
Solving Linear Programming Models using Graphical Method 3-4 6
Solving Linear Programming Models using Simplex Method 5-6 6
Integer Linear Programming Models 7 3
Branch & Bound Method. Heuristic Methods 8 3
Mid Term Exam 1 9
Graph Theory 10 3
Shortest Path Algorithm 11 3
Minimum Spanning Tree 12 3
Critical Path Method 13 3
Max Flow Network 14 3
Mid Term Exam 2 15
7. WHERE DO WE APPLY MATHEMATICAL MODELING?
Distribution, Warehousing, and Inventory Management (Supply Chain Management):
Optimal Stocking of raw material and finished goods
Manufacturing plants location
Warehouse Location
Vehicle routing and scheduling
Solid Waste Management:
Landfill location
Creation of solid waste districts
Routing of solid waste collection vehicles
Manufacturing, Refining, and Processing:
Activity Analysis
Least Cost Analysis
Max Profit
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 7
8. WHERE DO WE APPLY MATHEMATICAL MODELING? (CONT.)
Educational Systems:
Classroom Scheduling
School Bus Routes
School District Boundaries
Personnel Scheduling and Assignment:
Scheduling and Assignment of Airline Crews
Aircraft Crews
Emergency Systems:
Fire Stations Location
Ambulances Staging
Emergency Evacuation
Emergency Response and Restoration
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 8
9. WHERE DO WE APPLY MATHEMATICAL MODELING? (CONT.)
Sales:
Traveling Salesperson
Sales Districts
Water Resources and Water Quality Management:
Reservoir Capacity and Location
Reservoirs Operations
Irrigation Water Distribution
Electric Utility Applications and Air Quality Management:
Transmission Network
Power Dispatching
Pricing
Civil Infrastructure and Construction:
Restoration/ Maintenance Scheduling
Critical Path Method
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 9
11. ANALYTICAL FRAMEWORK FOR ENGINEERING PROBLEMS
Step 1: Problem Identification
In this step, stakeholders identify a need to solve a problem. Stakeholders might be individuals, public
elected officials, Corporation Board of Directors , …etc.
As a result of this step, an Engineer or a Systems Analyst is called on for help.
Step 2: Engineers Involvement :
In this step, Engineer(s) work closely with stakeholders in defining and modeling the problem
Step 3: Mathematical Modeling:
Decision Variables: In this phase analyst(s) and client(s) define the decision variables for the problem
Objective: After identifying decision variables, an objective for the analysis should be defined. Also, the
mathematical form of the objective function will be defined in this step.
Constraints: The analysis constraints will be defined and incorporated in the mathematical model
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 11
12. ANALYTICAL FRAMEWORK FOR ENGINEERING PROBLEMS (CONT.)
Step 4: Optimization of the problem’s Mathematical Model
The analyst will then solve the mathematical model of the problem and determine an “optimal solution”.
It is essential to recognize that the optimal solution obtained in this step is for the mathematical
model and is not necessary the optimal for the problem
Analyst will recommend the Optimal Solution
Step 5: Feedback and Post Optimality Analysis
In this step, the client will get back to the analyst with comments on the “optimal solution” and suggest
the evaluation for the impact of changing or relaxing some of the constraints of the problem.
By the end of this step, the analyst will give final recommendations for solving the problem.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 12
13. ANALYTICAL FRAMEWORK FOR ENGINEERING PROBLEMS (CONT.)
Note:
It is important to emphasis that the role of the engineer here is to provide
recommendations for decision makers and not developing decisions. In most cases,
while developing the mathematical model for a problem, some variables and/or
objectives are not included for several reasons. As an example for these reasons: the
complex nature of such objectives, or due to their qualitative nature, or due to
miscommunications between the client(s) and the analyst.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 13
14. RULES AND GUIDELINES FOR MATH MODEL
DEVELOPMENT:
Simplicity:
Try always to maintain simplicity in developing the model. Sometimes a simple problem could be modeled
in a very complex way that is not solvable.
To gain this skill you need to exercise on developing mathematical models for problems that have been
modeled before.
Notations:
In your notations, always let (x) as your decision variable
In most cases you will have several decision variables so let (xi) be the decision variable for the ith decision
Constraints:
A constraint is the condition that you need not to violate.
Try to group them in homogenous sets
Model Type:
Try to maintain a linear relationships between your decision variables, i.e. keep it linear
Multiplications or exponential relationships will result in a non-linear model.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 14
15. EXAMPLE 1: THE REDDY MIKKS COMPANY
Reddy Mikks produces both interior and exterior paints from two raw material, M1 and M2. The following table
provides the basic data of the problem:
A market survey restricts the maximum daily demand of interior paint to 2 tons. Additionally, the daily demand for
interior paint cannot exceed that of exterior paint by more than 1 ton. Reddy Mikks wants to determine the
optimum (best) product mix of interior and exterior paints that maximizes the total profit.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 15
Tons of raw material per ton of
Extrior Paint Interior Paint Maximum Daily
Availability (tons)
Material M1 6 4 24
Material M2 1 2 6
Profit/ton
($1000)
5 4
16. EXAMPLE 1: THE REDDY MIKKS COMPANY
Reddy Mikks produces both interior and exterior paints from two raw material, M1 and M2. The following table
provides the basic data of the problem:
DV:
X1=Amount to be produced of ext paint & X2=Amount to be produced of int paint
Objective:
Max Profit : Profit = 5 X1 + 4 X2
Constraints:
Material Conts. :
M1) 6 X1 + 4 X2 <=24
M2) 1 X1 + 2 X2 <= 6
Demand:
X2 <= 2 & X2 <= X1+1
X1& X2 >= 0
A market survey restricts the maximum daily demand of interior paint to 2 tons. Additionally, the daily demand for
interior paint cannot exceed that of exterior paint by more than 1 ton. Reddy Mikks wants to determine the
optimum (best) product mix of interior and exterior paints that maximizes the total profit.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 16
Tons of raw material per ton of
Extrior Paint Interior Paint Maximum Daily
Availability (tons)
Material M1 6 4 24
Material M2 1 2 6
Profit/ton
($1000)
5 4
17. EXAMPLE 1: THE REDDY MIKKS COMPANY
SOLUTION
Step 1: Decision Variables:
X1=Amount to be produced of ext paint
X2=Amount to be produced of int paint
Step 2: Objective Function:
Max Profit MAX 5X1+ 4X2
Profit = 5 X1 + 4 X2
Step 3: Constraints:
Resource Constraints
M1) 6 X1 + 4 X2 <=24
M2) 1 X1 + 2 X2 <= 6
Demand Constraints
X2 <= 2 & X2 <= X1+1
Implicit Constraints
X1& X2 >= 0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 17
18. EXAMPLE: 2
The WYNDOR GLASS CO. produces high-quality glass products, including windows and
glass doors. It has three plants. Aluminum frames and hardware are made in Plant 1, wood
frames are made in Plant 2, and Plant 3 produces the glass and assembles the products. The
company is planning to launch two new products having large sales potential:
-Product 1: An 8-foot glass door with aluminum framing
-Product 2: A 4 x 6-foot double-hung wood-framed window
Product 1 requires some of the production capacity in Plants 1 and 3, but none in Plant 2.
Product 2 needs only Plants 2 and 3. The marketing division has concluded that the company
could sell as much of either product as could be produced by these plants. However, because
both products would be competing for the same production capacity in Plant 3, it is not clear
which mix of the two products would be most profitable. Therefore, an OR team has been
formed to study this question.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 18
20. EXAMPLE: 3
A furniture company manufactures desks and chairs. The sawing department cuts the
lumber for both products, which is sent to separate assembly departments. Assembled
items are sent for finishing to the painting department. The daily capacity of the sawing
department is 200 chairs or 80 desks. The chair assembly department can produce 120
chairs daily and the desk assembly department 60 desks daily. The paint department has a
daily capacity of 150 chairs or 110 desks. Given that the profit per chair is $50 and that of
a desk is $100, determine the optimal production mix for the company.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 20
21. EXAMPLE: 4
Ozark Farms uses at least 800 lb of special feed daily. The special feed is a mixture of corn and soybean
meal with the following compositions:
The dietary requirements of the special feed stipulate at least 30% protein and at most 5% fiber. Ozark
Farms wishes to determine the daily minimum cost feed mix.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 21
Ib Per lb of feedstuff
Protein Fiber Cost ($/lb)
Corn .09 .02 .30
Soybean
meal
.60 .06 .90
24. EXAMPLE 1: THE REDDY MIKKS COMPANY
SOLUTION:
Attributes of Solutions:
Solutions are either: feasible or infeasible
Feasible Solution:
Is a solution that satisfies all listed constraints of the problem. (Not Necessary the “Best
Solution”)
Infeasible Solution:
Is a solution that violates at least one constraint.
Optimum Solution:
Is a feasible solution where the objective function has its maximum value.
Feasible Space:
Is the area in the decision space that contains all feasible solutions.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 24
25. GRAPHICAL SOLUTION OF LP
NOTE: The Graphical approach is for problems with only two decision variables and
could be used with unlimited number of constraints.
Step 1: Identify the Feasible Space
The F.S. could be identified by plotting all constraints. The area bounded by all
constraints is the F.S. Please not that in LP problems the F.S. is convex.
Step 2: Identify the Objective Function Direction
If the case is maximization, then we are looking for the direction in which the value of
the objective function will increase. If the case was minimization, then we will be
looking at the direction of decrease
Step 3: Identify the Optimum Solution
Start moving the objective function over the F.S., the tangent point in the F.S. to the
objective function line is the optimum solution.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 25
26. GRAPHICAL SOLUTION OF LP (CONT.)
Observations and Notes:
Feasible Space:
Note that the F.S. in LP problems is convex
Optimum Solution Characteristics:
Usually a corner point in the F.S.
Identifies the restricting/active constraints
Optimality range
Fall 2021 TTE 451 OPERATION RESEARCH / ELDESSOUKI 26
29. EXAMPLE: 2
The WYNDOR GLASS CO. produces high-quality glass products, including windows and
glass doors. It has three plants. Aluminum frames and hardware are made in Plant 1, wood
frames are made in Plant 2, and Plant 3 produces the glass and assembles the products. The
company is planning to launch two new products having large sales potential:
-Product 1: An 8-foot glass door with aluminum framing
-Product 2: A 4 x 6-foot double-hung wood-framed window
Product 1 requires some of the production capacity in Plants 1 and 3, but none in Plant 2.
Product 2 needs only Plants 2 and 3. The marketing division has concluded that the company
could sell as much of either product as could be produced by these plants. However, because
both products would be competing for the same production capacity in Plant 3, it is not clear
which mix of the two products would be most profitable. Therefore, an OR team has been
formed to study this question.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 29
30. EXAMPLE 2(CONT.):
DV:
X1- Number of doors batches
X2- Number of windows batches
Obj:
MAX $3000 * X1 + $5000* X2
Subject to: (Constraints)
Plant1) 1 * X1 <= 4
Plant2) 2*X2 <= 12 X2<= 6
Plant3) 3 X1 + 2 *X2 <= 18
X1 & X2 >=0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 30
31. GRAPHICAL SOLUTION FOR EXAMPLE 2:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 31
MAX $3000 * X1 + $5000* X2
Subject to: (Constraints)
Plant1) 1 * X1 <= 4
Plant2) 2*X2 <= 12 X2<= 6
Plant3) 3 X1 + 2 *X2 <= 18
X1 & X2 >=0
32. GRAPHICAL SOLUTION FOR EXAMPLE 2:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 32
Opt Sol:
X1 = 4, X2 = 6 , Z opt =
Plant3: 3 x4 + 2 * 6 = 24
Unit Worth for Plant 3:
U2 = Change in Z / Chan
U2 = (42000-36000) / (2
U2 = $6000 / 6 = $1000
There will be an increase
1000 per unit increase in
plant3 with a limit of 6 u
MAX $3000 * X1 + $50
Subject to: (Constraints)
Plant1) 1 * X1 <= 4
Plant2) 2*X2 <= 12 X
X2<= 9
Plant3) 3 X1 + 2 *X2 <=
Plant1
Plant2
33. EXAMPLE: 3
A furniture company manufactures desks and chairs. The sawing department cuts the
lumber for both products, which is sent to separate assembly departments. Assembled
items are sent for finishing to the painting department. The daily capacity of the sawing
department is 200 chairs or 80 desks. The chair assembly department can produce 120
chairs daily and the desk assembly department 60 desks daily. The paint department has a
daily capacity of 150 chairs or 110 desks. Given that the profit per chair is $50 and that of
a desk is $100, determine the optimal production mix for the company.
Decision Variables: X1 - Number of desks to produce , X2 – Number of chairs to produce
Objective Function: Max Profit MAX Z=100 X1 + 50 X2
Subject to (Constraints):
Assembly: X1 <= 60 & X2 <= 120
Sawing: X1/80 + X2 / 200 <= 1 X1<= 80 , X2<= 200
Painting: X1 <=110 X2<= 150
X1/110 <= 1 X2/150 <= 1
X1/110 + X2/150 <= 1
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 33
35. EXAMPLE: 4
Ozark Farms uses at least 800 lb of special feed daily. The special feed is a mixture of corn and soybean
meal with the following compositions:
The dietary requirements of the special feed stipulate at least 30% protein and at most 5% fiber. Ozark
Farms wishes to determine the daily minimum cost feed mix.
DV: X1 = Amount of Corn in the mix (Ib) , X2 = Amount of Soybeans in the mix (Ib)
Objective: MIN Cost MIN 0.30*X1 + 0.90*X2
Constraints: X1 + X2 >= 800
0.09*X1 + 0.60 *X2 >= 0.30 (X1+X2) -0.21X1 + 0.30 X2 >= 0 -2.1 X1 + 3 X2 >= 0-
0.02*X1 + 0.06 * X2 <= 0.05 (X1+X2) -0.03 X1 + 0.01 X2<=0 -3X1 + X2<=0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 35
Ib Per lb of feedstuff
Protein Fiber Cost ($/lb)
Corn .09 .02 .30
Soybean
meal
.60 .06 .90
38. SENSITIVITY ANALYSIS: SLACK AND SURPLUS VARIABLES
Slack Variable:
For a constraint of the type (<=), the right hand usually a constant represents the limit on the
availability of a resource, the left hand is the amount used of that resource. Slack is then defined
as the difference between the amount available of that resource and the amount used from that
resource.
Example: (Reddy Mikks Problem)
S1 >= 0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 38
#1
Constraint
for
Variable
Slack
The
)
4
6
(
24
,
24
4
6
24
4
6
:
1
#
Constraint
1
2
1
1
1
2
1
2
1
S
X
X
S
Where
S
X
X
X
X
39. SENSITIVITY ANALYSIS: SLACK AND SURPLUS VARIABLES
Surplus Variable:
For a constraint of the type (>=) normally set minimum specification requirements. Surplus is then
defined as the excess amount achieved on the left side over the minimum specified amount on the
right side.
Example: (Diet Problem)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 39
#1
Constraint
for
Variable
Surplus
The
30
21
,
0
30
21
0
30
21
:
1
#
Constraint
1
2
1
1
1
2
1
2
1
S
X
X
S
Where
S
X
X
X
X
40. SENSITIVITY ANALYSIS:
CHANGES IN THE OBJECTIVE FUNCTION COEFFICIENTS
For two-dimensional LP models, the objective function
could be written as:
Min or Max Z= c1 X1+c2 X2
Changing c1 and/or c2 will change the slope of Z.
Change of slop might change the optimum solution.
What is the range of variation in c1 and c2 such that the
optimum solution does not change?
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 40
41. SENSITIVITY ANALYSIS:
CHANGES IN THE OBJECTIVE FUNCTION COEFFICIENTS
Example 2.4-1 (The Reddy Mikks Problem)
The optimum solution was found at the intersection of constraint #1 and #2
The slop of the objective function (c1/c2=5/4)
Slop of Const. #1 = 6/4
Slop of Const. #2 = 1/2
Therefore, the optimal range for the ratio c1/c2 is:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 41
6
2
2)
24
4
6
1)
:
4
5
2
1
2
1
2
1
X
X
X
X
To
Subject
X
X
MAX
0
, 2
4
6
2
1
2
1
c
c
c
42. SENSITIVITY ANALYSIS:
CHANGES IN THE OBJECTIVE FUNCTION COEFFICIENTS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 42
Optimum Solution
Z = 5 X1+ 4 X2
M1: 6X1+ 4 X2<=24
Z2 = 7X1 + 4X2
43. SENSITIVITY ANALYSIS:
UNIT WORTH OF A RESOURCE
Unit Worth of a Resource
How sensitive is the optimal solution to a unit increase
or decrease of a specific resource?
Definition:
Is the unit increase/decrease in the objective function value per unit increase/decrease of the resource
Example 2.4-2 (The Reddy Mikks Problem)
The optimum solution was found at the intersection of constraints for M1 and M2 , Point C
Required: Unit worth of Materials M1 & M2
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 43
6
2
2)
24
4
6
1)
:
4
5
2
1
2
1
2
1
X
X
X
X
To
Subject
X
X
MAX
44. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M1 ( y1)
Step1: Determine two feasible points where the optimal solution will be constrained by M1 & M2 : C:
x1=3, x2=1.5 & D: x1=2, x2=2
Step2: Calculate the value of the objective function at both points:
Z = 5 X1 +4X2
ZC=5*3+4*1.5=21 ($k), ZD=5*2+4*2=18 ($k)
Step 3: Calculate the value of resource M1 at both points
M1C=24 (tons), M1D= 6*2+4*2=20 (tons)
Step 4: Calculate d(z) & d(M1)
d(z)=21-18=3 , d(M1)=24-20=4
Step 5: Calculate the Unit Worth of M1 (y1)
Y1=d(z)/d(M1)=3/4 =0.75 ($k/tone) 750 $/ton
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 44
)
(
)
(
M1
Material
in
Change
alue
function v
Objective
in
Change
1
1
M
Z
y
45. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M2 ( y2)
Step1: Determine two feasible points where the optimal solution will be constrained by M1 & M2 : C:
x1=3, x2=1.5 & B: x1=4, x2=0
Step2: Calculate the value of the objective function at both points:
Z = 5 X1 +4X2
ZC=5*3+4*1.5=21 ($k), ZB=5*4+4*0=20 ($k)
Step 3: Calculate the value of resource M2 at both points
M2C=6 (tons), M2B= 4 +2 * 0 =4 (tons)
Step 4: Calculate d(z) & d(M2)
d(z)=21-20=1 , d(M2)=6-4=2
Step 5: Calculate the Unit Worth of M2 (y2)
Y1=d(z)/d(M2)=1/2 =0.5 ($k/tone) 500 $/ton
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 45
=
Change in Objective function value
Change in Material M2
=
Δ( )
Δ( )
46. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M1 ( y1)
X1= 4, X2=1
M1: 6X1 + 4X2 = 6 * 4 + 4 * 1 = 28
Delat(M1) = 28 – 24 = 4
Z’ = 5X1 +4X2 = 5 * 4 + 4 * 1 = 24
Z= 5 * 3.0 + 4 *1.5 = 15+6 = 21
Delat (Z) = 24-21 = 3
Y1 = ¾ = 0.75
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 46
)
(
)
(
M1
Material
in
Change
alue
function v
Objective
in
Change
1
1
M
Z
y
47. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M1 ( y1)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 47
M1=24 tons
M1=20 tons
M1=36 tons
The feasible range of M1
C
A
E D
B
F
G
48. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M2 ( y2)
Step1: Determine two feasible point where the optimal solution will be constrained by M1 &
M2 : C: x1=3, x2=1.5 & B: x1=4, x2=0
Step2: Calculate the value of the objective function at both points:
ZC=5*3+4*1.5=21 ($k), ZB=5*4+4*0=20 ($k)
Step 3: Calculate the value of resource M2 at both points
M2C=6 (tons), M2D= 1*4+2*0=4 (tons)
Step 4: Calculate d(z) & d(M2)
d(z)=21-20=1 , d(M2)=6-4=2
Step 5: Calculate the Unit Worth of M2 (y2)
Y2=d(z)/d(M2)=1/2 ($k/tone)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 48
)
(
)
(
2
2
M
Z
M2
Material
in
Change
value
function
Objective
in
Change
y
49. SENSITIVITY ANALYSIS: UNIT WORTH OF A RESOURCE
Unit Worth of a Resource M2 ( y2)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 49
M2=6 tons
M2=6.667 tons
The feasible range of M2
M2=4 tons
C
A
E D
B
F
G
50. LP MODELING PRACTICE PROBLEMS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 50
51. PROBLEM 1: MR. JOHN’S FARM
Farmer John owns 45 Acres of land. He is going to plant each with wheat or corn. Each
acre planted with wheat yields $2000 ; each with corn yields $3000. The labor and fertilizer
used for each acre are given in Table 1. One hundred (100) workers are available, and 120
tons of fertilizer are available. Build a mathematical model to help Mr. John maximizing
profit from his land.
DV:
X1 – Number of acres planted with wheat
X2- Number of acres planted with corn
Obj: MAX Z = 2000 X1 + 3000 X2
Subject To:
Land Area: X1 + X2 <= 45
Workers: 3 X1 + 2 X2 <= 100
Fertilizers: 2X1 + 4 X2 <= 120
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 51
Wheat Corn
Workers 3 2
Fertilizer (tons) 2 4
53. PROBLEM 1: MR. JOHN’S FARM - SOLUTION
Step 1- Decision Variables:
The decision in this problem is: how many acres would be planted with wheat and how
many with corn:
X1= Number of acres to be planted with wheat, and
X2= Number of acres to be planted with corn
Step 2- Objective Function:
As stated in the problem: Maximize Profit
Profit is function of how many acres planted with wheat and with corn
Profit = 2000*X1+3000*X2
Objective: MAX 2000*X1+3000*X2
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 53
54. PROBLEM 1: MR. JOHN’S FARM - SOLUTION (CONT.)
Step 3- Constraints:
Workers Constraint
The total number of workers needed should be less than or at most equal to the number
available. From Table 1, each acre planted with wheat (X1) needs 3 workers, and each acre
planted with corn (X2) needs 2 workers, therefore ,
Workers needed = 3 X1 + 2 X2
Available workers = 100
Workers: 3 X1 + 2 X2 <= 100
Fertilizer Constraint
The amount of fertilizer used should not exceed the available (100 tons), From table 1, each acre
planted with wheat will consume 2 tons and with corn will consume 4 tons, therefore,
Fertilizers needed= 2 X1 + 4 X2
Available fertilizer = 100 tons
Fertilizers : 2 X1+ 4 X2<=100
Implicit Constraints
The acres to be planted can not have negative value,
X1, X2>=0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 54
56. PROBLEM 2: EZTRUCK COMPANY
EzTruck manufactures two types of trucks: 1 and 2. Each truck must go through the painting
shop and assembly shop. If the painting shop were completely devoted to painting type 1 trucks,
800 per day could be painted, whereas if it were painting type 2 trucks, 700 per day could be
painted. Similarly, if the assembly shop were devoted to work on type 1 trucks, 1500 per day
could be assembled , whereas it were assembling truck type 2, 1200 per day could be assembled.
Each type 1 truck contributes 5000 SR to profit; each type 2 truck contributes 7000 SR to profit.
Formulate an LP mathematical model that will maximize EzTruck profit.
Step 1- Decision Variables:
X1 =Number of Type 1 trucks to produce , X2= Number of type 2 trucks to produce
Step 2- Objective Function: Max Z = 5000 X1 + 7000 X2
Step 3- Constraints:
Painting Shop: X1 <= 800 X1/800 <= 1 , X2<= 700 X2/700 <= 1
7 X1 + 8X2 <= 5600 X1=0, X2 = 700 , X2= 0 X1<= 800
Assembly Shop:
4 X1 + 5 X2< = 6000 X1=0 , X2<=1200 & X2 = 0 , X1 = 1500
X1 & X2 >= 0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 56
57. PROBLEM 2: EZTRUCK COMPANY- SOLUTION
Step 1- Decision Variables:
X1= Number of trucks type 1 to be produced, and
X2= Number of trucks type 2 to be produced
Step 2- Objective Function:
As stated in the problem: Maximize Profit
Profit = 5000*X1+7000*X2
Objective: MAX 5000*X1+ 7000*X2
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 57
58. PROBLEM 2: EZTRUCK COMPANY- SOLUTION
Step 3- Constraints:
Paint Shop Daily Capacity Constraint
Unit time per truck needed at the paint shop
Truck Type 1 : 1day / 800 truck
Truck Type 2 : 1day / 700 truck
(1/800 ) * X1 +( 1/700 ) *X2 <= 1
Assembly Shop Daily Capacity Constraint
Unit time per truck needed at the assembly shop
Truck Type 1 : 1day /1500 truck
Truck Type 2 : 1day / 1200 truck
(1/1500 ) * X1 +( 1/1200 ) *X2 <= 1
Implicit Constraints
The acres to be planted can not have negative value,
X1, X2>=0
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 58
59. GRAPHICAL SOLUTION FOR EZTRUCK COMPANY
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 59
63. PROBLEM SET 2: SELECTED APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 63
D.V.:
X1- Number of efficiency units
X2- Number of duplexes units
X3- Number of Single FH Units
Obj: Max Income
600 X1 + 750 X2 + 1200 X3 + 100 * ( 10X1 + 15X2+ 18X3)
Subject To:
Demand Constraints:
X1 <= 500 , X2<= 300 , X3<= 250
X2 >= 0.5 * (X1+X3) -0.5 X1 + X2 – 0.5 X3 >= 0
Land Availability: (10 X1 + 15 X2 + 18X3) <= 10000
Implicit Constrains: X1,X2,X3 > = 0
64. PROBLEM SET 2: SELECTED APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 64
D.V.:
X1-Lower Income Houses
X2- Mid. Income houses
X3- Upper income houses
X4- Public houses
X5- Number of Slum Homes to buy
*X6- Number of Classrooms
*X7- Number of Retail Units
Objective: max Annual income
Max 7000X1+ 12000X2+20000X3
5000X4 +15000 X7 – 7000X5 -10000 X6
Constraints:
Demand: X1>100, X2>125 , X3>75, X4>300
X1<=200, X2<=190, X3<=260, X4<=600,
X7<= 25
Area:
.05 X1 + .07X2+ .03X3 +.025X4 +.045X6 +
.1X7 <= .85 * (50 + .25 * X5)
.05 X1 + .07X2+ .03X3 +.025X4 -.25*.85X5
+.045X6 + .1X7 <= .85*50
School:
1.3X1+ 1.2X2 +.5X3 +1.4X4 <= 25*X6
Retail:
.023X1 + .034X2 +.046X3 +.023X4
+.034X6 <= .1 * X7
X1,X2,X3,X4,X5,X6,X7 >= 0
65. PROBLEM
SET
2:
SELECTED
APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 65
Part a)
D.V.:
X(i) =Percentage of project (i) to be undertaken
Obj: Max Total Return
Max 32.4X1 + 35.8X2 +17.75X3 +14.85X4
+18.2X5 + 12.35 X6
Subject to:
Available Funds:
Yr1) 10.5 X1 + 8.3X2+ 10.2X3+ 7.2X4+
12.3X5 + 9.2X6 <= 60.0
Yr2) 14.4 X1 + 12.6X2+ 14.2X3+ 10.5X4+
10.1X5 + 7.8X6 <= 70.0
Yr3) ..……..
Yr4) ……….
X(i) <=1
X(i) >=0 for i = 1-6
Part b)
X6 >= X2
66. PROBLEM SET 2: SELECTED APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 66
67. PROBLEM SET 3: SELECTED APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 67
68. PROBLEM SET 3: SELECTED APPLICATIONS
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 68
69. SOLVING LP MATHEMATICAL MODEL:
THE SIMPLEX METHOD
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 69
70. SOLVING LP MODELS
Graphical Method can only be used to solve LP models with 2 decision
variables.
Most realistic LP models have more than 2 decision variables,
Hence, we use:
1- Simplex Method
2- Computer programs to solve those LP models
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 70
71. SIMPLEX METHOD: STEP 1
In this step we put the mathematical model of the problem into a canonical form
by doing the following (simplified assuming no unrestricted variables):
1- Convert all inequalities into equality by adding slack variables (S1, S2)
2- Covert the objective function to an equality equation with all variables on one
side and the other side is 0.
Example: The following is the math model for the Reddy Mikkes Example
converted into canonical form
Math Models Math Models in Canonical form
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 71
6
2
24
4
6
:
4
5
2
1
2
1
2
1
X
X
2)
X
X
1)
To
Subject
X
X
Z
MAX
6
2
24
4
6
0
0
0
4
5
2
2
1
1
2
1
2
1
2
1
S
X
X
2)
S
X
X
1)
S
S
X
X
Z
72. SIMPLEX METHOD: STEP 2
Put the mathematical model into a tablue as shown:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 72
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
1 -5 -4 0 0 0 Objective.
function
0 6 4 1 0 24 Constraint 1
0 1 2 0 1 6 Constraint 2
6
2
24
4
6
0
0
0
4
5
2
2
1
1
2
1
2
1
2
1
S
X
X
2)
S
X
X
1)
S
S
X
X
Z
73. SIMPLEX METHOD: STEP 3
Due to the fact that we have only 2 equations and 4 variables, then , we must
divide the set of variables into two groups:
Basic Variables: to solve and get their values.
Non-Basic Variables = 0 .
In this step, we will identify basic variables and non basic variables
Basic Variables = S1 & S2
Non-Basic Variables = X1=0, X2=0 .
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 73
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
Z 1 -5 -4 0 0 0
S1 0 6 4 1 0 24
S2 0 1 2 0 1 6
74. SIMPLEX METHOD:
STEP 4: OPTIMIZATION ALGORITHM
1- Identifying Entering Variable:
In this step, we will identify the non-basic variable that will enter the set of basic variables,
also we identify the pivot column
For maximization, select the non-basic variable with the highest negative coefficient
For minimization, select the non-basic variable with the highest positive coefficient
If there is no entering variables, then you have reached to the optimum solution.
Stop
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 74
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
Z 1 -5 -4 0 0 0 X1 Entering
S1 0 6 4 1 0 24
S2 0 1 2 0 1 6
75. SIMPLEX METHOD:
STEP 4: OPTIMIZATION ALGORITHM
2- Identifying Exiting Variable:
In this step, we will identify the basic variable that will leave the set of basic variables, also
we identify the pivot row
In this step we divide the RHS by the pivot column and select the lowest positive value
In our example S1 is the exiting variable.
We identify the pivot value (in the red box)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 75
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
Z 1 -5 -4 0 0 0 X1 Entering
S1 0 6 4 1 0 24 24/6 =
4
S1 Leaving
S2 0 1 2 0 1 6 6/1 =6
76. SIMPLEX METHOD:
STEP 4: OPTIMIZATION ALGORITHM
3- Getting the Simplex Tableau back in Canonical form:
The objective of this step is getting the column of the newly entered variable to be a
unity matrix column.
In this step we divide raw of the exiting variable by the pivot value and use raw
operations to convert the column of the new entering variable into a unity matrix column.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 76
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
Z 1 -5 -4 0 0 0
X1 0 6/6 4/6 1/6 0 24/6=
4
R11= R10/1
S2 0 1 2 0 1 6
78. SIMPLEX METHOD:
STEP 4: OPTIMIZATION ALGORITHM
4- Optimality Check:
For Maximization:
If the Z-raw has any negative coefficients, Go to 1, Else Stop
For Minimization:
If the Z-raw has any positive coefficients, Go to 1, Else Stop
In our example we still need to make another iteration because we have –ve in the z-raw
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 78
Basic
Variables
Z X1 X2 S1 S2 RHS Comments
Z 1 0 -2/3 0 5 30 X2-Entering
X1 0 1 0.667 .166 0 4 4/.667
S2 0 0 1.333 -.166 1 2 2/1.33
89. INTEGER PROGRAMMING MODELS
Definition:
Is a class of optimization problems where the decision variables
are either discreet 0,1,2,3…n or binary yes/no (0 or 1)
Example for Continuous Integer Programming Problems:
Maximize Profit for Auto Manufacturing Company (Decision
Variables: Number of Passenger Cars and SUV’s )
Example for Binary Variables: Knapsack Problem
For a set of items {G} where each item worth (wi) and volume
(vi), maximize the total worth of items to carry in the sack if the
maximum volume that could be carried was V.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 89
90. INTEGER PROGRAMMING: EXAMPLES
Example 1: Capital Budgeting :
Given five projects and their expected returns and annual cost. Determine the set of projects that
can be selected such that the total return at the end of the 3 year planning horizon is maximized.
DV:
X1 = 1 if project 1 was selected, = 0 otherwise
X2= 1 if project 2 was selected, = 0 otherwise
Xi= 1 if project (i) was selected, otherwise = 0 ( i = 15)
Obj:
Max Z = 20X1 + 40 X2 +20 X3 + 15 X4 + 30 X5
Subject to:
Yr1: 5X1 + 4X2+ 3X3+ 7X4+ 8X5 <= 25
Yr2: 1X1+7X2+9X3+4X4+6X5 <= 25
Yr3: 8X1+10X2+2X3+1X4+10X5 <= 25
X1 X5 INT
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 90
Expenditures (millions $/ yr)
1 2 3 Returns (millions $)
Project 1 5 1 8 20
Project 2 4 7 10 40
Project 3 3 9 2 20
Project 4 7 4 1 15
Project 5 8 6 10 30
Available Funds
(millions $)
25 25 25
91. INTEGER PROGRAMMING: EXAMPLES
Example 1: Capital Budgeting :
Decision Variables:
Objective Function:
Constraints:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 91
92. INTEGER PROGRAMMING: EXAMPLES
Example 2: Knapsack Problem:
Five items are to be loaded in a vessel. The weight wi and volume vi together with the value ri for item (i)
are given:
Vessel maximum load capacity was 15 tons, and volume capacity was 12 yd3
Xi = 1 if item (i) was selected to go on the vessel, = 0 otherwise ( i = 1 5)
Obj:
Max Z= 4 X1 + 7 X2+ 6 X3+ 5 X4+ 4 X5
Subject:
The total weight of the selected items should be less than the maximum load capacity of the vessel
5 X1 + 8 X2 +3 X3+ 2 X4+ 7 X5 <= 15
The total volume of the selected items should be less than or equal the maximum allowable volume for the
vessel
1 X1 + 8 X2 + 6X3 +5 X4 +4 X5 <= 12
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 92
Item
(i)
Unit
Weight
wi (tons)
Unit
Volume v
(yd3)
1 5 1
2 8 8
3 3 6
4 2 5
5 7 4
94. INTEGER PROGRAMMING: EXAMPLES
Example 3 (Ex 9.2-4): Set Covering Problem :
To promote safety for students, U of A Security Dept. is in the process of installing emergency telephones at selected locations on campus. The dept. wants
to install the minimum number of telephones provided that each of campus main streets is served by at least one telephone.
DV:
Xi = 1 IF NODE (i) WAS SELECTED FOR PHONE INSTALLATION,
=0 OTHERWISE (i = 1 8)
OBJ: MIN Z = X1+X2+X3+X4+X5+X6+X7+X8
MIN Z = ∑
SUBJECT TO:
St A: X1 + X2 >= 1
St B: X2 + X3 >= 1
St H: X4 + X7 >= 1
…
…..
L (i,j) : Xi + Xj >= 1 where L is street (AK)
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 94
1
6 7 8
4 5
2 3
Street E Street D
Street C
Street B
Street A
Street
H
Street
I
Street
J
Street
G
Street
K
95. INTEGER PROGRAMMING: EXAMPLES
Example 3 (Ex 9.2-4): Set Covering Problem
Decision Variables:
Objective Function:
Constraints:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 95
96. SOLVING MILP MODELS
Exact Methods:
For Binary Variables: Branch-and-Bound (B&B):
Branching on each variable to be 0 or 1 (tree)
Bounding on branches that yield infeasible solution.
For Continuous Integer Variables: Cutting Plane
By relaxing the integer constraints and using a step-wise
constraints.
Non-Exact Methods:
Greedy Methods:
Local optima and neighborhood search methods (varies by
problem type).
Heuristic Methods:
Genetic Algorithms, Simulated Annealing. Customized for each
problem.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 96
97. B&B FOR SOLVING MILP MODELS
Step 0:
Define Zi , Z’i , {Xi} where,
{Xi} = The set of decision variables at iteration (i) that have been decided to be
0 or 1
Zi = Is the value of the objective function for the given {Xi}
Z’i= Is the objective function value for the current {Xi} while the undecided
decision variables are set to 1
Step 1-n:
Set {Xi} = 0 (empty) and calculate Z, Z’
Branch: on variables and calculate Z, Z’
Calculate the current lower bound Z*, for maximization pick Max(Z)
Bound: On nodes where Z’ is lower than Z*
Bound: On nodes where Z is infeasible
Keep branching while there are variables not in {Xi}
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 97
98. MILP MODELS
Example 1: Capital Budgeting :
Given five projects and their expected returns and annual cost.
Determine the set of projects that can be selected such that the total
return and the end of the 3 year planning horizon is maximized.
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 98
Expenditures (millions $/ yr)
1 2 3 Returns (millions $)
Project 1 5 1 8 20
Project 2 4 7 10 40
Project 3 3 9 2 20
Project 4 7 4 1 15
Project 5 8 6 10 30
Available Funds
(millions $)
25 25 25
99. MILP MODELS
Example 1: Capital Budgeting :
Decision Variables:
X1, X2, X3, X4, X5 = 1 or 0
Where, Xi = 1 if project (i) was selected for construction , =0 otherwise
Objective Function:
Max Z= 20 X1+ 40 X2+ 20 X3+ 15 X4+ 30 X5
Constraints:
Yr1: 5 X1 +4 X2 +3 X3 +7 X4 +8 X5 <= 25
Yr2: X1+7 X2+9 X3+4 X4+6 X5 <= 25
Yr3: 8 X1+10 X2+2 X3+ X4+10 X5 <= 25
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 99
100. B&B FOR SOLVING MILP MODELS
Example 2: The Reddy Mikks Company Problem:
The Model:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 100
Int.
,
0
6)
0
5)
2
4)
1
3)
6
2
2)
24
4
6
1)
:
4
5
2
1
2
1
2
2
1
2
1
2
1
2
1
X
X
X
X
X
X
X
X
X
X
X
To
Subject
X
X
MAX
101. B&B FOR SOLVING MILP MODELS
Example 2: Reddy Mikks Problem:
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 101
M2: X1+ 2 X2<=6
Optimum Solution
Z = 5 X1+ 4 X2
M1: 6X1+ 4 X2<=24
105. SOLVING MILP MODELS: DEGREE OF COMPLEXITY
P-Class: Is the class of problems that could be solved in polynomial
time w.r.t. problem size (i.e. number of decision variables)
NP-Class: Is the class of problems that requires a non polynomial
time to solve w.r.t. problem size.
IP Models with Binary Variables:
For problems where decision variables are of the binary type (i.e. 0/1 )
Degree of complexity = 2n
where
n – the number of binary variables
General IP Models:
Degree of complexity = R1* R2* R3*..*..* Rn
where
n – the number of integer variables
Ri- Range of values for variable (i) {ex: 2<=X<8 , then Rx= 8-
2+1=7}
Fall 2021 TTE 451 OPERATION RESEARCH/ ELDESSOUKI 105