0% found this document useful (0 votes)
24 views23 pages

Or Lecture Notes 2023-2024 Hitl

Lec

Uploaded by

lucyelizabeth606
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views23 pages

Or Lecture Notes 2023-2024 Hitl

Lec

Uploaded by

lucyelizabeth606
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

OBJECTIVES OF THE COURSE


At the end of this course, students should be able to:
- Present real-life problems mathematically
- Solve them using the graphical and the simplex methods.
- Solve them using Operations Research software such as Excel solver, LINDO, LINGO
- Understand and interpret transportation problems using transportation models
- Take decisions based on business, management, engineering and agricultural issues.

LECTURE 1: LINEAR PROGRAMMING


1.0 INTRODUCTION
Operations Research (OR) is a discipline that provides a set of analytical models for problem
solving and decision making. The results from solving OR problems are used extensively in
engineering, management and public systems.
OR models use theories, results and theorems of mathematics, statistics and probability in the
problem solving process. It also has its own theories and algorithms that are being used by
academicians and practitioners. Most OR models attempt to provide optimal solutions to
problems and a lot of efforts have gone into providing or creating polynomially bounded
algorithms to several problems. Therefore, there are also inputs from computer science into
topics of OR related to algorithms and analysis. Some OR Problems have come out of graph
theoretic problems and, therefore, there is a strong relationship among mathematics, computer
science and graph theory.
The solution to a problem using OR techniques involved three stages or phases. These are:
 Formulation
 Solution
 Implementation
Among these, solution methods have attracted the most attention among theoreticians while
practitioners of OR are interested in the implementation of the results.

TACHI CLIFORD 1
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

1.1 TERMINOLOGY
 Decision variables
 Objective function
 Constraints
 Non negativity constraints
 Problem formulation
 Slack variables, surplus variables, artificial variables, Big M number.
 Basic and non-basic variables
The problem formulation involves the mathematical model of the given problem written in the
algebraic form. It has the following steps:
1. Identifying the decision variables
2. Writing the objective function
3. Writing the constraints
4. Writing the non-negativity restriction

1.2 ASSUMPTION IN LINEAR PROGRAMMING PROBLEM


1. Linearity: The objective function and constraints are linear. The profit from A and B is the
sum of the individual profits.
2. Proportionality: If the profit of one item is A, the profit of two of the items will be 2A
3. Divisibility and multiplicity: Multiplicity is the same as proportionality. Divisibility ensures

that profit of 1⁄2 item is 𝐴⁄2.


4. Deterministic: All parameters and coefficients are deterministic and are known with
certainty. They do not change during or after the formulation.

1.3 LINEAR PROGRAMMING FORMULATION


Consider a small manufacturer making two products A and B. Two resources R1 and R2 are
required to make these products. Each unit of product A requires 1 unit of R 1 and 3 units of R2.
Each unit of product B requires 1 unit of R1 and 2 units of R2. The manufacturer has 5 units of R1

TACHI CLIFORD 2
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

and 12 units of R2 available. The manufacturer also makes a profit of 6frs per unit of product A
sold and 5frs per unit of product B sold.
Let us address the above problem: The manufacturer has to decide on the number of units of
products A and B to produce. It is acceptable that the manufacturer would like to make as much
profit as possible and would decide on the production quantities accordingly. The manufacturer
has to ensure that the resources needed to make the products are available.
Before we attempt to find out the decision of the manufacturer, let us redefine the problem in
an algebraic form. The manufacturer has to decide on the production quantities. Let us call them
X1 and X2 which are defined as follows:
X1 = Number of units of product A made
X2 = Number of units of product B made

The profit associated with X1 units of product A and X2 units of product B is 6 X1 + 5X2. The
manufacturer would determine X1 and X2 such that this function has a maximum value.
The requirements of the two resources are X1 + X2 for R1 and 3X1 + 2X2 for R2 and the
manufacturer has to ensure that these are available. The formulation of the linear programming
problem is as follows:
Maximize Z = 6X1 + 5X2
Subject to
X1 + X2 ≤ 5
3X1 + 2X2 ≤ 12
X1, X2 ≥ 0

SOLVED EXAMPLES OF LINEAR PROGRAMMING FORMULATION


1. The postal department is considering the purchase of vehicles to pick up and deliver mails from
various offices. They are considering three types of vehicles. The costs of each of these are 5frs,
10frs and 8frs per vehicle, respectively. These require a crew of 2, 4 and 4 persons per day
considering multiple shifts. They expect these to run for 60, 100 and 80 km per day. They expect
that the total distance to be covered by the vehicles per day would be 2000km. Based on the fuel
economy, the operating cost per day for these vehicles are 200frs, 350frs and 300frs respectively.

TACHI CLIFORD 3
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

They have a budget restriction of 160 million frs and have 80 people available as crew. Formulate
a model to minimize the operating cost.
SOLUTION: Let us define
X1 = Number of vehicles of Type A being purchased
X2 = Number of vehicles of Type B being purchased
X3 = Number of vehicles of Type C being purchased
Objective function: Minimize Z = 200 X1 + 350 X2 + 300 X3
Constraint equation:
5X1 + 10X2 + 8X3 ≤ 160 (budget constraint)
2X1 + 4X2 + 4X3 ≤ 80 (crew constraint)
60X1 + 100X2 + 80X3 ≥ 2000
X1, X2, X3 ≥ 0 and integers
2. In a transport company, 6 trucks of Type 1, 10 trucks of Type 2 and 8 trucks of Type 3 are
available for each day’s requirement. The tonnage capacities are 16 for Type 1, 12 for Type 2 and
9 for Type 3.
The company dispatches its trucks to cities A and B. Tonnage requirements are 20 at city
A and 30 at city B; excess tonnage capacity supplied to a city has no value. Considering the
distance, it is possible for the trucks to go only once to the destinations every day. The cost of
sending a truck to each city is given in the table below:

Type 1 Type 2 Type 3


City A 2000 1800 1200
City B 3000 2400 2200
Table: Cost of sending trucks
Formulate this problem as a linear programming problem
SOLUTION: Let the number of trucks of type i going to city j be XIJ (i = 1 to 3, j = 1, 2).
Objective function:
Minimize Z = 2000 X11 + 1800 X21 + 1200 X31 + 3000 X12 + 2400 X22 + 2200 X32

TACHI CLIFORD 4
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Constraints: (demand constraints)


16X11 + 12X21 + 9X31 ≥ 20
16X12 + 12 X22 + 9X32 ≥ 30
(Availability constraints)
X11 + X12 ≤ 6
X21 + X22 ≤ 10
X31 + X32 ≤ 8
Xij ≥ 0, and integer

2.0 SOLVING LINEAR PROGRAMMING PROBLEM


Let us consider the small manufacturer problem that we had in 1.3 above.
Maximize Z = 6X1 + 5X2
Subject to
X1 + X2 ≤ 5
3X1 + 2X2 ≤ 12
X1, X2 ≥ 0
Linear Programming problems can be solved either by the graphical method (for TWO
UNKNOWNS ONLY)
2.1 THE GRAPHICAL METHOD
1. Plot the constraints on a graph.
2. Plot also the non-negativity restrictions (restrict yourself to the quadrant where both X1
and X2 are ≥ 0.
3. Identify the feasible region that contains the set of points satisfying all the constraints.
4. Identify the corner points.
5. Evaluate the objective function at all the corner points
6. The corner point that has the best value of the objective function (maximum or minimum
depending on the objective function) is optimal
In our example, there are four corner points. These are (0, 0), (4,0), (0,5) and (2,3). Let us evaluate
the objective function at these points.

TACHI CLIFORD 5
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

At (0, 0), Z = 0
At (4, 0), Z = 24
At (0, 5), Z = 25
At (2, 3), Z = 27

We observe that the corner points (2, 3) given by the solution X1 = 2, X2 = 3 has the maximum
objective function value of Z = 27. This is the best solution or optimal solution.

2.2 THE ALGEBRAIC METHOD


Let us consider the earlier problem again and illustrate the algebraic method.
Maximize Z = 6X1 + 5X2
Subject to
X1 + X2 ≤ 5
3X1 + 2X2 ≤ 12
X1, X2 ≥ 0
Assuming that we know how to solve linear equations, we convert the inequalities into equation
by adding slack variables S1 and S2, respectively. These two slack variables do not contribute to
the objective function. The linear programming problem becomes
Maximize Z = 6X1 + 5X2 + 0S1 + 0S2
Subject to
X1 + X2 + S1 = 5
3X1 + 2X2 + S2 = 12
With the addition of the slack variables, we now have four variables and two equations. With two
equations, we can solve only for two variables. We have to fix any two variables to some arbitrary

TACHI CLIFORD 6
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

value and can solve for the remaining two variables. The two variables that we fix arbitrary values
can be chosen in 𝐶24 = 6 ways (since we have 4 variables and 2 equations). In each of these six
combinations, we can actually fix the variables to any arbitrary value resulting in infinite number
of solutions. However, we consider fixing the arbitrary value to zero and hence consider only six
distinct possible solutions. The variables that we fix to zero are called non-basic variables and
the variables that we solve are called basic variables. These solutions obtain by fixing the non-
basic variables to zero are called basic solutions. There are as many basic variables as the number
of constraints. The six basic solutions are:
1. Variables X1 and X2 are non-basic and set to zero. Substituting, we get S1 = 5, S2 = 12 and
the value of the objective function Z = 0.
2. Variables X1 and S1 are non-basic and set to zero. Substituting, we solve for X2 = 5 and
2X2 + S2 = 12 and get X2 = 5, S2 = 2 and the value of the objective function Z = 25.
3. Variables X1 and S2 are non-basic and set to zero. Substituting, we solve for X2 + S1 = 5 and
2X2 = 12 and get X2 = 6, S1 = -1.
4. Variables X2 and S1 are non-basic and set to zero. Substituting, we solve for X1 = 5 and 3X1
+ S2 = 12 and get X1 = 5, S2 = -3.
5. Variables X2 and S2 are non-basic and set to zero. Substituting, we solve for X1 + S1 = 5 and
3X1 = 12 and get X1 = 4, S1 = 1 and the value of the objective function Z = 24.
6. Variables S1 and S2 are non-basic and set to zero. Substituting, we solve for X1 + X2 = 5 and
3X1 + 2X2 = 12 and get X1 = 2, X2 = 3 and the value of the objective function Z = 27.
Among these six basic solutions, we observe that four are feasible. These basic solutions that are
feasible (satisfy all constraints) are called basic feasible solutions. The remaining two (solutions
3 and 4) have negative values for some variables and, therefore, infeasible. We are interested
only in feasible solutions and, therefore, do not evaluate the objective function for infeasible
solutions.
The optimal solution is the basic feasible solution that maximizes the objective function. The
optimal solution is X1 = 2, X2 = 3 and Z = 27. It is to be OBSERVED that there are as many variables
in the solutions as the number of constraints.

TACHI CLIFORD 7
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

The following are the limitations of the algebraic method


𝑛
1. We have to evaluate all the 𝐶𝑚 basic solutions before we obtain the optimum.
2. Some basic solutions can be infeasible and we have to evaluate them also.
3. Among the basic feasible solutions, we don’t evaluate better and better solutions. Some
of the subsequently evaluated basic feasible solutions can have inferior value of the
objective function when compared to the best solution.
What we therefore need is a method that:
1. Does not evaluate any basic infeasible solution.
2. Progressively obtains better and better feasible solutions.
3. Identifies the optimum solution the moment it is reached so that all basic feasible
solutions are not evaluated.
The algorithm that has all the above characteristics is the simplex algorithm (Dantzig, 1963).

2.3 SIMPLEX METHOD


2.3.1 TABULAR FORM OF THE SIMPLEX ALGORITHM
The simplex method can be represented in a tabular form, where only the numbers are written
in a certain easily understandable form. Several forms are available but we present only one
version of the simplex method in tabular form. Table 2.1 represents the simplex table for the first
iteration in our small manufacturer problem example seen above.

FIRST SIMPLEX TABLE


Cj 6 5 0 0
CB BV X1 X2 S1 S2 RHS Θ
0 S1 1 1 1 0 5 5
0 S2 3 2 0 1 12 4

Zj 0 0 0 0
Cj-Zj 6 5 0 0 0

TACHI CLIFORD 8
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

SECOND SIMPLEX TABLE


From the second Simplex Table, we use the following formulae to have the row enteries.
1) For the pivot row, divide each entry by the pivot element.
2) For the other rows, use: New value = old value – (key column x key row)/key element.

Cj 6 5 0 0
CB BV X1 X2 S1 S2 RHS Θ
0 S1 0 1/3 1 -1/3 1 3
6 X1 1 2/3 0 1/3 4 6

Zj 6 4 0 2
Cj-Zj 0 1 0 -2 24

THIRD SIMPLEX TABLE


Cj 6 5 0 0
CB BV X1 X2 S1 S2 RHS
5 X2 0 1 3 -1 3
6 X1 1 0 -2 1 2
Zj 6 5 3 1
Cj-Zj 0 0 -3 -1 27

CONCLUSION: The Cj-Zj values for the non-basic variables are -3 and -1 which are negative and
zeros for the basic variables. That is, all the values in the Cj-ZJ row (indicator row) are either
negatives or zeros since we have a maximization problem. Thus, the algorithm terminates with
solution; X2 = 3, X1 = 2 and Z = 27 as the optimal solution.

TACHI CLIFORD 9
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Tips to be remembered about Simplex Method


1. Requirements for maximization problems
 Add a slack variable Si (amount of unused resources) to the left hand side of every ≤
constraint
 The objective function attracts zero coefficient of the slack variables
2. Requirements for minimization problem
 Subtract an Excess or Surplus variable ei (amount of excess resources) from the left hand
side of every ≥ constraint.
 Add an artificial variable (ai) to the left hand side of every ≥ constraint.
 The objective function attracts zero coefficient of the surplus variable and an imaginary
large value (M) is attached as coefficient of the artificial variable aI.
3. Requirements for mixed constraints
 For every equals to constraint, the artificial variable aI is added to the left hand side.
 The above conditions for minimization and maximization problems are applied.
N.B With The Form of the Simplex Algorithm Above,
1) The right hand side values are always non-negative
2) For maximization problems, every value on the indicator row, Cj-Zj (profit row) is to be
turned to negative or zero.
3) For minimization problems, every value on the indicator row, Cj-Zj (cost row) is to be
turned to positve or zero.
N.B Artificial variables ai are added only when variables in the system of equations DO NOT
form coefficient of the identity matrix.

TACHI CLIFORD 10
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

THE DUAL OF A LINEAR PROGRAMMING PROBLEM


Let us consider the small manufacturer problem (the primal) that we had in 1.3 above.
Maximize Z = 6X1 + 5X2
Subject to
X1 + X2 ≤ 5
3X1 + 2X2 ≤ 12
X1, X2 ≥ 0
The dual of the above problem is given as follows:
Minimize Z = 5Y1 + 12Y2
Subject to Y1 + 3Y2 ≥ 6
Y1 + 2Y2 ≥ 5
Y 1, Y 2 ≥ 0
The standard form of the dual and its solution is given as follows:
Minimize Z = 5Y1 + 12Y2 + 0S1 + 0S2 + Ma1 + Ma2
Subject to Y1 + 3Y2 – S1 + a1 = 6
Y1 + 2Y2 – S2 + a2 = 5
Y1, Y2, S1, S2, a1, a2 ≥ 0
First Iteration
Cj 5 12 0 0 M M
CB BV Y1 Y2 S1 S2 a1 a2 RHS Θ
M a1 1 3 -1 0 1 0 6 2
M a2 1 2 0 -1 0 1 5 5/2

Zj 2M 5M -M -M M M
Cj-Zj 5-2M 12-5M M M 0 0 0

TACHI CLIFORD 11
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Second iteration

Cj 5 12 0 0 M M
CB BV Y1 Y2 S1 S2 a1 a2 RHS Θ
12 Y2 1/3 1 -1/3 0 1/3 0 2 6
M a2 1/3 0 2/3 -1 -2/3 1 1 3

Zj 12+M 12 2M-12/3 -M 12-2M/3 M


Cj-Zj -7-M 0 12-2M/3 M 5M-12/3 0 24

Third iteration

Cj 5 12 0 0 M M
CB BV Y1 Y2 S1 S2 a1 a2 RHS

12 Y2 0 1 -1 1 1 -1 1
5 Y1 1 0 2 -3 -2 3 3
Zj 5 12 -2 -3 2 3
Cj-Zj 0 0 2 3 M-2 M-3 27

The relationship between the primal and the dual

TACHI CLIFORD 12
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

4.0 SENSITIVITY ANALYSIS


In sensitivity analysis, we attempt to address issues such as:
1) What happens to the solution if the value of the objective function coefficients’ change?
2) What happens when values of RHS change?
3) What happens when the coefficients in the constraints change?
4) What happens when we add a new variable?
5) What happens when we add new constraints?
We can address each issue separately or consider a combination of these issues by solving a new
problem all over again. However, here we iterate from the given optimal solution and evaluate
the effect of these changes.

EXERCISES
1. Consider the following linear programming problem:

a) What is the optimal solution to the given problem?


b) What is the optimal solution when the objective function is maximize Z = X1 + X2 ?

2. Write the following linear programming problems in standard form


a) Maximize Z = 6X1 + 8X2
Subject to X1 + X2 ≤ 10
2X1 + 3X2 ≤ 25
X1 + 5X2 ≤ 35
X1, X2 ≥ 0

TACHI CLIFORD 13
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

b) Minimize Z = 3X1 + 4X2


Subject to 2X1 + 3X2 ≥ 8
5X1 + 2X2 ≥ 12
X1, X2 ≥ 0
c) Maximize Z = 7X1 + 5X2
Subject to 2X1 + 3X2 = 7
5X1 + 2X2 ≥ 11
X1, X2 ≥ 0
3. Given the linear programming problem;
Maximize Z = 60X1 + 60X2 + 90X3 + 90X4
Subject to X1 + X2 + X3 + X4 ≤ 15
7X1 + 5X2 + 3X3 + 2X4 ≤ 1
3X1 + 5X2 + 10X3 + 15X4 ≤ 1
a) Solve for the optimal solution of Z
b) Give the dual program of the primal above
c) Deduce the optimal solution of the dual from a) above
4. A transportation company is involved in the transportation of two goods, X1 and X2. The goods
are expected to be transported using three cars, i.e C1, C2 and C3. It is given that C1, C2 and C3 can
operate for a maximum of 36hrs, 40hrs and 28hrs, respectively. Good one(X1) can be transported
for 6hrs, 5hrs and 2hrs using C1, C2 and C3 respectively while good two (X2) can be transported
for 2hrs, 5hrs and 4hrs using C1, C2 and C3 respectively. It is known that profit of 5frs and 3frs are
made on each unit of X1 and X2 transported.
i. What is the optimum quantity of good one and good two to be transported by the three
cars.
ii. When that optimum quantity is transported, is any of these cars operating with space
capacity?
iii. Provide a strong policy to ensure the sustainability of this company.
5. A firm produces three products A, B and C each of which passes through three different
departments; fabrication, finishing and packaging. Each unit of product A requires 3, 4 and 2

TACHI CLIFORD 14
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

hours of work respectively, B requires 5, 4 and 4 hours respectively and C requires 2, 4 and 5
hours respectively in each of the three departments. Every day, 60 hours are available in
fabrication department, 72 hours in finishing department and 100 hours in packaging
department. If unit contribution of product A is 5frs, 10frs for B and 8frs for C, then, determine
the number of units of each product so that total contribution to profit is maximized and also
determine if any capacity would remain unutilized.

TACHI CLIFORD 15
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

LECTURE 2: TRANSPORTATION MODEL

Definition: It deals with a special class of linear programming problem in which the objective is
to transport a homogeneous commodity from various sources (origins e.g factories, plants, etc) to
different destinations (e.g markets, customers, etc) at a total minimum cost.

TACHI CLIFORD 16
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

The following model is based on the assumption that there are no intermediate
points/facilities

 The total supply of the product from warehouse i is ai , where i = 1, 2, . . ., m.


 The total demand for the product at outlet j is bj , where j = 1, 2, . . ., n.
 The cost of sending one unit of the product from warehouse i to outlet j is equal
to cij , where i = 1, 2, . . ., m and j = 1, 2, . . ., n. The total cost of a shipment is
linear in the size of the shipment

The Decision Variables


xij = the size of the shipment from warehouse i to outlet j, where i = 1, 2, . . ., m
and j = 1, 2, . . ., n. This is a set of m × n variables.

Objective Function

Constraints
Since the total supply from warehouse i is ai , the total outgoing shipment cannot exceed ai . That
is, we must require

Since the demand at outlet j is bj , the total incoming shipment should not be less than
bj . That is, we must require

TACHI CLIFORD 17
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

LP Formulation

TACHI CLIFORD 18
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Types of Transportation Problem

1. Balanced

Supply = Demand

2. Unbalanced

Supply ≠ Demand

Exercise
Formulate the following transportation problem as a linear programming problem.

4 6 8 8 40

6 8 6 7 60

5 7 6 8 50

20 30 50 50

TACHI CLIFORD 19
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Solving Transportation Problem

It involves two phases:

1. Identifying a basic feasible solution (Construction methods)

 North-west corner method

 Minimum/Least cost method (Greedy Method)

 Penalty cost (Vogel’s approximation) method

This is an algorithm that finds the initial basic feasible solution to a transportation

problem by considering the “penalty cost” of not using the cheapest available rate.

2. Optimal solution (Improving methods)

 Stepping stone

 MODI (Modified distribution)

a) b)

4 6 8 8 40

6 8 6 7 60

5 7 6 8 50

20 30 50 50

TACHI CLIFORD 20
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

TACHI CLIFORD 21
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Let’s us use the feasible solution obtained from the Min Cost Method above to look for the
optimal solution of the transportation problem. The basic feasible solution MUST respect the
following conditions before the Stepping Stone Method is used.
1. The row column (supply-demand) constraints are satisfied
2. The non-negativity constraints are satisfied
3. The allocations are independent and do not form a loop
4. There are exactly M+N-1 allocated cells. Where M= number of rows and N= Number of
columns
First iteration

Second iteration

TACHI CLIFORD 22
INTRODUCTION TO OPERATION RESEARCH HITL 2023-2024 TLDR 3105

Third iteration

THANK YOU!!!

TACHI CLIFORD 23

You might also like