optimization_history module

Provide functions to study optimization history.

load(folder, flag_constraints=False)[source]

Load the threee optimization history files in folder.

Parameters:
  • folder (Path)

  • flag_constraints (bool, default: False)

Return type:

tuple[DataFrame, DataFrame, DataFrame]

get_optimization_objective_names(objectives)[source]

Get the columns corresponding to optimization objectives.

Also return columns taken from simulation outputs.

Parameters:

objectives (DataFrame)

Return type:

tuple[list[str], list[str]]

plot_optimization_objectives(objectives, opti_cols, subplots=False, logy=None, **kwargs)[source]

Plot evolution of optimization objectives.

Parameters:
Return type:

Axis | ndarray

_qty_sim_output(column_name)[source]

Get the quantity that is stored in the column column_name.

It is expected that the header of the column is qty @ position; it only works for the quantites taken from SimulationOutput and written in the objectives.csv.

Parameters:

column_name (str)

Return type:

str

_post_treat(df, post_treat=None, make_absolute=False)[source]

Post-treat the SimulationOutput data.

Parameters:
  • df (DataFrame)

  • post_treat (Literal['relative difference', 'difference'] | None, default: None)

  • make_absolute (bool, default: False)

Return type:

tuple[DataFrame, str]

plot_additional_objectives(objectives, simulation_output_cols, subplots=False, logy=None, post_treat=None, **kwargs)[source]

Plot evolution of additional objectives.

Parameters:
Return type:

Axis | ndarray | list

main(folder)[source]

Provide an example of complete study.

Parameters:

folder (Path)

Return type:

DataFrame