CascadeLevel struct
#include <gtopt/cascade_options.hpp>
One cascade level configuration.
LP is automatically rebuilt when model_options is present. When absent, the previous level's LP and solver are reused.
Public functions
- void merge(CascadeLevel opts)
Public variables
- OptBool active
- OptName aperture_system_file
- std::optional<ModelOptions> model_options
- Model overrides for this level (absent → reuse previous LP).
- OptName name
- Human-readable level name (for logging).
- std::optional<CascadeLevelMethod> sddp_options
- SDDP solver options for this level.
- OptName system_file
- std::optional<CascadeTransition> transition
- Transition from the previous level.
- OptUid uid
- Unique identifier for this level.
Function documentation
void gtopt:: CascadeLevel:: merge(CascadeLevel opts)
Merge another CascadeLevel on top of this one. Used by CascadeOptions::merge for element-wise level-array merges (e.g. from –set array-index overlays like cascade_options.level_array.0.sddp_options.max_iterations=20). Only fields set in opts overwrite the corresponding fields here; unset optionals in opts leave the existing values intact. Nested optional structs (model_options, sddp_options, transition) are themselves recursively merged when both sides have a value.
Variable documentation
OptBool gtopt:: CascadeLevel:: active
When false, the level is skipped entirely by the cascade solver: no LP is built, no solver runs, and no state/cuts are produced for downstream levels. Intended for quickly disabling a level in configuration without removing it (useful for boundary tests and partial runs). Default: true (active).
OptName gtopt:: CascadeLevel:: aperture_system_file
Optional path to a Planning JSON whose system (and its options.model_options) is used as the aperture system for this level's SDDP backward pass — the simplified model solved per aperture, distinct from this level's forward system_file / model_options. Resolution chain (highest first): Phase::aperture_system_file → this field → sddp_options.aperture_system_file → regular forward system. The parent simulation is reused; the reduced system must keep the same reservoir/storage/α inter-phase state elements (by uid).
OptName gtopt:: CascadeLevel:: system_file
Optional path to a Planning JSON whose system (bus_array, line_array, component bus refs) replaces the parent planning's system for this level only. Used by the cascade-reduced mode: the reducer emits per-level reduced JSONs and this field points each cascade level at its dedicated one. Resolution: tried as-is from the current working directory first, then under options.input_directory as a fallback. Only .system is taken from the loaded JSON; its .options and .simulation blocks are deliberately ignored — the cascade level's model_options overlay remains authoritative.