gemseo.scenarios.scenario_results.bilevel_scenario_result module#

BiLevel scenario result.

class BiLevelScenarioResult(scenario)[source]#

Bases: ScenarioResult

The result of a Scenario using a BiLevel formulation.

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.

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:

OptimizationResult