ambulance_simulation.generate_service_times#
- ambulance_simulation.generate_service_times(s: float, loc: float, scale: float, rng: numpy.random._generator.Generator | numpy.random.mtrand.RandomState, size: int, CUT_OFF: float) ndarray #
Generates service times from the lognormal distribution.
Note that a new data value is generated until it is between 0 and the
CUT_OFF
value. Only then it is added to the service_times output array.- Parameters:
s (float) – The sigma parameter.
loc (float) – The location parameter.
scale (float) – The scale parameter.
rng (rnd._generator.Generator | rnd.mtrand.RandomState) – An initialized random number generator.
size (int) – The number of service times to generate.
CUT_OFF (float) – The cut off/maximum value.
- Returns:
service_times (np.ndarray) – The generated service times.