LoadCachedFragilityCurve

fragility_curves.LoadCachedFragilityCurve()

Maakt het mogelijk om een vooraf berekende (cached) fragility curve in te laden.

Deze class doet het voor een enkel vak curve, voor een meerdere 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.

- failure_mechanism_id: int,
- measure_id: int,
- hydraulicload: float,
- failure_probability: float

measure_id_to_failuremechanism_id_schema : ClassVar[dict[str, str]] Schema waaraan de koppelingstabel tussen measure_id en failuremechanism_id moet voldoen.

- failure_mechanism_id: int,
- measure_id: int

Notes

Default waarden te overschrijven in de global variables:

  • 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.
failuremechanism_id_to_measure_id_schema dict() -> new empty dictionary
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
retrieve_cache_for_multiple_failure_mechanisms Functie om hergebruik toe te staan van LoadCachedFragilityCurve door LoadCachedFragilityCurveMultiple
run Runt de het ophalen van een voorberekende fragility curve voor een enkel vak, voor een meerdere faalmechanisme.

log_exceptions

fragility_curves.LoadCachedFragilityCurve.log_exceptions(method)

Stuurt exceptions eerst naar de logger van de DataAdapter

retrieve_cache

fragility_curves.LoadCachedFragilityCurve.retrieve_cache(
    df_fragility_curves,
    df_measures_to_effect,
    measure_id,
)

Functie om hergebruik toe te staan van LoadCachedFragilityCurveOneFailureMechanism door LoadCachedFragilityCurve

retrieve_cache_for_multiple_failure_mechanisms

fragility_curves.LoadCachedFragilityCurve.retrieve_cache_for_multiple_failure_mechanisms(
    df_fragility_curves,
    df_measures_to_effect,
    measure_id,
)

Functie om hergebruik toe te staan van LoadCachedFragilityCurve door LoadCachedFragilityCurveMultiple

run

fragility_curves.LoadCachedFragilityCurve.run(input, output, measure_id=None)

Runt de het ophalen van een voorberekende fragility curve voor een enkel vak, voor een meerdere faalmechanisme.

Parameters

Name Type Description Default
input list[str] - Als string: Naam van de input dataadapter: fragility curves, hierbij zijn de fragility curves voor een faalmechanisme en dijkvak, maar meerdere measureids. - Als list van strings: 1. Naam van de input dataadapter: fragility curves, hierbij zijn de fragility curves voor een faalmechanisme en dijkvak, maar meerdere measureids. 2. Naam van de input dataadapter: koppelingstabel tussen measure_id en failuremechanism_id required
output str Naam van de dataadapter voor de enkele Fragility curve output. required
measure_id int | None Measure_id van de fragility curve die ingeladen moet worden. None

Raises

Name Type Description
AssertionError Als input een string is, maar measure_id is None.

Notes