Cos 419-Operations Research
Cos 419-Operations Research
INTRODUCTION
- The term OR was coined during world war II when British Military
leaders asked scientists and engineers to analyze several military
problems such as the deployment of radar and the management of
convoy, bombing, antisubmarine, and mining operations. Quite recently,
we have the deployment of drones by the USA and Apache helicopters
by UK during the war in Libya. Etc.
1
among the components of the organization for reasons of the most
judicious allocation of scarce resources.
Discussion:
1 Why is it necessary to undertake prudent allocation of resources?
- In this course, (CS 414), Operation Research II, the following topics are
to be discussed;
- Network analysis
- Games theory
- Inventory problems
- Reliability problems, and
- Dynamic Programming
- Relevants Texts
2
Lecture 0: Introduction to Linear Programming
3
Demand for train is unlimited, but at most 40 soldiers are bought each week.
Giapetto wants to maximize weekly profit (revenue – cost)
Formulate a mathematical model of Giapetto’s situation that can be used to
maximize Giapetto’s weekly profit [Winston, 2004].
Solution
- To be able to formulate an appropriate model, we consider the
aforementioned characteristics of linear programming problems.
(3) Constraints
We note that, from (1), equation 1, Z can increase arbitrarily by
increasing the respective values of x1 and x2. However, the values of x1
and x2 are limited by the following restrictions.
(i) There are only 100 hrs available for finishing each week.
(ii) There are only 80 hrs available for carpentry each week.
4
(iii) And at most 40 soldiers should be produced each week.
- Finally, we express the fact that at most 40 soldiers per week can be
sold by limiting the weekly production of soldiers to at most 40 soldiers.
This yields the following constraint;
Maximum demand for soldiers: x1 ≤ 40 (4)
(4) Sign restrictions: clearly the sign restrictions for Giapetto? LP problem
are
x1 ≥ 0 (5)
and x2 ≥ 0 (6)
5
x1 + x2 ≤ 80 (3)
x1 ≤ 40 (4)
x1 ≥ 0 (5)
x2 ≥ 0 (6)
“subject to” (s.t) means that the values of the decision variable x1 and x2 must
satisfy all constraints and all sign restrictions. Note however, that the sign
restrictions are usually considered as being separate from the functional
constraints.
The above optimization model, as a case of linear programming problem, can
be solved by using any of the popular methods, such as the simplex method,
the tableau, graphical method, etc.
(2) The value 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)
NEXT
6
Solution
(1) Introducing sleek variables gives the ff set of equations.
- This will correspond to an initial set of feasible solution (x1, x2, x3, x4, x5,
Z).
The above solution is the augmented solution of the simplex method in
algebraic form.
- By virtue of the above method, a basic feasible solution is an
augmented corner point feasible solution. Each basic situation has
defining variables; non-basic variables set equal to zero (decision
variables) and the basic variables remaining, which are the
simultaneous solution of all the systems of the number of equations for
the problem in equality form, after setting the non basic variables to
zero.
Answers:
(1) The simplex method can start at any corner print feasible solution. In
our example, the non-basic variables can be set to zero to give an initial
solution.
(0, 0, x3, x4, x5, Z) = (0, 0, 100, 80, 40, 0)
- notice that each equation has just one basic variable with a coefficient
of +1 and the basic variable does not appear in any other equation. So
the solution is not optimal.
- By iterative steps the simple method moves from current feasible
solution to a better adjacent basic feasible solution. This involves
replacing one non-basic variable (called the entering basic variable) with
a new one (called the leaving basic variable.
7
- This move will definitely increase the size of Z and is performed by
choosing the variable that has the biggest impact on Z. In our example,
x1 has the higher coefficient of 3 and this becomes our first entering
basic variables.
- The leaving basic variable is the one whose nonnegativity constraint
imposes the smallest upper bound on how much the entering basic
variable can be increased. In our example, where the possible
candidates are (x3, x4, x5), the calculation to determine leaving basic
variables follows;
8
Since x5 imposes the smallest upper bound on x1, the leaving basic
variable is x5. Therefore, x5 becomes a basic variable and its value is set
to zero in the new basic feasible solution.
- How can the new basic feasible solution be identified most conveniently?
- We can solve for the new values of the remaining basic variables.
- We convert the system of equation into the same convenient form we
had at the initialization step: i.e. each equation will have just one basic
variable with a coefficient of +1 and this basic variable does not appear
in any other equation. This we can do by performing the following;
(a) multiplying an equation by a non-zero constant
(b) adding a multiple of one equation to another equation.
9
optimal.
nd
- We therefore continue to determine the 2 learning basic:
Now observe that the basic variables x1, x2, x4 all have coefficients of +1 and
appear only once each in the set of equations.
10
Lecture 1: Network Models
Basic Terminologies
- A graph or network is defined by two sets of symbols: nodes and arcs.
- The vertices of a graph or network are also called nodes and are points
of interest in a graph.
- An arc is an ordered pair of vertices and represents a possible direction
of motion that may occur between vertices.
Thus,
Arc (j,k) contained in a network implies that motion is possible from
node j to node k. where j is the initial node and k terminal node.
- A chain is a sequence of arcs such that every arc has exactly one vertex
in common with the previous arc.
- A path is a chain in which the terminal node of each arc is identical to
the initial node of the next arc.
Examples
1 4
2 3
11
Observe that: (1, 2) – (2, 3) - (4, 3) is a chain but not a path. But
(1, 2) – (2, 3) – (3, 4) is a chain and a path. The path
(1, 2) – (2, 3) – (3, 4) represent a way to travel from node 1 to node 4.
Example:
Consider the following Powerco example where power is apparently
generated from plant 1 and transmitted through substations to city 1 (node
6) as shown in the figure below.
3
4 2 4 2
Plant 1 1 2
3 6 City 1
3 2
3 5
For power to be sent from plant 1 (node 1) to city 1 (node 6), it must pass
through relay substations (nodes 2-5). In consideration of the above figure, if
the cost of transmitting power is proportional to the distance traveled, it
becomes necessary to determine the shortest path between plant 1 and city 1
in order to be operating at a minimum cost.
- It is important to note that with simple and small networks, finding the
shortest path can simply be reduced to summing up the feasible path
ways between the source and destination and determining the shortest
path. However, in reality, the shortest path problem will more often
involve large and complicated networks and or internetworks. This
scenario demands a reliable scientific approach for determining the
shortest path. One of such methods is the popular Dijkstra’s algorithm.
12
Dijkstra’s Algorithm (DA):
- DA can be used to find the shortest path from a node to another where
all arc lengths are non-negative.
- DA works by the use of labels: temporal and permanent.
- To begin, node 1 is given a permanent label of 0, then each node i that is
connected to node 1 is given a temporal label equal to the length of the
arc joining node 1 to node i.
- Each other node, apart from node 1, and those directly connected to
node 1, will have a temporal label ∞.
- From the set of labels, the node with the smallest temporal label is
made permanent.
- When node i has become the (k + 1)th node to be made a temporal label,
th
then node i is the k closest node to node 1.
1
- At this point, the temporal label of any node, eg. node i , is the length of
1
the shortest path from node 1 to node i that passes only through nodes
contained in the k – 1 closest nodes to node 1.
- For each node j that now has a temporal label and is connected to node
i by an arc, we replace node j ‘s temporary label with;
-
Node j’s current temporal label
Min{
node i’s permanent label + length of arc (i, j)
- The new temporal label from node j is the length of the shortest path
from node 1 to node j that passes only through nodes contained in the k
closest nodes to node 1.
- Therefore, the smallest temporal label is made a permanent label.
- The node with this new permanent label is the (k + 1)th closest node to
node 1.
- This process is continued until all the nodes have a permanent label.
- To find the shortest path from node 1 to node j, work backwards from
node j by finding nodes having labels differing by exactly the length of
their connecting arc. Where it is intended to determine the shortest path
from node 1 to node j, the labeling process can stop as soon as node j
receives a permanent label.
13
Illustration of Dijkstra’s Algorithm
3
2
4 4 2
Plant 1 1 2
6
3 City 1
3 2
3 5
Solution
- We use “*” to denote a permanent label.
- In line with the steps of the DA method, node 1 receives a permanent
label of 0 and the adjacent nodes (2 and 3) are labeled as their arc
lengths from node 1, while others are ∞.
We now know that node 3 is closest to node 1. We thus determine the new
temporary labels for all nodes that are connected to node 3 by a single arc.
From the figure, this is node 5.
Where;
New node 5 temporary label = min {∞, 3 + 3} = 6
Our new set of labels becomes
[0*, 4*, 3*, ∞, 6, ∞]
- with node 5 receiving a temporary label of 6, node 2’s label which is 4
becomes the smallest temporary label and therefore is made
permanent.
- Now modes 4 and 5 are connected to the newly labeled permanent label,
which is node 2, we obtain/change the temporal labels of nodes 4 and 5.
New node 4 temporal label = min {∞, 4 + 3} = 7.
while
new node 5 temporal used = min {6, 4+ 2} = 6.
- with this, node 5 has the smallest temporal label and therefore is given
a permanent label. The new set of labels becomes.
[0*, 4*, 3*, 7, 6*, ∞]
- only node 6 is connected to node 5, so node 6, temporal label will be
obtained by min {∞, 6 + 2 } = 8.
- This gives up node 4 also be with the smallest temporal label and
therefore is made permanent and our new set of labels become;
14
[0*, 4*, 3*, 7*, 6*, 8]
- For the fact that node 6 is connected to the newly permanent labeled
node 4, we must re-determine node 6’s temporal label by
Min {8, 7 + 2} = 8.
We now make node 6, label permanent, and our set of label becomes
[0*, 4*, 3*, 7*, 6*, 8*]
- To determine shortest path from node 1 to node 6, we work backwards
from node 6 though the nodes having labels differing by exactly the
length of the connecting arc. To do this effectively we reproduce the
diagram showing the nodes with their permanent labels.
4 3 7
4 2 4 2
Plant 1 1 2 8
3 6 City 1
3 2
3 5
3 6
- From the above, the difference between node 6, and 5, permanent label
= 2 = length of arc (5, 6), so we go back node 5.
- The difference between node 5, and node 2, permanent label = 2 =
length of arc (2, 5). So, we may go back node 2, and then node 1. This
gives the shortest path as
1–2–5- 6
- Observe that both paths add up to a total length of 8. Also, there exists
alternative shortest path (problems with multiple optimal solutions).
Next
- Equipment replacement example
- Shortest – Path problem as a transshipment problem.
Then
- maximum – flows problems
- CPM and PERT
- MCNFP and minimum Spanning Tree Problems.
15
Shortest Path Problems (contd)
The cost of maintaining a car during a year depends on its age at the
beginning of the year, as given in table 1. To avoid the high maintenance costs
associated with an older car, an old car may be traded in and a new car
purchased. The price received on a trade-in depends on the age of the car at
the time of trade-in as in table 2. For simplicity, it is assumed that at any time,
it costs $12,000 to purchase a new car.
Where:
Table 1
Car maintenance cost
Age of Annual Maint
car(yrs) Costs
0 2,000
1 4,000
2 5,000
3 9,000
4 12,000
Table 2
Car Trade-in Prices
Age (yrs) Annual Maint
Costs
1 7,000
2 6,000
3 2,000
4 1,000
5 0
16
Solution
- The network is to be one of six nodes: 1 to 6
- Node i is the beginning of year i.
- For i < j, an arc (i, j) corresponds to purchasing a new car at the
beginning of year i and keeping it until the beginning of year j.
- The length of arc (i, j), Ci,j is the total net cost incurred in owning and
operating a car from the beginning of year i to the beginning of year j if a
new car is purchased at the beginning of year i and this car is traded in
for a new car at the beginning of year j.
Thus;
Ci,j = maintenance cost incurred during years i, i + 1, …, j- 1 + cost of
purchasing car at beginning of year i – tradein value received at beginning of
yr j.
Applying the above formula,
C12 = 2 + 12 – 7 = 7
C13 = 2 + 4 + 12 – 6 = 12
:
C16 = 2 + 4 + 5 + 9 + 12 + 12 – 0 = 44
C23 = 2 + 12 – 7 = 7
:
C25 = 2 + 4 + 5 + 12 = 21
:
C34 = 2 + 12 – 7 = 7
:
C34 = 2 + 12 – 7 = 7
:C36 = 2 + 4 + 5 12 – 2 = 21
:C56 = 2 + 12 – 7 = 7
And so on.
We observe that the length of any path from node 1 to 6 is the net cost
incurred during the next five years corresponding to a particular trade–in
strategy.
17
The shortest path problem as a Transshipment problem
- Optimization problems which deal with finding the shortest path
between node i and node j in a network may be seen as a transshipment
problem.
- Solutions for solving the maximum flow problems include the familiar
linear programming method, Ford-Fulkerson method, etc.
18
LP Solution of maximum-flow problem
- To formulate an LP model for problems of this nature for a network
involving the flow of products, the arcs represent pipelines of different
diameter.
- We thus assume that no product (for instance, oil) gets lost while being
pumped through the network, so at each node, a feasible flow must
satisfy (2), which is the conservation of flow constraint.
Examples:
(1) Airline maximum flow
(2) Match making both in the texts.
NB
- We ignore the use of LINDO and LINGO due to limitation (constraints)
imposed by unavailability of systems and time.
19
CPM and PERT
Discussion
- Necessary consideration in the planning and budgeting of software
systems development projects.
- What about failure of software projects?
- Consider the philosophy of failure to plan implying planning to fail.
CPM and PERT have been used successfully in many applications, which
include;
(1) Scheduling construction projects
(2) Facilities relocation
(3) System (computer) installations
(4) Ship building
(5) Designing and Marketing new products
(6) Completion of corporate mergers and acquisitions.
20
Examples.
(1)
A B
1 2 3
(2)
A
1
C
3
B
2
(3)
B
A
1 2 C
Activity A is the predecessor of both B and C. Node 2 is the event that activity
A is completed.
21
Thus, instead of having
A
C
1 2
B
We should have;
A C
1 2
B Dummy arc
3
NB
- Two key building blocks in CPM are the concepts of early event time (ET)
and late event time (LT) for an event. Students should study these event
times and know how they are computed.
- We cannot conclude this section without stating how to find a critical
path, at least by definition:
A path from node 1 to the finish node that consists entirely of critical
activities is called a critical path.
Where,
- A critical activity is any activity with a total float of zero.
Where;
- The total float represented by TF(i,j) of the activity (i,j) is the amount by
which the starting time of activity (i,j) could be delayed beyond its
earliest possible starting time without delaying the completion of the
project (assuming no other activities are delayed).
- Observe that the linear programming approach can be used to find
critical path, as well as the LINGO system. However, we skip these and
PERT details owing to paucity of time.
Assignment
With the aid of a suitable illustration discuss each of the following
concepts:
(1) Minimum spanning tree
(2) Minimum cost network flow problem
(3) Critical Path method (CPM)
(4) Program evaluation and review technique (PERT)
22
Conclusion of Network Models
- Networks of some type arise in a wide variety of contexts. Network
representations are very useful for portraying the relationships and
connections between the components of systems.
- Frequently, flow of some type must be sent through a network, so a
decision needs to be made about the best way to do this.
- The kinds of network optimization models and algorithms introduced,
thus far, provide a powerful tool for making such decisions.
- The minimum cost flow problem plays a central role among these
network optimization models, both because it is so broadly applicable
and because it can be solved extremely efficiently by some of the
methods we have seen (shortest path: Dijkstra, LP, Simplex etc), and
maximum flow problem, in addition to transshipment and assignment
problems.
- Whereas all these models are concerned with optimizing the operation
of an existing network, the minimum spanning tree (not discussed) is a
prominent example of a model for optimizing the design of a new
network.
- The CPM method of time–cost trade-offs provides a powerful way of
using a network optimization model to design a project so that it can
meet its deadline with a minimum total cost.
- The topic, network models so treated, has only scratched the surface of
the current state of the art of network methodology. Therefore, you may
wish to consider further work in this subject area.
- Because of their combinatorial nature, network problems often are
extremely difficult to solve. However, great progress is being made in
developing powerful modeling techniques and solution methodologies
that are opening up new vistas for important applications.
- Infact, recent algorithmic advances are enabling researchers to solve
successfully some complex network problems of enormous size.
23
Lecture 2: Game Theory
(4) A 2–P 0–Sum game has the property that for any choice of strategies,
the sum of the rewards to the players is zero. i.e. every dollar won by a person
comes out of the other person’s pocket: conflict of interest.
24
assumptions that follow:
Basic Assumption of 2-person 0-sum Game Theory
- Each player chooses the best possible knowing that his opponent is
aware of his strategy.
- The implication of the above assumption is that the row player should
choose the row having the largest minimum, while the column player
chooses the column that has the lowest maximum as illustrated with
the following textbook example:
- Based on the assumption, if the row player chooses row 1, the column
player will choose either column 1 or 2.
- Similarly, it is obvious the choice of column for column player, if the row
player chooses row 2 or 3.
- In the same vein if the column player chooses column 1, the row player
will choose row 3 (highest reward), and so on.
- Based on the assumption of a 2–person 0-sum game and the analysis
of the game matrix, we discover that the game matrix has the property
of satisfying the Saddle point condition, which implies.
- Any 2- person 0 – sum game satisfy (1) is said to have a saddle point.
- If a game has a saddle point, the common figure on both sides is called
the value of the game to the row player.
- An easy way to spot a saddle point is
- smallest number in its row, and
- largest number in its column.
- A saddle point (coined from a horse’s saddle point) can also be thought
of as an equilibrium point in that neither player can benefit from a
unilateral change in strategy; neither player has an incentive to move
away from the saddle point.
- Nevertheless, we note that there are games without saddle point –
examples are given in texts.
25
Discussion
- Real life business scenarios which we can classify as 2 – person
0 –sum games.
- Where 2 players can still be in conflict even when the game is not zero-
sum.
- Defined as a game scenario in which the row player’s reward and the
column player’s reward add up to a constant value C, for any choice of
both players’ strategies.
- Suffice it to say that a 2-person 0-sum game is a 2-person constant-
sum game where C = 0.
- In 2-person constant-sum games, both players are in total conflict: a
unit increase in one players reward will always result in a unit decrease
in the other player’s reward. Same strategy can be used to find optimal
strategies as in 2-person 0-sum game.
Network 2 Row
Network 1 Western Soap Opera Comedy Minimum
Western 35 15 60 15
Soap Opera 45 58 50 45
Comedy 38 14 70 14
Column maximum 45 58 70
Discussion
For example, if both networks choose a western, the matrix indicates that 35
million people will watch network 1 and 100 – 35 = 65 million people will
watch network 2 indicating a constant-sum game with C = 100 (million).
Question
- Does this game have a saddle point?
- What is the value of the game to network 1?
- What is the value of the game to network 2?
Solution
Find the strategy that satisfies:
Max (row minimum) = min (column maximum) = 45
26
[network1 choosing soap opera and network 2 choosing western]
Question
Prove that neither network can do better by unilaterally changing strategy, i.e.
by moving away from the saddle point, if any.
- There are instances where 2-person 0-sum games can come up without
a saddle point.
- For example: Odds and Evens.
Consider two players, odd and even, who simultaneously choose the
number of fingers (1 or 2) to put out. If the sum of fingers put out by
both players is odd, Odd wins £1 from Even, and Even wins & £1
otherwise. Consider Odd to be the row player and Even column,
determine whether the game has a saddle point.
Solution
Max (row minimum) = -1
and min (column maximum) = + 1
Thus;
Max (row minimum) ≠ min (column maximum) No saddle point.
Thus, it remains a problem how to determine optimal strategy. Observe that
for any strategy, there is a player who can benefit by unilaterally changing her
strategy. We still need to find a way out (i.e. optimization)
- Strategies for finding optimal solutions for 2-person 0-sum games
without saddle point includes, Randomized strategies, Domination, and
Graphical solution.
27
Y1 = prob that even puts at one finger
Y2 = ,, ,, ,, ,, ,, two fingers
- If X1 ≥ 0, X2 ≥ 0, and X1 + X2 = 1
Then (X1, X2) is a randomized or mixed strategy for Odd. The same goes
for the column player Even.
- Any mixed strategy (X1, X2,…, Xm) for the row player is a pure strategy, if
any of the Xi = 1.
- A pure strategy is one in which the player chooses the same action.
- Recall that X1 + X2 = 1
Then; X2 = 1 – X1
Thus mixed strategy may be written as (X1, 1 – X1)
From the table:
Even
Odd 1 2
1 -1 +1
2 +1 -1
If Even puts out one finger and Odd chooses a mixed strategy of (X1, 1 – X1),
then Odd’s expected reward is
(-1) X1 + ( +1) (1 – X1) = 1 – 2X1
28
DE = Odd’s reward with X1 if Even picks 2
Conclusion
- The general problem of how to make decisions in a competitive
environment is a very common and important one.
- The fundamental contribution of game theory is that it provides a basic
conceptual framework for formulating and analyzing such problems in
simple situations.
- However, there is a considerably gap between what the theory can
handle and the complexity of most competitive situations arising in
practice. Therefore, the conceptual tools of game theory usually play
just a supplementary role in dealing with these situations.
- Finally, because of the importance of the general problem, research is
continuing with some success to extend the theory to more complex
situations.
29
Lecture 3: Inventory Models
- The term inventory represents the stocks of goods being held for future
use or sale. Placing orders to replenish inventories soon enough to
avoid shortages has become strategic for the sustenance of any
company dealing with physical products, any of such companies stand
to benefit from the techniques of scientific inventory management.
30
The categories are: deterministic models and stochastic models for
predictable and unpredictable (random) demand respectively.
- The unit purchasing cost c above is the variable cost associated with
purchasing a single unit. It includes: the variable labour cost, variable
overhead cost, and raw material cost associated with purchasing or
producing a single unit. It also includes shipping costs, if goods are
sourced externally.
31
cost due to possibility of spoilage (or expiry, or obsolescence). Usually,
however, the most significant component of holding cost is the
opportunity cost incurred by tying up capital in inventory.
32
The Basic Economic Order Quantity (EOQ) model
- The attributes of the EOQ model, just mentioned, may be described as;
repetitive ordering, constant demand, constant lead time (i.e time in
between orders and their arrival), and continuous ordering, which
implies placing an order any time.
1. Orders are placed when I = 0 and not when I > 0 to avoid unnecessary
holding cost.
33
2. Also, orders are placed to prevent a shortage from occurring.
- Observations 1 and 2 show that the policy that minimizes yearly cost
must place an order whenever I = 0.
- We may wish to denote the quantity that is ordered each time that I = 0
as q.
- We thus are to determine the value of q that minimize annual cost, call it
q*.
- Let TC(q) be the total annual cost incurred if q units are order each time
I = 0.
Note that;
TC (q) = annual cost of placing orders
+ annual purchasing cost
+ annual holding cost
NB
- The units ordered per period = q
- The total unit ordered in each yr in D which is the sum of the units per
year.
- Thus, the purchasing cost per year = PD while purchasing cost per
period = Pq.
Since each order is for q units, to meet annual demand of D units, you
place D/q number of orders per year.
Hence,
Ordering cost/year = (ordering cost/ order) (orders/year) = K D/q
- For all values of q the per-unit purchasing cost is P. Since we purchase
D units per year,
Purchasing cost/year = (purchasing cost/ unit) ( unit purchase/year) =
PD
- To compute the holding cost; If I units are held in one year at the cost of
$h, then the total holding cost = $hI
- If the inventory level varies over time, the holding cost for a specific
34
time period = hTI1 where I1 is the inventory level at time T.
J(t)
q
t
q/D 2q/D 3q/D
- Note that any interval of time that begins with the arrival of an order and
ends the instant before the next order is received is called a cycle.
- From the above figure, the cycle length is q/D of repeated cycle. Hence,
each year will contain 1/q /D = D/q cycles.
- The average inventory during any cycle is simply half of the maximum
inventory attained during the cycle. This result will hold in any model for
which demand occurs at a constant rate and no shortages are allowed.
- Since the average inventory level during each cycle is q/2 and each
cycle length is q/D holding cost/cycle = q/2 (q/D)h = q2 h/2D
Then
Holding cost/year = q2h/2D (D/q) = hq/2
- To find the value of q that minimizes TC(q), we set TC1 (q) equal to zero.
35
This yields;
1
TC (q) = -kD/q 2 + h/2 = 0 (1)
½
Equation (1) is satisfied for q = ± (2 kD/h)
Since.
½
q = - (2kD/h) makes no sense, it is more intelligible to assume that
the EOQ, q* will be given by
q* = (2kD/h) ½
36
Proof:
11 3
Since TC (q) = 2kD/q > 0 for all q > 0.
We know that TC(q) is a convex function.
Any point TC1(q) = 0 will minimize TC(q).
Thus, q* does indeed minimize total annual cost.
Hint:
Exclude the burden of proof that q* minimizes cost. Emphasis is on derivation
of q*.
37
receiving sales revenue, the cost of extra record keeping, etc.
38
Solution
From the EOQ formular;
q* = (2kD/h) ½
Where k = 12,000, h = 0.30 and d = 8,000
Then
q* = (2)(8,000)(12,000)
0.30 = 25,298
and each cycle length t = q/D
thus,
t* = 25,298
8,000 = 3.2months.
Example 2
(2) Braneast Airlines uses 500 taillights per year. Each time an order for
taillight is placed, an ordering cost of the $5 is incurred. Each light costs 40c,
and the holding cost is 8c/light/year. Assume that demand occurs at a
constant rate and shortages are not allowed. What is the EOQ?
How many orders will be placed each year? How much time will elapse
between the placements of orders?
Solution
We have that k = $5, h = $0.08/light/per year, and D = 500 lights/year.
The EOQ q* = (2(5) (500)/0.08)1/2 = 250
Hence, the airline should place an order for 250 taillights each time inventory
reaches zero.
orders/year = D/q* = 500/250 = 2 orders/year
The time between placement (or arrival) of orders is simply the length of a
cycle. Since the length of each cycle is q*/D, the time between orders will be:
q*/D = 250/500 = ½ year.
- It is also observable that slight deviation from the EOQ will result in only
slight deviation in cost, in most situations: an issue seen in the sensitivity of
total cost to small variations in the order quantities. Thus, moderate errors in
39
the determination of EOQ can be tolerable.
Conclusion of Inventory Theory
- We have looked at the basic EOQ model. The model can sometimes be
modified to include some type of stochastic demand, such as the
stochastic continuous – review model.
- The elementary revenue management models, not discussed though,
are a starting point for the sophisticated kinds of revenue management
analysis that now is extensively applied in the airline industry and other
service industries with similar characteristics.
40
Lecture 4: Dynamic Programming
41
current stage is transformed into the state at the next stage.
(4) Given the current stage, the optimal decision for each of the
remaining stages must not depend on previously reached states
or previously chosen decisions. This idea is known as the
principles of optimality in DP. In other words, the optimal
immediate decision depends on only the current state and not on
how the stage is reached.
(5) If the states for the problem have been classified into one of T
stages, there must be a recursion that relates the cost or reward
earned during stages t, t + 1, …., T to the cost or reward earned
from stages t + 1, t + 2, …, T. In essence, the recursion formalizes
the working-backward procedure.
- Joe Cougar lives in New York City, but he plans to drive to LA to seek
fame and fortune.
- Joe’s funds are limited, so he has decided to spend each night on his
trip at a friend’s house
- Joe knows that after one day’s drive, he can reach Columbus, Nashville,
42
or Louisville.
- After three days of driving, he can reach Kansas City, Omaha, or Dallas.
To minimize the number of miles traveled, where should Joe spend each night
of the trip? The actual road mileages between cities are given below.
680
Columbu Kansas
s2 City 5
580 580 610
790
900 760 790 540 Denver 8 1,030
New York Nashville Omaha 6
1 3
Los Angeles
Stage 1 660 940 10
stage 2 stage 3
Solution
- For Joe’s case, the shortest path between New York and LA can be
found by working backwards.
th
- All the cities that Joe can be in at the beginning of the n day of his trip
are classified as stage n cities.
- Considering numbers 1, .., 10, of the figure, used to label the cities, we
note Cij to be the road mileage between city i and city j. where, for
example, C35 = 580.
43
- Also, we let ft(i) be the length of the shortest path from city i to LA, given
that city i is a stage t city.
- We can now proceed to determine the shortest path to LA from all the
stages, working backwards:
(1) Stage 4 Computations:
- stage 4 cities each has only one path to LA we thus observe that f4 (8) =
1,030, the shortest path from Denver to LA simply being the only path
from Denver to LA. Similarly, F4 (9) = 1,390, the shortest (and only) path
from San Antonio to LA.
Where;
f3 (5), f3 (6), and f3 (7) each has two paths to LA
- For f3 (5)
Path 1 - city 5 to city 8, and the shortest path to LA
Path 2 - city 5 to city 9, and then shortest path to LA
Thus
Path 1 - C58 + f 4 (8) and Path 2 = C59 + f4 (9)
Therefore the shortest distance from city 5 to LA
- The shortest path from city 5 to city 10, f3(5), shown by “ * “ is the path 5 – 8
– 10.
44
shortest path from city 2 to 10 will begin by going through city 2 to 5, 6,
or 7 and uses the shortest path from that city to city 10 i.e. LA.
- From the figure, each stage 2 city has 3 paths to LA. We can compute
as follows for each city;
C25 + f3 (5) = 680 + 1,640 = 2, 320*
F2(2) = min{ C26 + f3 (6) = 790 + 1.570 = 2, 360
C27 + f3 (7) = 1,050 + 1,660 = 2, 710
F2(2) =
Thus the shortest path (f2 (2) = 2,320) is from city 2 to 5 to city 10 (5 – 8- 10)
Similarly,
C35 + f3 (5) = 580 + 1,640 = 2,220*
F2 (3) = min{ C36 + f3 (6) = 760 + 1,570 = 2,330
C37 + f3 (7) = 660 + 1,660 = 2,320
Thus f2 (3) = 2,220 implying that the shortest path from city 3 to 10 consists
of are 3 – 5 and from 5 to 10 (5 – 8 -10)
again, C45 + f3 (5) = 510 + 1,640 = 2, 150*
f2 (4) = min{ C46 + f3 (6) = 700 + 1,570 = 2, 270
C47 + f3 (7) = 830 + 1,660 = 2, 490
Thus, f2 (4) = 2,150.
45
Example 2: The stage Coach Problem
- The stage coach problem concerns a mythical fortune seeker in
Missouri who decided to go west to join the gold rush in California
during the mid- 19th century. The journey would require traveling by
stagecoach through unsettled country where there was serious danger
of attack by marauders (in our case, kidnappers and Boko Haram).
Although his starting point and destination were fixed, he had
considerable choice as to which states (or territories that subsequently
became states) to travel through en route. The possible routes are
shown in the figure that follows, where each state is represented by a
circled letter and the direction of travel is always from left to right in the
diagram.
Thus, four stages (stage – coach runs) were required to travel from his
point of embarkation in state A (Missouri) to his destination in state j
(California). The fortune seeker was a prudent man who was quite
concerned about his safety. After some thought, he came up with a
rather clever way of determining the safest route. Life insurance policies
were offered to stagecoach passengers. Because the cost of the policy
for taking any given stagecoach run was based on a careful evaluation
of the safety of that run, the safest route should be the one with the
cheapest total life insurance policy. The cost for the standard policy on
the stagecoach run from state i to state j, which is denoted by Cij, is
shown by length of arc linking i to j. determine the route that minimizes
the total cost of policy.
7 1
B E
2 4
6 3 4 H 3
4 6
A C 2 F J
4 3
3 4 1 3 4
I
D G 3
5
46
manual/explicit enumeration in terms of additions and comparisons.
47
(4) Types of Dynamic Programming
- There are two basic types of DP; Deterministic and Probabilistic
Dynamic Programming.
- Deterministic dynamic programming problems represent the case
where the state at the next stage is completely determined by the state
and policy decision at the current stage.
- Probabilistic dynamic programming differs from deterministic dynamic
programming in that the state at the next stage is not completely
determined by the state and policy decision at the current stage. Rather,
there is a probability distribution for what the next state will be.
However, this probability distribution still is completely determined by
the state and policy decision at the current stage.
- Typical examples and illustration of these types dynamic programming
are considered beyond the scope of this course.
In this model, the firm’s inventory position is reviewed at the end of each
period (say, at the end of each month), and the model is called a periodic
review model. Whereas the continuous reviews model is one in which the firm
knows its inventory position at all times and may place an order or begin
production at any time (recall reorder point). Dynamic programming can be
48
used to determine a production schedule that minimizes the total cost
incurred in inventory problems of this nature. We can verify this on our own.
(6) Conclusion:
- Dynamic programming is a useful technique for making a sequence of
interrelated decision.
- DP requires formulating an appropriate recursive relationship for each
individual problem.
- Nevertheless, DP provides a great computational savings over using
exhaustive enumeration to find the best combination of decisions,
especially for large problems. For example, if a problem has 10 stages
with 10 states and 10 possible decisions at each stage, then exhaustive
enumeration must consider up to 10 billion combinations, whereas
dynamic programming need make no more than a thousand
calculations (10 for each state at each stage).
- So far, we have seen the fundamentals of DP as a necessary step
towards understanding concepts of DP and the development of interest
for further work in this all important subject.
49
Lecture 5: Reliability Problems
Definition
- Reliability theory is the subject of estimating the distribution of machine
failure times and the distribution of time to failure of a system.
- For very obvious reasons, it is very necessary to estimate that a system
of machines can work for a desired amount of time.
- I suppose in OR we should also consider the reliability issues of models
used describe/represent real life problems – further work in this subject.
50
Common Types of Machine Combinations
Three common types are;
- A series system: function as long as each machine functions.
Conclusion
- Reliability modeling, and its understanding/studies, is essential in
today’s use of integrated systems.
- It is very essential to have a picture of, and a programme for, the extent
or measure of dependability or reliability of systems or machines in
order to address the problems that may be associated with machine
down times, which have adverse implications on operations and of
course revenue.
- The study of reliability modeling as part of operations research is
essential owing to the impact that failures of machines can have on the
operations of organizations. Therefore, reliability issues must be
factored in and accounted for in both planning and management of
virtually all operations of an organization.
- We have only dealt with the preliminaries of reliability modeling, so that
students can at least be familiar with the terminology and appreciate
the need to look out for the reliability rating and warrantee provisions of
machines/systems that they may encounter.
51
Revision
In thus course, COS 414 , Operations Research II, just concluded, we have
discussed the following topics (some in parts other in details);
- Network analysis
- Games Theory
- Inventory Problems
- Dynamic Programming, and
- Reliability Problems
- These have been in accordance with what we set out to achieve at the
beginning of the course. So far, we have kept faith with the curriculum of
the course, but it is hoped that the concepts introduced will be useful to all
concerned both for enterprise related reasons and for further work/studies,
regardless of the constraints of time and resources.
- For exams purposes, students are to pay particular attention to all the
topics covered and most especially first four in the above list.
52
Assignment – Dynamic Programming Problem
The World Health Council is devoted to improving health care in the under
developed countries of the world. It now has five medical teams available to
allocate among three such countries to improve their medical care, health
education, and training programs. Therefore, the council needs to determine
how many teams (if any) to allocate to each of these countries to maximize
the total effectiveness of the five teams. The teams must be kept intact, so
the number allocated to each country must be an integer. The measure of
performance being used is additional person years of life. For a particular
country, this measure equals the increased life expectancy in years times the
country’s population. Table 1 gives the estimated person years of life (in
multiples of 1,000) for each country for each possible allocation of medical
team.
Table 1
Medical Thousand of Additional person-years of life
Teams Country
1 2 3
0 0 0 0
1 45 20 50
2 70 45 70
3 90 75 80
4 105 110 100
5 120 150 130
Hints
- This problem requires making three interrelated decisions, namely how
many medical teams to allocate to each of the three countries.
Therefore, even though three countries can be considered as three
stages in a dynamic programming formulation. Then decision variables
Xn (n, = 1,2,3) are the number of teams to allocate to stage (country) n.
- To determine states, you need to determine;
- What changes from one stage to the next.
- How to describe the status at the current stage.
- Current state information that can be used to determine optimal policy
etc.
53
- The exam will be of 2 parts: The first will be compulsory 5 questions, which
will test the understanding of the major concepts in the course. The
second part will be three or four questions to answer two, which will deal
with all implementation of the concepts discussed in the course.
- May thanks and best of luck! 22/07/2011.
Initial stage 1 has in state detail ft -1 (.) along with the optimal decision for
every stage T – 1 state.
54