Based on Introduction to Simulation by R.G. Ingalls, in Proceedings of the 2008 Winter Simulation Conference
Copyright Gerd Wagner (CC BY-NC), created on 12/7/2016 with the Object Event Simulation (OES) framework OESjs, last modified on 1/9/2019 | OESjs Credits
Classification tags: business operations management, DES, next-event time progression, activity-based process modeling
As a car enters the drive thru from the street, the driver decides whether or not to get in line. If she decides to leave the restaurant, she counts as a lost customer. If she decides to get in line, she waits until the menu board is available. At that time, she gives the order to the order taker. After the order is taken, two things occur simultaneously:
As soon as the driver reaches the pickup window, she pays and picks up her food, if it is ready. If the food is not yet ready, she has to wait until her order is delivered to the pickup window.
The objective of the simulation is to analyze performance during peak periods to see how long customers spend waiting in line, how often customers pass by ("balk"), and what the utilization of the kitchen is.
The drive thru is modeled as a system with order processing activities performed at three service points with queues: the order taking at the menu board, the order preparation at the kitchen and the order pickup at the pickup window. The model includes four object types: MenuBoard, Kitchen, PickupWindow and Customer, one event type: CustomerArrival, and three activity types: OrderTaking, OrderPreparation and OrderPickup. NB: In a more realistic model, the order queue in the kitchen would be served by several kitchen staff members in parallel, such that they represent the resources of the OrderPreparation activity.
There are three order processing activities: the order taking, the order preparation and the order pickup, all of which are performed by business units that have queues: the menu board for order taking, the kitchen for order preparation and the pickup window for picking up orders.
The potentially relevant object types are:
Potentially relevant types of events are:
Notice that order taking, order preparations and order pickups are activities, which consist of a start and an end event.
ON (event type) | DO (event routine) |
customer arrival | If the order window is busy, then the newly arrived customer queues up, else a new order taking activity for this customer starts. |
end of order taking activity | If the pickup window is busy, then the customer queues up, else a new order pickup activity for this customer starts. If there are still customers waiting in the menu board queue, the next order taking activity starts. |
end of pickup activity | The served customer departs. If there are still customers waiting in the pickup window queue, the next pickup activity starts. |
A computational design for the purpose of computing the two statistics maximum queue length and utilization is obtained by modeling the following types of objects, events and activities:
MenuBoard
with a (multi-valued) reference property waitingCustomers
representing its queue, and two reference properties kitchen
and pickupWindow
for enabling the menu board to access the queues of the kitchen and the pickup window.Kitchen
with a (multi-valued) reference property waitingOrders
representing its queue, a multi-valued reference property preparedOrders
representing
the set of prepared orders and a reference property menuBoard
for enabling the kitchen
to access the queue of the menu board.PickupWindow
with two multi-valued reference properties waitingCustomers
representing its queue and preparedOrders
representing the set of prepared orders, and a
reference property menuBoard
for enabling the kitchen to access the queue of the menu board.Customer
with an attribute arrivalTime
for recording the customer's
arrival time such that the time in system can be computed.CustomerArrival
with a reference property orderWindow
having the class OrderWindow
as range. As an exogenous event type, CustomerArrival
has a recurrence
function representing a random variable for computing the time in-between
two subsequent event occurrences.OrderTaking
has a resource association with the object type
MenuBoard
and a randomDuration
function.OrderPreparation
has a resource association with Kitchen
and a randomDuration
function.OrderPickup
has a resource association with PickupWindow
and a randomDuration
function.For all activity types the simulator computes the utilization of their resources.
ON (event type) | DO (event routine) |
CustomerArrival( ow) @ t |
INCREMENT ow.queueLength IF ow.queueLength = 1 THEN SCHEDULE ActivityStart("OrderTaking", ow) @ (t+1) |
ActivityEnd("OrderTaking", a) @ t |
SET cust = POP( a.orderWindow.waitingCustomers) SET ordPrepDuration = OrderPreparationEnd.randomDuration() SET pickupWindowQueue = a.orderWindow.pickupWindow.waitingCustomers SCHEDULE OrderPreparationEnd( cust.orderNo) @ (t + ordPrepDuration) PUSH cust TO pickupWindowQueue IF pickupWindowQueue.size = 1 THEN SCHEDULE ActivityStart("OrderPickup", a.orderWindow.pickupWindow) @ (t+1) IF a.orderWindow.waitingCustomers.size > 0 THEN SCHEDULE ActivityStart("OrderTaking", a.orderWindow) @ (t+1) |
ActivityEnd("OrderPreparation", a) @ t |
SET pickupWindow = a.kitchen.pickupWindow SET orderNo = POP( a.kitchen.waitingOrders) pickupWindow.preparedOrders.add( ordNo) PUSH orderNo TO pickupWindow.preparedOrders |
ActivityEnd("OrderPickup", a) @ t |
SET cust = POP( a.pickupWindow.waitingCustomers) IF a.pickupWindow.waitingCustomers.size > 0 THEN SCHEDULE ActivityStart("OrderPickup", a.pickupWindow) @ (t+1) |