GTOpt Input Data Structure Documentation

This document describes the input data structure required to define and run optimization cases with GTOpt (Generation, Transmission and storage Optimization), the open-source solver for the optimization and analysis of power-system generation, transmission and storage.

For a step-by-step tutorial with worked examples and time-series workflow, see Planning Guide. For auto-generated field tables from source code run: python3 scripts/gtopt_field_extractor.py --format html --output field_reference.html


Overview

A GTOpt case is defined by one or more JSON configuration files that contain three top-level sections:

SectionDescription
optionsGlobal solver and I/O settings (includes solver_options and variable_scales)
simulationTime structure: blocks, stages, scenarios, phases, scenes, apertures
systemPhysical system: buses, generators, demands, lines, etc.

The JSON file may reference external data files (CSV or Parquet) for time-series or profile data. These files are stored in a subdirectory specified by options.input_directory.

Directory Layout

case_name/
├── case_name.json            # Main configuration file
└── <input_directory>/        # External data files
    ├── Demand/
    │   └── lmax.parquet      # Demand load profile
    ├── Generator/
    │   └── pmax.parquet      # Generator capacity profile
    └── ...

1. Options

Global settings that control solver behavior and I/O formats. All fields are optional – when absent, the solver applies built-in defaults (shown below).

Input settings

FieldTypeDefaultDescription
input_directorystring"input"Root directory for external data files (resolved relative to JSON file)
input_formatstring"parquet"Preferred input format: "parquet" or "csv"

Model parameters (options.model_options)

These keys live in the model_options sub-object; the former flat copies at the top level of options are rejected (see Planning Options). The table lists the commonly used ones; the full list is in Planning Options → ModelOptions.

FieldTypeDefaultUnitsDescription
demand_fail_costnumber1000$/MWhPenalty cost for unserved demand (value of lost load); see Unserved-demand cost and hard demand
battery_annual_standing_lossnumber0.48p.u./yearSelf-discharge for batteries without annual_standing_loss (4 %/month; 0 = legacy lossless). See Battery self-discharge default
battery_power_envelopebooleantrue–Per-block valid inequality p_charge/Pc_max + p_discharge/Pd_max ≤ 1 on every battery; false restores the pre-envelope LP
reserve_shortage_costnumber(none)$/MWhPenalty cost for unserved spinning reserve (formerly reserve_fail_cost)
hydro_spill_costnumber(none)$/m³Default penalty cost for unmet hydro (irrigation) rights (formerly hydro_fail_cost). Per-element fail_cost overrides this
hydro_use_valuenumber(none)$/m³Default value (benefit) of exercising hydro rights. Per-element use_value overrides this
state_violation_costnumber(none)$/MWhPenalty cost for SDDP state-variable violations (formerly state_fail_cost). Fallback when a reservoir/storage element lacks its own scost; converted via element's mean_production_factor
use_line_lossesbooleantrue–Deprecated — use line_losses_mode instead. Enable resistive line-loss modeling
line_losses_modestring"adaptive"–Line-loss model: "none", "linear", "piecewise", "bidirectional", "adaptive", "dynamic"
loss_segmentsinteger1–Number of piecewise-linear segments for quadratic line losses (1 = linear)
loss_cost_epsnumber0.1$/MWhCost on the line-loss columns: breaks bidirectional-flow degeneracy and blocks loss arbitrage under negative LMPs. Per-line Line.loss_cost_eps overrides; 0 disables. Inert for none/linear/piecewise_direct
loss_flow_abs_costnumber0.001$/MWhPin on the tangent_signed_flow abs-flow proxy columns (Σv ≥ |f|): forces Σv = |f| at the optimum. Shifts LMP differences by at most ≈ its value per lossy line. Only when loss_cost_eps > 0. Per-line Line.loss_flow_abs_cost overrides; 0 disables; 1e-6 = legacy internal pin
loss_overflow_costnumberdemand_fail_cost$/MWhPrice on the loss carried by the overflow tier past a decoupled Line.loss_envelope (flow between the envelope and tmax): closes the overflow energy sink under negative bus prices; genuine overloads pay it on their loss above R·env²/V². Per-line Line.loss_overflow_cost overrides; 0 disables. Unset default: the case's demand_fail_cost (global model_options value; per-demand fcost is not consulted), itself 1000 when unset; 1000 with a warning when it is an explicit 0.
prev_stage_linkstringstage—<attr>_prev at the first block of a stage whose previous stage is in the same phase: stage = that stage's last block, none = 0 (legacy), period = on a periodic stage the stage's own last block (the typical period wraps), else as stage
overload_slack_boundstringthermal—Default Line.overload_slack_bound: thermal = min(hard − normal, max_overload_ratio × normal), ratio, unbounded
max_overload_rationumber1.5—Default Line.max_overload_ratio (slack ≤ ratio × normal). A guard rail above reported DLR gains (+10–25 % typical, ~40 % at windy sites, 50–72 % outliers; see the formulation refs [39]–[44])
periodic_storagebooleanfalse—Storages on periodic stages (Stage.periodic): true = a daily_cycle storage starts every periodic stage free and closes on itself (no chain, eini / efin not applied); a state storage runs ONE real cycle and moves by n · Δ_cycle across the stage (n = duration / period_hours; rows cycle_scale / cycle_shift). false = legacy rules. See formulation §5.7
use_line_dlrbooleantrue—Global DLR switch: false ignores every Line.dlr block (static tmax applies), for static-vs-DLR comparisons. Also --set model_options.use_line_dlr=false
line_thermal_limit_modestringflow—Default for Line.line_thermal_limit_mode: flow limits the flow variable only (no extra row); sending limits the sending-end power f + a·ℓ; full adds f + ℓ ≤ tmax per direction. Per-line value overrides
line_direction_modestringoff—Radial-line flow-direction certificate: off = today's LP; report = log the radial / one-way / dead-end classification only; structural = drop the impossible direction of certified one-way radial lines and drop dead-end lines. Lines named in user constraints are left untouched. Per-line Line.flow_direction overrides. See the formulation, §5.5 "Radial Lines and One-Way Flow"
network_modelstringdc—Network power-flow model: dc = today's transport / DC power flow; lindistflow = linearised DistFlow for radial feeders (squared voltages, reactive power, taps, MVA polygons; §5.6 bis)
mva_polygon_sidesinteger8—Sides of the line MVA polygon under lindistflow (0 = only the active-power limit)
use_kirchhoffbooleantrue–Enable DC Kirchhoff voltage-law constraints
use_single_busbooleanfalse–Collapse network to a single bus (copper-plate model)
kirchhoff_thresholdnumber0kVMinimum bus voltage below which Kirchhoff is not applied
dc_line_reactance_thresholdnumber1e-6p.u.\|X/V²\| below which a line's KVL flow term is dropped (see tiny_reactance_mode); 0 disables
tiny_reactance_modestring"tie"–Lines with reactance 0 or below dc_line_reactance_threshold: "tie" = zero-impedance tie (bus angles forced equal, θ_a − θ_b = φ); "dc" = legacy free-flow DC link. Lines without reactance are always DC links
tiny_reactance_rel_thresholdnumber0.01–Relative tie floor: a line is a zero-impedance tie when \|X/V²\| < max(dc_line_reactance_threshold, this × median \|X/V²\|); 0 = absolute floor only
tie_line_lossesbooleanfalse–false: zero-impedance ties are lossless (no loss rows); true: legacy, ties keep their loss model
loss_segment_boundbooleantrue–Ordered-fill upper bound min(w_k, max(0, tmax − b_{k−1})) on PWL loss segment columns (valid tightening cut); false = width-only bounds
scale_objectivenumber1000dimensionlessDivisor applied to all objective coefficients for numerical stability
scale_thetanumberautodimensionlessVoltage-angle enlargement: θ_LP = scale_theta · θ (rad); auto = 1/(3·median(X/V²)); 1 = radians; 1000 = milliradians
objective_modestring"cost"–"emissions" minimises emissions instead of cost (see Emissions). Emission prices and caps are set on EmissionZone, not here
continuous_phasesstring"none"–Phase range where all integer/binary variables relax to continuous. Syntax: "all", "none", "0", "1,3:5,8:", ":3"
ramp_formulastring"backward"–Ramp discretisation: "backward" (default, also on point stages: the interval slope p_k − p_{k−1} ≤ RU·h_k, h_k = t_k − t_{k−1}, cyclic wrap h_0 = t_0 + H − t_{N−1}) or "central2" (opt-in, NOT recommended: a convex combination of the adjacent slopes that lets zig-zag dispatch through; see formulation C4/C5)
uc_formulationstring"energy_block"–Unit-commitment formulation on chronological block stages: "energy_block" (default, block-average power) or "power_based" (power at the block boundaries, block energy = trapezoid, exact ramps, start-up / shut-down trajectories, ramp-capability reserves; see Unit Commitment §4.6). Commitment.uc_formulation overrides it per unit
ramp_wrapbooleanfalse–central2 only: wrap the end nodes cyclically over the stage period
storage_integrationstringper type–Point-sampled stages only (block stages always use block). Storage balance time integration: block (e_b = e_{b−1} + f_b·Δt_b), trapezoid / lg4 / lg6 (banded 2- / 4- / 6-point Lagrange rule on Block.time, level at the node; rows balanced so interval sums = interval lengths and column sums = block weights), lg4_pos / lg6_pos (nonnegative weights; lg4_pos is the recommended high-order rule — plain lg4 / lg6 have negative weights and are not recommended for LP); every banded rule adds charge-only / discharge-only envelope rows (max(D_kj, 0)). Resolution: element storage_integration → reservoir_storage_integration / battery_storage_integration → this value → lg4_pos (reservoirs) / block (others)
reservoir_storage_integrationstring"lg4_pos"–Point-stage rule of reservoirs (see storage_integration)
battery_storage_integrationstring"block"–Point-stage rule of batteries and the other energy storages (see storage_integration)
commitment_breaksnumber[]unset–Planning default of the daily commitment grid (cell boundaries in hours of the day, e.g. [3.5, 7.5, 10.5, 14.5, 17.5, 23.5]) for units without their own commitment_breaks / commitment_period / commitment_grid "block" / "cells"; Stage.commitment_breaks overrides it per stage. See Commitment.commitment_breaks

Note: annual_discount_rate has moved to the simulation section (see Section 2). For backward compatibility, it is still accepted here.

Output settings

FieldTypeDefaultDescription
output_directorystring"output"Root directory for output result files
output_formatstring"parquet"Output format: "parquet" or "csv"
output_compressionstring"zstd"Compression codec: "uncompressed", "gzip", "zstd", "lz4", "bzip2", "xz"
use_uid_fnamebooleantrueUse element UIDs instead of names in output filenames

LP variable/row names are enabled automatically when the CLI flag --lp-file or --lp-debug is set; there is no separate JSON or CLI option to control the naming level. See Planning Options → LpMatrixOptions.

Solver selection

FieldTypeDefaultDescription
methodstring"monolithic"Planning solver: "monolithic" (default), "sddp", or "cascade". See SDDP Solver, Cascade Solver, and Monolithic Solver
build_modestring"scene-parallel"How PlanningLP::create_systems assembles per-cell SystemLPs: "serial", "scene-parallel" (default), "full-parallel", or "direct-parallel". Serial builds in the calling thread with no pool/build-buffer overhead

Logging and debugging

FieldTypeDefaultDescription
log_directorystring"logs"Directory for log, trace, and error LP files
lp_debugbooleanfalseSave LP debug files to log_directory before solving. Monolithic: one file per (scene, phase) named gtopt_lp_<scene>_<phase>.lp. SDDP: one file per (iteration, scene, phase) named gtopt_iter_<iter>_<scene>_<phase>.lp
lp_compressionstring""Compression codec for LP debug files: "" (inherit from output), "none" (no compression), or a codec name ("zstd", "gzip", "lz4", "bzip2", "xz")
lp_onlybooleanfalseBuild all LP matrices but skip solving entirely (CLI: --lp-only / -c). Combine with lp_debug: true to export every scene/phase LP
lp_scalesstringnonenone, summary (JSON <lp-file>.scales.json with objective scale, block weights, numerics) or full (plus Parquet tables of the scaled columns/rows); true/false mean full/none (CLI: --lp-scales; see LP scales)
lp_coeff_ratio_thresholdnumber1e7When the global max/min coefficient ratio exceeds this value, per-scene/phase breakdown is printed
lp_debug_scene_mininteger—Minimum scene UID (inclusive) for LP debug file saving
lp_debug_scene_maxinteger—Maximum scene UID (inclusive) for LP debug file saving
lp_debug_phase_mininteger—Minimum phase UID (inclusive) for LP debug file saving
lp_debug_phase_maxinteger—Maximum phase UID (inclusive) for LP debug file saving
lp_fingerprintbooleanfalseCompute LP structural fingerprint after solving. Output: lp_fingerprint_scene_{S}_phase_{P}.json per scene/phase. See LP Fingerprint

Constraint handling

FieldTypeDefaultDescription
constraint_modestring"strict"User-constraint runtime error policy: "normal" (warn + drop offending constraint), "strict" (default; abort with diagnostic), "debug" (strict + verbose per-row lowering trace). See User Constraints → constraint_mode

Removed LP solver fields

The former top-level lp_algorithm, lp_threads and lp_presolve keys are no longer part of the JSON contract; use the solver_options sub-object (algorithm, threads, presolve; see Section 1.1).

Example

{
  "options": {
    "output_format": "csv",
    "model_options": {
      "use_single_bus": false,
      "demand_fail_cost": 1000,
      "scale_objective": 1000,
      "use_kirchhoff": true
    },
    "input_directory": "system_c0",
    "input_format": "parquet",
    "method": "monolithic",
    "solver_options": {
      "algorithm": 3,
      "presolve": true
    }
  }
}

1.1 SolverOptions

LP solver configuration exposed as a sub-object under options. (The former top-level lp_algorithm, lp_threads and lp_presolve fields were removed.)

FieldTypeDefaultDescription
algorithminteger3 (barrier)LP algorithm: 0 = auto, 1 = primal simplex, 2 = dual simplex, 3 = barrier
threadsinteger0Number of solver threads (0 = automatic)
presolvebooleantrueEnable LP presolve optimizations
optimal_epsnumbersolver defaultOptimality tolerance (omit to keep solver default)
feasible_epsnumbersolver defaultFeasibility tolerance (omit to keep solver default)
barrier_epsnumbersolver defaultBarrier convergence tolerance (omit to keep solver default)
log_levelinteger0Solver output verbosity (0 = silent)
log_modestring"nolog"Solver log-file policy: "nolog" (no files) or "detailed" (one file per scene/phase/aperture, <solver>_sc<N>_ph<N>[_ap<N>].log); numeric 0 / 1 also accepted
time_limitnumbersolver defaultPer-LP wall-clock time limit in seconds. Exceeding it aborts the solve; caller must check is_optimal()
scalingstringsolver defaultInternal solver scaling strategy: "none", "automatic", "aggressive" (or 0 / 1 / 2). See SolverScaling enum
crossoverstringautoauto / primal / dual / none. When algorithm == barrier, convert the interior-point solution to a simplex basis (vertex duals). The SDDP forward pass uses none only when nothing consumes its vertex solution (see planning options)
max_fallbacksinteger2On non-optimal exit, cycle through barrier → dual → primal up to this many times. 0 disables fallback

Example:

{
  "options": {
    "solver_options": {
      "algorithm": 3,
      "threads": 4,
      "presolve": true,
      "optimal_eps": 1e-8,
      "feasible_eps": 1e-8,
      "log_level": 1
    }
  }
}

1.2 VariableScale

Per-class or per-element LP variable scaling factors. Convention: physical_value = LP_value * scale. Defined as an array under options.variable_scales.

Resolution priority when the solver looks up a scale:

  1. Per-element entry matching (class_name, variable, uid)
  2. Per-class entry matching (class_name, variable) with uid = -1
  3. Fallback: 1.0 (no scaling)

Note: Global options (scale_theta) take precedence over entries in variable_scales.

FieldTypeDefaultDescription
class_namestring—Element class (e.g. "Bus", "Reservoir", "Battery")
variablestring—Variable name (e.g. "theta", "volume", "energy")
uidinteger-1Element UID (-1 = apply to all elements of this class)
scalenumber1.0Scale factor: physical = LP * scale

Example:

{
  "options": {
    "variable_scales": [
      {"class_name": "Bus", "variable": "theta",
       "uid": -1, "scale": 0.001},
      {"class_name": "Reservoir", "variable": "volume",
       "uid": -1, "scale": 1000.0},
      {"class_name": "Battery", "variable": "energy",
       "uid": 1, "scale": 10.0}
    ]
  }
}

1.3 SDDPOptions

SDDP-specific solver configuration, specified as a sub-object under options.sddp_options. Field names omit the sddp_ prefix since the section name already provides the namespace. All fields are optional.

For full algorithmic details, see SDDP Solver.

The tables below cover the common fields; the complete list with defaults is in Planning Options → SddpOptions.

Iteration control

FieldTypeDefaultDescription
max_iterationsinteger100Maximum number of forward/backward iterations
min_iterationsinteger1Minimum iterations before declaring convergence
convergence_tolnumber0.01Relative gap tolerance; the stop criterion only when stationarity is disabled (stationary_tol = 0)
stationary_tolnumber0.005ΔUB stationarity tolerance (default stop criterion under convergence_mode = gap_stationary); 0.0 disables it
stationary_windowinteger4Look-back window (iterations) for the stationarity check

Advanced tuning

FieldTypeDefaultDescription
elastic_penaltynumber1.0Penalty for elastic slack variables in feasibility
elastic_modestring"farkas_recursive"Elastic filter mode: "farkas_recursive", "state_repair" (alias "plp"), "chinneck" (alias "iis"), "single_cut" (alias "cut"), or "multi_cut"
multi_cut_thresholdinteger100Cumulative forward-pass infeasibility count at a (scene, phase) before auto-switching to multi_cut (counter is persistent; 0 = always; <0 = disabled)
cut_sharing_modestring"none"Cut sharing across scenes: "none", "multicut" or "markov" (experimental); the removed "expected" / "accumulate" / "max" names are rejected
update_lp_skipinteger0Iterations to skip between LP coefficient updates, e.g. volume-dependent production factors (0 = every iteration)

Cut file management

FieldTypeDefaultDescription
cut_directorystring"cuts"Directory for Benders cut files
save_per_iterationbooleantrueSave cuts to CSV after each iteration (vs. only at end)
cuts_input_filestring""File path for loading initial cuts (empty = cold start)
sentinel_filestring""Path to a sentinel file; if it exists, the solver stops gracefully

Boundary cuts (deprecated aliases)

The boundary (future-cost) cuts are configured on the FutureCost element (system.future_cost_array, see Section 3.26). The keys below are deprecated aliases, honoured only when method is sddp or cascade and translated into the FutureCost element at load time with a warning.

FieldDeprecated alias for
boundary_cuts_filefuture_cost_array[].cuts_file
boundary_cuts_modefuture_cost_array[].mode
boundary_cut_sharing_modefuture_cost_array[].sharing
boundary_cuts_mean_shiftfuture_cost_array[].mean_shift
boundary_max_iterationsfuture_cost_array[].iteration_limit
missing_cut_var_modefuture_cost_array[].missing_cut_var_mode

scale_alpha and cut_coeff_eps stay genuine sddp_options fields (they are SDDP algorithm settings, not aliases).

Apertures

FieldTypeDefaultDescription
aperturesint array(absent)Aperture UIDs for backward pass. Absent = use per-phase apertures. Empty [] = pure Benders. Non-empty = use exactly these UIDs
num_aperturesinteger(absent)Apertures per phase taken from Phase.apertures: absent = all, 0 = none (pure Benders), N = first N. CLI --sddp-num-apertures
aperture_selection_modestring"head"Which num_apertures entries are taken: head (first N, the wettest with plp2gtopt ordering), stride (evenly spaced), tail (last N)
aperture_directorystring""Directory for aperture-specific scenario data (empty = use input_directory)
aperture_timeoutnumber30.0Timeout in seconds for individual aperture LP solves (0 = no timeout)
save_aperture_lpbooleanfalseSave LP files for infeasible apertures to log_directory

Timeouts and warm-start

FieldTypeDefaultDescription
state_variable_lookup_modestring"warm_start"How update_lp elements (seepage, production factor, discharge limit) obtain reservoir volume between phases: "warm_start" (warm solution / vini, no cross-phase lookup) or "cross_phase" (previous phase's efin). Does not affect SDDP state-variable chaining or cut generation.

Hot-start modes

FieldTypeDefaultDescription
cut_recovery_modestring"none"Hot-start mode: "none", "keep", "append", or "replace". Replaces the removed boolean hot_start (CLI: --hot-start)

Cut pruning

FieldTypeDefaultDescription
max_cuts_per_phaseinteger0Maximum retained cuts per (scene, phase) LP. 0 = unlimited
cut_prune_intervalinteger10Iterations between cut pruning passes
prune_dual_thresholdnumber1e-8Dual threshold for inactive cut detection
single_cut_storagebooleanfalseStore cuts in per-scene vectors only
max_stored_cutsinteger0Maximum total stored cuts per scene (0 = unlimited)
low_memory_modestring"compress" (SDDP/cascade) / "off" (monolithic)off or compress (snapshot and rebuild are back-compat aliases for compress; see SDDP method docs)
memory_codecstring"auto"Compression codec for compress mode

Simulation mode

FieldTypeDefaultDescription
simulation_modebooleanfalseRun in simulation mode: forward-only evaluation of the policy from loaded cuts. Sets max_iterations=0 and disables cut saving. Feasibility cuts from the simulation pass are discarded by default for hot-start reproducibility

Monitoring API

FieldTypeDefaultDescription
api_enabledbooleantrueEnable the SDDP monitoring API (writes JSON status file each iteration)

1.4 CascadeOptions (multi-level hybrid solver)

These options configure the cascade solver (method = "cascade"), which runs a multi-level hybrid algorithm with progressive LP refinement. They are set in their own cascade_options sub-object (not inside sddp_options). See Cascade Method for full documentation, and SDDP Solver – S10 for a summary.

The cascade_options object contains these top-level fields:

FieldTypeDescription
model_optionsobjectGlobal ModelOptions defaults for all levels
sddp_optionsobjectGlobal SddpOptions defaults for all levels. max_iterations here is the global budget across all levels
level_arrayarrayArray of CascadeLevel objects. When empty or omitted, a single level with the global options is run (plain SDDP)
write_level_outputsbooleanfalse (default): only the last active level writes results. true: every intermediate level also writes a full output set (results, solution.csv, cuts, solver_status.json, level_summary.json) to <output_directory>/<level name>/. See Cascade Method

Each element in the level_array is an object with the following optional fields:

FieldTypeDescription
uidintegerUnique identifier for this level
namestringHuman-readable level name (for logging)
model_optionsobjectLP formulation overrides; when present, a new LP is built. When absent, the previous level's LP is reused
sddp_optionsobjectSolver parameters for this level (per-level overrides)
transitionobjectTransfer rules from the previous level

model_options fields (same structure at both cascade and level scope):

FieldTypeDefaultDescription
use_single_busbooleanfalseAggregate all buses into one
use_kirchhoffbooleantrueEnable DC power flow (voltage angles)
line_losses_modestring"adaptive"Line-loss model (use_line_losses is the deprecated on/off form)
kirchhoff_thresholdnumber0.0Threshold for Kirchhoff constraint activation
loss_segmentsinteger1Number of piecewise-linear loss segments
scale_objectivenumber1000Divisor for objective coefficients
scale_thetanumberautoVoltage-angle enlargement: θ_LP = scale_theta · θ (rad); auto = 1/(3·median(X/V²)); 1 = radians; 1000 = milliradians
demand_fail_costnumber1000Penalty cost for unserved demand [$/MWh]
reserve_shortage_costnumber(none)Penalty cost for unserved reserve [$/MWh]

Note: annual_discount_rate has moved to the simulation section. For backward compatibility, it is still accepted in model_options.

sddp_options fields (per-level solver parameters):

FieldTypeDefaultDescription
max_iterationsintegerfrom global sddp_optionsMaximum iterations for this level
min_iterationsintegerfrom global sddp_optionsMinimum iterations before convergence
aperturesint arrayfrom global sddp_optionsAperture UIDs (absent = inherit, [] = Benders)
convergence_tolnumberfrom global sddp_optionsConvergence tolerance
stationary_tolnumberfrom global sddp_optionsStationary gap-change tolerance (0 = disabled)
stationary_windowintegerfrom global sddp_optionsLook-back window for stationary gap check

transition fields:

See CASCADE_SOLVER.md §4.5 for detailed cut forgetting semantics and the two-phase solve behavior.

FieldTypeDefaultDescription
inherit_optimality_cutsinteger00 = do not inherit; -1 = inherit and keep forever; N > 0 = inherit, then forget after N training iterations

SDDP example:

{
  "options": {
    "method": "sddp",
    "sddp_options": {
      "max_iterations": 200,
      "convergence_tol": 1e-5,
      "stationary_tol": 0.01,
      "stationary_window": 10,
      "cut_sharing_mode": "expected",
      "cut_directory": "cuts",
      "elastic_mode": "single_cut",
      "elastic_penalty": 1e7,
      "cut_recovery_mode": "keep",
      "apertures": []
    }
  }
}

Cascade example:

{
  "options": {
    "method": "cascade",
    "sddp_options": {
      "max_iterations": 30,
      "convergence_tol": 0.01
    },
    "cascade_options": {
      "level_array": [
        {
          "name": "uninodal_benders",
          "model_options": {
            "use_single_bus": true,
            "use_kirchhoff": false,
            "use_line_losses": false
          },
          "sddp_options": {
            "max_iterations": 10,
            "apertures": [],
            "convergence_tol": 0.05
          }
        },
        {
          "name": "transport_sddp",
          "model_options": {
            "use_single_bus": false,
            "use_kirchhoff": false
          },
          "sddp_options": {
            "max_iterations": 15,
            "apertures": [1, 2, 3]
          },
          "transition": {
            "inherit_optimality_cuts": -1
          }
        },
        {
          "name": "full_sddp",
          "model_options": {
            "use_kirchhoff": true,
            "use_line_losses": true
          },
          "sddp_options": {
            "max_iterations": 30,
            "apertures": [1, 2, 3]
          },
          "transition": {
            "inherit_optimality_cuts": -1
          }
        }
      ]
    }
  }
}

Simulation mode example:

{
  "options": {
    "method": "sddp",
    "sddp_options": {
      "simulation_mode": true,
      "cut_recovery_mode": "keep",
      "cut_directory": "cuts"
    }
  }
}

1.5 MonolithicOptions

Monolithic-solver-specific configuration, specified as a sub-object under options.monolithic_options. All fields are optional.

For full details, see Monolithic Solver.

FieldTypeDefaultDescription
solve_modestring"monolithic"Solve mode: "monolithic" (all phases in one LP) or "sequential" (phase-by-phase)
boundary_cuts_filestring—Deprecated alias → future_cost_array[].cuts_file
boundary_cuts_modestring—Deprecated alias → future_cost_array[].mode
boundary_cut_sharing_modestring—Deprecated alias → future_cost_array[].sharing
boundary_max_iterationsinteger—Deprecated alias → future_cost_array[].iteration_limit

The boundary_* aliases are honoured only when method is monolithic (the default). The monolithic solver reads the boundary cuts only from the FutureCost element (Section 3.26) and never from sddp_options.

Example:

{
  "options": {
    "method": "monolithic",
    "monolithic_options": {
      "solve_mode": "monolithic"
    }
  },
  "system": {
    "future_cost_array": [
      {
        "uid": 1,
        "name": "fcf",
        "cuts_file": "boundary_cuts.csv",
        "mode": "separated"
      }
    ]
  }
}

2. Simulation

Defines the temporal structure of the optimization. The simulation object contains arrays of time-structure elements organized in a hierarchy:

Scenario  (probability_factor)
  └─ Phase
       └─ Stage  (discount_factor, first_block, count_block)
            └─ Block  (duration [h])

Scenes group scenarios; Apertures define SDDP backward-pass openings.

Simulation-level fields

In addition to the arrays below, the simulation object accepts these scalar fields:

FieldTypeDefaultDescription
annual_discount_ratenumber0.0Annual discount rate for multi-stage CAPEX discounting [p.u./year]
boundary_cuts_filestring—Deprecated alias → future_cost_array[].cuts_file (any method)
boundary_cuts_valuationstring—Deprecated alias → future_cost_array[].valuation (any method)
probability_rescalestring"runtime"Rescale scenario / scene probabilities that do not sum to 1: none (warn only), build (at validation), runtime (at build and run time)
kappa_warningstring"warn"High basis condition number after a solve: none, warn (log a warning), save_lp (warn and write the LP). Needs a solver that reports kappa (solver_options.kappa_mode)
kappa_thresholdnumber1e9Kappa above which kappa_warning fires
block_hour_mapstring—Block → calendar-hour map file (written by plp2gtopt); metadata for post-processing, not read by the solver
iteration_arrayarray—Per-iteration SDDP control entries (Iteration)

Backward compatibility: annual_discount_rate is also accepted in options or options.model_options. The boundary cuts are configured on the FutureCost element (Section 3.26).

ArrayElementRequiredDescription
block_arrayBlockYesIndivisible time units
stage_arrayStageYesPlanning/investment periods
scenario_arrayScenarioYesStochastic realizations
phase_arrayPhaseNoGroups of consecutive stages
scene_arraySceneNoGroups of scenarios
aperture_arrayApertureNoSDDP backward-pass openings

When phase_array or scene_array are empty, a single default Phase / Scene covering all stages / scenarios is created automatically.

2.1 Block

A block is the smallest indivisible time unit. energy [MWh] = power [MW] × duration [h].

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
durationnumberhYesDuration of the block
timenumberhNoNode time inside the stage period (real hours), used by ramp_formula = central2 and point-stage storage integration. Must lie in its cell [τ_{k−1}, τ_k] (cumulative durations). Default: block midpoint

2.2 Stage

A stage groups consecutive blocks into a planning/investment period.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
first_blockinteger—Yes0-based index of the first block in this stage
count_blockinteger—YesNumber of consecutive blocks in this stage
discount_factornumberp.u.NoPresent-value cost multiplier for this stage
activeboolean—NoWhether the stage is active
chronologicalboolean—NoWhether blocks are sequential time periods (enables unit commitment). Default: false. See Unit Commitment
cycle_groupinteger—NoStorage cycle group: consecutive stages of one phase with the same id form one weighted cycle for daily_cycle storages (Σ w·ΔSoC = 0, see formulation §5.7). Default: unset (each stage closes its own day)
cycle_weightnumber—NoRepetitions of the stage inside its cycle_group (e.g. days per typical week). Must be > 0. Default: duration / 24
period_hoursnumber—NoReal length (h) of the chronological period sampled by the stage (168 typical week, 24 day). Block durations become weights; real step Δt = duration · period_hours / stage duration drives daily_cycle storage cycles, ramps and min up/down. Default: unset
periodicboolean—NoCircular typical period: the blocks sample ONE period repeated duration / period_hours times. Default: periodic when period_hours is set or sampling = "point". Wrapping is opt-in per coupling: Commitment.cycle = "stage", LineCommitment.cycle = "stage", model_options.periodic_storage, model_options.prev_stage_link = "period"
samplingstring—No"block" (default: a value holds constant over its block) or "point" (values are samples AT Block.time, required and increasing; durations are quadrature weights). Point stages integrate storage between nodes (storage_integration: lg4_pos for reservoirs, block for batteries by default), use interval-slope (backward) ramps scaled by h_k = t_k − t_{k−1}, floor commitment periods at 1 h, and count min up/down, commitment periods and max_cycles_day days on the quadrature cells; a periodic grid has N nodes (node N ≡ node 0 dropped, its weight added to node 0); duals ÷ duration are prices AT t_k; block_time.csv is written to the output directory
start_hournumberhNoClock time of the stage start (hours after midnight, taken modulo 24; e.g. 12 for a typical week from Wednesday 12:00). Only read by the daily commitment grid (commitment_breaks). Default: 0
commitment_breaksnumber[]hNoDaily commitment grid of this stage (cell boundaries in hours of the day, see Commitment.commitment_breaks), e.g. a seasonal sunrise / sunset pattern per month. Overrides model_options.commitment_breaks on this stage for units without their own commitment_breaks / commitment_period / legacy grid. Default: unset

2.3 Scenario

A scenario represents a possible future realization (hydrology, demand level, etc.).

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
probability_factornumberp.u.NoProbability weight (values are normalised to sum to 1)
risk_indexnumber—NoRanking index for an exogenous social-risk tail (model_options.risk_rank_by = "index"), e.g. a hydrology index; risk_tail picks the side. Unused otherwise
activeboolean—NoWhether the scenario is active

probability_factor values are global probabilities: a scene's weight is the sum of its scenarios' factors, and the total over all scenes should be 1. When it is not, a warning is always logged and, unless simulation.probability_rescale is none (warn only), the values are rescaled at build time (build, and runtime, the default):

  1. total ≈ 1: left untouched;
  2. every scene sums to ≈ 1 (two or more scenes; a single-scenario scene qualifies with factor 1): read as conditional per-scene probabilities — every factor is divided by the number of scenes, so the scenes get equal weight;
  3. any other total: every factor is divided by the total, keeping the relative scene weights. This changes the expected OPEX relative to CAPEX. A total outside [0.5, 2] usually means the values are representative-period weights (e.g. day counts); in gtopt those belong in the block/stage duration, not in probability_factor.

2.4 Phase

A phase groups consecutive planning stages into a higher-level period. This allows modelling distinct investment or operational windows (e.g. a 5-year construction phase followed by a 20-year operational phase). When only one phase is needed (the common case), it is created automatically with defaults covering all stages.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
activeboolean—NoWhether the phase is active
first_stageinteger—Yes0-based index of the first stage in this phase
count_stageinteger—NoNumber of stages (-1 or omit = all remaining)
aperturesarray—NoArray of aperture UIDs for this phase's SDDP backward pass (empty = use all)

2.5 Scene

A scene groups consecutive scenarios into a logical set. Scenes are used by the solver to partition scenarios when building LP sub-problems (one LP per scene/phase combination). When no scene_array is provided, a single default scene covering all scenarios is created.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
activeboolean—NoWhether the scene is active
first_scenariointeger—Yes0-based index of the first scenario in this scene
count_scenariointeger—NoNumber of scenarios (-1 or omit = all remaining)

2.6 Aperture

An aperture represents one hydrological (or stochastic) realization used in the SDDP backward pass. Each aperture references a source scenario whose affluent data (flow bounds) are applied to the cloned phase LP before solving. Apertures allow the backward pass to sample a different set of scenarios than the forward pass.

When no aperture_array is provided, the backward pass builds a plain Benders cut from the forward solution (no apertures), unless sddp_options.apertures lists UIDs: then one aperture is synthesised per listed UID from the first scenarios. sddp_options.num_apertures selects how many entries of each phase's Phase.apertures list are used: unset = all, 0 = none, N = the first N.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoOptional name
activeboolean—NoWhether the aperture is active
source_scenariointeger—YesUID of the scenario whose affluent data to use
probability_factornumberp.u.NoProbability weight (normalised to sum 1 across active apertures; default: 1)

Note: When aperture_directory is set in sddp_options, the source scenario is first looked up in that directory; if not found there, it falls back to the regular input_directory.

Example

{
  "simulation": {
    "block_array": [
      {"uid": 1, "duration": 1},
      {"uid": 2, "duration": 2}
    ],
    "stage_array": [
      {"uid": 1, "first_block": 0, "count_block": 1, "active": 1},
      {"uid": 2, "first_block": 1, "count_block": 1, "active": 1}
    ],
    "scenario_array": [
      {"uid": 1, "probability_factor": 1}
    ],
    "phase_array": [
      {"uid": 1, "first_stage": 0, "count_stage": 2}
    ],
    "scene_array": [
      {"uid": 1, "first_scenario": 0, "count_scenario": 1}
    ],
    "aperture_array": [
      {"uid": 1, "source_scenario": 1, "probability_factor": 0.5},
      {"uid": 2, "source_scenario": 2, "probability_factor": 0.5}
    ]
  }
}

3. System

The system section defines all physical components of the power system.

3.1 Bus

An electrical bus (node) in the network.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesBus name
activeboolean—NoWhether the bus is active
voltagenumberkVNoNominal voltage level
reference_thetanumberradNoFixed voltage angle (reference bus: set to 0)
use_kirchhoffboolean—NoOverride global Kirchhoff setting for this bus
vmin_pu / vmax_punumberp.u.NoLinDistFlow voltage limits (unset = none)
reference_voltagenumberp.u.NoLinDistFlow fixed voltage of the slack bus (1.0 when only reference_theta is set)
shunt_qnumberMVArNoLinDistFlow shunt injection at 1 p.u. (shunt_q·V²; capacitive > 0: line charging, capacitor banks)

3.2 Generator

A generation unit connected to a bus.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesGenerator name
businteger|string—YesConnected bus UID or name
activeboolean—NoWhether the generator is active
pminnumber|array|stringMWNoMinimum active power output
pmin_fcostnumber|array|string$/MWhNoMakes pmin soft: generation + unserved ≥ pmin, the slack priced at this cost (unset = hard pmin)
pmaxnumber|array|stringMWNoMaximum active power output
gcostnumber|array|string$/MWhNoVariable generation cost
lossfactornumber|array|stringp.u.NoNetwork loss factor
capacitynumber|array|stringMWNoInstalled capacity
expcapnumber|array|stringMWNoCapacity added per expansion module
expmodnumber|array|string—NoMaximum number of expansion modules
capmaxnumber|array|stringMWNoAbsolute maximum capacity
annual_capcostnumber|array|string$/MW-yearNoAnnualized investment cost
annual_deratingnumber|array|stringp.u./yearNoAnnual capacity derating factor
overnight_capcostnumber|array|string$/MWNoOvernight investment cost, used only when annual_capcost is unset: the LP charges overnight_capcost × CRF(wacc, economic_life) per MW-year (investment economics)
economic_lifenumber|array|stringyearsNoLife of the annuity of overnight_capcost (unset: perpetuity, CRF = wacc)
waccnumber|array|stringp.u./yearNoPrivate discount rate of THIS candidate's annuity (WACC / hurdle rate). Unset: the social annual_discount_rate. The stage discount factors always use the social rate
fixed_om_costnumber|array|string$/MW-yearNoFixed O&M of the expansion capacity, charged on the capacity built next to the annuity, with the same stage discounting; unset = none (investment economics)
emission_ratenumber|array|stringtCO₂/MWhNoLegacy CO₂ emission rate (scalar only), folded into a co2 EmissionSource. Prefer emissions or emission_source_array; see Emissions
emissionsarray—NoInline EmissionSource rows (zone, emission, rate, upstream_rate) for this generator
emission_capturesarray—NoCCS per pollutant: emission, capture fraction rate [p.u.], cost [$/t captured]
qmin / qmaxnumberMVArNoLinDistFlow reactive output range (makes Q a variable)
power_factornumberp.u.NoLinDistFlow fixed signed power factor Q = sign·tan(acos\|pf\|)·P (negative = absorbing); ignored with qmin/qmax
initial_generationnumberMWNoDispatch at t = 0⁻ (PLEXOS Initial Generation). Value of generation_prev at the first block of the horizon, so ramp user constraints gen − gen_prev ≤ R see the real starting point. Also the native Commitment ramp p_prev there when initial_power is unset. Never applied past the horizon start. Unset → 0 (cold start)
cogen_modestring—NoCogeneration tag: "dispatched" or "must_run" (unset = not a cogeneration unit)
outage_fractionnumber|array|stringp.u.NoMaintenance outage schedule f ∈ [0, 1] per (stage, block): pmin, pmax and the expansion capacity row scale by 1 − f (for a monthly block, f = d/D days out). Reserve reaction: model_options.outage_reserve_mode. Written back as Generator/outage_fraction. Unset = no outage
uininumber—NoUnits online at t = 0 (informational, written by plexos2gtopt; commitment state comes from Commitment.initial_status)

Note: Fields that accept number|array|string can be a numeric constant, an inline array (indexed by [stage][block]), or a filename referencing an external Parquet/CSV file in input_directory/Generator/.

3.3 Demand

An electrical demand (load) connected to a bus.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesDemand name
businteger|string—YesConnected bus UID or name
activeboolean—NoWhether the demand is active
lmaxnumber|array|stringMWNoMaximum served load
lminnumber|array|stringMWNoMinimum served load per (stage, block)
lossfactornumber|array|stringp.u.NoNetwork loss factor
fcostnumber|array|string$/MWhNoDemand curtailment cost; falls back to model_options.demand_fail_cost (default 1000). 0 = freely dispatchable load
fail_segmentsarray of objects—NoStepwise curtailment (VoLL) curve [{fraction, cost}, …]; overrides fcost (see below)
forcedboolean—NoWhen true, load is fixed at lmax (hard, non-sheddable demand; no curtailment)
eminnumber|array|stringMWhNoMinimum energy that must be served per stage
ecostnumber|array|string$/MWhNoEnergy-shortage cost
capacitynumber|array|stringMWNoInstalled capacity
expcapnumber|array|stringMWNoCapacity added per expansion module
expmodnumber|array|string—NoMaximum number of expansion modules
capmaxnumber|array|stringMWNoAbsolute maximum capacity
annual_capcostnumber|array|string$/MW-yearNoAnnualized investment cost
overnight_capcostnumber|array|string$/MWNoOvernight investment cost of an expandable demand (e.g. a desalination plant), used only when annual_capcost is unset: the LP charges overnight_capcost × CRF(wacc, economic_life) per MW-year (investment economics)
economic_lifenumber|array|stringyearsNoLife of the annuity of overnight_capcost (unset: perpetuity, CRF = wacc)
waccnumber|array|stringp.u./yearNoRate of the annuity; unset = simulation.annual_discount_rate (a public project at the social rate)
fixed_om_costnumber|array|string$/MW-yearNoFixed O&M of the expansion capacity, charged on the capacity built next to the annuity, with the same stage discounting; unset = none (investment economics)
power_factornumberp.u.NoLinDistFlow signed power factor of the served load (negative = leading); unset = unity
annual_deratingnumber|array|stringp.u./yearNoAnnual capacity derating factor

Stepwise failure curve (fail_segments)

fail_segments is an ordered list of curtailment segments. Each object has fraction (share of the block demand lmax, 0 < fraction ≤ 1) and cost ($/MWh; scalar, per-stage array, or a filename under input_directory/Demand/). Only the last segment may omit fraction: it is then open and covers the residual 1 − Σ fraction. When every fraction is explicit and they sum to less than 1, the uncovered remainder is firm load (it cannot be curtailed — PLP FALLA_* semantics).

{"uid": 1, "name": "d1", "bus": "b1", "lmax": 120,
 "fail_segments": [
   {"fraction": 0.05, "cost": 492.4},
   {"fraction": 0.05, "cost": 541.7},
   {"fraction": 0.10, "cost": 648.6},
   {"cost": 742.1}]}

Costs should be non-decreasing (a warning is issued otherwise). The LP adds one served-load column per segment (no extra rows); a single segment is identical to fcost. Precedence: forced > fail_segments

fcost > model_options.demand_fail_segments > model_options.demand_fail_cost. Outputs: Demand/fail_sol (total) plus Demand/fail_seg<k>_sol per segment (K ≥ 2). User constraints can reference demand('d1').fail (total curtailment) and demand('d1').load. A demand with K ≥ 2 segments cannot be the charge demand of a Converter nor carry a DemandProfile / demand CapacityProfile.

3.4 Line

A transmission line connecting two buses.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesLine name
bus_ainteger|string—YesSending-end (from) bus
bus_binteger|string—YesReceiving-end (to) bus
activeboolean—NoWhether the line is active
voltagenumber|array|stringkVNoNominal voltage level. Omit or set to 1.0 for per-unit mode
resistancenumber|array|stringΩ (p.u.)NoSeries resistance. Use Ω when voltage is in kV; p.u. when voltage is omitted
reactancenumber|array|stringΩ (p.u.)NoSeries reactance (DC power flow). Use Ω when voltage is in kV; p.u. when voltage is omitted. Susceptance: \(B = V^2 / X\). Omit for a DC/HVDC link (no KVL). 0 or \|X/V²\| below dc_line_reactance_threshold is a zero-impedance tie forcing equal bus angles (unless tiny_reactance_mode = "dc")
lossfactornumber|array|stringp.u.NoLumped loss factor
line_losses_modestring—NoLoss model of this line (none, linear, piecewise, bidirectional, adaptive, dynamic, piecewise_direct, tangent_signed_flow); unset inherits model_options.line_losses_mode
loss_segmentsinteger—NoPiecewise-linear segments of the quadratic loss curve; unset inherits model_options.loss_segments (1)
loss_pwl_layoutstring—NoSegment layout of the loss approximation: uniform (default), equal_error, tangent, midpoint
loss_allocation_modestring—NoBus that carries the loss: receiver (default), sender, or split (half at each end)
loss_envelopenumber|array|stringMWNoFlow range over which the loss segments are spread (e.g. the original rating when tmax is lifted). Unset = max(tmax_ab, tmax_ba). It never caps the flow: between loss_envelope and tmax losses stay quadratic and are priced by loss_overflow_cost
loss_secant_segmentsinteger—Notangent_signed_flow only: secant segments of the loss chord (default 1); unset inherits model_options.loss_secant_segments
loss_use_sos2boolean—Notangent_signed_flow only: SOS2 fill order on the secant segments (needs a MIP solver; default false)
use_line_lossesboolean—NoDeprecated — use line_losses_mode (false = none)
loss_cost_epsnumber$/MWhNoPer-line price on the line-loss columns; overrides model_options.loss_cost_eps (default 0.1). Set ≥ ½·|π_a + π_b| on corridors where the end-bus prices can sum negative to block loss arbitrage; 0 disables. Inert for none/linear/piecewise_direct
loss_flow_abs_costnumber$/MWhNoPer-line tangent_signed_flow abs-flow pin; overrides model_options.loss_flow_abs_cost (default 0.001). Only when the line's loss_cost_eps > 0; 0 disables
loss_overflow_costnumber$/MWhNoPer-line overflow-tier price; overrides model_options.loss_overflow_cost (default: the case's demand_fail_cost). Charged per MWh of loss carried between loss_envelope and tmax; 0 disables. Inert when tmax ≤ loss_envelope
line_thermal_limit_modestring—NoHow the thermal limit treats losses: flow (flow variable only), sending (sending-end power f + a·ℓ, a = sending-bus loss share of loss_allocation_mode) or full (f + ℓ ≤ tmax). Also folded into the capacity rows of expandable lines. Unset inherits model_options.line_thermal_limit_mode
flow_directionstring—NoAllowed flow direction: both (default), ab / ba (one-way: the reverse flow, loss and segment columns are not built; the reverse tmax is ignored) or auto (apply the radial certificate of model_options.line_direction_mode = structural to this line even when the global mode is off). An explicit ab/ba is a modelling decision: it is applied as given, even on a meshed line
typestring—NoElement type tag; use "transformer" for transformers
tap_rationumber|array|stringp.u.NoOff-nominal tap ratio τ (default 1.0). A tap-changing transformer with τ ≠ 1 has effective susceptance \(B/\tau\). Supports per-stage schedule.
phase_shift_degnumber|array|stringdegreesNoPhase-shift angle φ in degrees (default 0). Models a Phase-Shifting Transformer (PST); shifts the Kirchhoff constraint RHS by \(-\sigma_\theta \cdot \phi_{\text{rad}}\).
tap_ratio_min / tap_ratio_maxnumberp.u.NoLinDistFlow optimised (continuous) tap range \([\underline{t},\overline{t}]\); one side unset → tap_ratio; ignored by the DC model (§5.6 bis)
tmax_abnumber|array|stringMWNoMax flow in A→B direction
tmax_banumber|array|stringMWNoMax flow in B→A direction
max_flow, min_flownumber|array|stringMWNoPLEXOS Max Flow / Min Flow: aliases of tmax_ab and -tmax_ba (min_flow is signed, ≤ 0). Give either the alias or tmax_*, not both. Never replaced by a DLR rating. See Line limits
max_rating, min_ratingnumber|array|stringMWNoPLEXOS Max Rating / Min Rating (normal rating; min_rating signed, ≤ 0). The limit is min with every other set field
overload_max_rating, overload_min_ratingnumber|array|stringMWNoPLEXOS Overload Max/Min Rating (emergency rating; min signed). The hard cap when overload_penalty / limit_penalty > 0 in the block, with the normal rating as the priced threshold; unused otherwise
outage_max_rating, outage_min_ratingnumber|array|stringMWNoPLEXOS Outage Max/Min Rating (min signed): the rating in blocks with units_out > 0 (maintenance derate); never replaced by a DLR rating
units_outnumber|array|string—NoPLEXOS Units Out: > 0 applies outage_*_rating in that block
limit_penaltynumber|array|string$/MWhNoPLEXOS Limit Penalty: alias of overload_penalty (give one)
conductor_rating_ab, conductor_rating_banumber|array|stringMWNoConductor (thermal) rating per direction; a dlr rating replaces it by default
equipment_rating_ab, equipment_rating_banumber|array|stringMWNoSeries-equipment rating per direction (current transformers/TTCC, series capacitors/CCSS, wave traps, breakers); never weather-scaled
security_limit_ab, security_limit_banumber|array|stringMWNoSecurity / operational limit per direction (voltage or angle stability, N-1 transfer limits); never weather-scaled
tmax_normal_abnumber|array|stringMWNoSoft (normal) A→B threshold. With overload_penalty > 0, flow above it (up to tmax_ab) pays the penalty; ignored when unset or ≥ tmax_ab
tmax_normal_banumber|array|stringMWNoSoft (normal) B→A threshold (same semantics as tmax_normal_ab)
overload_penaltynumber|array|string$/MWhNoPrice per MWh of flow above tmax_normal_* (per-(stage, block), weighted by block duration like any energy cost). 0 / unset: no overload columns
overload_slack_boundstring—NoUpper bound of the overload slack: thermal (default: min(hard − normal, max_overload_ratio × normal) — on DLR lines the IEEE 738 emergency minus normal rating; ratio alone without a finite hard cap), ratio (max_overload_ratio × normal) or unbounded. Unset inherits model_options.overload_slack_bound
max_overload_rationumber—NoOverload headroom as a fraction of the normal threshold (default 1.5: slack ≤ +150 %, flow ≤ 2.5 × normal). Unset inherits model_options.max_overload_ratio
in_serviceinteger|array|string—NoPer-(stage, block) in-service flag (PLEXOS Units): 0 opens the line for that block — no flow column, loss, balance or KVL contribution. Default: in service
enforce_levelinteger—NoLegacy PLEXOS Enforce Limits (0/1/2). Kept for backward compatibility; a no-op — the flow cap is always enforced (express soft limits with tmax_normal_* + overload_penalty)
dlrobject—NoDynamic line rating through critical spans — see Dynamic line rating
tcostnumber|array|string$/MWhNoVariable transmission cost
capacitynumber|array|stringMWNoInstalled capacity
expcapnumber|array|stringMWNoCapacity added per expansion module
expmodnumber|array|string—NoMaximum number of expansion modules
capmaxnumber|array|stringMWNoAbsolute maximum capacity
annual_capcostnumber|array|string$/MW-yearNoAnnualized investment cost
annual_deratingnumber|array|stringp.u./yearNoAnnual capacity derating factor
overnight_capcostnumber|array|string$/MWNoOvernight investment cost, used only when annual_capcost is unset: the LP charges overnight_capcost × CRF(wacc, economic_life) per MW-year (investment economics)
economic_lifenumber|array|stringyearsNoLife of the annuity of overnight_capcost (unset: perpetuity, CRF = wacc)
waccnumber|array|stringp.u./yearNoPrivate discount rate of THIS candidate's annuity (WACC / hurdle rate). Unset: the social annual_discount_rate. The stage discount factors always use the social rate
fixed_om_costnumber|array|string$/MW-yearNoFixed O&M of the expansion capacity, charged on the capacity built next to the annuity, with the same stage discounting; unset = none (investment economics)
integer_expmodboolean—NoBuild whole expansion modules only (integer expmod, MIP)

Line limits

Every limit field is optional. An unset field gives no limit; it is never read as 0. In each block and direction the line limit is the min over the fields that are set. With none set, the line is bounded only by capacity (unbounded without one), as before.

  • Directions. An unset B→A field does not copy the A→B value; this is the same convention as tmax_ba. Set both directions when the limit is symmetric.
  • Signs (PLEXOS). min_flow, min_rating, overload_min_rating and outage_min_rating are signed, as in PLEXOS: min_rating = -490 limits the B→A flow to 490 MW. Validation rejects a positive min_* value and a negative max_* value. The _ab / _ba fields are magnitudes (≥ 0).
  • Unset cells. In a schedule, a NaN cell (or a missing value in a file) means "unset in this block". An explicit 0 is a real limit of 0 MW.

PLEXOS ↔ gtopt.

PLEXOS (Line / Transformer)gtopt fieldNotes
Max Flow / Min Flowmax_flow / min_flowAliases of tmax_ab / -tmax_ba
Max Rating / Min Rating (Transformer: Rating)max_rating / min_ratingNormal rating
Overload Max Rating / Overload Min Rating (Transformer: Overload Rating)overload_max_rating / overload_min_ratingEmergency rating, used when the band is priced
Outage Max Rating / Outage Min Ratingoutage_max_rating / outage_min_ratingApplies where units_out > 0
Units Outunits_outMaintenance flag per block
Limit Penaltylimit_penaltyAlias of overload_penalty
Unitsin_service0 opens the line

Limit causes. A limit also has a cause, and the cause decides whether a dynamic line rating may replace it. The CEN ERST study gives each Chilean transmission limit a cause:

PartFieldsERST causes (examples)DLR
Conductorconductor_rating_ab / _baConductor (conductor heating)Replaced by the DLR rating (default when a conductor rating is set)
Equipmentequipment_rating_ab / _baTTCC (current transformers), CCSS (series capacitors), wave traps, breakersNever weather-scaled
Securitysecurity_limit_ab / _baEstabilidad de Tensión (voltage stability), angle stability, N-1 transfer limitsNever weather-scaled

A converter that knows the cause writes the classified field. One that does not writes max_rating (or max_flow). The fields combine freely, because the limit is always the min over the set fields.

One bound per direction, duals per part. Every part bounds the same loaded quantity, set by line_thermal_limit_mode: |f|, |f| + a·ℓ or |f| + ℓ. The min is carried by one flow-column bound, one thermal{p,n} row, or the DLR span row or bound. No row is added per part. The binding part is found by comparing values; on a tie the order is conductor (the DLR included), rating, outage, equipment, security, flow. The dual of that bound or row is written as Line/<part>{p,n}_dual: conductor, rating, outage, equipment, security or flowlimit (for example securityp_dual). These outputs are written only for lines that have a rating, outage or classified field. thermal{p,n}_dual and span_thermal_dual are unchanged. On these lines the loss segments are spread over the stage maximum of the limit, and the block limit is then applied as a bound or row RHS (as for a DLR rating). This keeps the segment widths from tying with the limit, a tie that would split the dual arbitrarily.

  • Expansion. On an expandable line, the installed capacity (the capacity rows) is the equipment that the investment adds. A DLR rating never replaces it.
  • PAMPL. Every field is a line.<field> parameter (for example line.max_rating, line.security_limit_ba); the signed min_* fields are returned as given. line.tmax_ba also resolves min_flow.
  • Interfaces (follow-up). PLEXOS Interface limits span several circuits, for example NPA–Polpaico at 2000 MW over two circuits. They are not modelled as line fields. Write them today as a user constraint on the sum of the circuit flows.

Dynamic line rating (DLR)

dlr limits the line flow, per block, by the thermal rating of its critical spans: the spans whose conductor temperature binds first (Matus et al. 2012, DOI 10.1109/TPWRD.2012.2185254; Open access: ResearchGate, PDF (Universidad de Chile)). One representative span is valid and common. Choosing the spans is a pre-processing step (Python tooling); gtopt only consumes the list.

For each span and block gtopt evaluates the IEEE Std 738 steady-state heat balance at the maximum conductor temperature from that block's weather, converts the ampacity to MW and limits the flow by the minimum over the spans (and the static tmax). Weather is exogenous data, so the rating is a per-block right-hand side: the LP stays linear. See formulation §5.5 Dynamic Line Rating.

"dlr": {
  "conductor": {"diameter": 0.02814, "r25": 7.283e-5, "r75": 8.688e-5,
                "emissivity": 0.8, "absorptivity": 0.8, "subconductors": 1},
  "tmax_conductor": 75,
  "tmax_conductor_emergency": 100,
  "voltage": 220,
  "span_mode": "min",
  "critical_spans": [
    {"uid": 101, "name": "s1", "azimuth": 35, "elevation": 420,
     "ambient_temperature": "dlr_ambient_temperature",
     "wind_speed": "dlr_wind_speed", "wind_direction": "dlr_wind_direction",
     "solar_irradiance": "dlr_solar_irradiance"},
    {"uid": 102, "name": "s2", "rating": "dlr_rating"}
  ]
}
Field (dlr.*)TypeUnitsDefaultDescription
conductor.diameternumberm—Conductor outside diameter (required for IEEE 738)
conductor.r25, conductor.r75numberΩ/m—AC resistance at 25 °C and 75 °C; R(T) is linear between them and extrapolated beyond
conductor.r20, conductor.alpha_r, conductor.ac_factornumberΩ/m, 1/K, ——, —, 1Alternative to r25/r75 (give one form, not both): R(T) = ac_factor · r20 · (1 + alpha_r·(T − 20))
conductor.emissivitynumber—0.8Emissivity ε ∈ [0, 1]
conductor.absorptivitynumber—0.8Solar absorptivity α ∈ [0, 1]
conductor.subconductorsinteger—1Conductors per phase bundle (multiplies the rating)
tmax_conductornumber°C75Normal maximum conductor temperature
tmax_conductor_emergencynumber°C—Emergency temperature. When set (and overload_penalty > 0 in the block) the emergency rating is the hard cap and the normal rating the soft overload_penalty threshold; the overload slack is bounded by min(emergency − normal, max_overload_ratio × normal) under the default overload_slack_bound = thermal. Emergency tiers are owner-defined in practice (long-term emergency 4–12 h, short-term ~15 min; ISO-NE PP7, NYISO)
voltagenumberkVLine.voltageVoltage of the A→MW conversion (must be in kV)
v_punumberp.u.1Operating voltage
power_factornumber—1Power factor (0, 1]
safety_factornumber—1η, multiplies the IEEE 738 rating (1 = off)
span_modestring—minmin: effective rating = min over spans; rows: one row pair per non-dominated span
use_emergencyboolean—truefalse drops the emergency tier (tmax_conductor_emergency, rating_emergency): the normal rating is the hard cap
low_wind_speednumberm/s0.5Below this speed the wind direction is ignored and low_wind_angle is used (0 disables the rule)
low_wind_anglenumberdeg45Attack angle of the low-wind rule, in [0, 90]
solar_modestring—ghighi: solar_irradiance is the global horizontal irradiance used directly as absorbed flux, q_s = α·S·D (conservative; same convention as the Python critical-span tooling); none: q_s = 0 and solar_irradiance becomes optional
limit_modestring—model_options.dlr_limit_mode; unset: replace with conductor_rating_*, else minreplace: the DLR rating replaces conductor_rating_* (without one: max_rating / min_rating) and tmax_normal_*; min: min(static, rating) in every block. Flow, outage, equipment and security limits apply in both
critical_spansarray——One or more spans (non-empty)
Field (critical_spans[k].*)TypeUnitsDefaultDescription
uidinteger—1000·line.uid + k (k 1-based)Span uid; keys the weather files and the per-span outputs, so it must be unique across the case
namestring—<line>_s<k>Span name
azimuthnumberdeg0Bearing of the span axis
elevationnumberm0Altitude above sea level (air density)
ambient_temperaturenumber|array|string°C—Per-(scenario, stage, block) ambient temperature
wind_speednumber|array|stringm/s—Wind speed (below low_wind_speed, default 0.5 m/s, the attack angle is low_wind_angle, default 45°)
wind_directionnumber|array|stringdeg—Wind bearing; attack angle φ = \|((dir − azimuth + 90) mod 180) − 90\|
solar_irradiancenumber|array|stringW/m²—Global horizontal irradiance (GHI), used as absorbed flux q_s = α·S·D (conservative; no sun-geometry model). Not needed under solar_mode = "none"
tmax_conductor, tmax_conductor_emergencynumber°Cdlr.*Per-span overrides
ratingnumber|array|stringMW—Precomputed normal rating; bypasses IEEE 738 and the weather fields (used verbatim — no η, v_pu or power factor)
rating_emergencynumber|array|stringMW—Precomputed emergency rating (requires rating)

The weather fields and rating are STB schedules: a scalar, a 3-D inline array [scenario][stage][block], or a file name resolved as input/Line/<name>.parquet (or .csv) in long layout with columns scenario, stage, block, uid, value, where uid is the span uid. One file per field can hold every span of the case.

References. The critical-span approach follows Matus et al., "Identification of Critical Spans for Monitoring Systems in Dynamic Thermal Rating", IEEE Trans. Power Delivery 27(2):1002–1009, 2012, DOI 10.1109/TPWRD.2012.2185254; Open access: ResearchGate, PDF (Universidad de Chile) (gtopt consumes the span list; selecting the spans is done outside gtopt). The ampacity follows the steady-state heat balance of IEEE Std 738-2012. See the formulation refs [9], [38].

Precomputed ratings are verbatim. A span rating / rating_emergency is used exactly as given (MW): safety_factor (η), v_pu, power_factor, subconductors and voltage apply only to ratings computed from weather with IEEE 738. Fold any margin into the schedule itself.

SDDP apertures. The DLR rating belongs to the scene (scenario): every backward-pass aperture of a phase reuses its scene's per-block ratings. Apertures represent hydrology; DLR weather does not vary per aperture.

Loss envelope. The loss PWL is never driven by the per-block DLR rating: it keeps the static tmax (or capacity), or loss_envelope when set. With neither tmax nor capacity the stage envelope 1.05 · max_b T̄_b stands in as the static cap and loss range. On lines that cannot be expanded, the range under limit_mode = "replace" is the larger of the static limit maximum and that envelope. The static limit maximum covers every set field, with the overload rating where one is given.

DLR vs static limits (limit_mode). The DLR rating is the conductor's thermal capacity. It replaces the conductor rating, but never another part (see Line limits):

  • Line with conductor_rating_*. The default is replace. The DLR rating replaces the conductor rating, and the limit is the min of the DLR rating and the other set fields (equipment, security, rating, outage, flow). You no longer need to inflate tmax as a guard.
  • Line without a conductor rating. The default is min: min(static, DLR), which is the original min(tmax, DLR). An explicit replace (dlr.limit_mode or model_options.dlr_limit_mode) replaces max_rating / min_rating instead. max_flow / tmax is never replaced.
  • Maintenance derate. Use outage_max_rating with units_out. It always applies, so min(DLR, outage) holds in the maintenance blocks. in_service = 0 opens the line.

Under replace the static tmax_normal_* (a thermal rating) is ignored. When the emergency tier is active, the DLR normal rating sets the overload band. On expandable lines the installed-capacity rows always stay in place. When the DLR rating exceeds the static limit, the loss PWL is stretched to the DLR envelope.

Thermal-limit mode. The DLR rating is a thermal limit like tmax and follows the same line_thermal_limit_mode (per line, else model_options.line_thermal_limit_mode), in both directions, both span modes, the emergency tier and precomputed ratings: flow caps |f| ≤ T (no extra row: span_mode = min only tightens the flow-column bound), sending caps |f| + a·ℓ ≤ T (a = sending-bus loss share) and full caps |f| + ℓ ≤ T (min lowers the RHS of the existing thermalp / thermaln rows, no extra row). line_thermal_limit_mode = flow is the flow-only DLR. To audit a run, take ℓ from Line/loss_sol, which is already the line's total loss (lossp + lossn); Line/lossn_sol is only its B→A part, so adding it to loss_sol counts a reverse-direction loss twice.

Outputs (Line/…): dlr_rating_sol (effective normal rating, A→B, the remaining static cap included: a security or equipment limit, an outage rating, or the static rating under limit_mode = "min"), dlr_rating_emergency_sol (emergency tier), critical_span_sol (uid of the binding span; -1 when a static cap is lower) and span_thermal_dual (per-span rating dual ∂obj/∂T_k, keyed by the span uid; same unfolding as the other *_dual outputs).

Validation rejects negative or out-of-range parameters, an empty critical_spans, a span with neither the four weather fields nor rating, weather without conductor or a kV voltage, inline arrays whose shape is not [scenario][stage][block], duplicate span uids, and an unknown span_mode; it warns when the line is out of service (in_service = 0) in every block.

3.5 Battery

A battery energy storage system (BESS).

Standalone battery (unified definition)

When the optional bus field is set (without source_generator), the system auto-generates a discharge Generator, a charge Demand, and a linking Converter during preprocessing. Both charge and discharge connect to the same external bus. Only a single Battery element is needed — no separate Converter, Generator, or Demand definitions required.

{
  "uid": 1, "name": "bess1",
  "bus": 3,
  "input_efficiency": 0.95, "output_efficiency": 0.95,
  "emin": 0, "emax": 200,
  "pmax_charge": 60, "pmax_discharge": 60,
  "gcost": 0,
  "capacity": 200
}

Generation-coupled battery (hybrid / behind-the-meter)

When both bus and source_generator are set, the battery operates in generation-coupled mode: the referenced generator directly charges the battery through an auto-created internal bus. This models a solar or wind plant that sits "behind" the battery (e.g. a DC-coupled or AC-coupled hybrid system).

System::expand_batteries() will:

  • Create an internal bus (name = <battery.name>_int_bus)
  • Connect the discharge Generator to the external bus
  • Connect the charge Demand to the internal bus
  • Rewire the source generator to the internal bus

The source_generator value is the UID or name of a Generator element already defined in generator_array. Its own bus field is overwritten with the internal bus.

{
  "uid": 1, "name": "bess1",
  "bus": 3,
  "source_generator": "solar1",
  "input_efficiency": 0.95, "output_efficiency": 0.95,
  "emin": 0, "emax": 200,
  "pmax_charge": 60, "pmax_discharge": 60,
  "gcost": 0,
  "capacity": 200
}

Traditional definition

Without the bus field, a separate Converter, Generator, and Demand must be defined manually (see §3.6 Converter).

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesBattery name
activeboolean—NoWhether the battery is active; a per-stage vector on a state-carrying battery must be one contiguous active period (see State-carrying storage activation)
businteger|string—NoBus connection (enables unified / coupled definition)
source_generatorinteger|string—NoSource generator for generation-coupled mode (battery name or UID)
input_efficiencynumber|array|stringp.u.NoCharging efficiency
output_efficiencynumber|array|stringp.u.NoDischarging efficiency
annual_standing_lossnumber|array|stringp.u./yearNoAnnual self-discharge rate (linear: hourly drain = value/8760). Default when absent: 0.48 (4 %/month) — see Battery self-discharge default
eminnumber|array|stringMWhNoMinimum state of charge
emaxnumber|array|stringMWhNoMaximum state of charge
ecostnumber|array|string$/MWhNoStorage usage cost (penalty)
eininumberMWhNoInitial state of charge
efinnumberMWhNoTerminal state of charge
efin_costnumber$/MWhNoPenalty per MWh of efin shortfall; makes efin soft (see the reservoir note on terminal targets and SDDP apertures)
pmax_chargenumber|array|stringMWNoMax charging power (unified definition)
pmax_dischargenumber|array|stringMWNoMax discharging power (unified definition)
pmin_chargenumber|array|stringMWNoMin charging power: hard floor every block, or the when-charging floor with commitment
pmin_dischargenumber|array|stringMWNoMin discharging power: hard floor every block (Generator.pmin), or the when-discharging floor (Commitment.pmin) with commitment
commitmentboolean—NoGate pmin_charge / pmin_discharge with per-block charge / discharge mode binaries (MIP). See formulation §5.8 Charge / Discharge Rate Floors
exclusive_charge_dischargeboolean—NoWith commitment: charge/discharge exclusivity constraint u_charge + u_discharge ≤ 1 per block. Default when absent: true; false allows both modes in one block. Ignored without commitment (warning if true)
gcostnumber|array|string$/MWhNoDischarge generation cost (unified definition)
capacitynumber|array|stringMWhNoInstalled energy capacity
expcapnumber|array|stringMWhNoEnergy capacity per expansion module
expmodnumber|array|string—NoMaximum number of expansion modules
capmaxnumber|array|stringMWhNoAbsolute maximum energy capacity
annual_capcostnumber|array|string$/MWh-yearNoAnnualized investment cost
annual_deratingnumber|array|stringp.u./yearNoAnnual capacity derating factor
overnight_capcostnumber|array|string$/MWhNoOvernight investment cost, used only when annual_capcost is unset: the LP charges overnight_capcost × CRF(wacc, economic_life) per MWh-year (investment economics)
economic_lifenumber|array|stringyearsNoLife of the annuity of overnight_capcost (unset: perpetuity, CRF = wacc)
waccnumber|array|stringp.u./yearNoPrivate discount rate of THIS candidate's annuity (WACC / hurdle rate). Unset: the social annual_discount_rate. The stage discount factors always use the social rate
fixed_om_costnumber|array|string$/MWh-yearNoFixed O&M of the expansion capacity, charged on the capacity built next to the annuity, with the same stage discounting; unset = none (investment economics)
power_capacitynumber|array|stringMWNoInstalled power (charge + discharge per block ≤ installed power)
power_expcapnumber|array|stringMWNoPower per expansion module
power_expmodnumber|array|string—NoMaximum number of power modules
power_capmaxnumber|array|stringMWNoAbsolute maximum power. Set pmax_charge / pmax_discharge at least this high on a candidate battery
power_annual_capcostnumber|array|string$/MW-yearNoAnnualized investment cost of power
power_annual_deratingnumber|array|stringp.u./yearNoAnnual power derating factor
power_overnight_capcostnumber|array|string$/MWNoOvernight cost of power; annuity at the battery's wacc / economic_life when power_annual_capcost is unset
power_fixed_om_costnumber|array|string$/MW-yearNoFixed O&M of expansion power, forwarded to the converter (fixed_om_cost)
energy_power_rationumberhNoFixed storage duration: installed energy = ratio × installed power, so both axes are built together. Unset = energy and power expand independently
integer_expmodboolean—NoBuild whole expansion modules only (MIP), on the energy axis and, when the power axis is expandable, on the converter's power modules too
max_cycles_daynumbercycles/dayNoHard daily throughput limit Σ discharge·Δt ≤ N · capacity per day (PLEXOS Max Cycles Day); a constraint, not a cost
typestring—NoOptional battery type tag (metadata, e.g. "lithium", "flow")
soft_eminnumber|array|stringMWhNoSoft minimum energy per stage (penalized slack below emin)
soft_emin_costnumber|array|string$/MWhNoPenalty cost per unit of soft_emin slack violation
use_state_variableboolean—NoEnable stage/phase coupling of the battery state variable
daily_cycleboolean—NoEnforce daily cycling (initial SoC equals final SoC each day). Default true; a state battery (carried across stages / phases) needs daily_cycle: false together with use_state_variable: true — use_state_variable alone has no effect (validation warning)
reserve_sustain_hoursnumberhNoNative BESS reserve rows: two-sided power headroom and SoC sufficiency for \(T\) hours (formulation §5.9)
reserve_discharge_creditboolean—NoCredit discharge in the down-reserve headroom (default false)
reserve_energy_usage_up / reserve_energy_usage_downnumberMWh/MW/hNoExpected reserve deployment energy charged to the SoC (replaces the CEN AUX CF_*_COMP; no bus term)
storage_integrationstring—NoPoint-stage storage integration of this battery (overrides model_options.battery_storage_integration; see storage_integration)

File-backed battery schedules

Any battery schedule may name a long-layout table instead of an inline value, e.g. "active": "act" reads <input_dir>/Battery/act.parquet (or .csv) rows stage, uid, value for the battery's own uid. A unified battery (one with bus) is expanded into <name>_gen, <name>_dem, <name>_conv and uc_<name>_gen; the schedules they inherit (active, pmax_discharge, discharge_cost, pmax_charge, pmin_charge, charge_cost, pmin_discharge) are rewritten to the reference "Battery@<field>#<battery uid>", so every synthesized element reads the battery's rows rather than its own class directory and uid. The general file-reference grammar is "<field>", "<Class>@<field>" and "<Class>@<field>#<uid>" (the last reads the rows of element <uid>). A file-backed charge_cost must still hold the negated value (it lands on the charge demand's fcost, as for an inline cost the expansion negates it).

Unserved-demand cost and hard demand

Every demand is soft by default: served load may fall below lmax and each unserved MWh costs the demand's fcost or, when fcost is unset, the global model_options.demand_fail_cost, which defaults to 1000 $/MWh when it is itself unset.

WantSet
Value of lost load for all demandsmodel_options.demand_fail_cost (default 1000)
Different cost for one demandDemand.fcost (scalar, per-(stage, block) array, or file)
Freely dispatchable load (no penalty, e.g. a charging sink or the demand linked to a Pump)Demand.fcost = 0 (or the global demand_fail_cost = 0)
Hard, non-sheddable demandDemand.forced = true (load fixed at lmax; the LP is infeasible if it cannot be served)

An explicit demand_fail_cost: 0 keeps its literal meaning (zero penalty, so unserved load is free) and gtopt warns when no demand carries its own fcost/ecost either. Before the 1000 $/MWh default existed, leaving demand_fail_cost unset behaved like 0; cases that relied on that must now set it to 0 explicitly. Converters always write an explicit value (e.g. plp2gtopt writes 0 because PLP prices curtailment per demand through its falla units).

State-carrying storage activation

A storage element that carries a state variable across stages / phases (use_state_variable true and daily_cycle false: reservoirs, LNG terminals, H2 / thermal / ammonia storage, volume rights by default; a battery only when set explicitly) may be commissioned once (inactive -> active) and retired once (active -> inactive): its per-stage active vector must read off* on* off*. At retirement the state is simply dropped (no link into the inactive stages or phases; an efin target in an inactive last stage does not apply). Switching it back on after a gap (on -> off -> on) is rejected by validation at the stage where it reactivates, because the dropped state would re-enter unlinked. For a cyclic store set use_state_variable: false or daily_cycle: true, or model the two periods as two elements.

Battery self-discharge default

A battery whose annual_standing_loss is absent self-discharges at 0.48 p.u./year = 4 %/month (0.04 × 12). gtopt uses the linear convention SoC[b] = SoC[b−1] · (1 − annual_standing_loss/8760 · Δt_b) + …, so the hourly drain is 0.48/8760 ≈ 5.48e-5 and a single 730 h block loses exactly 4 %.

The value is a conservative lithium-ion cell + BMS figure:

The default also penalises the LP degeneracy that lets a lossless battery cycle (charge/discharge zig-zag across blocks) at zero cost — but only when the replaced energy has a positive price. If the charging window is priced at exactly 0 $/MWh (free curtailed solar), zig-zag schedules still tie; give the zero-cost unit its physical VOM (even 0.5–2 $/MWh) or set a datasheet degradation cost in the battery's discharge_cost to break it. Same-block simultaneous charge + discharge is limited by the power envelope p_charge/pmax_charge + p_discharge/pmax_discharge ≤ 1 (on by default, model_options.battery_power_envelope; partial simultaneous operation inside it is still LP-feasible).

Rules:

  • An explicit annual_standing_loss (including 0) is always respected.
  • model_options.battery_annual_standing_loss changes the default for the whole case; 0 restores the legacy lossless behaviour (--set model_options.battery_annual_standing_loss=0).
  • Only Battery is affected — Reservoir, LngTerminal, and the other storages keep annual_standing_loss = 0 when unset. Converters write an explicit value for non-lithium storage emitted as a Battery (pumped hydro → 0), and plp2gtopt converts a nonzero PLP mloss [%/month] to −12·ln(1 − mloss/100).
  • gtopt logs once (INFO) how many batteries took the default.
  • Deprecated alias: the previous key annual_loss (on every storage element) and model_options.battery_annual_loss are still accepted and rewritten to annual_standing_loss / battery_annual_standing_loss, with a one-time deprecation warning. Setting both spellings on the same object is an error.

3.6 Converter

Links a battery to a discharge generator and a charge demand.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesConverter name
activeboolean—NoWhether the converter is active
batteryinteger|string—YesAssociated battery UID or name
generatorinteger|string—YesDischarge generator UID or name
demandinteger|string—YesCharge demand UID or name
conversion_ratenumber|array|stringMW/(MWh/h)NoElectrical output per unit stored energy withdrawn
capacitynumber|array|stringMWNoInstalled power capacity
expcapnumber|array|stringMWNoPower capacity per expansion module
expmodnumber|array|string—NoMaximum number of expansion modules
capmaxnumber|array|stringMWNoAbsolute maximum power capacity
annual_capcostnumber|array|string$/MW-yearNoAnnualized investment cost
annual_deratingnumber|array|stringp.u./yearNoAnnual capacity derating factor
overnight_capcostnumber|array|string$/MWNoOvernight investment cost, used only when annual_capcost is unset: the LP charges overnight_capcost × CRF(wacc, economic_life) per MW-year (investment economics)
economic_lifenumber|array|stringyearsNoLife of the annuity of overnight_capcost (unset: perpetuity, CRF = wacc)
waccnumber|array|stringp.u./yearNoPrivate discount rate of THIS candidate's annuity (WACC / hurdle rate). Unset: the social annual_discount_rate. The stage discount factors always use the social rate
fixed_om_costnumber|array|string$/MW-yearNoFixed O&M of the expansion capacity, charged on the capacity built next to the annuity, with the same stage discounting; unset = none (investment economics)
commitmentboolean—NoGate the charge demand / discharge generator bounds with per-block mode binaries (set from Battery.commitment)
exclusive_charge_dischargeboolean—NoWith commitment: add u_charge + u_discharge ≤ 1 per block (row charge_discharge_exclusive). Default true
energy_power_rationumberhNoFixed storage duration (set from Battery.energy_power_ratio)

3.7 Junction

A hydraulic node in the water network.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesJunction name
activeboolean—NoWhether the junction is active
drainboolean—NoIf true, excess water can leave the system through a drain column
drain_capacitynumberm³/sNoUpper bound on the drain flow (default +∞ = unbounded; PLP VertMax). Ignored unless drain is true
drain_costnumber$/(m³/s·h)NoCost of the drained flow, weighted per block like Waterway.fcost (default 0 = free; PLP CVert). Ignored unless drain is true

3.8 Waterway

A water channel connecting two junctions.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesWaterway name
activeboolean—NoWhether the waterway is active
junction_ainteger|string—YesUpstream junction UID or name
junction_binteger|string—YesDownstream junction UID or name
capacitynumber|array|stringm³/sNoMaximum flow capacity
lossfactornumber|array|stringp.u.NoTransit loss coefficient
fminnumber|array|stringm³/sNoMinimum required water flow
fmin_fcostnumber|array|string$/(m³/s·h)NoMakes fmin soft (flow + unserved ≥ fmin, e.g. an ecological flow under drought); unset = hard
fmaxnumber|array|stringm³/sNoMaximum allowed water flow

3.9 Reservoir

A water reservoir connected to a junction. Volume units: hm³ (1 hm³ = 10⁶ m³).

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesReservoir name
activeboolean—NoWhether the reservoir is active; a per-stage vector on a state-carrying reservoir must be one contiguous active period (see State-carrying storage activation)
junctioninteger|string—YesAssociated junction UID or name
spillway_capacitynumberm³/sNoMaximum uncontrolled spill capacity
spillway_costnumber$/(m³/s·h)NoCost per unit of spilled flow; setting it (0 = free) creates the spill column
spill_junctioninteger|string—NoJunction that receives the spilled water (unset = spill leaves the system)
capacitynumber|array|stringhm³NoTotal usable storage capacity
annual_standing_lossnumber|array|stringp.u./yearNoAnnual evaporation/seepage loss rate
eminnumber|array|stringhm³NoMinimum allowed stored volume
emaxnumber|array|stringhm³NoMaximum allowed stored volume
ecostnumber|array|string$/hm³NoWater value (shadow cost of stored water)
eininumberhm³NoInitial stored volume
efinnumberhm³NoTarget final stored volume
efin_costnumber$/hm³NoPenalty per hm³ of efin shortfall; makes efin soft (vol_end + slack >= efin, slack priced at efin_cost)
fminnumberm³/sNoMinimum net inflow
fmaxnumberm³/sNoMaximum net inflow
flow_conversion_ratenumberhm³/(m³/s·h)NoConverts m³/s × hours to hm³ (default: 0.0036)
scostnumber|array|string$/hm³NoShort-run water shortage cost
soft_eminnumber|array|stringhm³NoSoft minimum volume per stage (penalized slack below emin)
soft_emin_costnumber|array|string$/hm³NoPenalty cost per unit of soft_emin slack violation
use_state_variableboolean—NoEnable stage/phase coupling of the reservoir state variable
daily_cycleboolean—NoEnforce daily cycling (initial volume equals final volume each day)
storage_integrationstring—NoPoint-stage storage integration of this reservoir (overrides model_options.reservoir_storage_integration; default lg4_pos)

Terminal targets and SDDP apertures

A hard efin (no efin_cost) is a terminal constraint every SDDP backward-pass aperture must be able to meet from the forward trial state. When a dry aperture cannot, it is dropped and the expected cut is renormalised over the feasible apertures; if that repeats every iteration the LB is over a rescaled (wetter) distribution and gtopt does not report the run as converged (see SDDP §4.4, Infeasible apertures). A soft target (efin_cost) restores feasibility, with two caveats: a meaningful penalty may not be available (it must exceed the value of the stored water to bind, yet it enters the objective and the cuts), and the solution may then never reach efin — it pays the penalty instead, so the target is silently unmet. Check the efin slack in the output.

All reservoir costs are opt-in: gtopt adds none by default. A positive spillway_cost (or ecost, or a cost on every outflow path) makes the water value negative, down to −cost, while the reservoir spills: one more m³ in a full reservoir must be spilled at that cost. Set them only when the source model publishes the value; use spillway_cost = 0 for a free spillway.

3.10 Turbine

A hydro turbine linking a waterway to a generator.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesTurbine name
activeboolean—NoWhether the turbine is active
waterwayinteger|string—YesAssociated waterway UID or name
generatorinteger|string—YesAssociated generator UID or name
drainboolean—NoIf true, turbine can spill water without generating
conversion_ratenumber|array|stringMW·s/m³NoWater-to-power conversion factor
capacitynumber|array|stringMWNoMaximum turbine power output
main_reservoirinteger|string—NoReservoir whose volume drives the efficiency curve

3.11 Flow (Inflow)

A water inflow or outflow at a junction.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesFlow name
activeboolean—NoWhether the flow is active
directioninteger—No+1 = inflow, −1 = outflow
junctioninteger|string—YesAssociated junction UID or name
dischargenumber|array|stringm³/sYesWater discharge schedule

3.12 Reservoir Seepage (formerly Filtration)

Piecewise-linear seepage model from a waterway to an adjacent reservoir, representing water losses due to soil permeability (Darcy's law approximation). The seepage flow through the waterway is constrained to:

seepage [m³/s] = slope [m³/s/hm³] × avg_reservoir_volume [hm³] + constant [m³/s]

where avg_reservoir_volume = (eini + efin) / 2. This captures the hydrostatic-head dependence of seepage. Corresponds to PLP plpfilemb.dat.

When piecewise-linear segments are provided, the active segment is selected based on the reservoir's current volume (vini from the previous phase). The LP constraint coefficients (slope and RHS) are updated dynamically — the same mechanism used by Reservoir Production Factor for turbine conversion rates. If segments is empty, the static slope and constant fields are used as a simple linear model.

JSON array name: reservoir_seepage_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesSeepage element name
activeboolean—NoWhether the seepage element is active
waterwayinteger|string—YesSource waterway UID or name
reservoirinteger|string—YesReceiving reservoir UID or name
slopenumberm³/s / hm³NoDefault seepage slope (used when segments is empty)
constantnumberm³/sNoDefault constant seepage rate (used when segments is empty)
segmentsarray—NoPiecewise-linear concave segments (see below)

Each segment in the segments array describes one piece of the concave filtration envelope:

FieldTypeUnitsDescription
volumenumberhm³Volume breakpoint
slopenumberm³/s / hm³Seepage slope at this breakpoint
constantnumberm³/sSeepage rate at this breakpoint

The seepage rate at volume V is computed as the minimum over all segments: seepage(V) = min_i { constant_i + slope_i × (V − volume_i) }. This is analogous to the piecewise-linear evaluation used in Reservoir Production Factor.

Example with segments:

{
  "uid": 1,
  "name": "filt1",
  "waterway": "w1_2",
  "reservoir": "r1",
  "slope": 0.001,
  "constant": 1.0,
  "segments": [
    { "volume": 0.0, "slope": 0.0003, "constant": 0.5 },
    { "volume": 5000.0, "slope": 0.0001, "constant": 2.0 }
  ]
}

3.13 Reservoir Production Factor

Piecewise-linear turbine efficiency as a function of reservoir volume (hydraulic head). Models the PLP "rendimiento" concept: the turbine conversion rate varies with the current water level in the reservoir. Corresponds to PLP plpcenre.dat (Archivo de Rendimiento de Embalses).

When the SDDP solver runs, it updates the turbine's conversion-rate LP coefficient at each forward-pass iteration using the current reservoir volume. For the first iteration, the reservoir's eini value is used. If the LP solver does not support in-place coefficient modification (supports_set_coeff()), the static conversion_rate from the Turbine element is used unchanged.

JSON array name: reservoir_production_factor_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesProduction factor element name
activeboolean—NoWhether the element is active
turbineinteger|string—YesAssociated turbine UID or name
reservoirinteger|string—YesAssociated reservoir UID or name
mean_production_factornumberMW·s/m³NoFallback production factor (default: 1.0)
segmentsarray—NoPiecewise-linear concave segments

Each segment in the segments array has the following fields:

FieldTypeUnitsDescription
volumenumberhm³Volume breakpoint
slopenumberefficiency/hm³Slope at this breakpoint
constantnumberMW·s/m³Efficiency at this breakpoint (point-slope form)

The efficiency is computed as the minimum over all segments:

efficiency(V) = min_i { constant_i + slope_i × (V − volume_i) }

Segments should have slopes in decreasing order so the function forms a concave envelope. The result is clamped to zero (efficiency cannot be negative).

Example:

{
  "reservoir_production_factor_array": [
    {
      "uid": 1,
      "name": "eff_colbun",
      "turbine": "COLBUN",
      "reservoir": "COLBUN",
      "mean_production_factor": 1.53,
      "segments": [
        { "volume": 0.0, "slope": 0.0002294, "constant": 1.2558 },
        { "volume": 500.0, "slope": 0.0001, "constant": 1.53 }
      ]
    }
  ]
}

3.14 Reservoir Discharge Limit

Piecewise-linear volume-dependent discharge limit for reservoirs. This is a safety/environmental constraint that limits the hourly-average discharge as a function of the reservoir volume (e.g. to prevent landslides or excessive drawdown).

The constraint per stage is:

qeh ≤ slope × V_avg + intercept

where qeh is the stage-average hourly discharge [m³/s], V_avg is the average reservoir volume (eini + efin) / 2 [hm³], and slope/constant are from the active piecewise-linear segment.

Generalizes the PLP "Ralco" constraint (plpralco.dat).

JSON array name: reservoir_discharge_limit_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesDischarge limit element name
activeboolean—NoWhether the element is active
waterwayinteger|string—YesSource waterway UID or name
reservoirinteger|string—YesAssociated reservoir UID or name
segmentsarray—NoPiecewise-linear segments

Each segment has:

FieldTypeUnitsDescription
volumenumberhm³Volume breakpoint
slopenumberm³/s / hm³Discharge limit slope
interceptnumberm³/sDischarge limit intercept

3.15 Generator Profile

A time-varying capacity-factor profile for a generator.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesProfile name
activeboolean—NoWhether the profile is active
generatorinteger|string—YesAssociated generator UID or name
profilenumber|array|stringp.u.YesCapacity-factor profile (0–1)
scostnumber|array|string$/MWhNoShort-run generation cost override

3.16 Demand Profile

A time-varying load-shape profile for a demand element.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesProfile name
activeboolean—NoWhether the profile is active
demandinteger|string—YesAssociated demand UID or name
profilenumber|array|stringp.u.YesLoad-scaling profile (0–1)
scostnumber|array|string$/MWhNoShort-run load-shedding cost override

3.17 Reserve Zone

A spinning-reserve requirement zone.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesZone name
activeboolean—NoWhether the zone is active
urreqnumber|array|stringMWNoUp-reserve requirement
drreqnumber|array|stringMWNoDown-reserve requirement
urcostnumber|array|string$/MWNoUp-reserve shortage penalty
drcostnumber|array|string$/MWNoDown-reserve shortage penalty
urmin / drminnumber|array|stringMWNoRequirement floor (Min-Provision)
urreq_planes / drreq_planesarray of objects—NoDynamic requirement \(R \ge \max_k\) plane \(_k\); each object has alpha [MW], demand_coef [MW/MW], inertia_coef [MW/MWs], contingency_coef [MW/MW], flow_coef [MW/MW], all scalar|array|filename schedules
load_termstring—No"exogenous" (default: load is a parameter) or "endogenous_generation" (PLEXOS-compat, creates negative LMPs)
system_loadnumber|array|stringMWNoGiven plane load \(D\) (overrides the demand sum)
demand_load_factornumberp.u.No\(D\) = factor × Σ demand lmax (default 1.05: conservative, over-sizes rather than under-sizes the reserve; CEN PCP ratio 1.025–1.05; endogenous_generation default 1)
demandsarray—NoDemands summed into \(D\) (default: all but battery charge)
inertia_zoneinteger|string—NoInertiaZone whose provisions give the inertia term
inertia_termstring—NoPlane inertia \(I\): "commitment" (default, CEN B.1: \(\sum I_c u_c\) over the zone's provisions, \(I_c = \mathrm{pf}\cdot\min\)(provision_max, pmax); uncommitted units count only when forced on; with a relaxed Commitment it can price buses negative — validate_planning warns), "exogenous" (data: system_inertia, else the conservative must-run sum, with a warning; the remedy for that risk), "endogenous" (PLEXOS-compat \(\sum \mathrm{pf}\,r\), \(r \le p\); couples dispatch, can price buses negative). Only the CPF planes — an InertiaZone's own minimum stays commitment-based
system_inertianumber|array|stringMWsNoGiven plane inertia \(I\) for inertia_term: "exogenous" (missing blocks read 0, the most conservative value)
contingency_generatorsarray—NoUp contingency: \(C \ge p_g\) for each listed generator
contingency_demandsarray—NoDown contingency: \(C \ge\) load of each listed demand (e.g. bess_dem)
urcontingencies / drcontingenciesarray of objects—NoContingency candidates (PLEXOS *_Comparison): {name, generators, generator_coefs, demands, demand_coefs, lines, line_coefs, offset}, \(C \ge \sum a\,x + \mathrm{offset}\) (coefs default 1)
requirement_sensestring—No"ge" (default) or "eq": equality provision balance (PLEXOS *MinProvision Sense 0)
ursurplus_cost / drsurplus_costnumber|array|string$/MWNoSurplus penalty of an "eq" balance (no column when unset: provision pinned). Ignored with planes: \(R\) absorbs the excess (validate_planning warns)
contingency_includes_reserveboolean—No\(C \ge a(p + r)\): the lost unit's provision into this zone counts (default false, as PLEXOS)
flow_linesarray—NoLines whose signed flow sum is the flow_coef term. Couples dispatch into the requirement (the term enters the LMP spread; validate_planning warns). Decoupled alternative: an exogenous alpha schedule (expected flow or fixed MW contingency)

Example (CEN CPF+@10s, two of the twelve planes; see formulation §5.9):

{"uid": 1, "name": "cpf10s", "urcost": 5000,
 "urreq_planes": [
   {"alpha": 516.0, "demand_coef": -0.0366, "inertia_coef": -0.0123,
    "contingency_coef": 1.25},
   {"alpha": 219.16, "demand_coef": -0.02064, "inertia_coef": -0.003164,
    "contingency_coef": 0.928}],
 "demand_load_factor": 1.025, "inertia_zone": "sen",
 "contingency_generators": ["unit_a", "unit_b", "bess_gen"]}

Outputs (planes mode, ReserveZone/): urequirement_sol, the plane duals urplane<k>_dual, urplane_binding_sol, inertia_sol, and the native requirement credit reserve_credit_sol [$/MWh] (the LMP shift \(\ell \sum_k \delta^D_k \mu_k\) of the endogenous load term, the same at every bus; 0 with the exogenous default), credit_transfer_sol [$] (credit × generated energy) and, with flow_lines, flow_credit_sol (the extra LMP spread across the corridor).

A plane term whose support is missing (inertia_coef without an inertia source, contingency_coef without candidates, flow_coef without flow_lines) is an error under constraint_mode strict (both in validate_planning and when the LP is built) and a warning in normal mode, where the term is dropped; contingency_coef must be ≥ 0. Every dispatch-coupling channel is reported by validate_planning according to model_options.reserve_coupling (warn default, error, off).

The load term is exogenous by default so that a marginal MWh of demand never changes the requirement (no negative LMPs); see CEN Minuta GM-DPRO Nº05-2026 (https://www.coordinador.cl/wp-content/uploads/2026/06/Minuta_GM-DPRO_No05-2026_Modelacion_y_Asignacion_de_SSCC_CF-ISSCC2026.pdf).

Stepwise reserve demand curve (ORDC). There is no dedicated demand-curve element: a priced zone (urreq + urcost) is one ORDC step exactly — its requirement column \(0 \le s \le\) urreq costs \(-c\), i.e. the step's value, and the zone adds \(+c \cdot\) urreq as an objective constant so the reported objective is the shortage penalty. A concave ORDC with steps (width \(w_k\), price \(c_k\), decreasing) is therefore one zone per step, urreq \(= w_k\), urcost \(= c_k\), and one provision per eligible unit and step, all with shared_headroom. The objective equals the welfare form ( \(\text{cost} - \sum_k c_k s_k\)) plus the constant \(\sum_t \sum_k c_k w_k \Delta t\). sienna2gtopt reserves maps PowerSimulations' StepwiseCostReserve this way and is cross-checked against it (tools/test_sienna_vs_gtopt.py).

3.18 Reserve Provision

A generator's contribution to reserve zones.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesProvision name
activeboolean—NoWhether the provision is active
generatorinteger|string—YesAssociated generator UID or name
reserve_zonesstring—YesComma-separated reserve zone UIDs or names
urmaxnumber|array|stringMWNoMaximum up-reserve offer
drmaxnumber|array|stringMWNoMaximum down-reserve offer
ur_capacity_factornumber|array|stringp.u.NoUp-reserve capacity factor
dr_capacity_factornumber|array|stringp.u.NoDown-reserve capacity factor
ur_provision_factornumber|array|stringp.u.NoUp-reserve provision factor
dr_provision_factornumber|array|stringp.u.NoDown-reserve provision factor
urcostnumber|array|string$/MW·hNoUp-reserve direct provision cost (wear, regulation VOM; not the opportunity cost, which the LP prices). Must be ≥ 0
drcostnumber|array|string$/MW·hNoDown-reserve direct provision cost. Must be ≥ 0
ur_zone_factors / dr_zone_factorsarray of numbersp.u.NoPer-zone effectiveness factor, parallel to reserve_zones (default 1)
shared_headroomboolean—NoOne headroom row shared by all flagged provisions of the generator
offlineboolean—NoCold up reserve: no headroom row, \(r \le\) urmax·(1−u)
symmetricboolean—No\(r^{up} = r^{dn}\)
urmax_response / drmax_responsenumber|array|stringMWNoNative BESS only: cap on the discharge-side part (PLEXOS Max Response)
urmax_charge_response / drmax_charge_responsenumber|array|stringMWNoNative BESS only: cap on the charge-side part (PLEXOS Max Charge Response)
ur_energy_usage / dr_energy_usagenumber|array|stringMWh/MW/hNoNative BESS only: deployment energy of this provision charged to the SoC; overrides the Battery reserve_energy_usage_up/down
ur_partload_cost / dr_partload_costnumber|array|string$/MW·hNoSSCC known cost: part-load efficiency penalty of holding reserve, added to the provision cost (default off, ≥ 0)
ur_activation_factor / dr_activation_factornumber|array|stringMWh/MW·hNoSSCC: activation factor γ ∈ [0, 1], expected energy deployed per MW·h held (default 0)
ur_activation_cost / dr_activation_costnumber|array|string$/MWhNoSSCC known cost: cost of the deployed energy, adds γ·cost. Unset with γ set: generator SRMC (fuel + VOM) for up, 0 for down
ur_degradation_cost / dr_degradation_costnumber|array|string$/MWhNoSSCC known cost: degradation per MWh of deployed throughput (BESS), adds γ·cost (needs γ)

SSCC known variable costs. The provision column cost becomes urcost + ur_partload_cost + ur_activation_factor·(ur_activation_cost + ur_degradation_cost) (down alike); every term is off unless set. Each term is written separately as ReserveProvision/{up,dn}_{partload,activation,degradation}_cost_sol [$/h = adder × reserve held], so an SSCC cost analysis can split θ = known variable costs + derived maintenance delta (gtopt_usage theta). urcost then holds only the remaining direct (wear) cost. The part-load penalty can alternatively be represented by the generator's piecewise heat rate (heat_rate_segments): holding reserve keeps the unit on a costlier segment, which the LP prices without an adder — use one or the other, not both. The activation cost is an expected cost of deployment; the deployed energy itself is not dispatched in the LP.

Per-service costs on one unit (CPF / CSF / CTF). A unit that offers several services with different costs gets one provision per service (one zone each), all with shared_headroom: true. Each provision keeps its own urcost / drcost, and the services share one headroom pair \(p + \sum_s r^{up}_s \le \bar P(u)\), \(p - \sum_s r^{dn}_s \ge \underline P(u)\). A single provision listing several zones has ONE column per direction that counts towards all its zones at once (nested products, *_zone_factors) and its cost is paid once — use it for nested requirements of the same service, not for services priced apart. Negative urcost / drcost are rejected (validation and LP build).

"reserve_provision_array": [
  {"uid": 1, "name": "U1_cpf", "generator": "U1", "reserve_zones": ["cpf"],
   "urmax": 30, "ur_provision_factor": 1, "urcost": 2.1,
   "shared_headroom": true},
  {"uid": 2, "name": "U1_csf", "generator": "U1", "reserve_zones": ["csf"],
   "urmax": 60, "ur_provision_factor": 1, "urcost": 3.4,
   "shared_headroom": true}
]

3.18 bis Inertia Zone (commitment-dependent requirement)

Besides uid, name, active, requirement [MWs] and cost [$/MWs], an inertia_zone_array entry accepts:

FieldTypeUnitsRequiredDescription
requirement_creditsarray of objects—NoRelief steps {name, generators, units, credit, integer}: the requirement drops by credit [MWs]·y with units·y ≤ Σ u_g over generators; integer: true = exact step (binary y), default continuous as PLEXOS

Example (Norte Grande, 13 400 / 9 500 / 7 500 MWs for 0–1 / 2–3 / ≥ 4 Guacolda units):

{"uid": 2, "name": "norte_grande", "requirement": 13400,
 "requirement_credits": [
   {"generators": ["GUACOLDA_1", "GUACOLDA_2", "GUACOLDA_3",
                   "GUACOLDA_4", "GUACOLDA_5"],
    "units": 2, "credit": 3900, "integer": true},
   {"generators": ["GUACOLDA_1", "GUACOLDA_2", "GUACOLDA_3",
                   "GUACOLDA_4", "GUACOLDA_5"],
    "units": 4, "credit": 2000, "integer": true}]}

3.19 User Constraint

User-defined linear constraints applied to the LP formulation. See User Constraints for the full syntax reference and examples.

FieldTypeUnitRequiredDescription
uidinteger—YesUnique identifier
namestring—YesHuman-readable constraint name
activeboolean—NoActivation flag (default: true)
expressionstring—YesConstraint expression in AMPL-inspired syntax
descriptionstring—NoFree text
constraint_typestring—NoScaling hint: power (default), energy, raw, unitless
penaltynumber$/unitNoWhen > 0 the constraint is soft: violations are paid at this price (weighted by probability, discount and block duration like every cost)
penalty_classstring—NoPenalty unit: raw (default) or hydro_flow
rhsnumber|array|string—NoRight-hand side per stage and block; replaces the number at the end of expression where set
scopestring—NoRow granularity: block (default), stage, phase, global
active_stagesarray|string0/1NoPer-stage on/off ([0, 1, 1] or a file field); a stage with 0 gets no row. Combined with active
daily_sumboolean—NoOne row per 24 h day instead of one per block (with constraint_type: energy the terms are weighted by block duration)
directiveobject—NoTyped constraint-family directive (kind, …); see User Constraints
slack_namestring—NoName of the slack column of a soft constraint (LP labels only)

System-level fields:

FieldTypeDescription
user_constraint_arrayarrayInline array of UserConstraint objects
user_constraint_filestringPath to external JSON file with constraint array
user_constraint_filesarray of stringPaths to multiple external JSON files with constraint arrays

3.20 Flow Right

Water-right constraints on waterway flow (m³/s). See Irrigation Agreements for the full reference.

JSON array name: flow_right_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesFlow right name
activeboolean—NoActivation flag (default: true)
purposestring—NoMetadata tag (irrigation, generation, environmental, …)
junction_ainteger|string—NoSource junction (the served flow is withdrawn there)
directioninteger—NoSign in user-constraint flow balances: +1 supply, -1 withdrawal
fminnumber|array|stringm³/sNoHard lower bound on the served flow (default 0)
fmaxnumber|array|stringm³/sNoHard upper bound; unset = target when set, else fmin
targetnumber|array|stringm³/sNoSoft kink: below it fcost applies, above it uvalue (legacy alias discharge)
fcostnumber|array|string$/m³/s·hNoPenalty on the shortfall below target; unset = model_options.hydro_spill_cost on blocks with target > 0
uvaluenumber|array|string$/m³/s·hNoValue of flow above target (positive = benefit, negative = cost); formerly use_value
flow_modestring—Noper_block (default), stage_average (kink and costs on the stage-average flow), stage_uniform (one flow for the whole stage). Legacy use_average: true = stage_average
prioritynumber—NoAllocation priority (metadata for ordering)
bound_ruleobject—NoVolume- or month-dependent bound, see RightBoundRule
junction_binteger|string—NoReturn junction (carry mode and/or the opt-in bypass)
consumptiveboolean—Nofalse returns the served flow to junction_b (default: true)
use_bypassboolean—NoOpt-in pass-through arc junction_a → junction_b (default: off; implied by bypass_cost/bypass_fmax)
bypass_costnumber$/m³/s·hNoCost on the bypass arc (default: 0)
bypass_fmaxnumberm³/sNoCapacity of the bypass arc (default: unbounded)

Outputs (FlowRight/): flow_sol / flow_cost, fail_sol, excess_sol, flow_kink_dual, and — only when the bypass is built — bypass_sol / bypass_cost (the pass-through flow, needed to close the junction_a / junction_b balances from the output).

See irrigation-agreements.md for details and examples.

3.21 Volume Right

Water-right ledgers in volume (hm³): a "dummy reservoir" that tracks the accumulated entitlement, optionally carried between phases as an SDDP state. See Irrigation Agreements for the full reference.

JSON array name: volume_right_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesVolume right name
activeboolean—NoActivation flag (default: true)
purposestring—NoMetadata tag (irrigation, economy, …)
reservoirinteger|string—NoPhysical source reservoir: the right's extraction leaves its balance
right_reservoirinteger|string—NoParent VolumeRight whose balance receives this right's flow (with direction); must appear earlier in the array
directioninteger—No+1 supply / -1 withdrawal in the parent balance
emin / emaxnumber|array|stringhm³NoBounds on the accumulated volume
ecostnumber|array|string$/hm³NoHolding cost of the accumulated volume
eini / efinnumberhm³NoInitial volume / end-of-horizon minimum (efin_cost makes it soft)
soft_emin / soft_emin_costnumber|array|stringhm³, $/hm³NoSoft floor and its penalty
demandnumber|array|stringhm³/stageNoRequired delivery per stage; shortfall pays fail_cost
fmaxnumber|array|stringm³/sNoMaximum extraction rate
fail_costnumber$/hm³NoPenalty on unmet demand
saving_ratenumber|array|stringm³/sNoEconomy rights: maximum rate at which unused rights become savings
forfeitboolean—NoFree disposal of unused rights (keeps the state value ≥ 0); default false
flow_conversion_ratenumberhm³/(m³/s·h)NoDefault 0.0036
use_state_variableboolean—NoCarry the ledger between phases (SDDP state)
annual_standing_lossnumber|array|stringp.u./yearNoLedger decay
reset_monthstring—NoCalendar month at which the right is re-provisioned (to reset_value, else the bound_rule value, else emax)
reset_monthlyboolean—NoRe-provision at every new calendar month (not with a bound_rule provision)
reset_valuenumberhm³NoExplicit provision at reset (e.g. 0 for an up-counter)
reset_debit_rightinteger|string—NoRight whose incoming volume is subtracted from this right's provision at reset
reset_credit_rightinteger|string—NoRight whose remaining volume is credited at reset: provision = min(emax, own + credit)
prioritynumber—NoAllocation priority (metadata)
bound_ruleobject—NoSee RightBoundRule

Right bound rule

bound_rule (on FlowRight and VolumeRight) is a piecewise-linear function bound = min(cap, max(floor, constant_k + slope_k · x)) over segments {volume, slope, constant} sorted by their breakpoint volume. The input x depends on axis:

FieldDefaultDescription
axisreservoir_volumereservoir_volume (stage-start volume of reservoir) or stage_month (calendar month of the stage; needs stage months)
reservoir—Reservoir whose volume drives the rule (required for reservoir_volume)
segments[]Breakpoints {volume, slope, constant}; empty = no effect
capunsetUpper cap of the computed bound
floor0Lower floor of the computed bound

Rules are re-evaluated in update_lp each SDDP iteration from the stage-start volume. The agreements' coupling rows are user constraints, usually loaded from PAMPL files that use named sets and state(var) (see User Constraints).

See irrigation-agreements.md for details and examples.

3.22 User Parameter

Named scalar parameters usable in user constraint expressions.

JSON array name: user_param_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesParameter name (used in constraint expressions)
valuenumber|array|string—YesParameter value (per block/stage/scenario schedule)

3.23 Commitment

Unit commitment parameters for a generator. Each entry links to exactly one generator and enables binary on/off scheduling with startup/shutdown costs, ramp constraints, and minimum up/down times on stages with chronological: true. On a non-chronological stage the same element uses the per-block formulation (status u per block, p ≤ Pmax·u, p ≥ pmin·u, no-load cost per block; startup / shutdown / ramp / min up-down data ignored). The deprecated simple_commitment_array (dispatch_pmin → pmin) is read as Commitments.

Full documentation: See Unit Commitment Guide for the mathematical formulation, worked examples, and advanced features.

JSON array name: commitment_array

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—NoHuman-readable name
activeboolean—NoWhether this commitment is active (default: true)
generatorinteger|string—YesForeign key to Generator (uid or name)
startup_costnumber|array|string$/startNoCost per startup event
shutdown_costnumber|array|string$/stopNoCost per shutdown event
noload_costnumber$/hrNoFixed hourly cost when committed
startup_wear_costnumber|array|string$/startNoWear part of one start, kept apart from startup_cost (output Commitment/startup_wear_cost); >= 0. Default off
wear_hour_costnumber|array|string$/hNoOperation wear a per committed hour (term a·u); >= 0. Default off
wear_load_costnumber|array|string$/MWhNoOperation wear b per MWh above the committed floor (term b·(p − Pmin·u)), any sign (b < 0 = low-load penalty); a + b·(Pmax − Pmin) must be >= 0. Output Commitment/operation_wear_cost ($/h). Default off
pminnumber|array|stringMWNoMinimum stable level while committed (p ≥ pmin·u), per stage and block. Unset: the generator's own lower bound. Generator.pmin stays an unconditional floor
noload_fuelnumberfuel unit/hNoNo-load fuel burn while committed (PLEXOS Heat Rate Base); counted in Fuel offtake and fuel-basis emissions (noload_fuel · u · Δt), not re-priced (cost stays in noload_cost)
min_up_timenumberhoursNoMinimum online duration after startup
min_down_timenumberhoursNoMinimum offline duration after shutdown
ramp_upnumberMW/hrNoNormal ramp-up rate
ramp_downnumberMW/hrNoNormal ramp-down rate
startup_rampnumberMWNoMax output in startup block (default: Pmax)
shutdown_rampnumberMWNoMax output in shutdown block (default: Pmax)
initial_statusnumber—NoInitial state: 1.0 = online, 0.0 = offline
initial_hoursnumberhoursNoHours in current state at t=0
relaxboolean—NoLP relaxation: u,v,w ∈ [0,1] instead of {0,1}
must_runboolean—NoForce u = 1 at all times
transition_integralitystring—NoStartup / shutdown integrality for this unit: auto (binary), continuous, binary; unset = model_options.transition_integrality (default auto)
startup_tier_integralitystring—NoHot / warm / cold selector integrality: continuous or integer; unset = model_options.startup_tier_integrality (default continuous)
fast_startboolean—NoFast-start unit for pricing_mode = "fast_start" (unset = auto: min up and min down ≤ fast_start_max_hours)
commitment_periodnumber | "auto"hoursNoCoarser binary variable resolution. Periods are unions of whole cells (blocks; quadrature cells on Stage.sampling = "point" stages): cell k joins period ⌊mid_k/P⌋, so a boundary snaps to the nearer cell end. "auto": P = max(block resolution, ½·min(min_up_time, min_down_time))
commitment_gridstring—No"block" (one status per block/cell) or "overlay" (per commitment_period). Default: overlay iff commitment_period is set. Point stages: default = uniform grid of max(commitment_period, 1 h) by node time; "block" / "cells" keep the previous per-node / quadrature-cell grids
commitment_breaksnumber[]hNoDaily (non-uniform) commitment grid: cell boundaries in hours of the day, [0, 24), strictly increasing, at least one; the last cell wraps around midnight. E.g. [3.5, 7.5, 10.5, 14.5, 17.5, 23.5] = 23:30–03:30, 03:30–07:30, 07:30–10:30, 10:30–14:30, 14:30–17:30, 17:30–23:30. Nodes (point stages: Block.time; block stages: the block midpoint) join the cell of their clock time Stage.start_hour + t, half-open [a, b); v / w only at cell boundaries; min up / down count cell hours; cells with no node continue the previous status; on a cyclic whole-day stage the cell straddling the period start is one cell. Precedence: unit commitment_breaks > commitment_period > Stage.commitment_breaks > model_options.commitment_breaks > Block.commitment_cell. Exclusive with commitment_period and commitment_grid "block" / "cells" (validation error). Ignored on non-chronological stages
ramp_allowancestring—No"boundary" (default: only ramp rows crossing a commitment-period boundary get the SU/SD ramp allowance) or "period" (every block of a commitment period gets the allowance of its period; older, looser form)
startup_trajectorynumber arrayMWNopower_based only: power at successive trajectory_step instants of the start-up, before the unit reaches pmin (empty = quick start)
shutdown_trajectorynumber arrayMWNopower_based only: power at successive instants after leaving pmin (last entry normally 0)
trajectory_stepnumberhNoSpacing of the trajectory samples (default 1)
cyclestring—No"none" (default) or "stage": cyclic UC over the stage (typical day/week): transitions, windows and ramps wrap, no initial state, start costs × duration / period_hours. See unit-commitment
long_transitionstring—Cond."on", "off" or "no_uc"; required for cyclic units whose min up/down time or start window exceeds the typical period (validation error otherwise)
long_transition_schedulestring[]—NoPer-stage long_transition (by stage position)
hot_start_costnumber$/startNoStartup cost for hot start
warm_start_costnumber$/startNoStartup cost for warm start
cold_start_costnumber$/startNoStartup cost for cold start
hot_start_timenumberhoursNoA start is hot when the unit has been offline less than this
cold_start_timenumberhoursNoA start is cold when the unit has been offline at least this (warm in between)
initial_powernumberMWNoOutput at t = 0⁻ used by the first-block ramp rows; unset: Generator.initial_generation at the horizon start, else 0
fixed_statusnumber|array|string0/1NoPin the status u per stage and block (1 on, 0 off); blocks without a value stay free. Wins over must_run where set
max_starts / min_startsintegerstartsNoHard bounds on the number of starts within each starts_scope window
starts_scopestring|integer—NoWindow of max_starts / min_starts: hour, day, week, horizon (default; month / year are treated as horizon), or a window length in hours
ini_hours_up / ini_hours_downnumberhoursNoInformational copy of the source's initial up / down hours (the LP uses initial_status and initial_hours)

Removed fields: pmax_segments, heat_rate_segments, fuel_cost and fuel_emission_factor are no longer Commitment fields. The piecewise heat rate is set on the Generator (fuel, pmax_segments, heat_rate_segments) with the fuel price on Fuel.price; emissions are set with Fuel.emission_factors[] or an EmissionSource (see Unit Commitment §5).

Startup tiers require all five fields (hot_start_cost, warm_start_cost, cold_start_cost, hot_start_time, cold_start_time) to be present. If one is missing, or cold_start_time < hot_start_time (physically invalid), tiers are skipped with a warning and every start is priced at the flat startup_cost — or, when that is unset, at the largest given tier cost (a start is never free). The tier of a start is chosen from the unit's offline time: for a unit off since before the horizon that is the in-horizon time before the start plus initial_hours, so a first-block start after a short initial outage is a hot start. A unit that shut down inside the horizon is offline for the blocks from its shutdown to the start. In both cases the start is hot when offline < hot_start_time, warm when hot_start_time ≤ offline < cold_start_time, and cold otherwise.

3.24 Model Options

System-wide modeling options that control the objective and LP relaxation. The full list is in Section 1.

JSON path: options.model_options

FieldTypeUnitsRequiredDescription
objective_modestring—No"cost" (default) or "emissions": minimise emissions, charging each emission source at its zone price (1 $/t when unset). See Emissions
continuous_phasesstring—NoPhase range expression for LP relaxation of UC binaries: "all", "none", "1,3:5", etc. Default: "none". See Relaxation Control

3.25 Emissions

Emissions are modelled with three arrays in system plus generator and fuel fields. See Emissions for the full guide (global and local pollutants, marginal emissions) and Unit Commitment §6 for the LP rows.

emission_array (Emission) — pollutant registry.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesPollutant name (co2, ch4, n2o, nox, so2, pm10, …)

emission_zone_array (EmissionZone) — system-wide or regional scope of a price and/or cap.

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier
namestring—YesZone name
emissionsarray—Yes¹Covered pollutants: {emission, weight}; weight is the CO₂-eq factor (GWP-100), default 1.0.
pricenumber|array|string$/tNoPer-tonne price (tax) on every source in the zone
capnumber|array|stringt/stageNoCap on total weighted emissions per (scenario, stage). Hard unless cap_cost is set
cap_costnumber|array|string$/tNoPenalty on emissions above cap (soft cap)
allowance_poolinteger|string—NoFK to an AllowancePool (cap-and-trade with banking); replaces the per-stage cap row
busesarray—NoBus scope (uids or names) for the fuel-derived sources synthesised from Fuel.emission_factors: only generators on these buses get a source in this zone. Empty = all buses. Explicit emission_source_array rows are not filtered

¹ Or the single-pollutant shortcut "emission": "co2" (weight 1.0).

emission_source_array (EmissionSource) — generator → zone → pollutant link. Can also be written inline as Generator.emissions[].

FieldTypeUnitsRequiredDescription
uidinteger—YesUnique identifier (optional inline)
namestring—YesSource name (optional inline)
generatorinteger|string—YesFK to Generator (omitted inline)
zoneinteger|string—YesFK to EmissionZone
emissioninteger|string—YesFK to Emission; must match an entry of the zone's emissions
ratenumber|array|stringt/MWhNoCombustion (stack) rate
upstream_ratenumber|array|stringt/MWhNoUpstream (well-to-tank) rate
fuel_ratenumber|array|stringt/fuel unitNoCombustion factor applied to the generator's fuel burn (per-block or piecewise heat rate); additive with rate
upstream_fuel_ratenumber|array|stringt/fuel unitNoUpstream factor applied to the fuel burn

Fuel.emission_factors[] ({emission, combustion, upstream} in t per fuel unit) builds one source per covering zone for every generator with that fuel: a t/MWh rate (heat rate × heat content × factor) when heat_rate is a scalar, otherwise (per-block heat_rate, heat_rate_segments) a fuel_rate (heat content × factor) that the LP applies to the exact fuel burn, including the piecewise heat-rate slacks and the committed no-load burn Commitment.noload_fuel · u. Generators with fuel_per_block are skipped with a warning. Pollutants can be referenced by name or by uid in zones, sources and fuels; both resolve against emission_array.

Example: a 30 $/t CO₂ price on the whole system and a soft cap of 1500 t per stage:

"emission_array": [{"uid": 1, "name": "co2"}],
"emission_zone_array": [
  {"uid": 1, "name": "system_co2",
   "emissions": [{"emission": "co2", "weight": 1.0}],
   "price": 30.0, "cap": 1500.0, "cap_cost": 200.0}
],
"emission_source_array": [
  {"uid": 1, "name": "g1_co2", "generator": "g1",
   "zone": "system_co2", "emission": "co2", "rate": 0.9}
]

Outputs: EmissionSource/emissions_sol, combustion_sol, rate_sol (and upstream_sol, captured_sol when used); EmissionZone/cap_dual (the endogenous price of a cap) and cap_slack_sol for a soft cap.

Migrating from emission_cost / emission_cap. The options model_options.emission_cost and model_options.emission_cap were removed and are rejected as unknown. Use a system-wide zone instead: emission_cost: X becomes "price": X, and emission_cap: Y becomes "cap": Y (hard) or "cap": Y, "cap_cost": Z (soft). Generator.emission_rate still works but is folded into a co2 source that goes to the first zone listing co2 by uid, or else to an automatic unpriced default_co2 zone; write an explicit EmissionSource to attach it to a priced or capped zone.

3.26 Future Cost

The FutureCost element owns the end-of-horizon cost-to-go (the future-cost function, FCF: α / varphi_s) and the boundary cuts that linearise it. It is the single place where the FCF boundary cuts are configured, for every planning method: monolithic, sddp, cascade (and the monolithic fallback of a single-phase SDDP run) all read only the resolved FutureCost element. The first active element is used.

JSON array name: future_cost_array

FieldTypeDefaultDescription
uidinteger—Unique identifier
namestring—Element name (e.g. "fcf")
activebool/inttrueInactive elements are skipped
descriptionstring—Free-text provenance
cuts_filestring—Boundary-cut CSV (iteration,scene,rhs,<state...>); a relative path resolves against options.input_directory for every method
scale_alphanumberautoScale of the α / varphi_s columns; auto-derived from the cut coefficients when unset
mean_shiftbooltrueRebase α at the reservoirs' efin targets; the removed constant c̄ is added back to the objective
single_cut_equalitybooltrueWith a single cut per scene, install it as an equality with α freed (PLEXOS-style terminal value); false keeps the ≥ form
sharingstringderived"per_scene", "shared" or "multicut"; unset → shared for mode = combined, otherwise per_scene
modestring"separated""noload", "separated" (per scene), "combined" (broadcast), or "phi_expectation" (PLP-literal NVarPhi plane-hydrology φ columns)
iteration_limitinteger0Keep only the cuts of the last N iterations of the source run (distinct CSV iteration values); 0 = all
missing_cut_var_modestring"skip_coeff"Cut naming an unknown state variable: "skip_coeff" (drop the coefficient) or "skip_cut" (drop the cut)
valuationstring"end_of_horizon""end_of_horizon" or "present_value" (apply the last stage's discount factor on load)
use_user_alphaboolfalseReplace the built-in α by a user-authored DecisionVariable; mutually exclusive with cuts_file
user_alpha_uidinteger—UID of the user α DecisionVariable (required with use_user_alpha)

Example:

{
  "system": {
    "future_cost_array": [
      {
        "uid": 1,
        "name": "fcf",
        "cuts_file": "boundary_cuts.csv",
        "mode": "separated",
        "iteration_limit": 0
      }
    ]
  }
}

A boundary cut always involves α. Any other generic linear constraint on the terminal state belongs in a User Constraint, not in FutureCost.

Fields that stay in sddp_options

  • sddp_options.scale_alpha — the SDDP per-phase α scale. When future_cost_array[].scale_alpha is set it overrides it for the boundary α; the monolithic solver reads only the FutureCost value.
  • sddp_options.cut_coeff_eps — SDDP only; the monolithic solver uses the default 1e-8 when loading boundary cuts.

Deprecated aliases

The keys that preceded FutureCost are still accepted. They are translated into the first active FutureCost element (an element {"uid": 1, "name": "fcf"} is created when there is none) once, after every JSON file and every --set / CLI override has been merged, so --set sddp_options.boundary_cuts_file=... keeps working. Each honoured alias logs a warning naming the old and the new key.

Legacy keyFutureCost fieldHonoured for method
options.sddp_options.boundary_cuts_filecuts_filesddp, cascade
options.sddp_options.boundary_cuts_modemodesddp, cascade
options.sddp_options.boundary_cut_sharing_modesharingsddp, cascade
options.sddp_options.boundary_cuts_mean_shiftmean_shiftsddp, cascade
options.sddp_options.boundary_max_iterationsiteration_limitsddp, cascade
options.sddp_options.missing_cut_var_modemissing_cut_var_modesddp, cascade
options.monolithic_options.boundary_cuts_filecuts_filemonolithic
options.monolithic_options.boundary_cuts_modemodemonolithic
options.monolithic_options.boundary_cut_sharing_modesharingmonolithic
options.monolithic_options.boundary_max_iterationsiteration_limitmonolithic
simulation.boundary_cuts_filecuts_fileany
simulation.boundary_cuts_valuationvaluationany

Rules:

  • A key of the other method is ignored with a warning: the monolithic solver never reads sddp_options, and SDDP never reads monolithic_options.
  • The same field given with different values (element vs. alias, or two aliases) is a hard error; equal values are accepted.
  • cascade_options.level_array[].sddp_options boundary keys are not read.

To rewrite existing cases, use the migration helper (formatting is preserved; --method-rules applies the per-method rules above instead of moving every legacy key):

python tools/migrate_future_cost.py [--method-rules] [--dry-run] FILE...

gtopt_check_json reports each alias (check future_cost_aliases) as a warning and conflicting values as a critical finding.

3.27 Gas Network

A steady-state natural-gas network (radial tangents, or linearised pipes with a sequential LP for meshed networks) coupled to the dispatch (pure LP; formulation in mathematical-formulation.md §5.19; user guide and benchmark cases in Gas Network). Units: flow km³/h (standard), pressure bar abs, gas cost $/km³, heat rate km³/MWh. The converter gasnet2gtopt writes these arrays from a *.gasnet.json description (--legacy keeps the older DecisionVariable / UserConstraint form).

Network gas properties live in options.gas_options: gas_specific_gravity (0.6), gas_temperature [K] (288.15) and compressibility (0.9). They feed the Weymouth constant from geometry and the elevation exponent; a pipe's gravity, temperature and z override them. The sequential LP of weymouth_mode: linearized pipes is controlled by slp_iterations (0 = single pass), slp_tolerance (1e-4, relative flow change), slp_damping (ω = 0.5), slp_min_flow (1e-3 · fmax), slp_initial_flow (0.1 · fmax) and slp_proximal_cost (ρ = 1e-6 $ per km³/h per hour on |f̄ − f₀|). The proximal term makes the SLP settle when the LP is degenerate: equal-cost vertices otherwise alternate between passes. linepack_cyclic (default true) closes each stage with at least its initial line pack. Set it to false for outage studies, so that the pack can be drawn down.

gas_options fieldDefaultDescription
gas_specific_gravity0.6Gas specific gravity G (air = 1)
gas_temperature288.15Flowing temperature T [K]
compressibility0.9Compressibility factor Z
slp_iterations0SLP passes after the first monolithic solve
slp_tolerance1e-4Stop when the largest relative flow change is below it
slp_damping0.5ω in f₀ ← f₀ + ω (f − f₀)
slp_min_flow1e-3Floor on |f₀| as a fraction of fmax
slp_initial_flow0.1First-pass |f₀| as a fraction of fmax (no reference_flow)
slp_proximal_cost1e-6ρ on |f̄ − f₀| (0 = off)
linepack_cyclictrueEach stage closes with at least its initial line pack

Every gas element accepts the common fields uid (integer, required), name (string), active (boolean or per-stage array, default active) and type (free string tag, e.g. lng_regas, fuel_gas_booster, ccgt). References to other elements (gas_node, gas_node_a, generator, bus, …) accept a uid or a name.

gas_node_array — squared-pressure node with a gas balance per block.

FieldTypeUnitsRequiredDescription
uid, nameinteger, string—YesIdentity
activeboolean|array—NoActivation status (default active)
typestring—NoFree tag (e.g. city_gate)
pmin, pmaxnumber|array|stringbarNoPressure band (π = p² ∈ [pmin², pmax²])
pressure_costnumber|array|string$/(bar²·h)NoCost on π; a tiny negative value (−1e-4) selects the highest-pressure optimum
p_initnumberbarNoInitial pressure of adjacent line-pack pipes
elevationnumbermNoElevation above datum (default 0); see elevation_exponent

gas_supply_array — source (field, import, LNG regasification).

FieldTypeUnitsRequiredDescription
gas_nodeuid|name—YesInjection node
fmin, fmaxnumber|array|stringkm³/hNoInjection limits
costnumber|array|string$/km³NoGas cost
typestring—NoTag, e.g. lng_regas
volumenumberkm³NoVolume available over each stage: Σ Δt·flow ≤ volume (e.g. an LNG allotment); fmax stays the rate cap

gas_demand_array — non-power gas load.

FieldTypeUnitsRequiredDescription
gas_nodeuid|name—YesDelivery node
loadnumber|array|stringkm³/hNoLoad per block
fail_costnumber|array|string$/km³NoShedding cost; unset = hard load

gas_pipe_array — Weymouth pipe, flow gas_node_a → gas_node_b.

FieldTypeUnitsRequiredDescription
gas_node_a, gas_node_buid|name—YesInlet / outlet
fmaxnumber|array|stringkm³/hYesCapacity (tangents span [0, fmax])
weymouth_knumberbar²/(km³/h)²NoWeymouth constant; default from the geometry below (Menon SI Weymouth)
lengthnumberkmNo*Pipe length (*needed without weymouth_k, or for line pack without linepack_coeff)
diameternumbermmNo*Inner diameter (*as length)
efficiencynumberp.u.NoPipeline efficiency E (0.92)
gravity, temperature, znumber—, K, —NoPer-pipe overrides of gas_options
elevation_exponentnumber—NoExponent s of the elevation term (π_a − e^s π_b = K_e f|f|); default from the end nodes' elevation
segmentsinteger—NoNumber of tangents (8)
tangent_layoutstring—Nouniform (default) or relative_pressure
weymouth_modestring—Noradial (default: fixed direction, tangents), linearized (meshed: signed flow, one equality per block, SLP) or none (capacity-only arc a → b, 0 ≤ f ≤ fmax, no pressure coupling: a transfer through a parallel system)
linearizationstring—Nolinearized mode: secant (default) or tangent
reference_flownumberkm³/hNolinearized mode: signed first-pass reference flow f₀ (default slp_initial_flow · fmax)
linepackboolean—NoModel line pack (intra-stage cycle)
linepack_coeffnumberkm³/barNoDefault: geometric volume / (Z·Pb)
linepack_pressure_refnumberbarNoLinearisation pressure
linepack_ininumberkm³NoInitial pack (default from the nodes' p_init)

gas_compressor_array — station / booster gas_node_in → gas_node_out.

FieldTypeUnitsRequiredDescription
gas_node_in, gas_node_outuid|name—YesSuction / discharge node
fmaxnumber|array|stringkm³/hYesThroughput capacity
max_rationumber—Nop_out ≤ max_ratio · p_in (default 1: no boost)
allow_bypassboolean—NoAllow p_out < p_in (regulator); default true except saldarriaga
bidirectionalboolean—NoOpen valve: signed flow, p_out = p_in; needs max_ratio 1 and fuel_model none (default false)
fuel_modelstring—Nonone, fixed_fraction (default), saldarriaga
fuel_fractionnumber—NoFixed fuel share of throughput
gamma, alphanumber—NoSaldarriaga γ (adiabatic default) and (κ−1)/κ
efficiency, driver_efficiencynumber—No0.80 / 0.33
op_flow, op_ratio, op_suction_pressurenumber, array, numberkm³/h, —, barNoTaylor operating point(s); one fuel plane per op_ratio
drivestring—Nogas (fuel from the suction node) or electric
bus, motor_efficiency, power_maxuid|name, number, number—, —, MWNoElectric drive: motor load on bus (motor efficiency 0.95; power_max unset = unbounded)

gas_turbine_array — link from a Generator to its fuel-gas node.

FieldTypeUnitsRequiredDescription
generator, gas_nodeuid|name—YesPlant and delivery node
heat_ratenumber|array|stringkm³/MWhNoFuel use in the node balance
min_pressurenumberbarNoPlant minimum fuel-gas pressure (gate)
pressure_bandnumberbarNoLinear ramp below min_pressure (0.5)
nominal_pressurenumberbarNoFull output pressure (derate above min_pressure)
derate_min_outputnumberp.u.NoOutput share at min_pressure
"gas_node_array": [{"uid": 1, "name": "S", "pmin": 30, "pmax": 70},
                   {"uid": 2, "name": "T", "pmin": 35, "pmax": 70}],
"gas_supply_array": [{"uid": 1, "name": "LNG", "gas_node": "S",
                      "fmax": 1000, "cost": 300, "type": "lng_regas"}],
"gas_demand_array": [{"uid": 1, "name": "CITY", "gas_node": "T",
                      "load": 60, "fail_cost": 3000}],
"gas_pipe_array": [{"uid": 1, "name": "S_T", "gas_node_a": "S",
                    "gas_node_b": "T", "length": 80, "diameter": 406,
                    "fmax": 300}],
"gas_turbine_array": [{"uid": 1, "name": "CCGT_gas", "generator": "CCGT",
                       "gas_node": "T", "heat_rate": 0.2,
                       "min_pressure": 30}]

Outputs: GasNode/{pressure_sol, pi_sol, balance_dual} (gas price $/km³), GasSupply/flow_sol, GasDemand/{load_sol, fail_sol}, GasPipe/{flow_sol | flow_in_sol, flow_out_sol, linepack_sol} and the exactness report GasPipe/{weymouth_gap_sol, pressure_error_sol}, GasCompressor/{flow_sol, fuel_sol, ratio_sol, power_sol}, GasTurbine/{fuel_sol, pressure_gate_dual, derate_dual}.


3.28 Multi-carrier nodes and storage (hydrogen, ammonia, thermal)

Besides the electric Bus, gtopt has carrier-tagged balance nodes. Carriers never mix: an element on a node of one carrier cannot serve another carrier except through a CarrierConverter. Energy units are MWh (MWh_LHV for hydrogen and ammonia, MWh_th for heat). The LP is given in formulation.

ArrayElementFields
hydrogen_node_array / ammonia_node_array / thermal_node_arrayNodeuid, name, active
hydrogen_storage_arrayHydrogenStoragesee below, node key hydrogen_node
ammonia_storage_arrayAmmoniaStoragesee below, node key ammonia_node
thermal_storage_arrayThermalStoragesee below, node key thermal_node
hydrogen_demand_arrayHydrogenDemandsee below
carrier_converter_arrayCarrierConvertersee below

Storage fields (all three storage types; same semantics as Battery / Reservoir): type (tag, e.g. salt_cavern, lh2), the node key, input_efficiency, output_efficiency, annual_standing_loss [p.u./year], emin, emax, ecost, eini, efin, efin_cost, soft_emin, soft_emin_cost, the expansion fields capacity, expcap, expmod, capmax, annual_capcost, annual_derating, integer_expmod, and use_state_variable / daily_cycle. The storage level is carried between stages like a battery's. On point-sampled stages these storages follow model_options.battery_storage_integration.

HydrogenDemand (offtake from a hydrogen_node):

FieldUnitsDescription
hydrogen_node—Node the offtake withdraws from
lmax / lminMW_LHVOfftake rate bounds per (stage, block); lmax unset = unbounded, lmin default 0
min_energy / max_energyMWh_LHV/stageEnergy delivered per stage, Σ dur·load
min_energy_cost$/MWh_LHVPenalty below min_energy (set = soft, unset = hard)
price$/MWh_LHVValue of the offtake (price-responsive buyer); default 0

CarrierConverter (electrolyser, fuel cell, Haber–Bosch, cracker, power block, …) moves energy from one carrier's node to another's:

FieldUnitsDescription
from_carrier / to_carrier—electric, hydrogen, thermal, ammonia (required)
from_node / to_node—Node (Bus, HydrogenNode, …) of the matching carrier
efficiencyp.u.Output per unit input, per (stage, block); default 1
ocost$/MWh inputOperating cost per unit of input flow; default 0
capacity, expcap, expmod, capmax, annual_capcost, annual_derating, integer_expmodMW inputInstalled input capacity and capacity expansion
overnight_capcost, economic_life, wacc$/MW, years, p.u./yearAnnuity overnight_capcost × CRF(wacc, economic_life) when annual_capcost is unset; wacc unset = the social annual_discount_rate (investment economics)
fixed_om_cost$/MW-yearFixed O&M of the expansion capacity, charged with the annuity

3.29 Fuel

JSON array name: fuel_array. Generators reference a fuel (Generator.fuel, with heat_rate); see Unit Commitment and Emissions.

FieldUnitsDescription
type / subtype / description—Tags (e.g. gas / lng); metadata only
price$/fuel unitPer-(stage, block) schedule; the fuel unit is the user's choice and must match heat_rate
heat_contentGJ/fuel unitOptional, for energy reporting
emission_factors—Array of {emission, combustion, upstream} [t/fuel unit] per pollutant
combustion_emission_factor / upstream_emission_factortCO₂/fuel unitLegacy single-pollutant form, folded into emission_factors
max_offtake / min_offtakefuel unit/stageCap / floor on the fuel burnt by all generators on this fuel per stage
max_offtake_cost / min_offtake_cost$/fuel unitPenalty that makes the cap / floor soft (unset = hard)
max_offtake_per_block / min_offtake_per_blockboolEnforce the stage limit per block, pro-rated by block duration

3.30 Plant

JSON array name: plant_array. Groups generators that are configuration variants of one physical plant (e.g. combined-cycle modes).

FieldDescription
generator_namesMember generators (at least two for any row to be emitted)
pmaxPlant capacity: Σ generation ≤ pmax per block
n_unitsUnits that can be committed: Σ commit_coeffs·status ≤ n_units, one row per stage on the members' first-block status
commit_coeffsPer-member coefficients for n_units (default 1 each)
uniq_mutextrue: at most one configuration committed, Σ status ≤ 1 per stage (first-block status; default off)

3.31 Line Commitment

JSON array name: line_commitment_array. Optimal transmission switching: a binary in-service status u for a line, with the KVL row relaxed by a big-M when the line is open.

FieldDescription
lineLine being switched
initial_statusStatus at t = 0 (1 closed, 0 open); unset = free
must_runPin the line closed
fixed_statusPer-(stage, block) pin (1 closed, 0 open; other values free). A line outage always pins it open
relaxRelax u to [0, 1] (LP lower bound)
kvl_big_mPer-line big-M of the KVL disjunction (> 0); default \|b\|·(θmax − θmin)
startup_cost, shutdown_cost, hot_start_cost, warm_start_cost, cold_start_cost, hot_start_time, cold_start_time, min_up_time, min_down_time, max_starts, min_starts, starts_scope, initial_hoursSwitching costs and limits with the same meaning as on Commitment (switching events become v / w columns)
cycle"none" (default, chronological from initial_status) or "stage": cyclic line commitment over each stage (typical day / week, mirrors Commitment.cycle): the transition at the first block wraps to the last, min up / down and start-tier windows wrap on real time steps, start / stop costs × duration / period_hours; initial_status / initial_hours ignored

3.32 Inertia Provision

JSON array name: inertia_provision_array. Inertia offered by a generator to one or more inertia zones (see Section 3.18 bis).

FieldUnitsDescription
generator—Providing generator
inertia_zones—Zones credited
inertia_constantsMachine inertia constant H
rated_powerMVARated apparent power S
provision_maxMWMaximum provision per (stage, block)
provision_factorMWs/MWEffectiveness factor per (stage, block)
cost$/MWProvision cost per (stage, block)

3.33 Pump

JSON array name: pump_array. A pump moves water through a waterway using the electricity of a linked demand: pump_power = pump_factor · flow.

FieldUnitsDescription
waterway—Pumping waterway
demand—Electrical demand that carries the pump load (usually with fcost = 0)
pump_factorMW/(m³/s)Power per unit flow
efficiencyp.u.Pump efficiency (default 1)
capacitym³/sMaximum pump flow
main_reservoir—Reservoir whose volume may drive the conversion rate

3.34 Decision variables and user models

decision_variable_array declares free LP columns (bounds, cost, scope, state carried between stages, non-anticipativity) that user constraints can reference; user_model_array bundles variables and constraints under one name and tag; user_constraint_file(s) load PAMPL files. All three are described in User Constraints.

3.35 LNG Terminal

JSON array name: lng_terminal_array. An LNG tank with deliveries, regasification and boil-off that fuels linked generators (formulation §5.14; with a gas network, see Gas Network).

FieldUnitsDescription
emin / emaxm³Tank level bounds per (stage, block)
ecost$/m³Holding cost per (stage, block)
eini / efin / efin_costm³, $/m³Initial level, end-of-horizon minimum and its shortfall penalty
soft_emin / soft_emin_costm³, $/m³Soft floor and its penalty
annual_standing_lossp.u./yearBoil-off
deliverym³/stageScheduled (contracted) cargo arrivals
delivery_cost$/m³Contract purchase price of delivery per stage (a constant of the objective; unset = costless)
sendout_max / sendout_minm³/hRegasification rate bounds on Σ heat_rate × generation, per block (each applies only when set)
enforce_sendout—Apply sendout_max / sendout_min (default true; false ignores them, the former behaviour)
use_generator_fuel_curve—Draw tank gas along each linked generator's own curve (pmax_segments / heat_rate_segments, scalar heat_rate, Commitment.noload_fuel) × the link heat_rate (then m³ per fuel unit); r_up backed at the top slope (default false: link heat_rate × P)
reserve_sustain_hourshGas backing of the linked units' up reserve: V_end − fcr·T·Σ heat_rate·r_up ≥ emin and, with sendout_max, Σ heat_rate·(P + r_up) ≤ sendout_max per block (unset = off, LP unchanged; 0 = send-out row only)
reserve_gas_usageMWh/MW/hExpected up-reserve deployment burnt from the tank (+fcr·a·heat_rate·Δ·r_up in the balance; only with reserve_sustain_hours, default 0)
spot_cargo_volumem³Volume of one optional spot cargo
spot_cargo_maxcargoes/stageSpot arrival slots per stage (schedule; 0 = none)
spot_cost$/m³Spot purchase price per stage
spot_integer—Whole cargoes (MIP: HiGHS / CPLEX, never CLP) when true; continuous by default
spot_annual_maxcargoes/yearCap on spot cargoes per planning year (8760-h windows of the horizon)
spillway_capacity / spillway_costm³/h, $/m³Venting limit and penalty
use_state_variable—Carry the tank level between phases
mean_production_factorMWh/m³Used to convert the state penalty scost
scost$/m³State-violation penalty
flow_conversion_rate—m³/h × h → m³ (default 1)
generators—Linked generators: [{generator, heat_rate}], heat_rate in m³ LNG/MWh (default 1)

The linked generators burn tank gas priced by the tank balance dual (its shadow value), so their gcost should carry only the non-fuel VOM; the purchase cost goes on delivery_cost / spot_cost, and spillway_cost is the extra loss of venting or diverting a surplus cargo (not its price). A spot cargo arrives in the first block of its stage and only fits if the tank has room (emax). Outputs: LngTerminal/spot_sol (cargoes per stage), spot_cost (reduced cost), spot_annual_dual, sendout_dual; lng_terminal("X").spot is a PAMPL variable. Example: cases/lng_spot_1b.

4. External Data Files

When a field value is a string instead of a number, it refers to an external data file in the input_directory. Files are organized by component type:

<input_directory>/
├── Bus/
├── Generator/
│   └── pmax.parquet
├── Demand/
│   └── lmax.parquet
├── Line/
├── Battery/
└── ...

File Format

External data files (CSV or Parquet) follow a tabular format with columns:

ColumnDescription
scenarioScenario UID
stageStage UID
blockBlock UID
uid:<N>Value for element with UID N

Example CSV

"scenario","stage","block","uid:1"
1,1,1,10
1,2,2,15
1,3,3,8

5. Output Structure

After running GTOpt, results are written to the output_directory:

output/
├── solution.csv              # Objective value, status
├── Bus/
│   └── balance_dual.csv      # Marginal costs per bus
├── Generator/
│   ├── generation_sol.csv    # Generation dispatch
│   └── generation_cost.csv   # Generation costs
└── Demand/
    ├── load_sol.csv           # Served load
    ├── fail_sol.csv           # Unserved demand
    ├── capacity_dual.csv      # Capacity dual values
    └── ...

Output files use the same tabular format as input files, with scenario, stage, block, and uid:<N> columns.


6. Planning (Root Container)

The Planning object is the root of the GTOpt input data model. A JSON configuration file represents a single Planning instance with three top-level sections:

FieldTypeRequiredDescription
optionsOptionsNoGlobal solver and I/O settings (see Section 1)
simulationSimulationYesTime structure: blocks, stages, scenarios, phases, scenes, apertures (see Section 2)
systemSystemYesPhysical network components (see Section 3)

Multiple JSON files can be merged with Planning::merge(), allowing the configuration to be split across files (e.g. time structure in one file, network elements in another). The merge uses first-value semantics for scalar options and concatenation for arrays.

Example (minimal single-file):

{
  "options": {
    "model_options": {
      "demand_fail_cost": 1000,
      "use_single_bus": true
    },
    "input_directory": "input",
    "output_directory": "output"
  },
  "simulation": {
    "block_array": [{"uid": 1, "duration": 1}],
    "stage_array": [
      {"uid": 1, "first_block": 0, "count_block": 1}
    ],
    "scenario_array": [{"uid": 1, "probability_factor": 1}]
  },
  "system": {
    "bus_array": [{"uid": 1, "name": "bus1"}],
    "generator_array": [
      {"uid": 1, "name": "gen1", "bus": 1, "pmax": 100,
       "gcost": 20}
    ],
    "demand_array": [
      {"uid": 1, "name": "dem1", "bus": 1, "lmax": 50}
    ]
  }
}

7. Complete Example

See cases/c0/system_c0.json for a minimal working example with:

  • 1 bus, 1 generator, 1 demand
  • 5 time blocks, 5 stages, 1 scenario
  • Demand expansion planning

See also

  • Unit Commitment Guide — Dedicated guide for the three-bin UC formulation, emission framework, and worked examples
  • Mathematical Formulation — Full LP/MIP optimization formulation with academic references
  • Planning Guide — Step-by-step planning guide with worked examples
  • Usage Guide — Command-line options and advanced usage
  • Scripts Guide — Python conversion utilities