ambulance.Ambulance.charge_at_hospital#
- Ambulance.charge_at_hospital(hospital_location_ID: int, charging_stations_hospitals: dict[str, list[simpy.resources.resource.Resource | float]], SIMULATION_PARAMETERS: dict[str, Any], SIMULATION_DATA: dict[str, Any])#
Charge at a hospital.
- Parameters:
hospital_location_ID (int) – The hospital location ID.
charging_stations_hospitals (dict[str, list[sp.resources.resource.Resource | float]]) – The charging stations resources at all hospitals together with their charging speeds.
SIMULATION_PARAMETERS (dict[str, Any]) – The simulation parameters. The parameter
PRINT
is at least necessary. Note that methods that are called within this method may require more parameters. Seemain.py
for parameter explanations.SIMULATION_DATA (dict[str, Any]) – The simulation data. Methods that are called within this method require data. See these methods for explanations.
- Raises:
Exception – If the ambulance is not at a hospital, but it can also not reach its base.
- Returns:
charging_interrupted (bool) – Whether the charging was interrupted or not.