SceneLP class
#include <gtopt/scene_lp.hpp>
Represents a logical scene with linear programming scenario elements.
This class combines a Scene with its associated ScenarioLP elements, providing a unified interface for scene management in linear programming contexts.
Constructors, destructors, conversion operators
- SceneLP() defaulted
-
SceneLP(Scene scene,
const Simulation& simulation,
SceneIndex index = SceneIndex {unknown_
index}) explicit -
SceneLP(Scene scene,
std::span<const Scenario> scenarios,
SceneIndex index = SceneIndex {unknown_
index}) explicit - Construct a SceneLP from a Scene and a collection of Scenario elements.
Public functions
- auto count_scenario() const -> constexpr auto noexcept
- auto first_scenario() const -> constexpr auto noexcept
- auto index() const -> constexpr auto noexcept
- auto is_active() const -> constexpr auto noexcept
- Check if the scene is active.
- auto probability_factor() const -> constexpr auto noexcept
- auto scenarios() const -> const std::vector< ScenarioLP > & -> constexpr auto
- Get all scenario elements associated with this scene.
- auto uid() const -> constexpr auto noexcept
- Get the unique identifier of the scene.
Function documentation
gtopt:: SceneLP:: SceneLP(Scene scene,
std::span<const Scenario> scenarios,
SceneIndex index = SceneIndex {unknown_ index}) explicit
Construct a SceneLP from a Scene and a collection of Scenario elements.
| Parameters | |
|---|---|
| scene | The Scene object |
| scenarios | Collection of Scenario elements |
| index | Index of this scene in the parent container |
Initializes the SceneLP with the given Scene and extracts the relevant ScenarioLP elements based on the Scene's first_scenario and count_scenario.
constexpr auto gtopt:: SceneLP:: probability_factor() const noexcept
| Returns | Accumulated probability factor across all scenarios in this scene. Each scenario contributes its own probability_factor (default 1.0). |
|---|