Inventory System Simulation With Example
Initialization
● Initialize simulation parameters, including number of items, starting quantities
of each item and reorder point.
● We set these initial values in our system and define the reorder point to ensure
we never run out of essential items.
● Set up the first demand event.
Main Simulation Loop
● Iterate through various (s, S) pairs, representing inventory policies.
● Initialize the model with the current (s, S) values.
● Run the simulation until an end-simulation event occurs.
● Determine the next event type using the timing function.
● Execute the appropriate event function (order arrival, demand, evaluation, or
reporting).
● Update time-average statistics.
Event Functions
Order_arrival Demand
Evaluate Report
Updating Time-Average Statistics
In the update_time_avg_stats function:
● Compute the time since the last event.
● Determine the status of the inventory level during the previous interval.
● Update area_shortage if inventory was negative.
● Update area_holding if inventory was positive.
Random Number Generation
Function random_integer:
● Generate a random U(0,1) variate.
● Example: How many customer will come, what and when they buy a product.
Function uniform:
● Generate a random U(a, b) variate.
● Example: Delivery of new products
End of Simulation
● Now wrap the simulation process and saved all the data.
● If there are more (s, S) pairs to consider, the program repeats the simulation
● The program stops when all pairs are considered.
● This part concludes our simulation and allows us to analyze the results for
different inventory policies.