gtopt/scene_merge.hpp file

Merge the scenes spanned by a nonanticipative DecisionVariable.

gtopt builds one LP per (scene, phase) cell, so a scope: "global" DecisionVariable is one column per scene: shared by the scenarios of a scene, but free to differ between scenes. nonanticipative: true asks for ONE value across scenes as well (a here-and-now decision taken before the scene — e.g. the hydrology — is known).

The implementation reuses the existing "one scene, several scenarios" path: every active scene is folded into a single LP scene whose scenario range is the union of the original ones. Each scenario keeps its own data, probability and state columns (reservoirs, …); only the scene-level columns (coarse-scoped DecisionVariables, capacity expansion) become one shared column — the extensive form of the two-stage problem. The planning's scene_array is NOT modified: SimulationLP applies the merge when it builds its scenes, and the output writer splits the per-cell shards back into the original scenes.

Namespaces

namespace gtopt

Classes

struct gtopt::SceneMerge
The scenes folded into one LP scene for nonanticipative variables.