Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Simulation modelling
1. Gary Spencer 14/15 UG EECS Project
Queen Mary, University of London.
Page 1 of 1
Simulation Modelling
Investigating the effectiveness of smart resource allocation strategies
Time interval here isthe lengthof time betweencustomersarriving(sotime interval forperson2is how
longtheyarrive afterperson1).Service time ishow longittakesthe persontobe servedonce they
reach the frontof the queue.
Person Time
interval
Arrival time Start of
service
Service time End of
service
Queueing
time
Anna 2 2 2 5 7 0
Bert 3 5 7 3 10 2
Charlie 6 11 11 4 15 0
Time intervalsare of 2, 3 and 6 minutes;Anna(t=2); Bert (t=2+3); Charlie (t=5+6).
Annais servedassoonas he arrives(t=2),butBert can’t be serveduntil Annahasfinishedbeingserved
as our queue ismodelledaround1server.Anna’sservice time was5,herservice time iscalculatedas2 +
5 = 7, where the nextcustomercanbe servedat t=7.
Arrival time:time interval+previouscustomersarrival time
Queueingtime:difference intime betweenarrival time andstartof service.
Bert finishesbeingservedat10 minutesbutCharlie doesn’tarrive until 11minutes,andcan’tbe served
until he getsthere,because of thisthere is1 minute notutilisedandsoiswasted.
If a customerarrivesafterthe previousservice hasfinished,theycanbe servedstraightaway.
The logicsbehindmyqueue simulationprogram:
Time interval: b[n] = c[n] - c[n-1]
Arrival time:c[n] = b[n] + c[n-1]
Start of service: d[n] = f[n-1]
Service time: e[n] = x[user input]
End of service: f[n] = d[n] + e[n]
Queueingtime: g[n] = d[n] - c[n]