ambulance_simulation.py#
This file contains the code for running the simulation.
  | 
Initializes all data and required objects of the simulation.  | 
  | 
Generates service times from the lognormal distribution.  | 
Generates the interarrival times if   | 
|
  | 
Performs a single simulation run.  | 
  | 
Initializes the charging stations dictionary.  | 
  | 
Initializes the ambulances and saves these in a list.  | 
  | 
Generates new patients and starts their aid process.  | 
  | 
Generates the patient arrival locations.  | 
  | 
Processes a patient arrival.  | 
  | 
Checks in time intervals whether there are waiting patients that can be helped by ambulances.  | 
  | 
The ambulance aid process.  | 
  | 
The ambulance drive process to its base.  | 
  | 
Checks whether ambulances are available.  | 
  | 
Selects the closest hospital based on a source location.  |