gtopt::Scenario struct

One possible future realization in stochastic planning.

When probability_factor values across all scenarios do not sum to 1, the solver normalises them internally. A scenario can be deactivated (e.g. to perform deterministic runs with a single scenario).

Public static variables

static std::string_view class_name

Public functions

auto is_active() const -> auto noexcept

Public variables

OptBool active
Activation status (default: active).
OptInt hydrology
Optional source-hydrology index (metadata for PLP provenance).
OptName name
Optional human-readable label.
OptReal probability_factor
OptReal risk_index
Optional ranking index of the scenario for an exogenous risk tail (model_options.risk_rank_by = "index"), e.g. a hydrology index (inflow energy, exceedance probability) or an expected unserved energy. risk_tail picks the side (upper = highest values). Not used by the default expected-cost LP.
Uid uid
Unique identifier.

Variable documentation

OptInt gtopt::Scenario::hydrology

Optional source-hydrology index (metadata for PLP provenance).

Populated by plp2gtopt as the 0-based index into PLP's hydrology classes. Not consumed by the LP solver — kept so post-processing tools can trace each scenario back to its original PLP hydrology.

OptReal gtopt::Scenario::probability_factor

Probability weight of this scenario [p.u.]; values are normalised to sum 1