gemseo / post

Show inherited members

opt_history_view module

Basic display of optimization history: functions and x.

class gemseo.post.opt_history_view.OptHistoryView(opt_problem)[source]

Bases: OptPostProcessor

The OptHistoryView post processing performs separated plots.

The design variables history, the objective function history, the history of hessian approximation of the objective, the inequality constraint history, the equality constraint history, and constraints histories.

By default, all design variables are considered. A sublist of design variables can be passed as options. Minimum and maximum values for the plot can be passed as options. The objective function can also be represented in terms of difference w.r.t. the initial value. It is possible either to save the plot, to show the plot or both.

Parameters:

opt_problem (OptimizationProblem) – The optimization problem to be post-processed.

Raises:

ValueError – If the JSON grammar file for the options of the post-processor does not exist.

DEFAULT_FIG_SIZE = (11.0, 6.0)

The default width and height of the figure, in inches.

database: Database

The database generated by the optimization problem.

materials_for_plotting: dict[Any, Any]

The materials to eventually rebuild the plot in another framework.

opt_problem: OptimizationProblem

The optimization problem.

x_label: ClassVar[str] = 'Iterations'

The label for the x-axis.