gemseo.scenarios.scenario_results.scenario_result module#

Scenario result.

class ScenarioResult(scenario)[source]#

Bases: object

The result of a Scenario.

Parameters:

scenario (BaseScenario | str | Path) -- The scenario to post-process or the path to its HDF5 file.

Raises:

ValueError -- When the scenario has not yet been executed.

plot(name, **settings)[source]#

Visualize the result.

Parameters:
  • name (str) -- The name of the post-processing.

  • **settings (Any) -- The settings of the post-processing.

Returns:

The post-processing of the result.

Return type:

BasePost

POST_FACTORY: ClassVar[PostFactory] = +----------------------------------------------------------------------------------------------------------------------+ |                                                       BasePost                                                       | +--------------------------------------+------+------------------------------------------------------------------------+ |                Module                | Is a |                        Purpose or error message                        | +--------------------------------------+------+------------------------------------------------------------------------+ |              Animation               | Yes  |             Animated GIF maker from a :class:`.BasePost`.              | |             BasicHistory             | Yes  |   Plot the history of selected constraint, objective and observable    | |                                      |      |                               functions.                               | |          ConstraintsHistory          | Yes  |                 A matrix of constraint history plots.                  | |             Correlations             | Yes  |               Scatter plots of the correlated variables.               | |         GradientSensitivity          | Yes  |   Derivatives of the objective and constraints at a given iteration.   | |            HessianHistory            | Yes  |        Plot the history of the diagonal of the Hessian matrix.         | |            ObjConstrHist             | Yes  |         History of the maximum constraint and objective value.         | |            OptHistoryView            | Yes  |  Plot the history of the design variables, objective and constraints.  | |         ParallelCoordinates          | Yes  |                       Parallel coordinates plot.                       | |             ParetoFront              | Yes  |        Compute the Pareto front for a multi-objective problem.         | |              QuadApprox              | Yes  |                 Quadratic approximation of a function.                 | |              RadarChart              | Yes  |    Plot the constraints on a radar chart at a given dataset index.     | |              Robustness              | Yes  |               Uncertainty quantification at the optimum.               | |                 SOM                  | Yes  |          Self organizing map clustering optimization history.          | |          ScatterPlotMatrix           | Yes  |    Scatter plot matrix among design variables, output functions and    | |                                      |      |                              constraints.                              | |             TopologyView             | Yes  |  Visualization of the solution of a 2D topology optimization problem.  | |          VariableInfluence           | Yes  |                First order variable influence analysis.                | | gemseo_bilevel_outer_approximation.a |  No  |                       No module named 'ortools'                        | | lgos.opt.bilevel_master_outer_approx |      |                                                                        | | imation.bilevel_master_outer_approxi |      |                                                                        | |                mation                |      |                                                                        | | gemseo_bilevel_outer_approximation.a |  No  |                       No module named 'ortools'                        | | lgos.opt.core.bilevel_outer_approxim |      |                                                                        | |                ation                 |      |                                                                        | | gemseo_bilevel_outer_approximation.a |  No  |                       No module named 'ortools'                        | | lgos.opt.core.outer_approximation_op |      |                                                                        | |               timizer                |      |                                                                        | | gemseo_bilevel_outer_approximation.a |  No  |                       No module named 'ortools'                        | |  lgos.opt.ortools_milp.ortools_milp  |      |                                                                        | | gemseo_bilevel_outer_approximation.a |  No  |                       No module named 'ortools'                        | | lgos.opt.outer_approximation.outer_a |      |                                                                        | |             pproximation             |      |                                                                        | | gemseo_bilevel_outer_approximation.d |  No  |                       No module named 'ortools'                        | | isciplines.scenario_adapters.mdo_sce |      |                                                                        | |        nario_adapter_benders         |      |                                                                        | | gemseo_bilevel_outer_approximation.f |  No  |                       No module named 'ortools'                        | |         ormulations.benders          |      |                                                                        | | gemseo_bilevel_outer_approximation.f |  No  |                       No module named 'ortools'                        | |     ormulations.benders_settings     |      |                                                                        | | gemseo_bilevel_outer_approximation.p |  No  |                       No module named 'ortools'                        | | ost.bilevel_outer_approximation_hist |      |                                                                        | |                 ory                  |      |                                                                        | | gemseo_bilevel_outer_approximation.p |  No  |                       No module named 'ortools'                        | |   ost.outer_approximation_history    |      |                                                                        | | gemseo_bilevel_outer_approximation.p |  No  |                       No module named 'ortools'                        | |      ost.upper_bound_animation       |      |                                                                        | | gemseo_calibration.post._matplotlib_ |  No  |                cannot import name 'get_color_map' from                 | |           multiple_scatter           |      | 'gemseo.utils.compatibility.matplotlib' (/home/docs/checkouts/readthed | |                                      |      |       ocs.org/user_builds/gemseo/envs/6.3.0/lib/python3.12/site-       | |                                      |      |           packages/gemseo/utils/compatibility/matplotlib.py)           | | gemseo_mlearning.active_learning.act |  No  |             No module named 'gemseo.algos._progress_bars'              | |          ive_learning_algo           |      |                                                                        | | gemseo_mlearning.algos.opt.core.surr |  No  |             No module named 'gemseo.algos._progress_bars'              | |        ogate_based_optimizer         |      |                                                                        | | gemseo_mlearning.algos.opt.surrogate |  No  |             No module named 'gemseo.algos._progress_bars'              | |         _based_optimization          |      |                                                                        | | gemseo_pymoo.post.base_weighted_pymo |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |      o_post_algorithms_settings      |      |                                                                        | |     gemseo_pymoo.post.compromise     |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | | gemseo_pymoo.post.compromise_setting |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |                  s                   |      |                                                                        | | gemseo_pymoo.post.core.multi_objecti |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |              ve_diagram              |      |                                                                        | |       gemseo_pymoo.post.petal        |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |   gemseo_pymoo.post.petal_settings   |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |       gemseo_pymoo.post.radar        |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | |   gemseo_pymoo.post.radar_settings   |  No  |   unsupported operand type(s) for |: 'Decomposition' and 'NoneType'    | +--------------------------------------+------+------------------------------------------------------------------------+#

The factory of BasePost, if created.

design_variable_names_to_values: dict[str, ndarray]#

The design variable names bound to the optimal values.

optimization_problems_to_results: dict[str, OptimizationResult]#

The optimization results associated with the different optimization problems.

property optimization_result: OptimizationResult#

The optimization result of the main optimization problem.

For some scenarios, such as those based on multi-level formulations, there are several optimization problems including a main one. The current optimization result corresponds to this main optimization problem.

For scenarios with a single optimization problem, the current optimization result corresponds to this unique optimization problem.