Discrete Event Simulation in Python
Diogo Costa (PhD, MSc)
Adjunct Professor, University of Saskatchewan, Canada & CEO of ImpactBLUE-Scientific
Continue modellen
Draaien op vaste tijdstappen
Tijd is een dummyvariabele
Gebruik van tijd-for-loops
for t range(time_range):
Discrete-evenementmodellen
Draaien op variabele tijdstappen
Tijd is een toestandvariabele
Gebruikt vaak while-lussen
while (time < 365):
time += process_duration
Voorbeeld: model taxibedrijf
while (time < 10):
# Process 1
time_duration_1 = manage_requests()
time += time_duration_1
# Process 1
time_duration_2 = dispatch_taxi()
time += time_duration_2
Eindvoorwaarde
while (time < 10)
Voorbeeld: model taxibedrijf
while (time < 10):
# Process 1
time_duration_1 = manage_requests()
time += time_duration_1
# Process 1
time_duration_2 = dispatch_taxi()
time += time_duration_2
Klok
time += time_duration_1
time += time_duration_2
time houdt de huidige simulatie‑tijd bijVoorbeeld: model taxibedrijf
while (time < 10):
# Process 1
time_duration_1 = manage_requests()
time += time_duration_1
# Process 1
time_duration_2 = dispatch_taxi()
time += time_duration_2
Toestandvariabele
time
Verkort tijd tussen bellen en afzetten van klant
Variabelen die systeemoutput en efficiëntie bepalen
Discrete Event Simulation in Python