Professional Documents
Culture Documents
01 Slides - en
01 Slides - en
2
The 10 principles of modelling
3
Linear Programming Models
Step I — Determine, in the concrete problem, what is fixed and can not be changed (data) and what can
be decided (decision variables variables). Represent the decision variables in an algebraic form.
Step II — Identify the constraints of the problem, i.e, that which limits decisions, and represent them as
equalities or inequalities as a linear function of the decision variables.
Step III — Identify the objective(s) of the problem and represent it (them) as a linear function of the
decision variables, which must be minimized or maximized.
4
Creams & Lotions
Creams & Lotions wants to schedule the production of three new lotions that will be launched to the market.
The lotions are produced with the super secret ingredient SSS and this ingredient must be compounded by very
experienced staff.
The requirements in experienced labor and SSS for each lotion are depicted in the next table.
Lotion A B C
Labor (hours per kg of lotion produced) 7 3 6
Raw material (kg per kg of lotion produced) 4 4 5
Profit (ekg of lotion produced) 4 2 3
The raw material, SSS, is limited to 200 kg/day. There is also a limit of 150 labor hours per day.
The objective is to maximize the total profit.
1. Write the linear programming model for this problem.
2. Consider now that Creams & Lotion knows the maximum demand for each one of the products. The
demand is 10kg for lotions A and C and 15kg for lotion B. Add these constraints to the previous model.
3. Consider now additionally that the quantity to produce of each one of the lotions must always be greater
than or equal to 25% of the total quantity of lotions produced. Add these constraints to the previous model.
5
Modelling | without integer variables
Exercises
6
Diaz Coffee Company
The Diaz Coffee Company blends three types of coffee beans (Brazilian, Colombian, and Peruvian) into ground
coffee to be sold to retailers. Suppose that each kind of bean has a distinctive aroma and strength, and the
company has a chief taster who can rate these features on a scale of 1 to 100.
The features of the beans are tabulated below:
The company would like to create a blend that has an aroma rating of at least 78 and a strength rating of at
least 16. Its supplies of the various beans are limited, however. The available quantities are specified above and
all beans are delivered under a previously arranged purchase agreement.
Diaz wants to make 4 000 kg of the blend at the lowest possible cost.
1
adapted from Powell and Baker: Management Science The Art of Modelling with Spreadsheets
7
Problem of the Oil Refinery
An oil refinery can mix 3 types of crude to produce normal and super gasoline. The oil refinery has two blending
units, an older unit and a newer unit.
For each production cycle, the older unit uses 5 barrels of A crude, 7 barrels of B crude and 2 barrels of C crude
to produce 9 tanks of normal and 7 tanks of super gasoline. The newest blending unit uses 3 barrels of crude A,
9 barrels of B and 4 barrels of C for each production cycle to produce 5 tanks of normal gasoline and 9 tanks of
super gasoline.
Due to contracts already signed, the refinery has to produce at least 500 tanks of normal gasoline and 300 tanks
of super gasoline. For this production there are 1500 barrels of A crude, 1900 of B crude and 1000 of C crude.
The refinery has a profit of 6 monetary units per tank of normal gasoline and 9 monetary units per tank of super.
The aim is to know how to use the crude reserves and the two blending units in order to maximize the refinery’s
profit while respecting the commitments made. Write the linear programming model for that problem.
8
Renting Space in a Warehouse
A company needs to rent space in a warehouse. The needs for the next 3 months are represented in the
following table.
The renting price per square meter is dependent on the number of months rented and is represented in the
following table.
9
Ship Cargo
A shipping company has a ship with 3 cargo holds (front, center and rear) with the capacities presented in the next table:
You have been asked to prepare a loading plan for the ship bound for Africa. A trader in agricultural products wants to transport the following
products on board the ship. He can choose to load any of the products partially or in full.
Each cargo hold can carry more than one product. However, in order to preserve the balance of the vessel, the weight in the bow shall be a maximum
of 10 percent of the weight in the stern, and the weight in the centre cargo hold shall be between 40 and 60 percent of the total weight on board.
10
Modelling | Network Problems
Modelling | Network Problems – Learning Objectives
Given a description of a problem, be able to recognise the network problem, represent the problem in a network
diagram and identify:
• the Decision Variables;
• the Constraints that have to be written as linear combinations of the Decision Variables;
• the Objective Function that has to be written as a a linear combination of the Decision Variables.
Given a formulation, be able to describe what does a constraint or a group of constraints mean, in the context
of a concrete problem.
11
Transportation Problems | Transport of Refrigerators
A producer of refrigerators has three plants that supply three customers (distributors). At the beginning of each
month, the producer receives the information of the number of refrigerators that each customer needs in that
month. The refrigerators have to be produced in the 3 plants which have a limited capacity. The cost of
shipping a refrigerator from each plant to each customer is known.
The problem consists in determining how many refrigerators should be supplied from each plant to each
customer, minimizing the total shipping cost and satisfying the constraints on the supply and the demand.
Formulate this problem considering that the production capacities are equal in all plants (20 refrigerators) and
the customer needs correspond to 10, 30 and 20 refrigerators. The unit costs of shipping are indicated in the
following table (in thousands of Kmus):
Clients
C1 C2 C3
P1 2 4 3
Plants P2 1 5 2
P3 1 1 6
12
Transportation Problems | Transport of Refrigerators | Network
P1
2€
C1
20
10
4€
3€
1€
C2
P2
5€
30
20
2€
1€
1€
P3
6€
C3
20
20
13
Transportation Problems | Transport of Refrigerators | Model
Decision variables
xpc – quantity to transport from plant p to client c.
Objetivo:
Minimize transportation costs.
min 2x11 +4x12 +3x13 +x21 +5x22 +2x23 +x31 +x32 +6x33
Subject to:
Constraints on the capacity of the origins.
x11 +x12 +x13 ≤ 20
x21 +x22 +x23 ≤ 20
x31 +x32 +x33 ≤ 20
14
Transportation Problems | General Model
Data
cij – cost per unit transported from origin i to destination j;
di – supply availability at origin i;
nj – demand at the destination j.
Decision Variables
xij – number of units transported from origin i to destination j.
Objective:
XX
min cij xij
i j
Subject to:
X
xij ≤ di , ∀i (supply constraints)
j
X
xij ≥ nj , ∀j (demand constraints)
i
xij ≥ 0, ∀i,j
15
Assignment Problems | Plant Layout
A plant has four areas (1,2,3,4) to receive three new machines (A, B, C). Only one machine can be put in each
area. Area 4 is too small to hold machine A. The cost of handling the materials produced by the machines, in
hundreds of euros/hour, in each location is as follows:
a1 a2 a3 4
A 5 1 3 x
B 3 1 4 3
C 3 3 4 2
It is intended to assign each new machine to each plant area in order to minimize the total cost of handling the
materials.
16
Assignment Problems | Plant Layout | Model i
The constraint that area 4 is not admissible for machine A must be added to the problem.
This constraint may be added to the problem directly by not considering the corresponding decision variable,
alternatively the decision variable may be considered but it must be fixed to 0 or the corresponding cost may be
set to infinity (in practice we can use a cost that is considerably higher than the other assignment costs).
1 2 3 4
A 5 1 3 ∞
B 3 1 4 3
C 3 3 4 2
Decision Variables
17
Assignment Problems | Plant Layout | Model ii
Objective:
min 5xA1 +1xA2 +3xA3 +∞xA4
+3xB1 +1xB2 +4xB3 +3xB4
+3xC 1 +3xC 2 +4xC 3 +2xC 4
Subject to:
All the machines must be positioned:
xA1 +xA2 +xA3 +xA4 ≥ 1
xB1 +xB2 +xB3 +xB4 ≥ 1
xC 1 +xC 2 +xC 3 +xC 4 ≥ 1
xma ≥ 0
18
Assignment Problems | Modelo Geral
Data
cij – cost of assigning origin i to destiny j.
Decision Variables
xij – is equal to one if origin i is assigned to destination j is zero otherwise; xij ∈ {0, 1}.
Objective: Minimize the assignment cost
n X
X n
min cij xij
i=1 j=1
Subject to:
n
X
xij = 1, i ≥ 1...n
j=1
n
X
xij = 1, j ≤ 1...n
i=1
xij ∈ {0, 1}, ∀i,j
19
Maximum Flow Problems | MaxFlowBasic
The maximum flow problem is the problem o finding a maximum feasible flow through a capacitated directed
graph from a single-source to a single-sink.
Consider the network that is represented in the figure where the numbers near each arc correspond to the
maximum capacity of each arc.
B
9 7
A 3 D
8 9
C
The objective is to determine the maximum flow through the network from node A to node D.
Write the linear programming model for the maximum flow problem represented in the figure.
20
Maximum Flow Problems | MaxFlowBasic | Model i
Indices
i, j – ∈ I; I = {A, B, C , D}
A – Source node;
D – Sink node.
Data
Decision Variables
21
Maximum Flow Problems | MaxFlowBasic | Model ii
Objective Function
Constraints
22
Maximum Flow Problems | MaxFlowBasic | Model iii
Excel Model
Data AB AC BC BD CD
Capacities of the arcs 9 8 3 7 9
B
Decision Variables AB AC BC BD CD
Flow in the arcs 8 8 1 7 9 9 7
8 7
Objective Function
max flow-in A 16
A 3 D
max flow-out D 16 16 16
1
Constraints 8 9
Node B 1 -1 -1 0 = 0
Node C 1 1 -1 0 = 0 8 9
23
Maximum Flow Problems | General Model
Indices
i, j – ∈ I; I = {1, 2, . . . I }
i = s – Source node;
i = t – Sink node.
Data
cij – capacity of the arc (i, j).
Decision Variables
xij – flow through arc (i, j), from i to j.
Objective Function
maximize the flow entering the source node
P
max j xsj
or maximize the flow leaving the sink node
P
max i xit
Constraints
flow conservation in theX
nodes
P
xik = j xkj , ∀k
i
capacity constraints
xij ≤ cij , ∀i,j
24
Shortest Path Problems | ShortestPathBasic
The shortest path problem is the problem of finding a path between two vertices (or nodes) of a graph such that
the sum of the weights of its constituent edges is minimized.
Consider the graph represented in the following figure:
2
B D
21
15
3
A 4 6 F
9
7
C 16 E
Write the linear programming model for the shortest path problem represented in the figure. The source node is
node A and the sink node is node F. The numbers near the arcs represent their lengths.
25
Shortest Path Problems | ShortestPathBasic | Model i
Indices
BG ∈ {A, B, C , D, E };
EN D ∈ {B, C , D, E , F };
CT R ∈ {B, C , D, E }.
Data
Decision Variables
26
Shortest Path Problems | ShortestPathBasic | Model ii
Objective Function
Constraints
27
Shortest Path Problems | ShortestPathBasic | Model iii
Excel Model
Data AB AC BD CB CD CE DC DE DF EF
Length of the arcs 15 9 2 4 3 16 3 6 21 7
Decision Variables AB AC BD CB CD CE DC DE DF EF
Arc belongs to min path?
0 1 0 0 1 0 0 1 0 1
Yes (1) No (0)
Objective Function
min Path AF 25
Constraints
Node B 1 -1 1 0 = 0
Node C 1 -1 -1 -1 1 0 = 0
Node D 1 1 -1 -1 -1 0 = 0
Node E 1 1 -1 0 = 0
Node A 1 1 1 = 1
Node F 1 1 1 = 1
28
Shortest Path Problems | General Model i
Indices
I – ∈ {INI , 1, 2, . . . , n};
F – ∈ {1, 2, . . . , n, END};
N – ∈ {1, 2, . . . , n}.
Data
Decision Variables
29
Shortest Path Problems | General Model ii
Subject to:
X X
xij = xjk , ∀j∈N (node balance)
i∈I k∈F
X
xINIj = 1, (only one path can leave the INIcial node)
j∈F
X
xiEND = 1, (only one path can arrive at the END node)
i∈I
30
Modelling | NetworkProblems
Exercises
31
Asa de Luxo
The transportation company, Asa de Luxo Ltd, purchased three new airplanes.
After a market study, four possible destinations for the airplanes were identified: Monte Carlo, Canary Islands, Biarritz, and the
Greek Islands. Each airplane must be assigned to at most one destination. For each of the destinations and airplanes, the
estimated profit (in M e) is as follows:
Destination A1 A2 A3
Monte Carlo 8 11 10
Canary Islands 10 9 9
Biarritz 9 4 8
Greek Islands 6 7 5
The managing director of Asa de Luxo Ltd (who has an apartment in Biarritz) decided that Biarritz had to be the destination of
an airplane.
In addition, the marketing manager considered that the largest possible number of destinations had to be reached and therefore
at most one airplane should be send to each destination.
The maintenance chief pointed out that planes A1 and A3 cannot land on the Greek Islands.
Build the linear programming model to decide which airplane should fly for each destination, and win a free trip for two to a
destination of your choice (offered by Asa de Luxo Ltd, of course!...).
32
Airplane Manufacturer
An airplane manufacturer intends to plan the production of an airplane engine for the next 4 months.
To meet the contractual conditions, the manufacturer needs to deliver the number of engines shown in the 2nd column of the
table. The maximum number of engines that the company produces in each month and the cost of each engine (in million
dollars) are given in the 3rd and 4th columns.
Given the fluctuations in production costs, it may be worth to produce some engines one or more months prior to the delivery
dates scheduled. If this hypothesis is chosen, the engines will be stored until the delivery month, with an additional cost of 0.015
million dollars/month.
The production manager needs to know how many engines should be produced in each month (and the delivery months) in
order to minimize the total costs of production and storage.
Build the linear programming model for this problem.
33
State Gas Company
State Gas Company owns a gas pipeline network which is used to transport natural gas from the gas exploration site located at
node 1 to the gas storage site located at node 6, as represented in the figure. The capacity of each of the pipeline sections,
determined by the diameter of the pipes, is shown in the figure in 1000 cubic metres per hour.
2
adapted from Powell and Baker: Management Science The Art of Modelling with Spreadsheets
34
Transfrontier Supply Chain
A company has two plants (P1 and P2 ) where a product is produced to be exported to 3 different locations in a neighboring
country (L1 , L2 and L3 ). The supply chain goes through two frontiers (F1 and F2 ) (there are no limits to the daily quantities
transported through each border). In addition, each storage charges an extra fee for each unit of the product transported
(coming from P1 or P2 ).
The daily availability of each plant is known, and is sufficient to meet the daily need of each final location. In addition, the
transportation costs of a unit of product from each producer to each frontier and from each frontier to each destination, are also
known. All these data are represented in the figure.
L1
50
23€/un
P1
50€/un
F1
34€/un
40€/un
120
4€/un
40€/un
20€/un
L2
52€/un
70
45€/un
P2
55€/un
F2
80
3€/un
38€/un
L3
60
1. Build the linear programming model that enables to find the optimal transportation policy between each producer, storage,
and destination.
2. Consider now that the frontiers have a maximum capacity of 100 units. Formulate the problem again with this additional
constraint.
35
War between Blues and Greens i
The Blue Country was suddenly attacked by the Green Country troops. The Blue Forces military staff immediately schedule a
meeting to decide on troop movements in order to cope with the Green Forces invasion.
The Blue Forces military staff was informed that the invasion was being processed in 3 different fronts, with the following code
names: β1 , β2 and β3 . It was immediately concluded that it would be necessary to transport two combat divisions for β1 , a
division for β2 and another for β3 . At that time, the Blue Forces had five combat divisions in the cities closer to the border that
has been attacked, two in α1 (in code, of course!), two in α2 and one in α3 . These divisions could be transported to the places
under attack. However, the Green Airplanes were already flying the Blue Country, and the division movements had to be done
with the least human risk.
After inspecting a territory map, the scheme below was made. It represents the paths that can be used by the Blue Forces
combat divisions (the values in the arcs correspond to distances in kilometers).
2 β1
α1 1
1
4
2 β2
α2 3 1 3
3
5
1 2
α3 2
4 β3
36
War between Blues and Greens ii
The Blue Forces commanders, experts in Operational Research, have to decide from what barracks should leave the combat
divisions needed in β1 , β2 and β3 . The objective is to minimize the human losses, directly related to the bombardment risk.
During the meeting of the Blue Forces military staff, the 20 stars commander Foj (in code, as expected) said that: “The
bombardment risk can be considered directly proportional to the distance between each α and β. In this case, it should be used
the distances as a measure of risk to transport a division from αi to βi , and applied the assignment algorithm to solve the
problem”. Commander Jac added that: “We could use the transportation algorithm to solve the problem, considering the
distances as a measure of risk as well”. Finally, Soj ordered that: “The division left stays in the corresponding barrack”.
Follow Foj, Jac and Soj instructions and build a linear programming model that allows us to determine the decisions that should
be taken by the Blue Forces military staff, as we are the Green Forces!!!!
37
Game Board
0 4 3 6
7 8 6 8
2 3 1 8
The game consists of moving a pawn from the upper left to the lower right, through a sequence of movements to the right or
downwards, in order to minimize the sum of points of the grids used.
Write the linear programming model to solve this problem.
38
Modelling | with Integer Variables
Mixed Integer Programming (MIP) Models – Learning Objectives
39
UPorto Events i
UPorto decided to invest 200,000e in cultural and sports events organised over the next five years, aiming to
strengthen ties within the University and strengthen the UPorto brand in the City of Porto and the country. The
Rector of UPorto asked the team that prepared the data for the decision to provide the estimated budget and
the number of people who would participate in each proposed event.
The team presented their work to the Rector on the scheduled date.
1. Build the linear programming model that would allow to find the best set of events to organize, considering
that the Rector of U.Porto wants to maximize the total number of participants.
40
UPorto Events ii
2. After analysing the solution found for the five-year investment, the Rector asked the same team to classify
the various events into the following categories: Arts and Architecture, Philosophy and Literature, and
Sports and Science, as he wanted constraints to be added to the model to enable him to ensure that
UPorto would organise a maximum of two events of each type.
Event Arts and Architecture Philosophy and Literature Sports and Science
(01) In U.Porto everything is drama X
(02) Science in U.Porto X
(03) Running in U.Porto X
(04) With U.Porto we rise with books. X
(05) Inside U.Porto X
(06) Folk festival in U.Porto X
(07) After six, U.Porto is Jazz X
(08) U.Porto is only choirs X
(09) On U.Porto paths X
(10) To be or not to be U.Porto X
41
UPorto Events – Resolution i
1. Data
oe – Estimated budget for event e (in e);
pe – Number of participants for event e;
B – Budget available (in e);
tet – =1 if event e is of type t; =0 if not.
Decision Variables
xe – binary variable; =1 if event e is organized; =0 if not.
Objective Function
P
Maximize the number of participants: e pe xe
Constraints P
Total Budget: e oe xe ≤ 200 000e
Binary variables: xe binary ∀e
2. New Constraints
P
Maximum of two events of each type e tet × xe ≤ 2 ∀t
3. New Constraints
if x03 not x08 x03 + x08 ≤ 1
if x10 then x04 x10 ≤ x04
42
UPorto Events – Resolution ii
Arts and Architecture x01 + x05 + x06 + x07 + x08 + x09 ≤ 2 × δAA
Philosophy and Literature x04 + x10 ≤ 2 × δFL
Sports and Science x02 + x03 ≤ 2 × δSS
If an event of Arts and Architecture is organised, no event of Philosophy and Literature can be organised.
δAA + δFL ≤ 1
If a Philosophy and Literature event is organised, then at least one Sports and Science event must be
organised.
δFL ≤ δSS
43
UPorto Events – Resolution iii
44
Modelling logical relationships
f (xi ) ≤ 0 ∨ g (xi ) ≤ 0
45
Modelling logical relationships
46
Modelling logical relationships between constraints
PN
f (x ) = i=1 δi di
PN i
i=1 δi = 1
δi ∈ {0, 1}
47
Mayhugh Manufacturing
3
Mayhugh Manufacturing, a medium-size job shop, may produce and sell three product families. Each product family requires
production hours in each of three departments of Mayhugh Manufacturing. The parameters describing the situation are
sumarized in the following table.
Costs of the selling team (e) 60 000 200 000 100 000
48
Mixed Integer Programming (MIP) Models
Exercises
49
Emergency Sites in Metropolis i
4
The city of Metropolis is in the process of designing a new public emergency system, and their design calls for locating emergency vehicles around
the city. The city is divided into nine districts, and seven potential sites have been identified as possible locations for emergency vehicles. Equipment
located at each potential site can reach some (but not all) of the districts within the 3-minute time requirement specified by the city. In the following
table, an entry of 1 means that the district can be serviced from the corresponding site within the time requirement.
S1 S2 S3 S4 S5 S6 S7
District 1 0 1 0 1 0 0 1
District 2 1 0 0 0 0 1 1
District 3 0 1 0 0 0 1 1
District 4 0 1 1 0 1 1 0
District 5 1 0 1 0 1 0 0
District 6 1 0 0 1 0 1 0
District 7 1 0 0 0 0 0 1
District 8 0 0 1 1 1 0 0
District 9 1 0 0 0 1 0 0
The city wants to provide coverage to all nine districts within the specified time, using the minimum number of sites. Write the linear programming
model for the problem and then add the following constraints to the model:
4
in Powell and Baker: Management Science The Art of Modelling with Spreadsheets
50
Spencer Shoe Company
5
The Spencer Shoe Company manufactures a line of inexpensive shoes in one plant in Pontiac and distributes to five main
distribution centers (Milwaukee, Dayton, Cincinnati, Buffalo, and Atlanta) from which the shoes are shipped to retail shoe
stores. Distribution costs include freight, handling, and warehousing costs.
To meet increased demand, the company has decided to build at least one new plant with a capacity of 40 000 pairs per week.
Surveys have narrowed the choice to three locations: Cincinnati, Dayton, and Atlanta.
As expected, production costs would be low in the Atlanta plant, but distribution costs are relatively high compared to those of
the other two locations. Other data are as follows:
1. Assume that the Pontiac plant has no resale value and must remain open. What are the plant locations that will minimize
total costs, including production, distribution, and fixed costs? What is the optimal total cost?
2. Assume now that the Pontiac plant could be closed at zero net cost. What are the optimal locations? What is the optimal
total cost?
5
in Powell and Baker: Management Science The Art of Modelling with Spreadsheets
51
Watch Production for Heathrow Terminals i
6
A watch manufacturer intends to market its four watch models (M1, M2, M3 and M4) in stores in the Heathrow airport
terminals. The manufacturer made a proposal to several stores located in Terminals 1, 3 and 4 to pay them a certain percentage
of his gross profit (the difference between the retail price and the total cost of production) generated by selling the watches.
Several stores were receptive to this deal, two stores at Terminal 1 (L1 and L2), three stores at Terminal 3 (L3, L4 and L5) and
one store at Terminal 4 (L6). Each store may sell one or more models of watches. The manufacturer does not want to sell the
same watch model in more than one store in each terminal in order to avoid competition between stores. The number of
watches of each model that the stores predict to sell weekly is in the following table.
Shops
Model L1 L2 L3 L4 L5 L6
M1 10 12 8 20 15 10
M2 15 10 5 9 8 5
M3 8 6 5 7 4 2
M4 4 3 7 2 2 1
The variable production costs for each watch (including raw materials and labor), and the fixed costs to produce each model
(resulting from preparation of the assembly line for the production of a particular model) are shown in the following table.
52
Watch Production for Heathrow Terminals ii
The manufacturer follows a policy of not keeping stocks of watches, implying that the watches sold in a given week are
produced in the preceding week. The sales price of each watch model (in mu) depend on the terminal where the store is located
and are presented in the following table.
The manufacturer is able to produce 60 model M1 watches (if he only produces this model), 35 model M2 watches (if he only
produces this model), 20 M3 watches (if he only produces this model) and 15 M4 watches (if he only produces this model) or
any linear combination of these numbers.
Write the linear programming model for this problem.
6
Exam of 2011.02.07 (MIEA, MIEEC, MIEM) FEUP
53
Linear Programming – a geometrical
preview
Linear Programming – Learning Objectives
54
Production Planning @ BA
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mould injection.
BA recently won two new clients and intends to assign this production to one of its furnaces. The orders were of
bottles of Sandeman Ruby Port (75cl) and one liter bottles of olive oil Oliveira da Serra. Both customers buy all
the bottles that BA can produce.
Due to differences in the production (number of cavities and different cycle times), each batch of portwine
bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30 hours. There are a total of
2000 hours available at the oven.
Moreover, there are restrictions in the storage capacity of the bottles prior to their dispatch. The warehouse has
300m3 available and each batch of portwine bottles occupies 6m3 of warehouse space, while each batch of
bottles of olive oil holds 5m3 .
Finally we must also consider the capacity available in the decoration sector (e.g. labels, packaging), which is
200 hours. The portwine bottles spend 3 hours per batch and the olive oil bottles 5 hours per batch.
Barbosa & Almeida wants to maximize the profit from these two orders, knowing that the profit per batch is
50e and 60e, respectively.
55
Production Planning @ BA
Linear Programming Model
Decision variables
xVP – Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;
xA – Number of batches of Azeite Oliveira da Serra bottles to produce.
Objective:
max Z = 50xVP + 60xA
Subject to:
50xVP + 30xA ≤ 2000 (time in the oven)
6xVP + 5xA ≤ 300 (space in the warehouse)
3xVP + 5xA ≤ 200 (capacity in the decoration sector)
xVP , xA ≥0
56
Production Planning @ BA
Graphical resolution — Active and redundant constraints
80
XA
60 Z = 50XVP + 60XA
Tempo no Forno
50
Espaço no armazém
40 Capacidade na decoração
Função objectivo
30
XVP =0
20
3XVP + 5XA = 200
(restrição ativa)
10
0
0 10 20 30 40 50 60 70 80
XA=0 6XVP + 5XA = 300 XVP 57
(restrição redundante)
Production Planning @ BA
Graphical resolution — Optimal solution
80
XA
70
50XVP + 30XA = 2000
60 50xVP + 30xA = 2000 xVP = 25
3xVP + 5xA = 200 xA = 25
50
Optimal solution:
40 ∗ = 25, x ∗ = 25, Z ∗ = 2750
xVP A
Z = 50XVP + 60XA
30
20
The optimal solution must be in a vertex of the solution
3XVP + 5XA = 200 space:
10
The solutions inside the admissible region cannot be
0 optimal because the profit may always increase by
0 10 20 30 40 50 60 70 80 increasing xVP , xA or both.
6XVP + 5XA = 300 XVP
58
Production Planning @ BA
Graphical resolution — Relation between vertices and basic solutions
80
X = (XVP; XA; Folgaf; Folgaa; Folgad)
XA
A = (0; 40; 800; 100; 0)
70 • basic variables have a value > 0*;
50XVP + 30XA = 2000 B = (0; 0; 2000; 300; 200)
• non-basic variables have a value = 0;
60 C = (40; 0; 0; 60; 80)
30 Z = 50XVP + 60XA
D
20 U When moving from one vertex to another adjacent
3XVP + 5XA = 200 vertex one basic variable becomes non-basic and one
10 non-basic variable becomes basic.
0B C W
0 10 20 30 40 50 60 70 80
6XVP + 5XA = 300 XVP
George Dantzig
61
The Simplex Algorithm moves
from an admissible solution to an
adjacent solution that improves
the value of the objective function.
When no adjacent solution im-
proves the objective function, the
optimal solution has been found
and the algorithm stops.
62
Simplex algorithm: A systematic procedure for solving linear programs
63
Production Planning at BA
Linear Programming Model
Objective:
max Z = 50xVP + 60xA
Subject to:
50xVP + 30xA ≤ 2000 (time in the oven)
6xVP + 5xA ≤ 300 (space in the warehouse)
3xVP + 5xA ≤ 200 (capacity in the decoration sector)
xVP , xA ≥0
Objective:
max 50xVP + 60xA
Subject to:
50xVP +30xA +s1 = 2000
6xVP +5xA +s2 = 300
3xVP +5xA +s3 = 200
xVP , xA , s1 , s2 , s3 ≥ 0
64
80
XA
70
50XVP + 30XA = 2000
60
Objective:
max Z = 50xVP + 60xA 50
Z = 50XVP + 60XA
Subject to: 40
s1 = 2000
(
Basic variables: s2 = 300 • Objective: maximize Z ; choose the variable with
s3 = 200 the most positive coefficient in the objective
function: xA
Z=0 • s3 is the first variable that turns zero when xA
grows.
• xA grows from 0 until 40, a value such that s3 = 0;
s1 and s2 remain ≥ 0
65
80
XA
70
xVP , xA , s1 , s2 , s3 ≥ 0
10 3XVP + 5XA = 200
Basic (admissible) solution:
0
0 10 20 30 40 50 60 70 80
xVP =0 XVP
Non-basic variables: s3 =0
6XVP + 5XA = 300
66
Objective:
max Z = 2400 +14xVP −12s3 80
1 3 XA
= 2400 +14(25 − 32 s1 + 16 s3 ) −12s3
7
= 2750 − 16 s1 − 758 s3
70
50XVP + 30XA = 2000
60
Subject to:
1 3
xVP + 32 s1 − 16 s3 = 25 50
3 5 Z = 50XVP + 60XA
− 32 s1 +s2 − 16 s3 = 25 40
3 30
+xA − 160 s1 − 71
80 s3 = 25
xVP , xA , s1 , s2 , s3 ≥ 0 20
s1∗
=0 0
Non-basic variables:
s3∗ =0 0 10 20 30 40 50 60 70 80
XVP
6XVP + 5XA = 300
x∗ = 25
(
VP
Basic variables: s∗
2 = 25 • This solution is optimal because an increase in s1 or
x∗
A = 25 s3 ⇒ reduction of Z .
Z∗ = 2750
67
Sensitivity Analysis
68
Production Planning @ BA
Graphical resolution (Sensitivity analysis – Coefficients of the objective function)
80
XA
70
50XVP + 30XA = 2000
60
20
Varying the slope of the objective function the optimal
3XVP + 5XA = 200
10 solution jumps from vertex to vertex.
0
0 10 20 30 40 50 60 70 80
6XVP + 5XA = 300 XVP
69
Production Planning @ BA
Graphical resolution (Sensitivity analysis – Coefficients of the objective function)
70
Production Planning @ BA
Graphical resolution (Sensitivity analysis – RHS of the constraints)
80
XA
70
50XVP + 30XA = b1
60
50
Active constraint with another slope:
40
the optimal value changes but the vertex does not
Z = 50XVP + 60XA change.
30
20
71
Production Planning @ BA
Graphical resolution (Sensitivity analysis – RHS of the constraints)
Increasing the number of available hours in the
Reducing the number of available hours in the “oven time” (b1 ) translates the line upwards.
“oven time” (b1 ) translates the line downwards. If the line surpasses the intersection between the
If the line surpasses the intersection between the constraint“space in the warehouse”and“decoration
constraint “decoration capacity” and xVP ≥ 0 capacity”:
(xVP , xA ) = (0, 40)
(xVP , xA ) = (33 13 , 20)
the constraint “decoration capacity” will not be an
active constraint any more and the optimal vertex the constraint “oven time” is not active anymore
changes. and the optimal vertex changes.
(0, 40) ∈ line “oven time” (33 31 , 20) ∈ line “oven time”
50 × 0 + 30 × 40 = b1 50 × 33 13 + 30 × 20 = b1
b1 = 1200 b1 = 2266 23
72
Production Planning @ BA
Graphical resolution (Shadow prices7 of the constraints)
The shadow price of one constraint represents the variation in the objective function value if we increase the RHS of the
constraint by one unit.
Example:
By how much would the profit increase if we could have an additional hour in the decoration? (increase the RHS of the
contraint from 200 to 201)
13
50xVP + 30xA = 2000 xVP = 24 16
3xVP + 5xA = 201 ⇔ 5
xA = 25 16
∗ ∗ ∗
Optimal solution: xVP = 24 13 5 3
16 , xA = 25 16 , Z = 2759 8
With an additional hour in the decoration (an increase from 200 to 201) the value of the optimal solution increased from 2750
to 2759 38 . The constraint “decoration capacity” has therefore a shadow price of 9 83 .
The shadow price remains the same while the optimal vertex does not change (see the sensitivity analysis for the RHS of the
constraints).
The shadow price of a non-active constraint is zero.
7
The shadow prices are also called dual variables, marginal values or pi values.
73
Linear Programming
Graphical resolution (Unique optimal solution)
x2
20
16
8 12
4
0
Z = 4 x1 + x2
Objective:
max Z = 4x1 + x2 x1 - x2 = 2
Subject to:
x1 − x2 ≤2
x1 + 2x2 ≤8 x1 + 2x2 = 8
x1 , x2 ≥0
x1
74
Linear Programming
Graphical resolution (Non-unique optimal solution)
x2 - 34
Z = x1 - x2 - 30
- 32
- 30
- 28
Objective:
max Z = x1 − x2 − 30 x1 - x2 = 2
Subject to:
x1 − x2 ≤2
x1 + 2x2 ≤8
x1 , x2 ≥0 x1 + 2x2 = 8
x1
75
Linear Programming
Graphical resolution (Unlimited optimal solution)
x2
20
16
8 12
4
0
Z = 4 x1 + x2
Objective:
max Z = 4x1 + x2 x1 - x2 = 2
Subject to:
x1 − x2 ≤2
x1 , x2 ≥0
x1
76
Linear Programming
Graphical resolution (Without admissible solution)
x2
x1 - x2 = -5
Objective:
max Z
Subject to:
x1 − x2 ≤ −5
x1 + 2x2 ≤8
x1 , x2 ≥0
x1 + 2x2 = 8
x1
77
Mathematical Programming Models that we will consider:
• All the decision variables take values in R or in Z.
• There is only one objective to minimize or to maximize.
• The objective and the constraints are linear functions of the decision variables.
78
Mathematical Programming: fundamentals
Objective:
min f (X )
Subject to:
gi (X ) ≤0 ∀i∈{1,...,m}
hi (X ) =0 ∀i∈{1,...,l}
f (X ∗ ) ≤ f (X ) ∀X ∈S
79
Mathematical Programming
Non-linear programming example
Curvas de nível de f
x2 Objective:
(3, 6) min f (X ) = (x1 − 3)2 + (x2 − 6)2
Subject to:
−x12 + x2 ≥ 0
x1 + x2 ≤ 6
x1 , x2 ≥ 0
Conjunto
admissível Optimal solution: x1 = 23 , x2 = 92 , f = 9
2
x1
x 2 = x 12 x1 + x 2 = 6
80
Linear Programming
Exercises
81
Rio Negro
Objective:
max Z = 2xA +4xB − 280
Subject to:
0, 7xA +3, 5xB ≤ 210
xA +xB ≤ 100
xA , xB ≥ 0
Solve the problem graphically and determine the optimal solution and its value.
82
Linear Programming 1
Consider the Linear Programming problem depicted in the figure, where the objective function is F = x1 + x2 .
The domain of admissible solutions is the shaded area and the optimal solution is at the point G.
1. Suppose that the coefficient of x1 in the objective function remains equal to 1.
Between what values can the coefficient of x2 in the objective function vary so that the solution G remains
optimal?
2. Suppose now that the coefficient of x2 in the objective function remains equal to 1.
Between what values can the coefficient of x1 in the objective function vary so that the solution G remains
optimal?
83
Linear Programming 2
X2
2
P
1
1 2 3 4 5 6 7 X1
Consider the Linear Programming problem presented in the figure, where F = 3x1 + 4x2 is the objective
function. The shaded area represents the region of the feasible solutions and the optimal solution is on point P.
Suppose that the coefficient of x2 in the objective function is kept constant and equal to 4.
1. What is the maximum value that the objective function coefficient x1 can take, so that the solution P
remains optimum?
2. And what is the minimum value?
84
Linear Programming 3
X2
6
Consider the Linear Programming (LP) problem
5 presented in the figure, where the shaded area rep-
!"#!$%&' resents the region of the feasible solutions and the
4
objective is:
!$%(' min X1 + X2
3
85
Linear Programming 4
X2
6
Consider the Linear Programming (LP) problem
5 presented in the figure, where the shaded area rep-
#$!#"'(!"( resents the region of the feasible solutions and the
4
objective is:
86
Linear Programming 5
X2
5
Consider the Linear Programming (LP) problem
presented in the figure, where the shaded area rep-
4
!"#!$%&'& resents the region of the feasible solutions and the
objective is:
3
!$%$()& max X1 + X2
2 1. What is the optimal solution of this problem?
$!
" #*
!"%"& !$ % 2. Which of the following constraints are active
1 +& on the optimal solution?
2.1 X1 ≥ 0;
0 X1
2.2 X2 ≥ 0;
-1 0 1 2 3 4 5
2.3 X1 ≥ 1;
2.4 X2 ≤ 2.5;
-1 2.5 2X1 + 3X2 ≤ 8.
87
Linear Programming 6
X2
5
88
Notice that . . .
• the Optimal Solution is necessarily (and at least) on one of the vertices of the Space of Admissible
Solutions;
• by changing the slope of the Objective Function the Optimal Solution jumps from vertex to vertex;
• if the slope of the Objective Function is equal to the slope of an Active Constraint then there are multiple
optima;
• changing the slope of an Active Constraint the value of the Optimal Solution changes but remains in the
same vertex;
• changing the right-hand side (independent term) of a constraint causes the constraint to move to a parallel
position and may imply that the Optimal Solution changes vertex; how does this change relate to the
concept of Shadow Price?
89
Excel Solver
Excel Solver – Learning Objectives
90
Production planning in BA with Favaios Bottles
The factory of Barbosa & Almeida (BA) in Avintes produces glass containers through mould injection. BA
recently won two new clients and intends to assign this production to one of its furnaces. The orders were of
bottles of Sandeman Ruby Port (75cl), one liter bottles of olive oil Oliveira da Serra and one liter bottles of
Favaios Moscatel. The customers buy all the bottles that BA can produce.
Due to differences in the production (number of cavities and different cycle times in the oven), each batch of
portwine bottles takes 50 hours to produce, whereas each batch of oil bottles requires only 30 hours and a batch
of favaios takes 50 hours to produce. There are a total of 2000 hours available at the oven.
Moreover, there are restrictions in the storage capacity of the bottles prior to their dispatch. The warehouse has
300m3 available and each batch of portwine bottles occupies 6m3 of warehouse space, each batch of bottles of
olive oil holds 5m3 and each batch of favaios holds 6m3 .
Finally we must also consider the capacity available in the decoration sector (e.g. labels, packaging), which is
200 hours. The portwine bottles spend 3 hours per batch, the olive oil bottles 5 hours per batch and the favaios
bottles also 5 hours per batch.
Barbosa & Almeida wants to maximize the profit from these two orders, knowing that the profit per batch is
50e 60e and 20e, respectively.
91
Production planning in BA with Favaios Bottles
Linear Programming Model
Decision variables
xVP – Number of batches of Vinho do Porto Ruby Sandeman bottles to produce;
xA – Number of batches of Azeite Oliveira da Serra bottles to produce;
xF – Number of batches of Favaios bottles to produce.
Objective:
max Z = 50xVP + 60xA + 20xF
Subject to:
50xVP +30xA +50xF ≤ 2000 (time in the oven)
6xVP +5xA +6xF ≤ 300 (space in the warehouse)
3xVP +5xA +5xF ≤ 200 (capacity in the decoration sector)
xVP , xA , xF ≥ 0
92
Production planning in BA with Favaios Bottles
Excel Model
Colour code:
Orange Decision Variables
Blue Data
Grey Formulas
93
Production planning in BA with Favaios Bottles
Excel Model
94
Production planning in BA with Favaios Bottles
Resolution using Solver — Parameters and Model in the Solver
95
Production planning in BA with Favaios Bottles
Resolution using Solver — Optimal solution
96
Production planning in BA with Favaios Bottles
Sensitivity Report
97
98
Excel Solver
Exercises
99
Volkswagen Autoeuropa i
Volkswagen Autoeuropa produces four types of vehicles: Scirocco, Eos, Sharan and Alhambra. The capacity of the Palmela plant limits the total
output to a maximum of 200,000 units per year. Due to constraints related with the existing production equipment, the total units of both Sharan
and Alhambra can not exceed 100,000 units, and the total units of both Scirocco and Eos can not exceed 65,000 units. The marketing strategy of
Volkswagen requires the production of minivans (Sharan and Alhambra) to be at least 1.5 times the production Scirocco and Eos models.
Volkswagen’s environmental protection policy Volkswagen requires that in each of their factories the production mix respects an average CO 2
emission of 150 g/Km. The profits, the selling potential and the CO 2 are in the following table:
Figures 1, 2 and 3 reproduce the Excel model and the corresponding solver reports obtained after finding the optimal solution.
100
Volkswagen Autoeuropa ii
101
Volkswagen Autoeuropa iii
102
Chutalto calçado desportivo i
Chutalto, a national company specialised in sports footwear, in addition to the other distribution channels, now has three own mega shops in
shopping centres, which act as an important showcase for the brand: Porto, Tejo and La Laguna.
The Logistics Department has to plan the replenishment of the articles in the shops from two logistics platforms with which the company has a
contract: Braga and Faro. Physical transport will be guaranteed by UPS, the well-known international logistics company. The estimated needs for the
Dolce Vita Porto, Tejo and La Laguna shops are 6000, 12000 and 8000 SKUs, respectively. Due to space limitations, the shops must not receive more
SKUs than they need, that is, each shop must receive exactly the quantities it needs.
The logistical platforms are in turn supplied from their 2 suppliers, located in Vigo and Ksar es Seghir, whose monthly SKU availability for dispatch to
the logistical platforms is 14000 from Vigo and 16000 from Ksar es Seghir. The logistical platforms must receive exactly what they need to send to
the shops, functioning as mere transshipment points.
The cost per SKU shipped via UPS is shown in the following table:
Cost per SKU shipped (e) Dolce Vita Porto Dolce Vita Tejo Dolce Vita La Laguna
Braga 50 100 400
Faro 120 80 300
1. Explain in your own words what are, in this problem, the decision variables, the objective function and the constraints.
2. Write the algebraic model.
3. Build the model on a spreadsheet.
4. Using the optimization solver, determine the optimum solution to the problem, generating the corresponding sensitivity report.
103
Chutalto calçado desportivo ii
5. From the sensitivity report of the optimal solution obtained in the previous question, tell us between which values you can vary the unit cost of
shipping between Vigo and Braga, without the optimal solution to change.
6. Also based on the sensitivity report on the optimal solution, state whether it would be useful, in order to improve the optimal solution obtained,
to increase the capacity of the Vigo supplier, the maximum amount payable for this increase in capacity and the maximum value of capacity to
which the expansion should be applied. Justify.
104
Oriental Airlines i
Oriental Airlines is considering a capital expansion by acquiring new Boeing B797s, Airbus A450s and Lockheed L120s aircraft for its Pacific routes.
The average annual profit expected to be made on each of the aircraft is $3.5 million, $2.8 million and $3.0 million respectively and the company’s
goal is to maximise total profit.
The budget for the new acquisitions is $750 million. Boeing B797 aircraft cost $42 million, Airbus A450 cost $30 million and Lockheed L120 cost
$27.5 million.
Oriental has allocated up to $10 million for additional staff to support the operation of the new aircraft. Each B797 needs $200 000 in new hires,
each A450 needs $180 000 and each L120 $190 000.
Currently the existing maintenance resources allow 800 days of maintenance per year for the new acquisitions. Each B797 requires 45 days of
maintenance, each A450 38 days and each L120 42 days.
To maintain diversity in its suppliers, Oriental Airlines intends to buy at least 2 aircraft from each supplier: Boeing, Airbus, Lockheed. However, to
maintain the subsidies received from the European Union, the number of aircraft purchased from Airbus cannot be less than the number of aircraft
purchased from Boeing.
Consider that the number of planes does not have to be integer.
1. Explain in your own words what are, in this problem (i) the decision variables; (ii) the objective function; (iii) the constraints, and write the
algebraic model.
2. Build the model on a spreadsheet.
3. Using the optimization solver, determine the optimal solution for the problem, and generate the sensitivity report.
4. Using the Solver sensitivity report, determine between which values you can vary the unit profit of Airbus A450 aircraft so that the optimal
solution does not change. Justify.
5. Using the Solver sensitivity report, determine between which values you can vary the maintenance capacity (currently set at 800 days) so that
the structure of the optimal solution does not change. Justify.
6. Using only the information from Solver’s sensitivity report, state how much the profit would decrease if it were mandatory to purchase at least
4 planes from each supplier. Justify.
105
Resolution of Problems with Integer
Variables
Integer Programming – Learning Objectives
106
Solving Integer Programming Problems
Solve the non-integer problem with Simplex and round?
107
Solving Integer Programming Problems
Test all the solutions? They are less than 20. . .
108
Solving Integer Programming Problems
Test all the solutions? They are 1030 !
If there are 100 events to choose from, as each decision variable can take two values (0 or 1) there would be
2 × 2 × 2 × . . . × 2 = 2100 ≈ 1030 alternative solution that should be evaluated.
Obviously some of these solutions would be non-admissible but it is not possible to assess whether or not a
solution meets the constraints without first generating it. That would make this “testing all solutions” method
impractical.
Considering that the universe has approximately 1010 years, if, since the beginning of the universe, we would
have evaluated 1020 solutions per year, or 4 × 1012 per second, we would be now near the end . . .
109
Exact Methods to solve Integer or Mixed Integer Programming Problems
Relaxation If we do not consider one or more constraints of the Original Problem (OP), we can
transform the problem in another problem, the Relaxed Problem (RP) that can be simpler
to solve. Considering that the problem is a minimization problem, the optimal values of the
objective function are related in the following way:
⋆ ⋆
fRP ≤ fOP
(with less constraints the solution can only improve or stay the same).
Linear relaxation transform an integer problem in a problem with continuous variables by “dropping” the
constraint that the variables must be integer (or Binary). This allows us to use the Simplex
Algorithm instead of the more complex, and far more time consuming, tree search.
Branch and Bound The “branch and bound” method is based on an intelligent enumeration of the solutions
that are candidates to be integer optimal by successively partitioning the solution space and
cutting the search tree by considering limits that are calculated during the enumeration.
110
Solving a Problem with B&B
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ∈ Z0+
Optimal Solution:
(x, y ) = (1, 4); F = 31
111
Solving the linear relaxation of the problem, LP0
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
Optimal Solution:
(x, y ) = (3.5, 3.5); F = 35
112
Problem LP01 branching in x: x ≤ 3
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
Optimal Solution:
(x, y ) = (3, 3.6); F = 34.5
113
Problem LP02 branching in x: x ≥ 4
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≥ 4
no admissible solution
114
Problem LP011 branching in y : y ≤ 3
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≤ 3
Optimal Solution:
(x, y ) = (3, 3); F = 30
(x, y ∈ Z0+ )
115
Problem LP012 branching in y : y ≥ 4
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≥ 4
Optimal Solution:
(x, y ) = (1.7, 4); F = 33.2
116
Problem LP0121 branching in x: x ≤ 1
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≥ 4
x ≤ 1
Optimal Solution:
(x, y ) = (1, 4.2); F = 32.5
117
Problem LP0122 branching in x: x ≥ 2
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≥ 4
x ≥ 2
no admissible solution
118
Problem LP01211 branching in y : y ≤ 4
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≥ 4
x ≤ 1
y ≤ 4
Optimal Solution:
(x, y ) = (1, 4); F = 31
(x, y ∈ Z0+ )
119
Problem LP01212 branching in y : y ≥ 5
max F = 3x + 7y
s. t.:
x ≤ 3.5
5x − 4y ≤ 10
4
7
x + 2y ≤ 9
x , y ≥ 0
x ≤ 3
y ≥ 4
x ≤ 1
y ≥ 5
no admissible solution
120
“Branch-and-Bound” tree
LP_0
(non
integer)
x
=
3.5
y
=
3.5
F
=
35
x <= 3 x >= 4
LP_01
LP_02
(non
integer)
(no
solu=on)
x
=
3
y
=
3.6
F
=
34.5
y <= 3 y >= 4
LP_011
LP_012
(integer)
(non
integer)
x
=
3
x
=
1.7
y
=
3
F
=
30
y
=
4
F
=
33.2
x <= 1 x >= 2
LP_0121
LP_0122
(non
integer)
(no
solu=on)
x
=
1
y
=
4.2
F
=
32.5
y <= 4 y >= 5
LP_01211
LP_01212
(integer
op=mal)
(no
solu=on)
x
=
1
y
=
4
F
=
31
121
Bounds
Maximization Problem
F • a lower bound LB is given by an integer
solution that has been previously obtained –
Upper Bound – UB the optimal solution F ⋆ can never be worse
Value of the objective function for the
most promising unexplored node
(lower) than the integer solution that we
already have;
Optimal integer solution F* • an upper bound UB is given by the highest
(unknown)
value of the objective function among all the
F*- LB ≤ UB - LB nodes that are not yet completely explored
(we hope to find there an integer solution
Lower bound – LB that is better than the one we have).
Best integer solution found
(highest value of the objective
function)
122
PIC Problem
Consider a linear programming problem where all the variables are integer. The tree in the figure is obtained
along the resolution process.
LP_1
(non-‐integer
solu2on)
Z
=
100
LP_2
LP_3
(non-‐integer
solu2on)
(non-‐integer
solu2on)
Z
=
85
Z
=
91
LP_8
LP_9
(no
solu2on)
(non-‐integer
solu2on)
Z
=
65
123
PIF Problem
The Branch and Bound tree in the figure has been built for an integer programming problem.
The node sequence as well as the value of the objective function are represented in each node.
(1)
20
(2)
(3)
30
20
1. Determine the absolute error for the optimal solution in each one of the nodes.
2. Which nodes need to be explored?
124
Open questions
• Given a set of unexplored nodes how can we choose the next node to explore?
P1 P2 P1 P2
P3
P4
P5
P6
P3
P4
Most promising node
Select the node with the best objective function.
P5
P6
The node that can potentially lead to the best
integer solution.
• Selection of the variable to branch on – After selecting the node to explore, which variable should be
chosen to branch on within the variables that are not integer in the solution in the node?
Some strategies have been described in literature, but their results depend heavily on the problem at hand
and on the physical meaning of the variables.
125
Resolution of Problems with Integer Variables
Exercises
126
PID Problem
The “Branch-and-Bound” in the figure has been built for a maximization problem..
The node sequence is represented in the tree, as well as the value of the objective function in each node.
Node
0
93
Node
1
Node
2
84
82
127
Grants for the Olympic Games i
Aiming the success of the Portuguese participation in the London 2012 Olympic Games, the Portuguese
Olympic Committee (COP) started the Project London 2012. Within this project, grants will be given to
support the preparation of the Portuguese athletes. Grants may be individual or collective.
COP has to decide how many collective and how many individual grants will be given, so that the total number
of grants is maximized.
The COP Operational Research team (ORCOP) has built the Linear Programming model presented below. In
this model x and y are the decision variables and stand, respectively, for the number of collective and individual
grants to give.
Max Z =x +y
sub. to:
x + 3, 7y ≤ 18
−0, 25x + 0, 75y ≥ 0
y ≥ 2
x, y ≥ 0 and integer
128
Grants for the Olympic Games ii
Now that the model has been built, ORCOP is now trying to find the optimal solution by using the
“Branch-and-Bound” method. The tree presented in the figure represents the resolution process at this moment.
All the values are represented with a precision of one decimal place.
Node 1
X = 8,1
Y = 2,7
Z = 10,8
X≤8 X≥9
Node 2
X=8
Y = 2,7
Z = 10,7
Y≤2 Y≥3
Node 3 Node 4
X=6 X = 6,9
Y=2 Y=3
Z=8 Z = 9,9
X≤6 X≥7
Node 5
X=6
Y = 3,2
Z = 9,2
129
Grants for the Olympic Games iii
1. ORCOP does not know if it should go on with the tree ramification (branching) or if it should use just the
information generated until now.
If you would use just the information generated until now:
1.1 How many collective and individual grants should COP give?
1.2 How many grants could the COP be failing to award?
2. ORCOP has decided to continue branching the tree to try to get a better solution to the initial problem.
Knowing that the nodes in the figure are numbered in the order in which they were solved, indicate which is
the next node that ORCOP should branch in order to continue with the same branching strategy that was
used so far. Justify.
3. Help ORCOP branch the subproblem of Node 5, using the graphical method. You should present a graph
that allows you to identify clearly:
3.1 Constraints of the sub-problem and admissible region;
3.2 Optimal solution;
3.3 Isoline of the objective function in the optimal solution.
4. After solving the sub-problem of Node 5, ORCOP wants to know if it has already found the optimal
solution of the initial problem. Was it worth solving this additional sub-problem? Justify.
8
Problem from the Operations Research exam from 2011.11.28 – MIEM – FEUP
130
Queueing Theory
Queueing Theory – Learning Objectives
• Check from a problem description whether it is an M/M/1, M/M/S or M/M/S/K queueing problem.
• For each of these types of queues, calculate the performance measures (L, Lq, W, Wq) and the
probabilities associated either to the permanence in a given state (e.g. Pn) or those associated to the
metrics (e.g. P(W>t) ).
• Evaluate queue configuration alternatives (number of servers and server efficiency), from costs attributed
either to the service or to the clients’ time, and select the best ones.
• Identify the possible states of a queueing system and represent through a graph the transition between the
states.
• Estimate the probability of occurrence of the states of M/M/S/K systems from the equilibrium equations.
131
Stay in Queue! (movie)9
9
Stay in queue! A movie by Ferdinand Lutz. Music by Dominik Mueller. http://www.ferdinandlutz.com/
132
Queueing Theory
Pioneering work by A. K. Erlang (early 20th century), Danish scientist, on telephone calls waiting for a line to
be forwarded.10
10
“Telefon-Ventetider. Et Stykke Sandsynlighedsregning”, in Matematisk Tidsskrift, B, 1920 (a paper on telephone waiting times, in Danish, digitized
by Project Runeberg http://runeberg.org/img/matetids/1920b/0029.pdf) 133
Structure of a queueing system
System
Customers Output
Queue Service
Population Size infinite: when the probability of a new arrival occurring is not influenced by
the number of customers already in the system;
finite: –
Arrival Dimension • customers arrive one by one;
• customers arrive in groups.
Arrival Control • controllable arrivals (e.g. bookings on fixed days);
• uncontrollable arrivals (e.g. emergency at a hospital).
Distribution of Arrivals The pattern of arrivals can be described
by the time between two consecutive arrivals (time between arrivals)
or by the number of arrivals per unit of time (distribution of arrivals).
constant: fixed time intervals between successive arrivals (e.g. industrial
assembly queues);
random: time intervals between successive arrivals cannot be predicted with
certainty ⇒ probability distributions.
Arrival Rate (λ) Average number of customers seeking service per unit time slot.
• independent of system state;
• dependent on system state: λn , where n is the number of customers in the
system.
Attitude of Customers patient: customers stay in line until they are served ⇒ good approach when
there are few dropouts;
impatient: customers give up waiting or simply do not join the queue if it is too
long ⇒ use of simulation models.
135
Queues | Queue characterisation
Number of Queues single queue: a single queue even if the server has several service stations;
multiple queue: one queue per service station.
In these cases each queue/post combination constitutes a separate
queue system and it is usual to distribute arrivals equally between the
various queues.
Queue Length infinite: the maximum capacity of the queue is very large compared to the
number of elements that usually constitute it;
finite: the queue can accommodate only a small number of customers.
Queue discipline • FIFO – “First In First Out”;
• priorities: e.g. reserves, age, emergency;
• random.
136
Queues | Characterisation of the Service
Service Configuration Number of servers (service stations) in parallel and number of service phases:
• one server, one phase;
• one server, multiple phases;
• multiple servers, one phase;
• multiple servers, multiple phases;
• queueing networks.
Size of Service • simple;
• in group (e.g. one lift serves several customers simultaneously).
Service Time • constant;
• random: negative exponential distribution, Erlang, etc. . .
Service Rate (µ) Average number of clients that can be served by each server and per time unit.
1
µ
= average duration of the service.
If the average number of clients actually served ≤ µ there may be moments of inactivity.
• dependent on system state (µn )
(e.g. complaints service serving complaints faster when queue is longer: higher productivity or
degradation of service quality?)
• independent of the state of the system.
137
Queues | Purpose of Modelling
“Optimize” the functioning of queues, finding balanced solutions between two extremes:
Congestion and Rarefaction
Congestion server occupancy rate close to 100% → customers have to wait a long time in the queue.
This situation is only acceptable when the server cost is much higher than the waiting cost of the
clients.
Rarefaction servers remain inactive for a high percentage of time (sometimes desirable, e.g. fire services,
operating rooms, etc.).
138
Queues | Performance Measures
139
Queues | Parameters
140
Queues | Characterisation of the Distributions of Arrivals and Attendance
141
Negative Exponential Distribution
Cumulative distribution
142
Poisson Distribution
143
Properties
• If the time between two consecutive events follows a negative exponential distribution with parameter α,
then the number of events per time unit t follows a Poisson distribution with parameter αt.
• The negative exponential distribution has no memory, i.e., the probability of occurrence of an event is
independent of the time instant in which the immediately preceding event took place.
• Let T1 , T2 , . . . , Tn be random variables with negative exponential distribution and parameters
α1 , α2 , . . . , αn . The variable u = min{T1 , T2 , . . . , Tn , which represents P
the time until the first of n events
occurs, follows a negative exponential distribution with parameter α = ni=1 αi .
This property allows modelling systems with k identical servers (same distribution) with parameter µ,
operating in parallel, as a single server with parameter kµ (the next client is served when the first server
becomes free).
• Disaggregation — if the arrival of clients follows a Poisson distribution with parameter λ, and these clients
can beP divided into different types such that the probability pi of the client being of a given type i is fixed
and i pi = 1, then the arrival of each of the clients still follows a Poisson distribution with parameter
λi = pi λ.
144
Queues | Fundamental relations
Fundamental relations between the number of elements in the system (L) and in the queue (Lq ), and the
corresponding waiting times in the system (W ) and in the queue (Wq ), for queues in equilibrium.
Assuming arrival rates λ and service rates µ constant and independent of the system state:
L = λW (1)
Lq = λWq (2)
1
W = Wq + (3)
µ
λ
L = Lq + (4)
µ
If the arrival rate λ depends on the state of the system, then λ should be replaced by λ in equations (1) and (2).
Equation (3) is valid whatever the number of servers, as long as the average service time ( µ1 ) is the same for all.
145
Queues | Life and Death Process Modelling i
Life and Death processes are memoryless stochastic processes that, applied to queues, associate life with an
arrival in the queue and death with the exit of a customer after being served.
• Given that at instant t the system is in state n:
• the time between t from the next birth (arrival) follows a negative exponential distribution with parameter λn ;
• the time between t and the next death (service completed) follows a negative exponential distribution with parameter
µn .
• More than one birth or one death can never occur simultaneously (transition only to adjacent states).
The arrows represent the only possible transitions between the states of the system. The values associated with
the arrows correspond to the average rate for that transition when the system is in the state at the base of the
arrow.
146
Queues | Life and Death Process Modelling ii
Supposition
Principle
• For any state n (n = 0, 1, 2, ...) of the system, the average input rate is equal to the average output rate.
• The equation expressing this principle is called the equilibrium equation for state n.
• After building the equilibrium equations for all states as a function of the unknown probabilities Pn , one
can solve this system of equations (in addition to an equation stating that the probabilities must add up to
1) to find these probabilities.
147
Queues | Life and Death Process Modelling iii
Equilibrium Equations:
State 0: µ0 P1 =λ0 P0
State 1: µ1 P2 + λ0 P0 =µ0 P1 + λ1 P1
...
State n: µn Pn+1 + λn−1 Pn−1 =µn−1 Pn + λn Pn
...
148
11
Queue Classification – X /Y /Z /W
X , Y Distributions of the time interval between arrivals and the service time, respectively:
M negative exponential distribution;
G distribution not specified (any distribution);
D deterministic arrivals or attendances.
Z number of servers in parallel.
W other system characteristics, such as limited queue length or finite population:
blank or ∞ base model without any additional constraints;
K queue length limited, number of elements in the system cannot exceed K ;
N finite population.
Example: M/M/1
11
Based on the classification proposed by Kendall, D. G. (1953). Stochastic Processes Occurring in the Theory of Queues and their Analysis by the
Method of the Imbedded Markov Chain. Annals of Mathematical Statistics, 24(3), 338-354.
149
M/M/1 Queues
150
Basic model with one server – M/M/1
λ λ λ λ
P0 P1 P2 Pn-1 Pn Pn+1
µ µ µ µ
System in balance
151
M/M/1 Queues | Determination of the equilibrium equations
State 0
Number of entries in state 0 per unit time = µP1
(transition from state 1 to state 0 due to the exit of a served customer from the system)
λ
µP1 = λP0 ⇔ P1 = P0 (5)
µ
152
M/M/1 Queues | Determination of the equilibrium equations
State 1
Number of entries in state 1 per time unit = λP0 + µP2
(from state 0 due to the arrival of a customer to the system or from state 2 due to the exit from the system of a served customer)
153
M/M/1 Queues | Determination of the equilibrium equations
State 2
Number of entries in state 2 per time unit = λP1 + µP3
(from state 1 due to the arrival of a customer to the system or from state 3 due to the exit from the system of a served customer)
154
M/M/1 Queues | Determination of the equilibrium equations
State n
n
λ
Pn = P0 = ρn P0 (8)
µ
P∞
P0 is obtained by imposing the condition n=0 Pn = 1:
∞ ∞ ∞
X X 1 X 1
Pn = ρn P0 = 1 ⇔ = ρn = ⇔ P0 = 1 − ρ
n=0 n=0
P0 n=0
1 − ρ
P∞
n=0 ρn represents a geometric progression of reason ρ, which will be convergent if ρ < 1, in which case the
1
sum is given by 1−ρ .
Substituting P0 for 1 − ρ in the equation (8) we obtain:
Pn = ρn (1 − ρ) (9)
155
Queues | Characteristics of the M/M/1 model
156
An additional remark
Questions concerning the computation of probabilities of events in queueing systems are answered from the
determination of the states of the system that meet the conditions that define these events. To exemplify:
• In an M/M/1 system what is the probability of a queue being formed?
The states of the system in which there is a queue are states 2, 3, 4, etc..., that is, all but state 0 (no one
is in the system) and state 1 (there is only one customer in the system and, naturally, he is being served, so
there is no queue either).
Thus, the requested probability will be 1 − P0 − P1 .
• In an M/M/1 system what is the probability that a customer arrives and is immediately served (i.e.
what is the probability that he does not have to wait)?
In order for a client to arrive and be served immediately it is required that the server is free, that is, that no
one is there to be served (and therefore, that no one is in the system).
Thus, the requested probability will be P0 .
Note that if there is only one customer in the system (and therefore, being served) there is no queue, but a
customer that arrives cannot be served immediately and will have to wait. This customer, when entering
the system, will cause the system to change from state 1 to state 2 and there will be a queue with one
customer.
157
M/M/1 Queues | Pastry Shop
On Saturdays only one employee attends customers in a small pastry shop. The customer arrival pattern on
Saturdays follows approximately a Poisson distribution, with an average arrival rate of 10 people per hour. The
customers, who are many given the quality of the pastries, are served according to the FIFO rule. The time
taken to serve a customer is estimated to be exponentially distributed, with an average service time of 4 minutes.
Given the data presented above determine:
1. the probability that a queue will form;
2. the probability that a customer arrives and is immediately attended to;
3. the average queue length;
4. the average waiting time of a customer in the queue;
5. the probability of a customer to be less than 12 minutes in the pastry shop.
12
12
http://upload.wikimedia.org/wikipedia/commons/3/3c/Fruit Tarts
158
M/M/S Queues
159
Basic model with S servers – M/M/S
λ λ λ λ λ λ λ
µ 2µ 3µ (S-1)µ Sµ Sµ Sµ
160
Characteristics of the M/M/S model
Arrival: Poisson Service time: negative exponential
Arrival rate: λ customers Service rate: µ customers
time unit time unit and server
Population = ∞ No. of servers: S
Maximum queue length = ∞
λ
Average occupation rate ρ = Sµ <1
Average unoccupancy rate 1 − ρ
S
∞ λ
X P0 µ ρ Lq
Lq = (n − S)Pn = 2
Wq =
n=S
S!(1 − ρ) λ
∞
X λ 1 L
L= nPn = Lq + W = Wq + =
n=0
µ µ λ
S
λ
1 P0 µ 1 − e −µt(S−1−λ/µ)
−µt
P0 = P(W > t)t≥0 = e 1 +
n S λ
S!(1 − ρ) S −1− µ
S−1 λ λ
X µ µ 1
+
n=0
n! S! 1−ρ
λ n
µ
P , if 0 ≤ n ≤ S
n! n 0 −Sµ(1−ρ)t
Pn = λ P(Wq > t)t≥0 = [1 − P(Wq = 0)]e
µ
n−S P0 , if n ≥ S
S!S
S−1
X
P(Wq = 0) = Pn
n=0
161
M/M/S Queues | Practical table to calculate P0
162
M/M/S Queues | Post Office
A post office wants to resize and reorganise its service to the public. The attendance scheme, in which all employees attend all
types of customers, requests for information, complaints, acquisition of stamps, postal orders, etc., will however be maintained.
The opening hours to the public will also be maintained, totalling 8 hours per day.
To resize the attendance service, it was necessary to collect information on the number of arrivals of clients, as well as on the
service times. From this analysis, it was concluded that the number of arrivals followed approximately a Poisson distribution
with parameter λ = 1.56 arrivals per minute, while the service times followed a negative exponential distribution with a mean
equal to 66.24 seconds, which corresponds to a service rate µ = 1/66.24 × 60 = 0.906 customers per minute.
The hourly cost of each employee is 10e. As for the customers, an hourly waiting cost equal to the cost of the post office staff
was considered.
http://www.ctt.pt/fectt/wcmservlet/ctt/institucional/banco_imagens/categorias/ecs/index.html?
action=detail&image=5
163
M/M/1 and M/M/S Queues
Exercises
164
Warehouse
A warehouse receives its orders in trucks that are unloaded using forklifts. A data survey carried out on site led
to the conclusion that:
• trucks arrive according to a Poisson process at a rate of 16 trucks/day;
• the unloading times are variable (following a negative exponential distribution) with averages depending on
the number of forklifts used:
Number of forklifts Average unloading time (minutes)
1 50
2 20
3 15
4 12
5 10
• the operation of each forklift costs 15 euros/hour;
• the immobilisation of the trucks costs 30 euros/hour.
Size the unloading team in order to minimize the overall costs of the system, which operates 8 hours per day.
165
Emergency Service
The emergency service of a small hospital has one doctor on permanent duty.
Patients arrive according to a Poisson distribution with an average rate of 2.4 per hour. The doctor provides
emergency treatment to about 3 patients per hour. The distribution of the doctor’s attendance time per patient
can be approximated by a negative exponential.
1. On average, how much of the doctor’s time is spent providing emergency service?
2. On average, how long will a patient have to wait before being seen by the doctor?
3. How long on average should a patient wait to be seen by a doctor, in a situation where a doctor and an
assistant are part of an M/M/1 system, with a service rate of 6 patients per hour, keeping the arrival rate
at 2.4 patients per hour?
4. If the hospital improves the quality of emergency care, by adding a doctor to the permanent service
(M/M/2 system), what percentage of the doctors’ time will be used?
5. With two doctors available, how long should a patient wait, on average, before being sen by a doctor?
6. For the two situations above: care provided by two doctors, and care provided by one doctor and one
assistant, calculate how much time each patient will spend in the emergency service.
Discuss the advantages and disadvantages of each situation.
166
Veterinary Service
Edmundo Terra is one of the critics of the way the veterinary service of the Belos Ares Agricultural Cooperative
works. Edmundo states that whenever he calls a vet he never comes on the same day.
Currently the Veterinary Service has two veterinarians and each one answers an average of 5 calls a day. As for
the requests for support for sick animals these arrive randomly, following a Poisson process, at the rate of 9 per
day. In this case, the service can be considered M/M/2.
Sensible to the criticism of the members of the Cooperative, the direction decided to discuss the case, and even
considering hiring a new veterinarian.
Evaluate the situation, contributing with information that may be useful for a decision about the mentioned
recruitment.
167
Queues with Limited Length M/M/S/K
168
Queues with Limited Length M/M/S/K
Due to limitations of the system, the maximum number of elements in the system
(service + queue) is K
λ λ λ λ λ λ λ
µ 2µ 3µ (S-1)µ Sµ Sµ Sµ
169
Queues with Limited Length M/M/S/K
µ service rate
λ
Sµ
occupancy rate
λ
ρ = Sµ pressure rate
The system may be in equilibrium for values of ρ greater than 1, however, in that case there will be a
potentially large number of system users who arrive and are not served.
PK dropout probability
(due to lack of capacity of the system to serve customers who arrive when the system is full).
λPK dropout rate
(due to lack of capacity of the system to serve customers who arrive when the system is full).
(1 − PK ) probability of a customer entering the system.
170
M/M/1/K Queues | Sea Port
http://www.planete-tp.com/en/solid-cargo-in-bulk-a389.html
A harbour receiving bulk carriers has a single (mobile) unloading station which can unload an average of 5 ships
a day. The port has a quay that only allows 2 ships to berth, so when the quay is busy, additional ships wanting
to berth are diverted to another port at a cost of 20,000e per diverted ship. The cost of keeping ships in the
harbour is 12,000e per day per ship.
Arrivals of ships can be considered as Poissonian, with a rate of 3 ships per day, the unloading times being
exponentially negative.
We want to assess the economic feasibility of extending the quay to accommodate 3 ships, which would result in
an additional charge of 1,000e per day.
Use the equilibrium equations to solve this exercise.
171
Characteristics of the M/M/1/K model
Arrival: Poisson Service time: negative exponential
Arrival rate: λ customers Service rate: µ customers
time unit time unit and server
λ for n = 0, 1, 2, . . . , K − 1
λn = 0 for n ≥ K Number of servers: 1
K
X −1
λ
λ= λPn = λ(1 − PK ) ρ= µ
n=0
λ
Population = ∞ Average occupation rate = µ
λ
Maximum number of elements in the system = K Average unoccupancy rate = 1 − µ
Maximum queue K − 1
∞
X λ Lq
Lq = (n − 1)Pn = L − Wq =
n=1
µ λ
∞
X ρ (K + 1)ρK +1 1 L
L= nPn = − W = Wq + =
n=0
1−ρ 1 − ρK +1 µ λ
1−ρ
P0 = (unoccupancy rate)
1 − ρK +1
n
ρ P0 , se n = 1, . . . , K
Pn = 0, se n > K (14 ) P(Wq = 0) = P0
14
Pn can be calculated using the equilibrium equations, particularly in cases where the value of k is relatively small.
172
Characteristics of the M/M/S/K model
Arrival: Poisson Service time: negative exponential
Arrival rate: λ customers Service rate: µ customers
time unit time unit and server
λ for n = 0, 1, 2, . . . , K − 1
λn = 0 for n ≥ K Number of servers: S
K
X −1
λ
λ= λPn = λ(1 − PK ) ρ= Sµ
n=0
λ
Population = ∞ Average occupation rate = Sµ
λ
Maximum number of elements in the system = K Average unoccupancy rate = 1 − Sµ
Maximum queue K − S
∞
X Lq
Lq = (n − S)Pn = Wq =
λ
n=SS
P0 λ ρ
µ K −S K −S
= × [1 − ρ − (K − S)ρ (1 − ρ)]
S!(1−ρ)2
∞
X λ 1 L
L= nPn = Lq + W = Wq + =
n=0
µ µ λ
λ n
µ
P , if n = 1, . . . , S
n! n 0
1
P0 = n S Pn = λ
µ (15 )
S−1 λ λ K
P0 , se n = S, . . . , K
S!S n−S
X µ µ X n−S
+ ρ 0, se n > K
n=0
n! S! n=S
S−1
X
P(Wq = 0) = Pn
n=0
15
Pn can be calculated using the equilibrium equations, particularly in cases where the value of k is relatively small. 173
M/M/1/K Queues | Practical table to calculate P0
174
M/M/2/K Queues | Practical table to calculate P0
175
M/M/3/K Queues | Practical table to calculate P0 i
Number of elements in the system (K )
λ 4 5 6 7 8 9 10 11 12
µ
0,15 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607
0,2 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187
0,25 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788
0,3 0,7408 0,7407 0,7407 0,7407 0,7407 0,7407 0,7407 0,7407 0,7407
0,35 0,7046 0,7046 0,7046 0,7046 0,7046 0,7046 0,7046 0,7046 0,7046
0,4 0,6702 0,6701 0,6701 0,6701 0,6701 0,6701 0,6701 0,6701 0,6701
0,45 0,6375 0,6373 0,6373 0,6373 0,6373 0,6373 0,6373 0,6373 0,6373
0,5 0,6063 0,6061 0,6061 0,6061 0,6061 0,6061 0,6061 0,6061 0,6061
0,55 0,5767 0,5764 0,5763 0,5763 0,5763 0,5763 0,5763 0,5763 0,5763
0,6 0,5485 0,5481 0,548 0,5479 0,5479 0,5479 0,5479 0,5479 0,5479
0,65 0,5217 0,5211 0,521 0,5209 0,5209 0,5209 0,5209 0,5209 0,5209
0,7 0,4962 0,4954 0,4952 0,4952 0,4952 0,4952 0,4952 0,4952 0,4952
0,75 0,4719 0,4709 0,4707 0,4706 0,4706 0,4706 0,4706 0,4706 0,4706
0,8 0,4488 0,4476 0,4473 0,4472 0,4472 0,4472 0,4472 0,4472 0,4472
0,85 0,4269 0,4254 0,425 0,4248 0,4248 0,4248 0,4248 0,4248 0,4248
0,9 0,406 0,4042 0,4037 0,4035 0,4035 0,4035 0,4035 0,4035 0,4035
0,95 0,3862 0,3841 0,3834 0,3832 0,3831 0,3831 0,3831 0,3831 0,3831
1 0,3673 0,3649 0,364 0,3638 0,3637 0,3637 0,3636 0,3636 0,3636
1,05 0,3494 0,3466 0,3456 0,3452 0,3451 0,3451 0,3451 0,3451 0,3451
1,1 0,3324 0,3292 0,328 0,3276 0,3274 0,3273 0,3273 0,3273 0,3273
1,15 0,3163 0,3126 0,3112 0,3107 0,3105 0,3104 0,3104 0,3103 0,3103
1,2 0,3009 0,2968 0,2952 0,2945 0,2943 0,2942 0,2941 0,2941 0,2941
1,25 0,2863 0,2818 0,2799 0,2792 0,2788 0,2787 0,2786 0,2786 0,2786
1,3 0,2725 0,2675 0,2654 0,2645 0,2641 0,2639 0,2638 0,2638 0,2638
1,35 0,2593 0,2539 0,2515 0,2504 0,25 0,2497 0,2497 0,2496 0,2496
1,4 0,2469 0,2409 0,2383 0,237 0,2365 0,2362 0,2361 0,236 0,236
1,45 0,235 0,2286 0,2257 0,2243 0,2236 0,2233 0,2231 0,2231 0,223
1,5 0,2238 0,2169 0,2137 0,2121 0,2113 0,2109 0,2107 0,2106 0,2106
1,55 0,2131 0,2058 0,2023 0,2005 0,1996 0,1991 0,1989 0,1987 0,1987
1,6 0,203 0,1953 0,1914 0,1894 0,1884 0,1878 0,1875 0,1873 0,1873
1,65 0,1934 0,1852 0,1811 0,1789 0,1777 0,177 0,1766 0,1764 0,1763
1,7 0,1842 0,1757 0,1712 0,1688 0,1674 0,1667 0,1663 0,166 0,1659
1,75 0,1756 0,1667 0,1619 0,1592 0,1577 0,1568 0,1563 0,156 0,1559
1,8 0,1674 0,1581 0,153 0,1501 0,1484 0,1474 0,1469 0,1465 0,1463
1,85 0,1596 0,15 0,1446 0,1415 0,1396 0,1385 0,1378 0,1374 0,1371
1,9 0,1522 0,1422 0,1366 0,1332 0,1312 0,1299 0,1292 0,1287 0,1284
1,95 0,1451 0,1349 0,129 0,1254 0,1232 0,1218 0,1209 0,1204 0,12
2 0,1385 0,128 0,1218 0,118 0,1156 0,1141 0,1131 0,1124 0,112 176
2,05 0,1321 0,1214 0,115 0,111 0,1084 0,1067 0,1056 0,1048 0,1043
M/M/3/K Queues | Practical table to calculate P0 ii
177
M/M/4/K Queues | Practical table to calculate P0 i
Number of elements in the system (K ))
λ 5 6 7 8 9 10 11 12 13
µ
0,15 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607
0,2 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187
0,25 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788
0,3 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408
0,35 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047
0,4 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703
0,45 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376
0,5 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065
0,55 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769
0,6 0,5488 0,5487 0,5487 0,5487 0,5487 0,5487 0,5487 0,5487 0,5487
0,65 0,522 0,522 0,5219 0,5219 0,5219 0,5219 0,5219 0,5219 0,5219
0,7 0,4965 0,4965 0,4965 0,4965 0,4965 0,4965 0,4965 0,4965 0,4965
0,75 0,4723 0,4722 0,4722 0,4722 0,4722 0,4722 0,4722 0,4722 0,4722
0,8 0,4493 0,4491 0,4491 0,4491 0,4491 0,4491 0,4491 0,4491 0,4491
0,85 0,4274 0,4272 0,4271 0,4271 0,4271 0,4271 0,4271 0,4271 0,4271
0,9 0,4065 0,4063 0,4062 0,4062 0,4062 0,4062 0,4062 0,4062 0,4062
0,95 0,3867 0,3864 0,3863 0,3863 0,3863 0,3863 0,3863 0,3863 0,3863
1 0,3678 0,3675 0,3674 0,3674 0,3673 0,3673 0,3673 0,3673 0,3673
1,05 0,3499 0,3495 0,3493 0,3493 0,3493 0,3493 0,3493 0,3493 0,3493
1,1 0,3328 0,3323 0,3322 0,3321 0,3321 0,3321 0,3321 0,3321 0,3321
1,15 0,3166 0,316 0,3158 0,3158 0,3158 0,3158 0,3158 0,3158 0,3158
1,2 0,3012 0,3005 0,3003 0,3002 0,3002 0,3002 0,3002 0,3002 0,3002
1,25 0,2865 0,2857 0,2854 0,2854 0,2853 0,2853 0,2853 0,2853 0,2853
1,3 0,2726 0,2716 0,2713 0,2712 0,2712 0,2712 0,2712 0,2712 0,2712
1,35 0,2593 0,2583 0,2579 0,2578 0,2577 0,2577 0,2577 0,2577 0,2577
1,4 0,2467 0,2455 0,2451 0,245 0,2449 0,2449 0,2449 0,2449 0,2449
1,45 0,2347 0,2334 0,2329 0,2327 0,2327 0,2327 0,2327 0,2327 0,2327
1,5 0,2233 0,2219 0,2213 0,2211 0,221 0,221 0,221 0,221 0,221
1,55 0,2125 0,2109 0,2103 0,21 0,2099 0,2099 0,2099 0,2099 0,2099
1,6 0,2022 0,2005 0,1998 0,1995 0,1994 0,1993 0,1993 0,1993 0,1993
1,65 0,1924 0,1905 0,1897 0,1894 0,1893 0,1892 0,1892 0,1892 0,1892
1,7 0,1832 0,1811 0,1802 0,1798 0,1797 0,1796 0,1796 0,1796 0,1796
1,75 0,1743 0,1721 0,1711 0,1707 0,1705 0,1704 0,1704 0,1704 0,1704
1,8 0,1659 0,1635 0,1625 0,162 0,1618 0,1617 0,1617 0,1616 0,1616
1,85 0,158 0,1554 0,1542 0,1537 0,1535 0,1534 0,1533 0,1533 0,1533
1,9 0,1504 0,1477 0,1464 0,1458 0,1455 0,1454 0,1454 0,1453 0,1453
1,95 0,1432 0,1403 0,139 0,1383 0,138 0,1378 0,1378 0,1377 0,1377
2 0,1364 0,1333 0,1319 0,1311 0,1308 0,1306 0,1305 0,1305 0,1305 178
2,05 0,1299 0,1267 0,1251 0,1243 0,1239 0,1237 0,1236 0,1236 0,1235
M/M/4/K Queues | Practical table to calculate P0 ii
Number of elements in the system (K )
λ 5 6 7 8 9 10 11 12 13
µ
2,1 0,1237 0,1204 0,1187 0,1178 0,1174 0,1172 0,117 0,117 0,1169
2,15 0,1178 0,1144 0,1126 0,1117 0,1112 0,1109 0,1108 0,1107 0,1106
2,2 0,1123 0,1087 0,1068 0,1058 0,1052 0,1049 0,1048 0,1047 0,1046
2,25 0,107 0,1032 0,1013 0,1002 0,0996 0,0992 0,099 0,0989 0,0989
2,3 0,1019 0,0981 0,096 0,0948 0,0942 0,0938 0,0936 0,0935 0,0934
2,35 0,0972 0,0932 0,091 0,0898 0,0891 0,0886 0,0884 0,0883 0,0882
2,4 0,0926 0,0885 0,0863 0,085 0,0842 0,0837 0,0835 0,0833 0,0832
2,45 0,0883 0,0841 0,0818 0,0804 0,0795 0,079 0,0787 0,0786 0,0784
2,5 0,0842 0,0799 0,0775 0,076 0,0751 0,0746 0,0742 0,074 0,0739
2,55 0,0803 0,076 0,0734 0,0719 0,0709 0,0703 0,07 0,0697 0,0696
2,6 0,0766 0,0722 0,0695 0,0679 0,0669 0,0663 0,0659 0,0656 0,0655
2,65 0,0731 0,0686 0,0659 0,0642 0,0631 0,0625 0,062 0,0617 0,0615
2,7 0,0698 0,0652 0,0624 0,0607 0,0595 0,0588 0,0583 0,058 0,0578
2,75 0,0666 0,0619 0,0591 0,0573 0,0561 0,0553 0,0548 0,0545 0,0542
2,8 0,0636 0,0589 0,056 0,0541 0,0529 0,052 0,0515 0,0511 0,0508
2,85 0,0607 0,056 0,053 0,0511 0,0498 0,0489 0,0483 0,0479 0,0476
2,9 0,058 0,0532 0,0502 0,0482 0,0469 0,046 0,0453 0,0449 0,0445
2,95 0,0554 0,0506 0,0475 0,0455 0,0441 0,0432 0,0425 0,042 0,0416
3 0,0529 0,0481 0,045 0,0429 0,0415 0,0405 0,0398 0,0392 0,0389
3,05 0,0505 0,0457 0,0426 0,0405 0,039 0,038 0,0372 0,0366 0,0362
3,1 0,0483 0,0435 0,0403 0,0382 0,0367 0,0356 0,0348 0,0342 0,0337
3,15 0,0462 0,0413 0,0382 0,036 0,0345 0,0333 0,0325 0,0319 0,0314
3,2 0,0442 0,0393 0,0361 0,0339 0,0324 0,0312 0,0303 0,0297 0,0292
3,25 0,0422 0,0374 0,0342 0,032 0,0304 0,0292 0,0283 0,0276 0,0271
3,3 0,0404 0,0356 0,0324 0,0301 0,0285 0,0273 0,0264 0,0257 0,0251
3,35 0,0387 0,0338 0,0306 0,0284 0,0268 0,0255 0,0246 0,0238 0,0232
3,4 0,037 0,0322 0,029 0,0268 0,0251 0,0238 0,0229 0,0221 0,0215
3,45 0,0354 0,0306 0,0275 0,0252 0,0235 0,0223 0,0213 0,0205 0,0198
3,5 0,0339 0,0292 0,026 0,0237 0,0221 0,0208 0,0198 0,019 0,0183
3,55 0,0325 0,0278 0,0246 0,0224 0,0207 0,0194 0,0184 0,0175 0,0169
3,6 0,0311 0,0264 0,0233 0,021 0,0194 0,0181 0,017 0,0162 0,0155
3,65 0,0298 0,0252 0,0221 0,0198 0,0181 0,0168 0,0158 0,015 0,0143
3,7 0,0286 0,024 0,0209 0,0187 0,017 0,0157 0,0146 0,0138 0,0131
3,75 0,0274 0,0228 0,0198 0,0176 0,0159 0,0146 0,0136 0,0127 0,012
3,8 0,0262 0,0218 0,0187 0,0165 0,0149 0,0136 0,0126 0,0117 0,011
3,85 0,0557 0,0378 0,0289 0,0235 0,02 0,0175 0,0155 0,0141 0,0129
3,9 0,0525 0,0355 0,0269 0,0218 0,0184 0,016 0,0141 0,0127 0,0116
3,95 0,0496 0,0333 0,0251 0,0202 0,017 0,0146 0,0129 0,0115 0,0104
179
M/M/5/K Queues | Practical table to calculate P0 i
Number of elements in the system (K )
λ 6 7 8 9 10 11 12 13 14
µ
0,15 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607 0,8607
0,2 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187 0,8187
0,25 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788 0,7788
0,3 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408 0,7408
0,35 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047 0,7047
0,4 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703 0,6703
0,45 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376 0,6376
0,5 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065 0,6065
0,55 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769 0,5769
0,6 0,5488 0,5488 0,5488 0,5488 0,5488 0,5488 0,5488 0,5488 0,5488
0,65 0,522 0,522 0,522 0,522 0,522 0,522 0,522 0,522 0,522
0,7 0,4966 0,4966 0,4966 0,4966 0,4966 0,4966 0,4966 0,4966 0,4966
0,75 0,4724 0,4724 0,4724 0,4724 0,4724 0,4724 0,4724 0,4724 0,4724
0,8 0,4493 0,4493 0,4493 0,4493 0,4493 0,4493 0,4493 0,4493 0,4493
0,85 0,4274 0,4274 0,4274 0,4274 0,4274 0,4274 0,4274 0,4274 0,4274
0,9 0,4066 0,4065 0,4065 0,4065 0,4065 0,4065 0,4065 0,4065 0,4065
0,95 0,3867 0,3867 0,3867 0,3867 0,3867 0,3867 0,3867 0,3867 0,3867
1 0,3679 0,3678 0,3678 0,3678 0,3678 0,3678 0,3678 0,3678 0,3678
1,05 0,3499 0,3499 0,3499 0,3499 0,3499 0,3499 0,3499 0,3499 0,3499
1,1 0,3329 0,3328 0,3328 0,3328 0,3328 0,3328 0,3328 0,3328 0,3328
1,15 0,3166 0,3165 0,3165 0,3165 0,3165 0,3165 0,3165 0,3165 0,3165
1,2 0,3012 0,3011 0,3011 0,3011 0,3011 0,3011 0,3011 0,3011 0,3011
1,25 0,2865 0,2864 0,2863 0,2863 0,2863 0,2863 0,2863 0,2863 0,2863
1,3 0,2725 0,2724 0,2723 0,2723 0,2723 0,2723 0,2723 0,2723 0,2723
1,35 0,2593 0,2591 0,259 0,259 0,259 0,259 0,259 0,259 0,259
1,4 0,2466 0,2464 0,2463 0,2463 0,2463 0,2463 0,2463 0,2463 0,2463
1,45 0,2346 0,2344 0,2343 0,2343 0,2343 0,2343 0,2343 0,2343 0,2343
1,5 0,2232 0,2229 0,2228 0,2228 0,2228 0,2228 0,2228 0,2228 0,2228
1,55 0,2123 0,212 0,2119 0,2119 0,2118 0,2118 0,2118 0,2118 0,2118
1,6 0,202 0,2016 0,2015 0,2015 0,2014 0,2014 0,2014 0,2014 0,2014
1,65 0,1921 0,1917 0,1916 0,1916 0,1915 0,1915 0,1915 0,1915 0,1915
1,7 0,1828 0,1823 0,1822 0,1821 0,1821 0,1821 0,1821 0,1821 0,1821
1,75 0,1739 0,1734 0,1732 0,1732 0,1732 0,1731 0,1731 0,1731 0,1731
1,8 0,1655 0,1649 0,1647 0,1646 0,1646 0,1646 0,1646 0,1646 0,1646
1,85 0,1574 0,1568 0,1566 0,1565 0,1565 0,1565 0,1565 0,1565 0,1565
1,9 0,1498 0,1491 0,1489 0,1488 0,1487 0,1487 0,1487 0,1487 0,1487
1,95 0,1425 0,1418 0,1415 0,1414 0,1414 0,1414 0,1414 0,1414 0,1413
2 0,1356 0,1348 0,1345 0,1344 0,1344 0,1343 0,1343 0,1343 0,1343 180
2,05 0,1291 0,1282 0,1279 0,1277 0,1277 0,1277 0,1276 0,1276 0,1276
M/M/5/K Queues | Practical table to calculate P0 ii
Number of elements in the system (K )
λ 6 7 8 9 10 11 12 13 14
µ
2,1 0,1228 0,1219 0,1215 0,1214 0,1213 0,1213 0,1213 0,1213 0,1213
2,15 0,1169 0,1159 0,1155 0,1153 0,1153 0,1152 0,1152 0,1152 0,1152
2,2 0,1112 0,1102 0,1098 0,1096 0,1095 0,1095 0,1095 0,1094 0,1094
2,25 0,1059 0,1048 0,1043 0,1041 0,104 0,104 0,104 0,1039 0,1039
2,3 0,1008 0,0996 0,0991 0,0989 0,0988 0,0987 0,0987 0,0987 0,0987
2,35 0,0959 0,0947 0,0942 0,0939 0,0938 0,0938 0,0937 0,0937 0,0937
2,4 0,0913 0,0901 0,0895 0,0892 0,0891 0,089 0,089 0,089 0,089
2,45 0,087 0,0856 0,085 0,0847 0,0846 0,0845 0,0845 0,0844 0,0844
2,5 0,0828 0,0814 0,0808 0,0804 0,0803 0,0802 0,0801 0,0801 0,0801
2,55 0,0788 0,0774 0,0767 0,0764 0,0762 0,0761 0,076 0,076 0,076
2,6 0,0751 0,0736 0,0729 0,0725 0,0723 0,0722 0,0721 0,0721 0,0721
2,65 0,0715 0,07 0,0692 0,0688 0,0686 0,0685 0,0684 0,0684 0,0683
2,7 0,0681 0,0665 0,0657 0,0653 0,065 0,0649 0,0648 0,0648 0,0648
2,75 0,0649 0,0633 0,0624 0,0619 0,0617 0,0615 0,0615 0,0614 0,0614
2,8 0,0618 0,0601 0,0592 0,0588 0,0585 0,0583 0,0582 0,0582 0,0582
2,85 0,0589 0,0572 0,0563 0,0557 0,0554 0,0553 0,0552 0,0551 0,0551
2,9 0,0561 0,0544 0,0534 0,0529 0,0525 0,0524 0,0523 0,0522 0,0522
2,95 0,0535 0,0517 0,0507 0,0501 0,0498 0,0496 0,0495 0,0494 0,0494
3 0,051 0,0492 0,0481 0,0475 0,0472 0,047 0,0468 0,0468 0,0467
3,05 0,0486 0,0467 0,0457 0,045 0,0447 0,0444 0,0443 0,0442 0,0442
3,1 0,0463 0,0444 0,0433 0,0427 0,0423 0,0421 0,0419 0,0418 0,0418
3,15 0,0442 0,0423 0,0411 0,0405 0,04 0,0398 0,0396 0,0395 0,0395
3,2 0,0421 0,0402 0,039 0,0383 0,0379 0,0376 0,0375 0,0373 0,0373
3,25 0,0402 0,0382 0,037 0,0363 0,0359 0,0356 0,0354 0,0353 0,0352
3,3 0,0383 0,0364 0,0352 0,0344 0,0339 0,0336 0,0334 0,0333 0,0332
3,35 0,0366 0,0346 0,0334 0,0326 0,0321 0,0318 0,0315 0,0314 0,0313
3,4 0,0349 0,0329 0,0316 0,0309 0,0303 0,03 0,0298 0,0296 0,0295
3,45 0,0333 0,0313 0,03 0,0292 0,0287 0,0283 0,0281 0,0279 0,0278
3,5 0,0318 0,0298 0,0285 0,0277 0,0271 0,0267 0,0265 0,0263 0,0262
3,55 0,0303 0,0283 0,027 0,0262 0,0256 0,0252 0,0249 0,0248 0,0246
3,6 0,029 0,0269 0,0256 0,0248 0,0242 0,0238 0,0235 0,0233 0,0232
3,65 0,0277 0,0256 0,0243 0,0234 0,0228 0,0224 0,0221 0,0219 0,0218
3,7 0,0264 0,0244 0,0231 0,0222 0,0216 0,0211 0,0208 0,0206 0,0204
3,75 0,0252 0,0232 0,0219 0,021 0,0204 0,0199 0,0196 0,0194 0,0192
3,8 0,0241 0,0221 0,0208 0,0198 0,0192 0,0187 0,0184 0,0182 0,018
3,85 0,023 0,021 0,0197 0,0188 0,0181 0,0177 0,0173 0,017 0,0169
3,9 0,022 0,02 0,0187 0,0177 0,0171 0,0166 0,0163 0,016 0,0158
3,95 0,021 0,019 0,0177 0,0168 0,0161 0,0156 0,0153 0,015 0,0148
4 0,0201 0,0181 0,0168 0,0159 0,0152 0,0147 0,0143 0,014 0,0138
181
M/M/5/K Queues | Practical table to calculate P0 iii
182
Queues with limited length
Exercises
183
Boeingavela
Boeingavela, an airport fast-food restaurant, has currently only one employee at the counter who serves an
average of 10 customers per hour.It has been found that customers arrive at a rate of 7 per hour, this arrival
process following a Poisson distribution. The service time follows an exponential distribution.
The management admits the hypothesis of hiring one more employee, which will allow, by doubling the average
service ratio, to improve the quality of service.
1. Analyse the performance of the waiting system in the current state by calculating, namely, the occupancy
rate, the probability of no customer at the fast-food, the average queue length, the average number of
people at the fast food, the average time a customer waits to be served and the average time a customer
spends at the fast-food.
2. If people give up every time there are already 3 customers (in the system), what is the percentage of
potential customers lost? Use the equilibrium equations to answer this question.
3. How would the performance of the waiting system improve by hiring an additional employee? Use the same
indicators as in the first question.
Comment the situations you have studied.
184
Petrol Station
A petrol station has two places to refuel cars and two places for cars to queue up for refuelling. Assume that
some customers who arrive at the station and see that the number of cars is high decide not to go in. Once the
potential customers see that the two refuelling places and the two queuing places are occupied, they go to
another petrol station.
Under these conditions, the entry rates of customers (λ) depend on the number of customers in the system (n),
and are as follows:
n=0 ⇒ λ = 4/15 minutes
n=1 ⇒ λ = 4/15 minutes
n=2 ⇒ λ = 2/15 minutes
n=3 ⇒ λ = 1/15 minutes
n=4 ⇒λ=0
The fueling time follows a negative exponential distribution, with mean equal to 5 minutes.
1. Calculate the average number of customers in the queue and in the system (i.e., in line and refuelling).
2. Calculate the percentage of lost potential customers (assuming that potential customers arrive at the pump
with a rate λ = 4/15 minutes).
3. Calculate the average time customers are in the queue and in the system.
185
Birds
Maia Zoo has just witnessed the birth of three small birds of an endangered species. Given the importance of
these birds for the survival of the species, their behaviour has been monitored. Thus, it is known that each bird
spends on average 10 minutes (negative exponential distribution) in the nest before flying out. A bird takes on
average 15 minutes (with a negative exponential distribution) to return to the nest.
1. Define the equilibrium equations of the system whose states represent the number of birds in the nest at a
given time.
2. Determine the probability that there are, at a given time, more birds outside the nest than in the nest.
3. On average, how many birds are in the nest?
186
Painting Workshop at Virada Cultural
16
One of the events planned for the next Virada Cultural of São Paulo is a painting workshop that will take place in one of the city squares.
The painting workshop will be organised as follows:
Registration in the Workshop When a person arrives they enter a tent and go to an assistant who registers their participation in the workshop. The
arrival of people in the tent follows a Poisson distribution with an average of 54 people per hour. The time spent by the attendant to register a
person follows a negative exponential distribution with mean of 1 minute.
Given the limited space of the tent, an assistant outside will divert to other events of the Virada Cultural the people that arrive, whenever inside the
tent there are already 6 people waiting to register.
Workshop Activities After their registration, people go to the area where the workshop activities will take place. There they will be placed in a single
queue (with no capacity limit, since this queue is formed in an outdoor area), waiting their turn to carry out the programmed activity with the help of
one of the several plastic artists available on site. Each artist accompanies one person at a time in the execution of his or her activity. The time spent
by an artist accompanying each person follows a negative exponential distribution with an average of 5 minutes.
All the people who register only leave the workshop after having executed the scheduled activity with the help of the artist.
The person in charge of the workshop is concerned about its success and has asked you for help to find the answers to the following questions: (
justify adequately each of your answers)
1. Knowing that the Virada Cultural will last 24 hours, what will be the expected number of people in that period who will participate in this
workshop? (It is considered that a person participates in the workshop if he/she performs the activity scheduled for the workshop).
2. Within this same 24-hour period, how many people would you expect to attend the workshop but, due to the limited capacity of the tent, will
not be able to do so?
3. What should be the minimum number of artists to be invited to the workshop, so that the average number of people already registered and
waiting for an available artist is less than 3.
4. How would you calculate the average amount of time that will elapse from the time a person enters the workshop until they start performing
the scheduled activity?
Note: you are not required to calculate the numerical value of this average time, but to indicate how you could calculate it.
16
Exam of 2013.01.09 of IO of MIEM and MIEEC of FEUP
187
Decision Theory
Decision Theory – Learning Objectives
188
Decision Theory
189
Decisions
Uncertainty is much more the rule than the exception, the only thing that can
be certain is the past and decisions are taken for the future.
190
Features of a decision problem
Decision maker The decision maker is the person responsible for making decisions. It can be a single
individual, a group, a company or even a nation.
Actions The decision-maker must be able to build up an exhaustive and mutually exclusive list of all
alternative actions. Whenever better information can be obtained, the decision-maker must
choose the best source of information and the best strategy17 to follow.
States of nature Events that may occur and that cannot be controlled by the decision maker.States of nature
must be mutually exclusive and must exhaustively describe all possible situations18 States of
nature must be mutually exclusive and must exhaustively describe all possible situations19
Consequences Consequences are the measures of the benefit obtained by the decision maker. Consequences
depend on the decision made and the states of nature. You can then associate each pair
(decision made, state of nature) a value corresponding to the consequence for the decision
maker 20 .
17
A strategy is a set of decision rules that indicate, given an observation of the information source, which global action to take.
18
Only one and only one state of nature can occur.
19
Only one and only one state of nature can occur.
20
The value associated to that pair corresponds to a Utility Function, which sometimes directly corresponds to monetary values associated to each
consequence.
191
SO
FA fOsofa
fO
SO
FA
fO fOsofa
The sofa brand is a sofa retail franchise that has as a “driving force” for its sales the innovation in materials and
design and the quality and ease of maintenance of its sofas. Recently a new type of upholstery has appeared on the world
market, obtained from studies of materials made by the African Space Agency. This new upholstery, which also has the code
name X@K, has all the characteristics of natural skin but does not absorb grease and does not wear out. The price of this raw
material is very high, and its production is still minimal.
SO
fO
FA fOsofa
The managers of want to be always at the forefront of sofa innovation and therefore consider it crucial for the
company to invest in X@K. The decision to be made is how much to buy. Given that this upholstery has to be transported from
the east coast of Africa, where the African Space Agency is located, the transport will have to be done by sea and inside
containers and only 1, 2 or 3 containers of X@K 21 can bee bought. The purchase will have to be made now, and it will not be
possible to repurchase this material until early next year.
If one container is bought, the purchase price of 1m2 of X@K will be 22mu, if two containers are bought, the purchase price of
1m2 of X@K will be 20mu, and if three containers are bought, the purchase price of 1m2 of X@K will be 18mu. The selling
price of 1m2 will be 25mu, but if at the end of the year there is still X@K left, it will have to be sold for 10mu per m2 . Each m2
of unsold material due to stock-outs implies a loss of 5mu.
The administration considers that sofas consuming 100,000m2 , 150,000m2 or 250,000m2 of X@K could be sold. The three
types of demand would have probabilities of occurrence of 30%, 50% and 20% respectively.
21
Due to the unique packaging conditions, each container carries 100,000m2 of X@K.
192
SO
FA fOsofa
fO
— a matter of decisions
SO
FA fOsofa
fO
For the problem of define:
1. The decision makes
2. The actions
3. The states os nature
4. The consequences
193
SO
FA fOsofa
fO
— answer
SO
FA fOsofa
fO
Decision Maker The decision maker is the administration of .
Actions The alternative actions are:
• Buy 1 container (100.000m2 of X@K );
• Buy 2 containers (200.000m2 of X@K );
• Buy 3 containers (300.000m2 of X@K ).
States of Nature The states of nature that can occur are:
• Demand for 100.000m2 of X@K ;
• Demand for 150.000m2 of X@K ;
• Demand for 250.000m2 of X@K.
Consequencies There is a consequence associated to each pair (action, state of nature). In this case if for
example one chooses to buy 2 containers and the demand is 150,000m2 of X@K, then the
um + 50.000m2 × 10 um − 200.000m2 × 20 um = 250.000um
profit for the company will be: 150.000m2 × 25 m 2 m2 m2
194
Decision Matrix
Once all alternative actions and all states of nature have been defined, it should be possible to associate to each
pair (action, state of nature) a consequence that will have a value corresponding to the utility for the decision
maker.
Uij = U(ai ; θj )
With these values one can fill in a two-entry table which is called Decision Matrix.
States of Nature
actions θ1 θ2 θ3 ... θn
a1 U11 U12 U13 ... U1n
a2 U21 U22 U23 ... U2n
a3 U31 U32 U33 ... U3n
.. .. .. .. .. ..
. . . . . .
am Um1 Um2 Um3 ... Umn
195
SO
FA fOsofa
fO
- Decision Matrix
SO
FA fOsofa
Problem Build the DecisionMatrix for the fO
problem.
SO
FA fOsofa
Solution The DecisionMatrix for the fO
problem is represented in the following table (values presented in
kmu).
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 de 150.000m2 de 250.000m2
of X@K of X@K of X@K
196
Decision with perfect information
Let us now consider that the decision maker knows which state of nature will occur. In this case he will choose
the decision that maximizes utility.
Given that the state of nature θ0 will occur, the action a0 to take will then be:
SO
FA fOsofa
fO
In the example of the :
• If the decision maker knows that demand will be 100,000m2 he/she chooses to buy 100,000m2 of X@K.
• If the decision maker knows that demand will be 150,000m2 he/she chooses to buy 200,000m2 of X@K.
• If the decision maker knows that demand will be 250,000m2 he/she chooses to buy 300,000m2 of X@K.
197
Decision and uncertainty
A decision-maker who does not know what state of nature will occur will have to have criteria to make
decisions. These criteria can be:
• non-probabilistic;
• probabilistic (dependent on the probability of occurrence of the states of nature).
198
Dominated actions
199
SO
FA fOsofa
fO
— Alternative Version
SO
fO
FA fOsofa
The sofa brand is a sofa retail franchise that has as a “driving force” for its sales the innovation in materials and
design and the quality and ease of maintenance of its sofas. Recently a new type of upholstery has appeared on the world
market, obtained from studies of materials made by the African Space Agency. This new upholstery, which also has the code
name X@K, has all the characteristics of natural skin, but does not absorb grease and does not wear out. The price of this raw
material is very high and its production is still very limited.
SO
fO
FA fOsofa
The managers of want to be always at the forefront of sofa innovation and therefore consider it crucial for the
company to invest in X@K. The decision to be made is how much to buy. Given that this upholstery has to be transported from
the east coast of Africa, where the African Space Agency is located, the transport will have to be done by sea and in containers
and only 1, 2 or 3 containers of X@K 22 . The purchase will have to be made now and it will not be possible to buy this material
again until early next year.
If 1 container is bought, the purchase price of 1m2 of X@K will be 20mu, if 2 containers are bought, the purchase price of 1m2
of X@K will be 18mu and if 3 containers are bought, the purchase price of 1m2 of X@K will be 16mu. The selling price of 1m2
will be 25mu, but if at the end of the year there is still X@K left, it will have to be sold for 12,5mu per m2 . Each m2 of unsold
material due to stock-outs implies a loss of 5mu.
The administration considers that sofas consuming 100,000m2 , 150,000m2 or 250,000m2 of X@K could be sold. The three
types of demand would have probabilities of occurrence of 30%, 50% and 20% respectively.
22
Due to the special packaging conditions, each container carries 100,000m2 of X@K.
200
SO
FA fOsofa
fO
- Decision Matrix for Alternative Version
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 de 150.000m2 de 250.000m2
of X@K of X@K of X@K
201
Non-probabilistic decision criteria
202
SO
FA fOsofa
fO
— Laplace
Since the probability of occurrence of the states of nature is not known, all states of nature are considered to have an equal
probability of occurrence. If there are n states of nature, then the probability of occurrence of each of them will be n1 .
The action to choose will therefore be the one that corresponds to:
n P o
1 n
maxai n j=1 U(ai ; θj )
SO
FA fOsofa
fO
Considering once again the DecisionMatrix from , and using Laplace’s decision criterion:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2 Pn
1
of X@K of X@K of X@K n j=1 U(ai ; θj )
2 −100
100.000m 300 50 -450 3
2 500
200.000m -500 250 750 3
n P o
n
maxai 1
n j=1 U(ai ; θj ) = 500
3 ⇒ Action: buy 200.000m2 of X@K .
203
SO
FA fOsofa
fO
— Pessimist
Pessimistic criterion in which it is considered that nature is hostile and therefore the state of nature that can do the most harm
will always occur. The action to choose will then be:
n o
maxai minθj U(ai ; θj )
SO
FA fOsofa
fO
Considering once again the DecisionMatrix from , and using the Pessimist decision criterion:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K minθj U(ai ; θj )
2
100.000m 300 50 -450 -450
2
200.000m -500 250 750 -500
2
300.000m -900 -150 1350 -900
n o
maxai minθj U(ai ; θj ) = −450 ⇒ Action: buy 100.000m2 of X@K .
204
SO
FA fOsofa
fO
— Otimist
Optimistic criterion in which it is considered that the state of nature that can benefit most will always occur. The action to
choose will then be:
n o
maxai maxθj U(ai ; θj )
SO
FA fOsofa
fO
Considering once again the DecisionMatrix from , and using the Optimist decision criterion:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K maxθj U(ai ; θj )
2
100.000m 300 50 -450 300
2
200.000m -500 250 750 750
2
300.000m -900 -150 1350 1350
n o
maxai maxθj U(ai ; θj ) = 1350 ⇒ Action: Buy 300.000m2 of X@K .
205
SO
FA fOsofa
fO
— Hurwicz
The Hurwicz criterion aims to reflect all the attitudes of the decision maker, from very optimistic to very pessimistic. For that
purpose, a parameter 0 ≤ α ≤ 1 is defined, which is called optimism index. If α = 0 this criterion corresponds to the
application of the Pessimistic criterion. α = 1, corresponds to a 100% optimistic decision maker.
The action to choose is obtained as follows:
n o
maxai α × maxθj U(ai ; θj ) + (1 − α) × minθj U(ai ; θj )
SO
FA fOsofa
fO
Considering once again the DecisionMatrix from , and using the Hurwicz decision criterion:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K maxθ U(ai ; θj ) minθ U(ai ; θj ) Hurwicz
j j
2
100.000m 300 50 -450 300 -450 α 300 + (1-α) (-450)
206
SO
FA fOsofa
fO
—
Regrets Matrix or Opportunity Loss Matrix
The Regrets Matrix or Opportunity Loss Matrix can be obtained from the Decision Matrix using the transformation
P(ai ; θj ) = maxak {U(ak ; θj )} − U(ai ; θj )
SO
FA fOsofa
fO
Considering once again the DecisionMatrix from , the transformation of this matrix into a Regrets Matrix leads to:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K
207
SO
FA fOsofa
fO
— Savage
Savage’s criterion is also called the minimax opportunity loss (or minimax regret) criterion. This criterion is based on the
Pessimistic criterion, but is more moderate. Savage’s criterion is based on the following: once the action to be taken has been
decided and the state of nature has occurred, the decision-maker feels regret for not having chosen the best action. And it is
this regret that is intended to be minimised.
The Savage criterion results from applying the Pessimistic criterion to the Weighing Matrix:
n o
minai maxθj P(ai ; θj )
SO
FA fOsofa
fO
Considering Regret Matrix from , and using the Pessimist decision criterion:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K maxθ P(ai ; θj )
j
2
100.000m 0 200 1800 1800
n o
minai maxθj P(ai ; θj ) = 800 ⇒ Action: buy 200.000m2 de X@K .
208
Probabilistic decision criteria
Probabilistic decision criteria are based on the incorporation of a priori information the decision maker has on
the states of nature.
This incorporation of information corresponds to the attribution of probabilities of occurrence to the states of
nature.
Two probabilistic decision criteria:
• Maximization of expected value;
• Minimization of expected opportunity loss23 .
23
To apply this criterion it is necessary to begin by constructing the Regrets Matrix, as presented in Savage’s non-probabilistic criterion
209
Probabilistic decision criteria
Maximization of expected value (MEV)25
This decision criterion is based on the choice of the action that maximises the expected utility. This requires:
1. assign a probability h(θj ) 24 of occurrence to each of the states of nature θj (which
P are considered mutually
exclusive), such that the sum of the probabilities of occurrence equals one, ( j h(θj ) = 1);
2. calculate the expected value of each action:
P
∀ai VEai = j h(θj ) × U(ai ; θj )
a0 : maxai {VEai }
24
Also known as a priori probability of occurrence.
25
Also known as Bayes’ criterion or a priori decision criterion.
210
SO
FA fOsofa
fO
– Maximization of expected value (MEV)
Considering the possible states of nature and their respective probabilities of occurrence, as represented in the
first row of the next table, and also the values of U(ai ; θj ), we obtain the maximum expected value.
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K
h(θj ) 0.30 0.50 0.20
ai EVai
the choice is made to buy 200,000m2 of X@K, the action that corresponds to the maximum expected value (125
in this case).
211
SO
FA fOsofa
fO
Minimising the Expected Opportunity Loss
Considering the possible states of nature and their respective probabilities of occurrence, as represented in the
first row of the next table, and also the values of P(ai ; θj ), we obtain the minimum expected opportunity loss.
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K
h(θj ) 0.30 0.50 0.20
ai EOLai
one chooses to buy 200,000m2 of X@K, the action that corresponds to the minimum expected opportunity loss
(360 in this case).
212
Decision trees
213
SO
FA fOsofa
fO
— Decision tree
SO
FA fOsofa
fO
Question: Draw the decision tree for the problem of . Write all the actions, states of nature and their
probabilities of occurrence and respective consequences.
Answer:
214
Decision Theory – decisions with experimentation
215
Additional information
Until now, we have considered situations in which the decision-maker chooses between alternative actions based
solely on the a priori information they have about the problem, without attempting to obtain any additional
information.
Questions that arise at this stage include:
• Is it worth obtaining additional information?
• What additional information should be obtained?
• What strategy to follow after obtaining additional information?
• How much can the additional information be worth26 ?
26
Or in other words, how much are we willing to pay for the additional information?
216
Expected value of perfect information (EVPI )
In the absence of data on the credibility of the information provider, it is not possible to assign value to that
information. However, it is possible to determine the expected increase in the expected value if the information
is perfect, and this is indeed an upper limit for the value of the information.
This upper bound is known as the Expected Value of Perfect Information (EVPI ), and can be obtained in three
different ways:
1. by subtracting the Maximum Expected Value (with uncertainty), from the Maximum Expected Value (with
perfect information);
2. through an “incremental analysis”;
3. by calculating the minimum value for the expected opportunity loss.
217
SO
FA fOsofa
fO
— EVPI (Method 1)
P
MVEip Maximum Expected Value (perfect information) = j h(θj ) × maxai U(ai , θj );
nP o
MVE Maximum Expected Value (uncertainty) = maxai j h(θj ) × U(ai , θj )
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K MVEip
h(θj ) 0.30 0.50 0.20
maxai U(ai , θj ) 300 250 1350 485
218
SO
FA fOsofa
fO
— EVPI (Incremental Analysis)
SO
fO
FA fOsofa
Starting again from the example of , let us consider the action chosen by the Maximum Expected
Value criterion, “Buy 200,000m2 of X@K ”.
For each of the states of nature that can occur, we can calculate the difference between the highest utility and
the utility associated with the chosen action. Then we add up the products of these differences by the
probabilities of occurrence of the respective states of nature:
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K EVPI
h(θj ) 0.30 0.50 0.20
maxai U(ai , θj ) 300 250 1350
U(a2 , θj ) (ação escolhida por MVE ) -500 250 750
maxai U(ai , θj ) − U(a2 , θj ) 800 0 600 360
219
SO
FA fOsofa
fO
EVPI = Minimization of the expected loss of opportunity
Considering the possible states of nature and their respective probabilities of occurrence, as represented in the
first row of the following table, and also the values of P(ai ; θj ), we obtain the minimum expected opportunity
loss.
States of Nature
Demand for Demand for Demand for
Actions 100.000m2 150.000m2 250.000m2
of X@K of X@K of X@K
h(θj ) 0.30 0.50 0.20
ai POEai
Buy 100.000m2 de X@K 0 200 1800 460
Buy 200.000m2 de X@K 800 0 600 360
Buy 300.000m2 de X@K 1200 400 0 560
220
Perfect or imperfect information?
221
“Credibility” matrix
The “Credibility” matrix corresponds to a measure of the credibility of the experiment performed or the
consultant heard.
Considering P(rk |θj ) as the probability of the conducted experiment resulting in rk , given that the state of
nature is θj :
222
Perfect information – “Credibility” matrix
In the case of perfect information (maximum credibility), in which case the result ri indicates that the state of
nature θi will occur, the “Credibility” matrix will be as follows:
223
SO
FA fOsofa
fO
— Perfect Information (decision tree)
Perfect
consultant
Without
consultant
224
SO
FA fOsofa
fO
— External consulting
SO
fO
FA fOsofa
Returning to the initial problem . . . the management of considers that the company may sell sofas
that spend 100,000m2 , 150,000m2 or 250,000m2 of X@K. With the knowledge that the directors have of the
business, the three types of demand would have probabilities of occurrence of respectively, 30%, 50% and 20%.
At the last board meeting the possibility of using an external consultancy firm with some credibility in assessing
the market for this type of product was discussed.
By carefully analysing the market evaluations already performed by that company, it was concluded that, for this
concrete problem, the credibility matrix of the company P(rk |θj ) would be the following:
States of nature
Demand Demand Demand
Results of 100,000m2 of 150,000m2 of 250,000m2
of consultancy of X@K of X@K of X@K
Forecast of low demand 0.7 0.5 0.1
Forecast medium demand 0.2 0.5 0.4
Forecast high demand 0.1 0.0 0.5
How can we calculate P(θj |rk ) (probability of occurrence of the state of nature θj , given that the experiment
performed had result rk ) from these values?
225
Current point of situation:
Known data:
P(θj ) (a priori) probability of occurrence of the state of nature θj ;
P(rk |θj ) probability that the performed experiment resulted in rk , given that the state of nature is θj
(“credibility of the experiment”)
But what is important to know are the probabilities of occurrence of the states of nature after the information
provided by the experiments (a posteriori probabilities of occurrence).
P(θj |rk ) probability of occurrence of the state of nature θj , given that the result of the experiment was rk .
Bayes’ Theorem enables the calculation of P(θj |rk ) based on P(rk |θj ) and P(θj )
226
27
Reverend Thomas Bayes (1702–1761)
Bayes presented his theory of probability in an essay entitled “Essay towards solving
a problem in the doctrine of chances” published in the “Philosophical Transactions
of the Royal Society of London” in 1764:
27
Retrieved form:
http://rstl.royalsocietypublishing.org/content/53/370.full.pdf+html in 2012.12.27
227
Bayes’ Theorem
Bayes’ Theorem allows to calculate P(θj |rk ) (probability of occurrence of the state of nature θj given that the
outcome of the experiment was rk ), knowing P(rk |θj ) and P(θj ).
P
P(rk ) = m P(rk |θm ) × P(θm )
228
SO
FA fOsofa
fO
— External Consulting (resolution)
Applying Bayes’ Theorem, we obtain the revised probabilities of occurrence of each of the states of nature, given
the various possible outcomes of the experiment, as represented in the following table:
States of nature
Demand Demand Demand
Results of 100,000m2 of 150,000m2 of 250,000m2
of consultancy P(rk ) of X@K of X@K
21 25 2
Forecast of low demand 0.48 48 48 48
6 25 8
Forecast of medium demand 0.39 39 39 39
3 0 10
Forecast of high demand 0.13 13 13 13
229
SO
FA fOsofa
fO
External consultant (decision tree)
230
Decision Theory
Exercises
231
Xpt0 Textile
XptO Ltd. is a textile company that is currently preparing its winter collection, to be launched next year. Leopoldo, the company’s manager, is in
doubt about the amount of investment to be allocated to this collection and is hesitating between what he considers a large investment, an average
investment and a small investment.
In recent years, the weather, which has so much influence on the success of the collection, has proved to be uncertain, as autumn and winter can be
very similar, and sometimes winter is characterised by very sunny and warm days. It is known that, if the next winter presents many periods of sun
and heat, the winter collection will be a failure; if, on the other hand, the winter is harsh, the collection will bring XptO large profits; there is also the
possibility that the winter presents intermediate conditions, corresponding to a lower success of the collection.
Leopoldo prepared the following decision matrix, where the values represent profit (in thousands of euros)
1. Define the decision maker, the actions and the states of nature.
2. Suppose that the instability of recent years makes it very difficult to define the probabilities of occurrence of the states of nature.
Determine what kind of investment XptO should make based on the criteria: Optimistic (MaxiMax); Pessimistic (MaxiMin); Laplace; Hurwicz
with α=0.8 and Savage.
3. Consider now that, despite the instability, it was possible to estimate the following probabilities of occurrence of the states of nature:
p(severe winter)=50%, p(mild winter)=30%, p(warm winter)=20%.
Determine which type of investment the company should make based on the criteria: MEV (Maximization of expected value) and MEOL
(Minimization of expected opportunity loss).
232
Exploring Natural Gas
A large multinational company in the energy sector wants to pay Latifúndios e Companhia 60 000e for the rights to exploit
natural gas on one of its properties. The multinational’s offer includes an option for future development. If that option
materialises, if natural gas is discovered during the exploration phase, Latifúndios e Companhia will receive an additional
600 000e.
Latifúndios e Companhia considers that the multinational’s interest is a good indication that the gas exists and intends to assess
the possibility of exploring on its own. To do so, it will hire a team of specialists in natural gas exploration and development.
The initial cost of exploration is 100 000e. This amount will be lost if no gas is found. If gas is discovered in the initial phase,
the estimated profit will be 2 000 000e.
The decision alternatives for Latifúndios e Companhia are: D1 (accept the multinational’s offer); D2 (to go ahead with
exploration).
The states of nature are: S1 (there is no natural gas on the property); S2 (there is natural gas on the property).
The company Latifúndios e Companhia estimates that there is a 60% probability that natural gas will be found on the property.
The expected gains for each pair (alternative, state of nature) are presented in the following table:
S1 S2
D1 60 660
D2 -100 2000
1. Determine the decisions recommended by the criteria: Pessimistic (Maximin); Laplace; Savage; Hurwicz (α = 0.4); MEV
(Maximum Expected Value).
2. Consider now that the values represented in the Decision Matrix are costs and not gains. Now determine the decisions
recommended by the criteria in the previous paragraph.
233
A New Automotive Part
A company in the automotive industry wants to invest in the development of a new part.
For the development of the new part, the company has the alternative of doing its own research and development (R&D). The
management of the company is also considering forming a consortium with an engineering consultancy firm.
The following table shows the expected profits, in present value, for the next five years, depending on the success achieved and
the alternative chosen:
Based on several studies and after consulting with marketing and development companies, the following probabilities have been
estimated p1 = 0.2, p2 = 0.4 and p3 = 0.4 for the occurrence of each state of nature.
234
Machine Acquisition
The company Gulas & Gulas, which operates in the food business, is considering
purchasing machines for labelling its bottles, as depicted in the figure.
The company must decide whether to purchase one or two labelling machines, how-
ever, the cost per machine will be lower if both are purchased at the same time.
If only one machine is purchased and demand for the item is high, the second machine
can still be purchased later.
The estimated probabilities for the demand for the product are:
• low demand 0.30;
• demand high 0.70
The present value associated with the purchasing outcomes of the two machines at
the beginning is 750e if demand is low, and 1300e if demand for the product is
high.
The present value of the purchasing outcome for a machine under low demand is
900 e. If demand is high there are three hypotheses:
• do nothing will result in a value of 900e;
• outsourcing will yield 1 100e;
• buy the second machine will allow to obtain 1 000e.
235
LEST O, a new product
The marketing of LEST O, a new product (which has already a name) from Expedita is beginning to take shape. However, as
is often happens in new brand launches, there is considerable risk attached – will the product hold up well?
Taking a prudent approach, Expedita feels it is appropriate to introduce the LEST O only regionally, for market research
purposes, before a national launch. Therefore, the first decision to be taken is whether or not to conduct the market test.
The company estimates the cost to be 50,000e for market research. If this is the option, it will have to wait for the results of
this test. Then it will decide, based on these results, whether to bet on the commercialisation of the LEST O all over the
country. On the other hand, if the initial option is not to proceed with the tests, then the final decision - to commercialise the
product nationally or not - can already be taken.
The Expedita evaluates the success of the product, in the national market, at 1. 2Me, and a failure would result in a cost for
the company of 500,000 e.
The probabilities to be associated with the various events reflect the existing scientific knowledge and the experience of the
company with similar products. Thus Expedita assesses the probability of success (or failure) of LEST O at national level as
50%, without any information from market testing. However, if a test is conducted and points to success, then the company
believes that the probability of success at national level of the product will be 70%, while otherwise (the test points to failure),
the probability of success in the national market will only be 20%. Finally, it is assumed that the probability of the test pointing
to success is 60%.
236
ShowBizzz
ShowBizzz is a jazz show producer in the Porto area and is currently planning a major performance with Keith Jarrett scheduled
for two years from now in July. It has been decided that the show will take place at Serralves, but there is uncertainty about
whether it should be held on the tennis court or alternatively in the auditorium.
The tennis court at Serralves has a capacity of 1,000 people, while the auditorium has only 250 seats. The show will
undoubtedly sell out, regardless of the chosen venue. If the tennis court at Serralves is reserved, the profit will be e100,000. If
the reservation is made for the auditorium, tickets may be priced higher, resulting in a profit of e50,000.
However, July weather in Porto is not very reliable. If it rains on the day of the performance and the tennis court has been
reserved, the show will have to be canceled since Keith Jarrett will certainly not perform. In that case, it will be necessary to
pay e40,000 to cover all expenses.
1
The decision then depends heavily on the weather on the day of the show and at this time of year there is usually a 3 chance of
rain.
ShowBizzz can also call on MeteoGray, a rain specialist in Porto who, for 10,000e, will provide a long-term weather forecast.
Based on past forecasts from MeteoGray, the following credibility matrix was constructed:
1. If you don’t use MeteoGray, what space should you reserve for ShowBizzz considering that the decision criterion would be
to maximise the expected value?
2. What is the maximum value to be paid for perfect information?
3. What is the expected value of the gain if ShowBizzz uses MeteoGray? Is it worth using the information from MeteoGray?
4. What action should be taken if MeteoGray predicts that it will rain?
237
BigBank
A client contacted the administration of BigBank with a credit request of 1,000,000e. Like any other credit institution,
BigBank has a risk assessment process for its clients and, in a simplified manner, classifies them into three categories: low risk,
medium risk and high risk.
Experience with clients with similar characteristics indicates that 20 percent of them were low risk, 30 percent medium risk and
50 percent high risk.
If the credit is granted, the expected profit in case the client has a low risk is 200,000e, for medium risk the expected profit is
100,000e, and for high risk -150,000e. Of course, if you are not granted credit you will contact another competing bank.
The BigBank will be able to use a credit rating company that charges 2,000e for its analysis. The following table represents the
experience of the BigBank with that agency in previous situations.
1. If the credit rating company is not used, what action should be followed by the BigBank considering that the decision
criterion would be the maximization of the expected value?
2. What is the maximum value to pay for perfect information?
3. What is the expected value of the gain if the BigBank uses the rating company? Is it worth using the data provided by the
company?
4. What is the action to choose if the rating company classifies the client as “low risk”?
238