list_of_simulation_output_evaluators module
Define an object to regroup several SimulationOutputEvaluator.
We also define some factory functions to facilitate their creation.
- class ListOfSimulationOutputEvaluators(evaluators: list[SimulationOutputEvaluator])
Bases:
listA simple list of
SimulationOutputEvaluator.- __init__(evaluators: list[SimulationOutputEvaluator]) None
Create the objects (factory).
- run(*simulation_outputs: SimulationOutput, other_evals: dict[str, list[Any]] | None = None, project_folder: Path | None = None, **files_kw) DataFrame
Run all the evaluations.
- _unpack_other_evals(other_evals: dict[str, list[Any]] | None) tuple[list[str], list[list[Any]]]
Extract column names and data.
- _set_indexes(*simulation_outputs: SimulationOutput) list[str]
Set the indexes of the pandas dataframe.
- class FaultScenarioSimulationOutputEvaluators(quantities: tuple[str], faults: list[Fault], simulation_outputs: tuple[SimulationOutputEvaluator], additional_elts: tuple[Element | str] | None = None)
Bases:
objectA more specific class to evaluate settings found for a
FaultScenario.This class was designed to be used when all the faults of a
FaultScenarioare fixed, to output several performance indicators in a compact way. No plot is produced.- __init__(quantities: tuple[str], faults: list[Fault], simulation_outputs: tuple[SimulationOutputEvaluator], additional_elts: tuple[Element | str] | None = None) None
- _set_evaluation_elements(faults: list[Fault], additional_elts: tuple[Element | str] | None = None) tuple[list[Element | str], list[str]]
Set where the relative difference of
quantitieswill be evaluated.It is at the end of each compensation zone, plus at the exit of additional elements if given. Also set
columnsto easepandasDataFramecreation.
- _create_simulation_output_evaluators(ref_simulation_output: SimulationOutput) list[SimulationOutputEvaluator]
Create the proper
SimulationOutputEvaluators.
- _to_pandas_dataframe(evaluations: list[float | bool | None], precision: int = 3) DataFrame
Convert all the evaluations to a compact
pd.DataFrame.