bilevel_scenario_result module¶
BiLevel scenario result.
- class gemseo.scenarios.scenario_results.bilevel_scenario_result.BiLevelScenarioResult(scenario)[source]¶
Bases:
ScenarioResult
The result of a
Scenario
using aBiLevel
formulation.- Parameters:
scenario (Scenario | str | Path) – The scenario to post-process or the path to its HDF5 file.
- Raises:
ValueError – When the scenario has not yet been executed.
- get_sub_optimization_result(index)[source]¶
Return the optimization result of a sub-optimization problem if any.
- Parameters:
index (int) – The index of the sub-optimization problem, between 0 and N-1 where N is the number of sub-optimization problems.
- Returns:
The optimization result of a sub-optimization problem.
- Raises:
ValueError – If the index is greater than N-1.
- Return type:
OptimizationResult | None
- get_top_optimization_result()[source]¶
Return the optimization result of the top-level optimization problem.
- Return type:
- plot(name, **options)¶
Visualize the result.
- Parameters:
name (str) – The name of the post-processing.
**options (Any) – The options of the post-processing.
- Returns:
The post-processing of the result.
- Return type:
- POST_FACTORY = +--------------------------------------------------------------------------------------------------------------------------+ | OptPostProcessor | +------------------------+----------------+--------------------------------------------------------------------------------+ | Module | Is available? | Purpose or error message | +------------------------+----------------+--------------------------------------------------------------------------------+ | Animation | Yes | Animated GIF maker from an :class:`.OptPostProcessor`. | | BasicHistory | Yes | Plot the history of selected constraint, objective and observable functions. | | Compromise | Yes | Scatter plot with pareto front and compromise points. | | ConstraintsHistory | Yes | A matrix of constraint history plots. | | Correlations | Yes | Scatter plots of the correlated variables. | | DataVersusModel | Yes | Scatter plot of the model data versus the reference ones. | | GradientSensitivity | Yes | Derivatives of the objective and constraints at a given iteration. | | HighTradeOff | Yes | Scatter plot with pareto front and high trade-off points. | | MultiObjectiveDiagram | Yes | Base class for post-processing of multi-objective problems. | | ObjConstrHist | Yes | History of the maximum constraint and objective value. | | OptHistoryView | Yes | The **OptHistoryView** post processing performs separated plots. | | ParallelCoordinates | Yes | Parallel coordinates plot. | | ParetoFront | Yes | Compute the Pareto front for a multi-objective problem. | | Petal | Yes | `Petal diagrams <https://pymoo.org/visualization/petal.html>`_). | | QuadApprox | Yes | Quadratic approximation of a function. | | Radar | Yes | `Radar plots <https://pymoo.org/visualization/radar.html>`_. | | RadarChart | Yes | Plot the constraints on a radar chart at a given database index. | | Robustness | Yes | Uncertainty quantification at the optimum. | | SOM | Yes | Self organizing map clustering optimization history. | | ScatterPareto | Yes | Scatter plot with pareto points and points of interest. | | 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. | +------------------------+----------------+--------------------------------------------------------------------------------+¶
- 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.