ambulance_simulation.location_generator#
- ambulance_simulation.location_generator(rng: numpy.random._generator.Generator | numpy.random.mtrand.RandomState, SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any]) ndarray #
Generates the patient arrival locations.
The patient’s locations are generated according to the inhabitant’s proportion at each node.
- Parameters:
rng (rnd._generator.Generator | rnd.mtrand.RandomState) – An initialized random number generator.
SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameters
NUM_CALLS
andPRINT
are at least necessary. Seemain.py
for parameter explanations.SIMULATION_DATA (dict[str, Any]) – The simulation data.
NODES_REGION
is at least necessary. It is based onNODES_FILE
. Seemain.py
and the input data section on the ELASPY website for explanations.
- Returns:
location_IDs (np.ndarray) – Contains the initial location IDs of the patients.