Operations Research (OR, Course Code:) : Desta Ashebir +251-914-725775 Office: 309, EIT Building
Operations Research (OR, Course Code:) : Desta Ashebir +251-914-725775 Office: 309, EIT Building
Desta Ashebir
[email protected]
+251-914-725775
Office: 309, EIT Building
1
1 Introduction to Operations Research
A System
an organization of interdependent components that work together to
accomplish the goal of the system.
e.g. A company; a department; a distribution network
3
CO examples from logistics:
1 Transport & distribution
•Traveling salesman problem (TSP)
- company salesman
- distribution of goods to shops
- supply of gas stations
• Pickup-and-delivery problem
fleet of trucks: => routing problem
=> truck loading and unloading problem
• City bus problem:
- determine bus routes in such a way that every bus stop
is on a given number of city bus routes
4
OR Application Areas:
2 Production planning and scheduling
5
OR Application Areas:
2 Production planning and scheduling
7
OR Application Areas:
4 Allocation / Location Problems
• Warehouse design
8
Operation Research Models
Decision variables
must decide how many soldiers and trains should be manufactured each week
Define
X1= number of soldiers produced each week
X2= number of trains produced each week
Objective function
maximize weekly profit
Weekly profit =weekly revenues – raw material purchase costs – other variable
costs
Contribution to profit = 27 – 10 – 14 = 3
Contribution to profit = 21 – 9 – 10 = 2
Maximize z = 3X1 + 2X2
•The coefficient of a variable in the objective function is called the objective
12
function coefficient of the variable
Modeling the problem (2)
Constraints
Constraint 1: Each week, no more than 100 hours of finishing time may be used.
Constraint 2: Each week, no more than 80 hours of carpentry time may be used.
Constraint 3: Because of limited demand, at most 40 X’s should be produced each
week.
Total finishing hours = 2(X1) + 1(X2) = 2X1 + X2 ≤ 100
Total carpentry hours = 1(X1) + 1(X2) = X1 + X2 ≤ 80
X1 ≤ 80
•The coefficients of the decision variables in the constraints
are called technological coefficients.
13
Modeling the problem (4)
Complete Formulation
Maximize z = 3X1 + 2X2 (Objective function)
Subject to (s.t)
2X1 + X2 ≤ 100 (finishing constraint)
X1 + X2 ≤ 80 (carpentry constraint)
X1 ≤ 40 (constraint to demand of X’s)
X1 ≥ 0 (sign restriction)
X2 ≥ 0 (sign restriction)
14
Linear Programming Problem – definition
A linear programming problem (LP) is an optimization problem for which we do
the following:
1.We attempt to maximize (or minimize) a linear function of the decision variables.
The function that is to be maximized or minimized is called the objective function.
2.The values of the decision variables must satisfy a set of constraints. Each
constraint must be a linear equation or linear inequality.
3.A sign restriction is associated with each variable. For any variable xi, the sign
restriction specifies that xi must be either nonnegative (xi ≥0) or unrestricted in sign
(urs).
Maximize z = 3X1 + 2X2
(s.t)
2X1 + X2 ≤ 100
X1 + X2 ≤ 80
X1 ≤ 40
X1 ≥ 0
15
X2 ≥ 0
Some LP Assumptions
1.The contribution of the objective function (or to the left-side of each constraint)
from each decision variable is proportional to the value of the decision variable.
2.The contribution to the objective function (or to the left-side of each constraint)
for any variable is independent of the values of the other decision variables.
Divisibility Assumption
Each decision variable be allowed to assume fractional values.
The Certainty Assumption
Each parameter is known for certainty
16
Work Scheduling Problem (the Post Office Problem)
A post office requires different numbers of full-time employees on different
days of the week. The number of full-time employees required on each day is
given in the Table below. Union rules state that each full-time employee must
work five consecutive days and then receive two days off. For example, an
employee who works Monday to Friday must be off on Saturday and Sunday.
The post office wants to meet its daily requirements using only full-time
employees. Formulate an LP that the post office can use to minimize the
number of full-time employees who must be hired.
17
The Post Office Problem (Cont…)
Let:
xi = the number of employees working on day i
18
The Post Office Problem (Cont…)
Let:
19
Graphical Solutions Two-Variable LP Problems
20
Chapter-3
The Simplex Algorithm
Before the simplex algorithm can be used to solve an LP, the LP must
be converted into an equivalent problem in which all constraints are
equations and all variables are nonnegative.
Maximization LP Problem
Minimization LP Problem
To convert the ith ≥ constraint to an equality constraint, we define
an excess variable ei to be the amount by which the ith constraint is
oversatisfied.
23
The Simplex Algorithm
If we define
and
Ax=b
The Simplex Algorithm
Any basic solution to a standard LP in which all variables are nonnegative is a basic
feasible solution (or bfs).
25
The Simplex Algorithm
If we set X1 = X2 = X3 = 0 we can solve for the values of s1, s2, s3, and s4 by setting si
equal to the right-hand side of row i.
26
The Simplex Algorithm Procedure Summarized
Step 1 Convert the LP to standard form.
Step 2 Obtain a bfs (if possible) from the standard form.
Step 3 Determine whether the current bfs is optimal.
Step 4 If the current bfs is not optimal, then determine which non-
basic variable should become a basic variable and which basic
variable should become a non-basic variable to find a new bfs
with a better objective function value.
Step 5 Use EROs to find the new bfs with the better objective
function value. Go back to step 3.
27
The Simplex Algorithm (Cont…)
Is the Current Basic Feasible Solution Optimal?
• try to determine whether there is any way that z can be increased
by increasing some non-basic variable from its current value of
zero while holding all other non-basic variables at their current
values of zero.
28
The Simplex Algorithm (Cont…)
Determine the Entering Variable
• Choose the entering variable (in a max problem) to be the non-basic
variable with the most negative coefficient in row 0 (ties may be
broken in an arbitrary fashion).
How large can the value of the Entering Variable be?
• look at how increasing the value of the entering variable changes the
values of the current set of basic variables
• to keep all the basic variables nonnegative, the largest that we can
make x1 is 29
The Simplex Algorithm (Cont…)
The Ratio Test
• Compute
Right-hand side of row w
Coefficient of entering variable in row
• The smallest ratio is the largest value of the entering variable that
will keep all the current basic variables nonnegative.
The Simplex Algorithm (Cont…)
In which row does the entering variable become basic?
• Always make the entering variable a basic variable in a row that
wins the ratio test (ties may be broken arbitrarily).