infrastructure_interface¶
- class pyrecodes.component.infrastructure_interface.InfrastructureInterface¶
Bases:
StandardiReCoDeSComponent
Subclass of the StandardiReCoDeSComponent class used to interface the outputs of third-party infrastructure simulators into an iRe-CoDeS system-of-systems model.Infrastructure simulator performance is defined in the system configuration file.This interface implements the Tier 1 and Tier 2 infrastructure interfaces as defined in https://doi.org/10.1007/s10669-023-09931-0.- add_initial_zero_supply(step_limits: list, step_values: list) tuple ¶
- Add the initial zero supply to the step limits and step values.This is needed to make sure that the supply is zero before the infrastructure system is restored.This is not applied if the interface already defines the initial post-disaster supply amount at time 0.
- get_restoration_times(supply_dynamics: dict) list ¶
- Sample the restoration times from the distribution defined in the system configuration file.These times define the time steps at which the interface restors the supply amounts defined in the Amount key in the system configuration file.
- set_supply_dynamics(supply_dynamics: dict) None ¶
- Set the predefined supply dynamics of the infrastructure interface component by specifying the parameters of the component’s recovery model.These are defined in the system configuration file by specifying the amounts of resource supplied by the infrastructure system and the time step at which the supply is restored.Note 1: The supply dynamics are defined in the system configuration file, but in the component library file the interface component has to have the resource defined.Note 2: It is assumed that last value in the Amount key is the initial supply amount and the highest value that the infrastructure system provides.