LoadCachedFragilityCurveOneFailureMechanism
fragility_curves.LoadCachedFragilityCurveOneFailureMechanism()Maakt het mogelijk om een vooraf berekende (cached) fragility curve in te laden.
Deze class doet het voor een enkel vak curve, voor een enkele faalmechanisme.
data_adapter : DataAdapter Adapter for handling data input and output operations. df_in : Optional[pd.DataFrame] | None Input DataFrame containing fragility curves with multiple measure_ids df_out : Optional[pd.DataFrame] | None Output DataFrame containing the final fragility curve loaded_curve : Optional[FragilityCurve] | None Ingeladen fragility curve met cached curves cache_fragility_curve_schema : ClassVar[dict[str, str]] Schema waaraan de fragility curve moet voldoen:
- measure_id: int,
- hydraulicload: float,
- failure_probability: float
Notes
Default waarden te overschrijven in de global variables (let op: LoadCachedFragilityCurve):
- default_measure_id: int Standaard measure_id die gebruikt wordt als basis fragility curve, standaard 0.
Attributes
| Name | Description |
|---|---|
| cache_fragility_curve_schema | dict() -> new empty dictionary |
| data_adapter | |
| df_in | The type of the None singleton. |
| df_out | The type of the None singleton. |
| loaded_curve | The type of the None singleton. |
| measure_to_effect_schema | dict() -> new empty dictionary |
Methods
| Name | Description |
|---|---|
| log_exceptions | Stuurt exceptions eerst naar de logger van de DataAdapter |
| retrieve_cache | Functie om hergebruik toe te staan van LoadCachedFragilityCurveOneFailureMechanism door LoadCachedFragilityCurve |
| run | Runt het ophalen van de fragility curve voor een enkel vak, voor een faalmechanisme. |
log_exceptions
fragility_curves.LoadCachedFragilityCurveOneFailureMechanism.log_exceptions(
method,
)Stuurt exceptions eerst naar de logger van de DataAdapter
retrieve_cache
fragility_curves.LoadCachedFragilityCurveOneFailureMechanism.retrieve_cache(
df_fragility_curves,
df_measures_to_effect,
measure_id,
)Functie om hergebruik toe te staan van LoadCachedFragilityCurveOneFailureMechanism door LoadCachedFragilityCurve
run
fragility_curves.LoadCachedFragilityCurveOneFailureMechanism.run(
input,
output,
measure_id,
)Runt het ophalen van de fragility curve voor een enkel vak, voor een faalmechanisme.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| input | list[str] | Naam van de input dataadapter: fragility curves, hierbij zijn de fragility curves voor een faalmechanisme en dijkvak, maar meerdere measureids. | required |
| output | str | Naam van de dataadapter voor de enkele Fragility curve output. | required |
| measure_id | int | Measure_id van de fragility curve die ingeladen moet worden. | required |