Operations Research
Operations Research
1. Introduction
3. Post-War Expansion
a. Establishment as a Field
2
Society in the UK and the Operations Research Society of America
formalized the field.
Foundational Techniques: The post-war period saw the
development of key OR techniques such as linear programming
(introduced by George Dantzig), integer programming, and
queuing theory.
4. Modern Developments
3
Introduction to Linear Programming
1. Introduction
Linear Programming (LP) is a mathematical method used to determine
the best possible outcome in a given mathematical model. It involves
optimizing a linear objective function subject to a set of linear constraints.
2. Basics of Linear Programming
a. Definition
Objective Function: A linear function that needs to be maximized
or minimized. It is usually written as c 1x1+c2x2+⋯+cnxn, where ci
are coefficients and xi are decision variables.
b. Constraints: Linear inequalities or equations that restrict the values of
the decision variables. They are typically written in the form aijxj ≤ bi or
aij xj = bi where aij and bi are constants. Feasibility
Feasible Region: The set of all possible values for the decision
variables xi that satisfy the constraints.
c. Optimal Solution
Objective: The goal is to find the values of the decision variables
that maximize or minimize the objective function while staying
within the feasible region.
4
Graphical Solution for Linear Programming Problems
Introduction
Introduction
Key Concepts
Objective Function:
Constraints:
2. Feasible Region
The feasible region is the set of all points (x 1, x2) that satisfy all
constraints,
3. Objective Function
The goal is to find the point within the feasible region that
maximizes (or minimizes) the objective function Z.
5
Steps in solving an LP problem graphically
Step 1. Formulate the LP problem. Formulation refers to translating
the real-world problem into a format of mathematical equations
that represent the objective function and the constraint set.
Step 2. Construct a graph and plot the constraint lines. Constraint lines
represent the limitations on available resources. Usually,
constraint lines are drawn by connecting the horizontal and
vertical intercepts found from each constraint equation.
Step 3. Determine the valid side of each constraint line. The simplest
way to start is to plug in the coordinates of the origin (0,0) and see
whether this point satisfies the constraint.
If it does, then all points on the origin side of the line are feasible
(valid), and all points on the other side of the line are infeasible
(invalid). If (0,0) does not satisfy the constraint, then all points on
the other side and away from the origin are feasible (valid), and
all points on the origin side of the constraint line are infeasible
(invalid).
6
corner and all points along the line connecting the corners
correspond to optimal solutions. We’ll use an example to
illustrate optimal solutions later.
Step 7. Determine the optimal solution by algebraically
calculating coordinates of the most attractive corner.
7
Example:
Let’s look at the profit maximization problem that our furniture
manufacturer faces. The company uses wood and labor to
produce tables and chairs. Recall that unit profit for tables is
$6, and unit profit for chairs is $8. There are 300 board feet (bf)
of wood available, and 110 hours of labor available. It takes 30
bf and 5 hours to make a table, and 20 bf and 10 hours to make
a chair. Table 1 contains the information for the LP problem.
We will go through the step-by-step process of solving this
problem graphically.
Table 1. —Information for the wooden tables and chairs
linear programming problem.
8 6 Unit profit
8
Since only two variables (wood and labor) exist in this
problem, it can be solved graphically.
X1 = 300/30 X1 = 110/5
Next:
Set X1 = 0 and solve for X2 Set X1 = 0 and solve for
X2
X2 = 300/20 X2 = 110/10
(10,15) (22,11)
Chairs
9
Figure 1. —Wood and labor constraint lines.
Now plot the wood constraint line, using the intercepts X1 = 10 and
X2 = 15. Plot the labor constraint line, using the intercepts X1 = 22
and X2 = 11. See Figure 1.
Step 3. Determine the valid side of each constraint line.
We will use the origin (0,0) to check the valid side for both constraint lines.
30(0) + 20(0) < 300 is valid, so we know the side toward the origin (0,0) is the valid
side of the wood constraint line.
5(0) + 10(0) < 110 also is valid, so we know the side toward the origin (0,0) is the
valid side of the labor constraint line.
We can draw arrows indicating the valid side of each constraint line. See Figure 2.
We could have chosen any point to test for the valid side of the line. For example,
setting X1 = 20 and X2 = 10 (clearly on the other side, away from the origin) for the
wood constraint line, we get
30(20) + 20(10) < 300, which is not valid. In other words, there
simply isn’t enough wood to make 20 tables and 10 chairs.
10
Chairs
Wood
The feasible region is the area on the valid side of both constraint
lines. Any point located on the invalid side of a constraint line is
infeasible. Because of the nonnegativity conditions, the feasible
region is restricted to the positive quadrant. See Figure 2.
Step 5. Plot two objective function lines to determine the direction of
improvement.
: Z = 6X1 + 8X2
First, we’ll arbitrarily set profit, Z = 48, and then set profit, Z = 72.
We’ll find the x and y intercepts when Z = 48 and when Z = 72,
and plot the two lines.
Set Z = 48 Set Z = 72
Set X2 = 0 and solve for X1 Set X2 = 0 and solve for X1
48 = 6(X1) 72 = 6(X1)
48/6 = X1 72/6 = X1
X1 = 8 X1 = 12
Next:
11
Set X1 = 0 and solve for X2 Set X1 = 0 and solve for X2
48 = 8(X2) 72 = 8(X2)
48/8 = X2 72/8 = X2
X2 = 6 X2 = 9
Now plot
Chairs
the objective
Wood
function
lines when Z
= 48 and Z =
72. See
Figure 3.
We can see from the two objective function lines that as we move
away from the origin (0,0),
Z increases.
Chairs
Wood
12
region while moving away from the origin.
The most attractive corner lies at the intersection of the wood and
labor constraint lines. Therefore, coordinates for the most attractive
corner can be found by simultaneously solving the constraint
equations (wood and labor):
30X1 + 20X2 = 300 (wood)
X1 = 4 tables
13
20X2 = 180 10X2 = 90
X2 = 180/20 X2 = 90/10
X2 = 9 chairs X2 = 9 chairs
Step 8. Determine the value of the objective function for the optimal
solution.
Z = 6X1 + 8X2
Example :
Maximize Z=3x1+2x2
S.t
x1+x2 ≤ 4
2x1+x2 ≤ 5
x1, x2 ≥ 0
14
Sol
Solve:
x1+x2=4
2x1+x2=5
x1=1
Substitute
1+x2=4
x2=3
15
Example 2:
Minimize Z=4x1+3x2
S.t
2x1+x2 ≤6
x1+2x2 ≤8
x1,x2≥0
Solution
2x1+x2≤ 6 and 7
6
x1+2x2≤ 8. 5 1C
4
2. Identify Intersection
3
Points:
2
aeF -
1 elbis 2C
Solve:
0 aerA
0 1 2 3 4 5 6 7 8 9
2x1+x2=6 ……. eq (1)
x1−x2 = −2
x1 = −2+x2
16
x1= x2 −2
Substitute x1 = x2−2
2(x2−2) +x2= 6
2x2−4+x2=6
2x2 - 4 + x2 = 6
3x2= 10
17
Example 3:
Maximize Z= x1 +2x2
Subject to:
- x1 + 3x2 ≤ 10
x1 + x2 ≤ 6
x1 - x2 ≤ 2
x1 + 3x2 ≥ 6
x1, x2≥0
Solution
1. Plot the Constraints:
C1:
If X1=0 then X2=10/3 ………… (0,10/3)
If X2=0 then X1=10 ………… (10,0)
The point (-10, 10/3)
C2:
If X1=0 then X2=6 ………… (0,6)
If X2=0 then X1=6 ………… (6,0)
The point (6,6)
C3:
If X1=0 then X2= -2 ………… (0, -2)
If X2=0 then X1= 2 ………… (2,0)
The point (2, -2)
C4:
If X1=0 then X2= 2 ………… (0, 2)
If X2=0 then X1= ………… (6,0)
The point (6, 2)
18
plot the lines in the graph and find the intersection points:
oC 1: (-10, 10/3)
o C2: (6,6)
o C3: (2, -2)
o C4: (6,2)
7.00
6.00
5.00 C2
B
4.00
A
3.00
C
C1 2.00
E
1.00 D
C4
0.00
-12 -10 -8 -6 -4 -2 0 C3 2 4 6 8
-1.00
-2.00
-3.00
0 X1 A
3.333 X2
6.666 Z
OBJ.
Z= X1+2X2 Fun,
2 X1 10 <= 3 -1 C1 B
4 X2 6 <= 1 1 C2
10 Z
19
OBJ.
Z= 3X1+2X2 Fun,
4 X1 6 <= 1 1 C2 C
2 X2 2 <= -1 1 C3
8 Z
OBJ.
Z= 3X1+2X2 Fun,
3 X1 2 <= -1 1 C3 D
1 X2 6 <= 3 1 C4
5 Z
0 X1 E
2 X2
4 Z
Additional Notes
Limitations: The graphical method is limited to problems with two
variables. For larger problems, consider using computational
methods.
20
SIMPLEX METHOD
The Simplex Method is a popular algorithm used for solving linear programming (LP)
problems. LP problems involve optimizing a linear objective function subject to linear
equality and inequality constraints. The Simplex Method iterates through feasible
solutions to find the optimal solution efficiently.
1.1 Feasible Solution: A feasible solution satisfies all constraints of the LP problem.
In the Simplex Method, the solution must be at a vertex (or corner point) of the
feasible region defined by the constraints.
1.2 Basic and Non-basic Variables: In the Simplex Method, variables are
categorized as:
1.3 Basic Feasible Solution (BFS): A BFS is a solution where the number of basic
variables equals the number of constraints, and all constraints are satisfied. In this
context, BFS corresponds to a vertex of the feasible region.
2.1 Initialization:
1. Identify the entering variable: Choose the non-basic variable that will
increase the objective function most (in the case of maximization).
2. Determine the leaving variable: Calculate the ratio of the right-hand side to
the coefficients of the entering variable. The smallest non-negative ratio
determines which basic variable will leave the basis.
3. Pivot: Update the Simplex tableau by performing row operations to make the
entering variable a basic variable and the leaving variable a non-basic variable.
4. Repeat: Continue the process of entering and leaving variables until there are
no further improvements possible in the objective function (i.e., all
21
coefficients in the objective function row are non-positive for maximization
problems).
Example
Use the simplex method to find the optimal solution for the following Linear
programming problem
S.T
2x1 +3 x2 ≤ 6
- 3x1 +2 x2 ≤ 3
2 x2 ≤ 5
2x1 + x2 ≤ 4
x1, x2 ≥ 0
Solution:
Put the problem in the standard form
Max X0 - 4x1 - 3 x2 =0 First Iteration: Entering variable
Leaving variable
Determine the Entering variable:
o If the problem is maximization select the variable that
correspond to the most negative (the minimum value)
in the objective function.
22
o If the problem is minimization select the variable that
correspond to the most Positive (the Maximum value)
in the objective function.
Therefore, X1 will be the Entering variable
Determine the Leaving variable:
o Divide the values in the (C.V) by the corresponding
values in the variable which selected as an entering
variable.
o Exclude division by zero and negative value .
o Select the minimum division result which is (2)
therefore the pivot will be (2)
o Determine the entering and leaving variables
Second iteration
* For the pivot column divide by –
B.V C.V S4 X2 ve pivot value.
* S1 2 -1 2 For the pivot row divide by the
S2 9 3/2 7/2 pivot value
* For the raise value use the
S3 5 0 2
corners method.
X1 2 1/2 1/2 Pivot
X0 8 2 -1 X2: Entering
vb.
S1: Leaving vb.
23
Example (2)
Consider the following linear programming problem, use the
simplex method to find the optimal sol.
Max Z= 3x1 +2 x2
S.T
-x1 +2 x2 ≤ 4
3x1 + 2 x2 ≤ 14
x1 - x2 ≤ 3
x1, x2 ≥ 0
Solution :
Put the problem in the standard form
Max Z - 3x1 - 2 x2 = 0
S.T
-x1 +2 x2 + S1 = 4
3x1 + 2 x2 + S2 = 14
x1 - x2 + S3 = 3
x1, x2 ≥ 0 , s1, s2,s3 ≥ 0
Iteration (1)
B.V C.V X1 X2
S1 4 -1 2
S2 14 3 2
S3 3 1 -1
Z 0 -3 -2
Iteration (2)
B.V C.V S3 X2
S1 7 1 1
S2 5 -3 5
X1 3 1 -1
Z 9 3 -5
24
Iteration (3)
B.V C.V S3 S2
S1 6 8/5 -1/5
X2 1 -3/5 -1
X1 4 2/5 1/5
Z 14 0 1
25
MINIMIZATION PROBLEMS
Example (2)
Consider the following linear programming problem, use the
simplex method to find the optimal sol.
x1, x2 ≥ 0
Solution:
Put the problem in the standard form
Min Z+ 2x1 -3x2 = 0
S.T
x1 +S1= 6
x2 +S2 = 10
x1, x2 , S1, S2 ≥ 0
B.V C.V X1 X2
S1 6 1 0
S2 10 0 1
Z 0 2 -3
B.V C.V S1 X2
X1 6 1 0
S2 10 0 1
Z -12 -2 -3
X2 = 0
Z = -12
26
Assignment (1):
Operations Research (1) – Stat 1203
Name ………………………………………………………………….
St. Number: ………………………………………………………………
27
Dual Problem
Dual Problem in Optimization
1. Introduction to Duality
Definition: In optimization, every primal problem can be
associated with a dual problem. The dual provides a different
perspective on the same problem.
Purpose: Analyzing the dual can offer insights into the primal
problem, facilitate computation, and establish bounds on the
solution.
2. Advantages of Duality
Simplification: The dual may be easier to solve than the primal.
Sensitivity Analysis: The dual provides information on how
changes in constraints affect the optimal solution.
3. Applications
Linear Programming: Duality is a cornerstone of linear
programming, used in both theoretical and computational aspects.
Economics: Dual variables can represent prices or shadow costs
associated with resources.
4. Conclusion
Understanding dual problems enhances the ability to solve
optimization issues and provides deeper insights into the
relationships between constraints and objectives.
28
Example :
Find the dual problem for the below LPP
Min Z = 5x1 -4x2 +6x3 +8x4
S.t
x1 +7x2 + 3x3 +7x4 ≤ 46
3x1 - x2 + x3 + 2x4 ≤ 8
2x1 +3x2 - x3 + x4 ≤ 10
x1, x2 , x3, x4 ≥ 0
Solution :
Max Y0 = 46y1 +8y2 +10y3
S.t
y1 +3y2 + 2y3 ≥ 5
7y1 - y2 + 3y3 ≥ - 4
3y1 +y2 - y3 ≥ 6
7y1 +2y2 + y3 ≥ 8
y1 , y2 , y3 ≥ 0
29
Example (2)
Consider the following linear programming problem, use the
simplex method to find the optimal solution of the dual problem
x1, x2 ≥ 0
Solution:
Put the problem in the standard form
Min Z+ 2x1 -3x2 = 0
S.T
x1 +S1= 6
x2 +S2 = 10
x1, x2 , S1, S2 ≥ 0
B.V C.V X1 X2
S1 6 1 0
S2 10 0 1
Z 0 2 -3
B.V C.V S1 X2
X1 6 1 0
S2 10 0 1
Z -12 -2 -3
The optimal solution of the dual problem is :
S1 --------- Y1 = -2
S2---------- Y2 = 0
Z ----------Y0 = -12
30