gtopt::Block struct

Smallest time unit in the optimization horizon.

Blocks are ordered within a Stage. A stage references its first block by index (first_block) and contains count_block consecutive blocks. The duration field converts MW dispatch values into MWh energy quantities in the objective function.

Public static variables

static std::string_view class_name

Public variables

OptInt commitment_cell
Real duration
Duration of this time block [h].
OptName name
Optional human-readable label.
OptReal time
Uid uid
Unique identifier.

Variable documentation

OptInt gtopt::Block::commitment_cell

Commitment cell of the block (any integer label). When the blocks of a stage carry it, consecutive blocks with the same label share one commitment status u (and v / w only at cell boundaries): the binary grid is the base grid of a refined sampler (e.g. the hourly cells or the N Chebyshev nodes) while the refined blocks / nodes only add continuous variables. Block stages only, for units without their own commitment_period (which wins); point stages always use the uniform per-unit grid (never the nodes). Unset on every block = the usual per-block / period grid.

OptReal gtopt::Block::time

Node time of the block inside its stage's chronological period [h] (real hours from the period start, see Stage::period_hours). Used by derivative-based constraints (ramp_formula = central2) on non-uniform grids, e.g. Chebyshev nodes whose block durations are quadrature weights. Unset = midpoint of the block in real time.