Monte Carlo Simulation for Blood Inventory Management
Monte Carlo Simulation for Blood Inventory Management
Una clínica rural recibe del banco de sangre local una entrega de plasma fresco una vez por
week. The supply varies according to the demand from other clinics and hospitals of the
region, but it is between 4 and 9 units of half a liter of the most commonly used blood type, type
A. The number of patients per week who need this type of blood varies between 0 and 4, and
Each one may need from 1 to 4 units of half a liter.
Based on the following delivery quantities, patient distribution, and demand for
patient. What would be the number of half-liter units remaining or missing at the end?
a period of 6 weeks? Use Monte Carlo simulation to obtain your answer.
Consider that plasma can be stored and that at this moment there is nothing.
available.
Initial considerations
The first thing to identify in this problem is that we are dealing with 3
variables that determine the blood bank inventory.
For each variable, a random number is required to generate changes in the
inventory status. Since we are working with discrete units, it
will use the middle square method for seed generation.
I will require 6 random numbers for each variable to simulate each week.
the blood demand per patient will exceed 6 depending on how many patients there are
they attend every week.
A range table is needed for each variable based on which
They will introduce the simulation data (Note that the table they provide with
frequencies are now sorted in ascending order.
Patient distribution
Patients per week
Accumulated Frequency F. Range
that require blood
0 0.25 0.25 01 - 25
1 0.25 0.50 26 - 50
2 0.30 0.80 51 - 80
3 0.15 0.95 81 - 95
4 0.05 1.00 96 - 00
Random numbers
Delivery Patients
by for Demand
week week of blood
Seed (Seed) (Seed)
7845 8347 5761
5440 6724 1891
5936 2121 5758
2360 4986 1545
6960 8601 3870
4416 9772 9769
Simulation table.
Patients
No. No. Delivery Total No. No. Demand
Inventory what Patient Leftover
Seman Random for randomly available Random units
the initial they require e s
a o week e o o of blood
blood
1 0 54 6 6 67 2 1° 18 1 5
2° 91 4 1
2 1 40 6 7 24 0 --- -- 0 7
3 7 59 6 13 21 0 --- -- 0 13
4 13 36 6 19 21 0 --- -- 0 19
5 19 23 5 24 49 1 1° 57 2 22
6 22 60 6 28 86 3 1° 58 2 26
2° 15 1 25
3° 45 2 23
Remaining units in 6 weeks 23
OBSERVATION: It should be noted that the demand for blood units per week is at
function of two things: the number of patients requiring blood per week and the amount
of blood units required by each of the patients for the corresponding week.
PROBLEM 2.
In a game between two players, Gerald and Arnold toss a fair coin into the air;
by turns, if the result is heads Gerald pays Arnold $1.0, otherwise Arnold
pay $1.0 to Gerald.
a) Propose How would the simulation be with the Monte Carlo method? Use the function
Random number generator calculator.
b) Conduct an experiment with 5 replicas of 6 launches each to determine it
What does Gerald pay.
c) Based on the results of item b, what is the probability that Gerald will leave?
winning?
SOLUTION:
Part a. To work based on Monte Carlo, it is necessary to create a table of ranges based on
to the probabilities of each event occurring: heads or tails. In this problem, it is said that
the coin is not biased, so the probabilities of each outcome are similar.
On the other hand, a method for generating random numbers is necessary, since
The statement suggests the use of a calculator function, values will be noted.
obtained from the corresponding table
FavorableC.1
P (GaneGerald )= = =0.20
[Link] 5
For 5 replicas, it is obtained that Gerald has a 20% chance of getting out.
winning
PROBLEM 3.
Using Monte Carlo simulation, simulate 5 losses or wins in the following game of
data. The player rolls two fair dice; if the resulting sum is 4, 7, or 11, the player
wins $10. Otherwise, the player records the resulting sum (called a point) and continues.
rolling the dice until the resulting sum matches the noted point, in which case
the player wins $10. If during the throws after a scored value (Point) ...
gets 7 or 12, the player loses $10.
SOLUTION
4 = (3,1),(2,2,),(1,3)
7 = (6,1),(5,2),(4,3),(3,4),(2,5),(1,6)
11 = (6,5),(5,6)
Simulation table
SOLUTION
Part a. The approach consists of the formulation of a ranking table for the
Probabilities given in the statement. The resulting table is shown below:
Part b. This part consists of analyzing by simulation the final inventory until it falls to
a value less than 3. To do this we will use the proposed random numbers as
show below:
Month #Random Demand Final Inventory
0 -- -- 5
1 0.0589 0 5
2 0.6733 2 3
3 0.4799 1 2
It will take 3 months until the first restocking of spare parts is done.