Planning Options Reference

Comprehensive reference for the GTOpt option hierarchy, JSON interface, merge semantics, and solver configuration.

Option Class Hierarchy

MainOptions                    (CLI-only, not in JSON)
  |
  +-- PlanningOptions          (JSON key: "options")
        |
        +-- ModelOptions           (JSON key: "model_options")
        +-- MonolithicOptions      (JSON key: "monolithic_options")
        |     +-- SolverOptions        (JSON key: "solver_options")
        +-- SddpOptions            (JSON key: "sddp_options")
        |     +-- SolverOptions        (JSON key: "forward_solver_options")
        |     +-- SolverOptions        (JSON key: "backward_solver_options")
        +-- CascadeOptions         (JSON key: "cascade_options")
        +-- SolverOptions          (JSON key: "solver_options")
        +-- LpMatrixOptions        (JSON key: "lp_matrix_options")
        +-- SanityOptions          (JSON key: "sanity_options")
        +-- VariableScale[]        (JSON key: "variable_scales")

C++ headers:

ClassHeader
PlanningOptionsplanning_options.hpp
PlanningOptionsLPplanning_options_lp.hpp
MainOptionsmain_options.hpp
SolverOptionssolver_options.hpp
SddpOptionssddp_options.hpp
MonolithicOptionsmonolithic_options.hpp
CascadeOptionscascade_options.hpp
ModelOptionsmodel_options.hpp
VariableScalevariable_scale.hpp

Backward-compatibility aliases: Options = PlanningOptions, OptionsLP = PlanningOptionsLP. The JSON key "options" is unchanged.

PlanningOptions Fields

All fields are std::optional – absent fields inherit built-in defaults (see PlanningOptionsLP for resolved values).

Input/Output

FieldTypeDefaultDescription
input_directorystring"input"Root directory for external data files
input_formatstring"parquet"Input format: "parquet" or "csv"
output_directorystring"output"Root directory for result files
output_formatstring"parquet"Output format: "parquet" or "csv"
output_compressionstring"zstd"Compression codec for output files
use_uid_fnamebooltrueUse UIDs instead of names in filenames
output_round_decimalsint7Round the written value columns to N decimals (better zstd ratio); 0 or a negative value writes full precision. CLI: --set output_round_decimals=N
output_usage_metricsboolfalseWrite the per-block usage-accounting streams (Generator/usage_on, Generator/usage_ramp, Commitment/usage_pmin, Commitment/usage_at_pmin) read by gtopt_usage; output only, the LP is unchanged. See usage.md. CLI: --set output_usage_metrics=true
write_outstringallWhich result kinds to write: comma list of solution (sol), dual, rc (reduced cost), optionally restricted to element classes, e.g. "sol,dual,rc:Generator,Line". CLI: --write-out

Model parameters (moved to model_options)

The flat model keys that used to live directly under options (demand_fail_cost, reserve_fail_cost, hydro_fail_cost, hydro_use_value, use_line_losses, loss_segments, use_kirchhoff, use_single_bus, kirchhoff_threshold, scale_objective, scale_theta) were removed from the JSON contract: a planning file that still places them at the top level of options is rejected. Put them inside options.model_options (see ModelOptions Fields). Two of them were also renamed: reserve_fail_cost → reserve_shortage_cost and hydro_fail_cost → hydro_spill_cost.

On the command line the short keys keep working: --set demand_fail_cost=5000 is rewritten to --set model_options.demand_fail_cost=5000 (and reserve_fail_cost / hydro_fail_cost to the new names).

Note: annual_discount_rate belongs in the simulation section. For backward compatibility it is still accepted as a flat field in options, but emits a deprecation warning.

annual_discount_rate is the planning-wide (social) rate of the stage discount factors. It is also the fallback annuity rate of a capacity element priced by overnight_capcost without its own wacc; an element with wacc set annualises its overnight cost at that private rate while present values stay at the social rate (see investment economics).

Solver Selection

FieldTypeDefaultDescription
methodstring"monolithic"Planning method: monolithic, sddp, cascade
build_modestring"scene-parallel"How per-cell SystemLP objects are assembled: "serial", "scene-parallel", "full-parallel", "direct-parallel". serial skips the AdaptiveWorkPool / build-buffer for apples-to-apples comparison against the pre-parallel code path

Logging and Debug

FieldTypeDefaultDescription
log_directorystring"logs"Directory for log and trace files
lp_debugboolfalseSave LP debug files before solving
lp_compressionstring–Compression codec for LP files
lp_onlyboolfalseBuild LP matrices without solving (CLI: --lp-only / -c)
lp_scalesstringnoneWrite the LP scales next to each LP file written by --lp-file: summary (JSON) or full (JSON plus Parquet tables); true/false mean full/none (CLI: --lp-scales)
lp_fingerprintboolfalseWrite LP fingerprint JSON for formulation audit
lp_debug_scene_minint–Minimum scene UID (inclusive) for LP debug file saving
lp_debug_scene_maxint–Maximum scene UID (inclusive) for LP debug file saving
lp_debug_phase_minint–Minimum phase UID (inclusive) for LP debug file saving
lp_debug_phase_maxint–Maximum phase UID (inclusive) for LP debug file saving

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

Grouped Sub-objects

FieldTypeDescription
model_optionsModelOptionsPower system model configuration (canonical location for model fields)
monolithic_optionsMonolithicOptionsMonolithic solver settings
sddp_optionsSddpOptionsSDDP solver settings
cascade_optionsCascadeOptionsCascade solver settings
solver_optionsSolverOptionsGlobal LP solver configuration
lp_matrix_optionsLpMatrixOptionsLP assembly / equilibration / stats configuration
sanity_optionsSanityOptionsThresholds of the data-quality warnings emitted at load time
gas_optionsGasOptionsGas-network physical constants and the Weymouth SLP loop (see Input Data — Gas Network)
variable_scalesVariableScale[]Per-class/variable LP scale overrides

Migration: model parameter fields (use_kirchhoff, use_single_bus, etc.) belong in the model_options sub-object; the former flat copies at the top level of options are rejected (see Model parameters).

ModelOptions Fields

The model_options sub-object is the canonical location for LP-construction parameters. It enables per-level overrides in cascade solver configurations.

FieldTypeDefaultDescription
use_single_busboolfalseCollapse network to single bus (copper-plate)
use_kirchhoffbooltrueApply DC Kirchhoff voltage-law constraints
use_line_lossesbooltrueDeprecated — use line_losses_mode instead. Model resistive line losses (on/off)
line_losses_modestring"adaptive"Line loss formulation: "none", "linear", "piecewise", "bidirectional", "adaptive" (piecewise for fixed lines, bidirectional for expandable ones), "dynamic" (falls back to piecewise), "piecewise_direct", "tangent_signed_flow". Per-line Line.line_losses_mode overrides. See formulation §5.5
kirchhoff_thresholdfloat0.0Min bus voltage [kV] for Kirchhoff activation
kirchhoff_modestring"cycle_basis"KVL formulation: "cycle_basis" (loop flow) or "node_angle" (B–θ)
dc_line_reactance_thresholdfloat1e-6Per-unit floor \|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, KVL forces the two bus angles equal (θ_a − θ_b = φ), flow free within tmax; "dc" = legacy free-flow DC link. Lines without reactance are always DC links
tiny_reactance_rel_thresholdfloat0.01Relative tie floor: tie when \|X/V²\| < max(dc_line_reactance_threshold, this × median \|X/V²\|); 0 = absolute floor only
tie_line_lossesboolfalsefalse: zero-impedance ties are lossless; true: legacy, ties keep their loss model
loss_segment_boundbooltrueOrdered-fill upper bound on PWL loss segment columns (valid tightening cut); false = width-only bounds
loss_segmentsint1Piecewise-linear segments for quadratic losses
loss_cost_epsfloat0.1$/MWh on line-loss columns (degeneracy breaker / negative-LMP arbitrage guard). Per-line Line.loss_cost_eps overrides; 0 disables. Inert for none/linear/piecewise_direct
loss_flow_abs_costfloat0.001$/MWh (real units, before scale_objective) on the tangent_signed_flow abs-flow proxy columns v (Σv ≥ |f|). Degeneracy pin forcing Σv = |f| at the optimum, which keeps the secant chord on the losses anchored. Shifts LMP differences by at most ≈ its value per lossy line (flow direction). Applied only when loss_cost_eps > 0. Per-line Line.loss_flow_abs_cost overrides; 0 disables; 1e-6 reproduces the pre-option internal pin
loss_overflow_costfloatdemand_fail_cost$/MWh on the loss carried by the overflow tier past a decoupled Line.loss_envelope (flow between the envelope and tmax); stops the tier from being a free 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. Inert without headroom past the envelope
prev_stage_linkstringstageWhat a user-constraint <attr>_prev term reads at the first block of a stage whose previous stage is in the same phase: stage = that stage's last block; none = the constant 0 (legacy); period = as stage, except on a periodic stage (Stage.periodic, ≥ 2 blocks) the first block reads the LAST block of the same stage (the typical period wraps). The horizon start always reads initial_<attr> (e.g. Generator.initial_generation); a later-phase start reads 0 (see user-constraints.md). Also --set model_options.prev_stage_link=none
line_thermal_limit_modestringflowHow the line thermal limit treats losses: flow (flow variable only, no extra row), sending (sending-end power f + a·ℓ ≤ tmax, a = sending-bus loss share), full (f + ℓ ≤ tmax per direction; PyPSA convention). Per-line Line.line_thermal_limit_mode overrides. Also --set model_options.line_thermal_limit_mode=full
line_direction_modestringoffRadial-line flow-direction certificate. off (default) builds today's LP; report logs the classification of radial lines (bridges of the transport graph) as one-way ab/ba, dead-end or both; structural applies it: certified one-way lines lose their reverse columns and dead-end lines are not built. Lines in user constraints / line commitments stay untouched. Per-line Line.flow_direction overrides. Preview with gtopt_check_topology --directions. Also --set model_options.line_direction_mode=structural
network_modelstringdcNetwork power-flow model. dc (default) builds today's transport / DC power-flow LP; lindistflow adds squared bus voltages, reactive power, the voltage-drop rows, optimised taps and MVA polygons for radial distribution feeders and turns the DC angle rows off (§5.6 bis).
mva_polygon_sidesinteger8Sides of the polygon approximating the line MVA circle under lindistflow; it circumscribes the circle (over-estimate ≤ 1/cos(π/n) − 1); 0 keeps only the active-power tmax.
overload_slack_boundstringthermalUpper bound of the line overload slack (overload_penalty band): thermal = min(hard − normal, max_overload_ratio × normal) (DLR: IEEE 738 emergency − normal rating), ratio = max_overload_ratio × normal, unbounded = no bound. Per-line Line.overload_slack_bound overrides
max_overload_rationumber1.5Overload headroom as a fraction of the normal threshold (slack ≤ +150 %, flow ≤ 2.5 × normal). Per-line Line.max_overload_ratio overrides
use_line_dlrbooltrueGlobal switch for the dynamic line rating: false ignores every Line.dlr block and the lines keep their static tmax (static-vs-DLR comparisons). DLR via critical spans (Matus et al. 2012, DOI 10.1109/TPWRD.2012.2185254; Open access: ResearchGate, PDF (Universidad de Chile)) and IEEE Std 738-2012 ampacity. Also --set model_options.use_line_dlr=false
dlr_limit_modestringunsetHow a Line.dlr rating combines with the static limits: replace = the DLR rating replaces conductor_rating_* (without one, max_rating/min_rating) and tmax_normal_*; min = min(static, DLR rating) in every block. Unset: replace on lines with a conductor_rating_*, min otherwise (historical min(tmax, DLR)). Flow, outage, equipment and security limits always apply. Per-line Line.dlr.limit_mode overrides
scale_objectivefloat1000Objective coefficient divisor
scale_thetafloatautoVoltage-angle enlargement: θ_LP = scale_theta · θ (rad); auto = 1/(3·median(X/V²)); 1 = radians; 1000 = milliradians. auto_scale = false and unset ⇒ 1. Values < 1 shrink θ and log a warning (the meaning was inverted before 2026-11). A manual value always wins over auto (theta_max is still auto-computed); set it with --set model_options.scale_theta=1000 or the converters' opt-in --scale-theta FACTOR (plp2gtopt, plexos2gtopt), which emit nothing by default
demand_fail_costfloat1000Penalty $/MWh for unserved demand (value of lost load) for every demand without its own fcost. 0 = unpenalized (freely sheddable) load; for non-sheddable load set Demand.forced = true. See Unserved-demand cost
demand_fail_segmentsarray–Default stepwise curtailment curve [{fraction, cost}, …] (scalar costs) for demands with neither fcost nor fail_segments; takes precedence over demand_fail_cost. See input-data §3.3
battery_annual_standing_lossfloat0.48Self-discharge [p.u./year] for every Battery whose annual_standing_loss is unset (4 %/month, Li-ion cell + BMS; linear hourly drain = value/8760). 0 restores the legacy lossless default. Explicit per-battery values win; Reservoir/other storage unaffected
reserve_couplingstring"warn"How validate_planning treats a ReserveZone requirement coupled to dispatch (endogenous load term, flow_coef, endogenous inertia, commitment inertia with a relaxed Commitment, line contingencies, contingency_includes_reserve): "warn", "error" (reject the case) or "off". Such a coupling puts a \(\beta\mu\) credit into the LMPs and can price buses negative (formulation §5.9)
outage_reserve_modestring"none"Reserve reaction to Generator.outage_fraction (maintenance): "none" (the headroom rows follow the outage-scaled generation bounds; urmax / drmax untouched), "proportional" (urmax / drmax also scaled by 1 − f: the unit offers reserve only for the share of the block it is in service) or "exclude" (no reserve in a block with f > 0; a urmin floor is clamped to 0). Inert without an outage schedule. CLI: --set model_options.outage_reserve_mode=NAME
battery_power_envelopebooltrueEmit p_charge/Pc_max + p_discharge/Pd_max ≤ 1 per block on every battery converter (Converter/power_envelope), cutting simultaneous full-power charge + discharge
reserve_shortage_costfloat–Penalty $/MWh for unserved reserve (formerly reserve_fail_cost)
hydro_spill_costfloat–Default penalty $/m³ for unmet hydro rights (falls back to 0.0 when unset; formerly hydro_fail_cost). Overridden by per-element fail_cost
hydro_use_valuefloat–Default benefit $/m³ for exercising hydro rights (falls back to 0.0 when unset). Overridden by per-element use_value
state_violation_costfloat–Penalty $/MWh for state-variable violations in the SDDP elastic filter (formerly state_fail_cost). Fallback when an element (reservoir, etc.) does not define its own scost. Converted to physical units via the element's mean_production_factor
demand_fail_rhs_shiftboolfalseWrite unserved demand as load − lmax ∈ [−lmax, 0] and move the fail_cost·lmax baseline into the bus-balance / capacity right-hand sides instead of the objective constant (same optimum, no large constant). Legacy alias demand_option_c
allow_oversupplyboolfalseRelax the bus balance to ≥ (free disposal of surplus energy): over-supplied buses price at 0 instead of negative. Changes the reported LMPs
strict_storage_eminbooltrueEnforce the per-stage reservoir emin as a hard bound on the stage-start and stage-end volumes; false = PLP style (only the energy balance, SDDP keeps the trajectory above emin)
periodic_storageboolfalseStorages on periodic stages (Stage.periodic, default period_hours set or point sampling): daily_cycle storages start each typical period free and close on themselves; state storages run one real cycle and move by n · Δ_cycle (n = duration / period_hours). false keeps the legacy chain / stretched balance
lp_reductionboolfalseSkip provably-zero columns / rows at assembly (e.g. a generator with pmax = pmin = 0 and its commitment). Helps solvers with a weak presolve; can shift the optimum slightly because such units also lose their commitment. CLI: --lp-reduction
auto_scalebooltrueAutomatic per-element scaling (reservoir energy / flow, LNG energy, bus angle). false (CLI --no-scale) keeps raw physical units (debugging; much higher kappa)
theta_maxfloatautoBound of the voltage-angle columns, θ ∈ [−theta_max, theta_max]. Auto: Σ tmax·x_τ over the lines (never caps a flow below tmax); 2π when auto_scale = false
dc_line_resistance_thresholdfloat1e-7Per-unit floor \|R/V²\| below which a line is lossless (its loss model is dropped). 0 disables
scale_loss_linkfloatautoRow factor of the loss link row loss − Σ loss_k·seg_k = 0; auto = a power of 10 from median(R/V²); 1 disables. Not used by linear, piecewise_direct, none
loss_secant_segmentsint1tangent_signed_flow only: secant segments per line and block (with loss_use_sos2). Per-line Line.loss_secant_segments overrides
loss_use_sos2boolfalsetangent_signed_flow only: SOS2 ordering of the secant segments (needs a solver with native SOS2). Per-line Line.loss_use_sos2 overrides
naming_dialectstring–Naming dialect to enforce (gtopt, plp, sddp, plexos, pypsa, pandapower; see share/gtopt/naming_dialects.json): warns on keys from another dialect and writes planning.json keys in that dialect. CLI: --naming-dialect
objective_modestring"cost""emissions" minimises total emissions: generator dispatch cost coefficients (gcost, fuel) are zeroed and each emission source is charged at its zone price (1 $/t when unset). Emission prices and caps are not model options; set price, cap and cap_cost on an EmissionZone (see Emissions). The former emission_cost / emission_cap options were removed
continuous_phasesstring"none"Phase-range expression controlling which phases run LP-relaxed (integers become continuous). Syntax: "all", "none", "0", "1,3:5,8:", ":3". Settable per cascade level
pricing_modestring"fixed"MIP only: which LP supplies the duals (nodal prices) after the MIP; the dispatch is the same in every mode. "fixed" = all integers fixed at the incumbent (the polish LP); "relaxed" = LP relaxation of the full MIP; "fast_start" (alias "fast-start") = integers fixed except fast-start commitments, whose status is relaxed to [0, 1]. A non-optimal pricing LP falls back to fixed with a warning; every (scene, phase) is recorded in pricing.csv. CLI: --pricing-mode. See formulation §5.15 "Pricing"
transition_integralitystring"auto"Integrality of the commitment startup / shutdown columns (v / w) on a MIP build: "auto" = binary (exact); "continuous" = always continuous in [0, 1] (not exact with start / stop ramps); "binary" = always binary. The status u is always integer; relax, continuous_phases and --no-mip relax u, v, w together. Commitment.transition_integrality overrides it per unit
startup_tier_integralitystring"continuous"Integrality of the commitment hot / warm / cold start selectors: "continuous" (the tier rows are totally unimodular once v / w are integral) or "integer". Integer selectors are relaxed with u in pricing_mode = "fast_start". Commitment.startup_tier_integrality overrides it per unit
fast_start_max_hoursfloat1Auto rule for pricing_mode = "fast_start": a commitment without an explicit fast_start is fast-start when min_up_time and min_down_time are both ≤ this value [h] (unset = 0). Must be ≥ 0
risk_measurestring"expected"Social CVaR — the planner's / regulator's risk measure of the scenario costs: "expected" (risk-neutral, LP byte-identical), "cvar" = (1 − λ)·E[C] + λ·(mean of the tail) or "trim" = (1 − λ)·E[C] + λ·(mean outside the tail), λ = cvar_weight, tail mass 1 − cvar_alpha, tail chosen by risk_rank_by / risk_tail. Investment is first-stage; only operating cost is risk-adjusted. Monolithic, single-phase only (SDDP / cascade rejected). Duals become risk-adjusted; risk_measure.csv holds the risk-adjusted scenario probabilities. Use it instead of a risk premium in wacc, never on top. The investor's (private) risk belongs in the ex-post evaluation, not here. See formulation §4.5
cvar_alphafloat0.95Tail level α ∈ [0, 1): the tail is the (1 − α) share of probability mass. cvar: 0 = expectation, → 1 = worst scenario. trim: must be > 0
cvar_weightfloat0.5Weight λ ∈ [0, 1] of the tail term. 0 = expected cost; 1 = pure tail measure (cvar then gives the scenarios outside the tail zero weight and unpriced dispatch)
risk_rank_bystring"cost"How the tail is ranked: "cost" = endogenous system cost at the optimum (Rockafellar–Uryasev rows; only cvar with risk_tail = "upper" is convex and allowed); "index" = exogenous Scenario.risk_index (e.g. a hydrology index wet → dry, or a supply-risk metric), fixed risk-adjusted weights, no extra rows
risk_tailstring"upper"Side of the ranking that forms the tail: "upper" (highest cost / index) or "lower" (lowest index). With "index" the user decides which hydrologies are the supply risk (e.g. the dry tail)
uc_formulationstring"energy_block"Unit-commitment formulation: "energy_block" (block-average power) or "power_based" (power at block boundaries, trapezoid energy, start-up / shut-down trajectories; Morales-España et al.). Commitment.uc_formulation overrides it per unit. See Unit Commitment §4.6
ramp_formulastring"backward"Ramp discretisation: "backward" (interval slope; on point stages the step is the node spacing t_k − t_{k−1}) or "central2" (second-order node derivative; opt-in, not recommended, warns)
ramp_wrapboolfalsecentral2 only: wrap the first / last node around the period
long_transitionstring–Planning default of Commitment.long_transition ("on", "off", "no_uc") for cyclic units whose min up / down time or start window exceeds the typical period. Unset: such undeclared units are a validation error
commitment_breaksnumber[]–Planning default of the daily (non-uniform) commitment grid: cell boundaries in hours of the day, [0, 24), strictly increasing (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. Nodes map by their clock time Stage.start_hour + t. See Typical-week sampling §4c
transition_status_rowsbool–Removed: the rows v ≤ u / w ≤ 1 − u no longer exist (binary v / w make them redundant). Still parsed so old files load; a warning is logged and the value ignored
storage_integrationstringper typePoint-sampled stages only (Stage.sampling = "point"; block stages always use block): storage-balance time integration. block (alias cc / clenshaw_curtis: block weights, which are the Clenshaw–Curtis weights on a Chebyshev grid), trapezoid, lg4 / lg6 (banded Lagrange rules), lg4_pos / lg6_pos (same with non-negative weights). Resolution: element storage_integration → reservoir_storage_integration / battery_storage_integration → this value → lg4_pos (reservoirs) / block (other storages). See Typical-week sampling
reservoir_storage_integrationstring"lg4_pos"Point-stage rule of reservoirs (see storage_integration)
battery_storage_integrationstring"block"Point-stage rule of batteries and the hydrogen / thermal / ammonia storages (see storage_integration)

SolverOptions Fields

The solver_options sub-object (also embedded in monolithic_options, sddp_options.forward_solver_options, and sddp_options.backward_solver_options) configures the LP backend.

FieldTypeDefaultDescription
algorithmstring/int"barrier"LP algorithm: "default" (0), "primal" (1), "dual" (2), "barrier" (3)
threadsint0Number of parallel solver threads (0 = solver default)
presolvebooltrueApply LP presolve before solving
log_levelint0Solver output verbosity (0 = none)
log_modestring"nolog"Solver log-file policy: "nolog" or "detailed" (per-scene/phase/aperture file); the legacy numeric codes 0 / 1 are also accepted
optimal_epsfloat–Optimality (reduced-cost) tolerance, passed to the solver as given. Unset: the solver parameter file's value if it sets one (e.g. CPXPARAM_Simplex_Tolerances_Optimality in solvers/cplex.prm), else 1e-6 / scale_objective (clamped to [1e-9, 1e-1]) when scale_objective != 1, else the solver default. The value used and why is logged once
feasible_epsfloat–Feasibility tolerance (nullopt = solver default)
barrier_epsfloat–Barrier convergence tolerance (nullopt = solver default)
mip_gapfloat–MIP only: target relative optimality gap (unset = solver default; HiGHS mip_rel_gap, CPLEX EPGAP, CBC ratioGap, …)
mip_gap_absfloat–MIP only: target absolute gap in objective units (unset = solver default). Unlike mip_gap, insensitive to a large constant in the objective (e.g. a future-cost term)
memory_emphasisbool–Ask the backend for its memory-saving mode (CPLEX MEMORYEMPHASIS; other solvers ignore it). Unset leaves the solver default. Independent of sddp_options.low_memory_mode
time_limitfloat–Wall-clock budget in seconds for the whole solve of one LP/MIP (0 = no limit): MIP-start stages and algorithm-fallback retries share it — each retry gets the remaining time and retries stop once < 1 s is left. For a MIP with mip_polish on, min(5 % of the budget, 300 s) is reserved for the integer-fixed LP re-solve (the polish gets the remaining time, at least 10 s)
mip_polishbooltrueMIP only. After the MIP stops — optimal, or non-optimal at a time / node / solution / memory limit or abort while holding a feasible incumbent — fix every integer column at its incumbent value and re-solve the remaining LP (CPLEX: CPXPROB_FIXEDMILP). The reported objective, primal and duals are those of the fixed LP, which is never worse than the incumbent. Runs whether or not duals are written. A limit stop stays non-optimal: the run still exits 1 and solution.csv reports status 5 / limit_polished; the log prints the incumbent and polished objectives. If the fixed LP fails, the incumbent is kept and a warning is logged. false reports the raw incumbent (and, on a limit stop, no duals)
scalingstring–Internal solver scaling strategy (nullopt = solver default): "none", "automatic", "aggressive" (or the codes 0 / 1 / 2). See SolverScaling enum
crossoverstring"auto"Barrier only. "auto", "primal", "dual": cross over to a vertex (basis, vertex duals); "none": keep the interior point (interior duals, no basis, the next solve starts cold). HiGHS has one crossover, so primal / dual act like auto there. The SDDP forward pass picks none itself when nothing needs its basis (see docs/solvers.md); an explicit value always wins. Applied per solve: a none solve does not leave later solves of the same LP without crossover; set none in every pass's options to keep it off everywhere
barrier_solverstring"auto"Which interior-point code runs algorithm=barrier (HiGHS only; other solvers ignore it). "auto": HiPO (parallel) when HiGHS was built with HiPO, else IPX; "hipo": HiPO (falls back to IPX like auto); "ipx": IPX (serial), the barrier before HiPO builds. Also selects the IPM a HiGHS MIP falls back to (mip_ipm_solver)
mip_lp_algorithmstring–MIP only: algorithm of the root LP relaxation, "default", "primal", "dual" or "barrier" (the barrier_solver IPM on HiGHS). Unset: the solver default (HiGHS mip_lp_solver=choose; CPLEX StartAlgorithm untouched). HiGHS mip_lp_solver, CPLEX CPX_PARAM_STARTALG; other solvers ignore it
kappa_modestringcompiled defaultBasis condition number read after each solve: "estimate" (HiGHS Hager estimate, CPLEX CPX_KAPPA), "exact" (HiGHS exact, one FTRAN per row, very slow on large LPs; CPLEX CPX_EXACT_KAPPA; for verification and studies), "off" (kappa is neither queried nor printed: no solver call, no kappa / max_kappa columns in solution.csv, no kappa in logs, stats or high-kappa warnings). Gurobi: Kappa / KappaExact; CLP: its dual-error proxy for both; MindOpt, SCIP, cuOpt have no kappa. Read once per solve. When unset: $GTOPT_KAPPA_MODE, else the compiled default (CMake GTOPT_KAPPA_MODE_DEFAULT; auto = off in release builds, estimate in Debug / CIFast; shown by gtopt --version). run_gtopt --kappa-mode MODE forwards it
cold_solve_without_basisbooltrueHiGHS: when advanced_basis is requested but the LP holds no basis yet (first SDDP forward solve of a cell), solve cold with the normal settings (algorithm, presolve). false applies the warm settings anyway (simplex, presolve off), the behaviour before 2026-11, 2-3x slower on CEN cells
deterministic_parallelboolfalseReproducible multi-threaded solves. CPLEX: true sets CPX_PARAM_PARALLELMODE to deterministic, so the same LP, thread count and machine always give the same solution whatever the machine load; unset / false keeps opportunistic mode (faster, but on a degenerate LP the optimal basis, hence duals and reduced costs, can change from run to run under load). The e2e golden tests set it (integration_test/cmake/run_gtopt.cmake). Other solvers ignore it
accept_optimal_infeasbooltrueCPLEX LP status CPX_STAT_OPTIMAL_INFEAS (5, "optimal with unscaled infeasibilities"). Unset / true: accepted as optimal with one warning per solve giving the max unscaled primal / dual infeasibility, no fallback re-solve. false: not optimal, so the max_fallbacks cycle re-solves and the cell fails when no attempt reaches OPTIMAL (the behaviour before this option). Other solvers ignore it
mip_heuristic_effortfloat–MIP only, HiGHS only: share of the MIP effort spent in primal heuristics, 0–1 (HiGHS default 0.05; 0.5 under mip_start_effort: repair unless this is set). Other solvers ignore it (use param_file)
max_fallbacksint2On non-optimal exit, cycle through barrier → dual → primal up to this many times. 0 disables fallback. Each cycle logs one WARN line with every attempt's algorithm and native solver status (code and name) and the outcome
param_filestring–Backend-native parameter file (CPLEX .prm, …), read before the typed fields above. A relative path is resolved against input_directory first (the case directory wins, so "solvers/cplex.prm" works when gtopt runs from an output directory); the working directory is only a fallback when the case has no such file. The resolved path and which location supplied it are logged; a missing file is reported at WARN. Unset: <input_directory>/solvers/<solver>.prm is used when it exists (auto-discovery)

MonolithicOptions Fields

Boundary cuts: configure them on the FutureCost element (system.future_cost_array, see Input Data — Future Cost). The boundary_* keys below are deprecated aliases, honoured only when method is monolithic. The monolithic solver never reads sddp_options.

FieldTypeDefaultDescription
solve_modestring"monolithic"Solve mode: "monolithic" or "sequential"
solver_optionsSolverOptions–Per-method LP solver configuration
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_iterationsint–Deprecated alias → future_cost_array[].iteration_limit
mip_startMipStartOptionsoffFeasible MIP starting point for unit-commitment MIPs (LP relaxation, rounding, propagation dive, repair, injection; enabled, relax, round, domain_rules, dive, scip_repair, inject, from_file, dump_file, seed_solution_file, skip_relaxation, root_basis_cache_file). CLI: --mip-start. See Monolithic §4.5

CascadeOptions Fields

cascade_options holds model_options, sddp_options (global defaults of every level; max_iterations is the global budget), level_array (one CascadeLevel per level: uid, name, active, model_options, system_file, aperture_system_file, sddp_options, transition) and write_level_outputs (default false). Each level's sddp_options accepts the iteration, aperture, convergence and elastic fields plus its own forward_solver_options / backward_solver_options. Full reference: Cascade Method §4.

LpMatrixOptions Fields

The lp_matrix_options sub-object configures how the flat (column-major) LP representation is built and conditioned before being handed to the backend. Only the fields listed below are exposed in JSON; the four name flags (col_with_names, row_with_names, col_with_name_map, row_with_name_map) are set internally and are enabled together when --lp-file is given or lp_debug / lp_error is on (CLI flag, --set or JSON).

FieldTypeDefaultDescription
equilibration_methodstringtopologyMatrix scaling: "none", "row_max", "ruiz". Unset ⇒ "ruiz" for multi-bus Kirchhoff models (use_kirchhoff and not use_single_bus), else "row_max"
fast_sqrt_methodstring"ieee_halve"Approximate sqrt used by Ruiz scaling; see FastSqrtMethod enum
ruiz_max_iterationsint5Ruiz iteration cap
ruiz_tolerancefloat1e-3Ruiz convergence tolerance
pin_logic_rowsboolfalseKeep pure commitment-logic rows (u / v / w transition, exclusion, start-up tiers, start limits, converter charge / discharge exclusivity, plant unit counts with unit coefficients: ±1 rows on binary columns; not min up / down, whose window-length coefficient still needs balancing) out of row equilibration: their row factor stays 1 under row_max, ruiz and incremental add_row. Column scales still apply. Off by default: it left kappa unchanged on the benchmark cases and slowed some MIPs down considerably
water_dual_targetfloatunset (off)Target \|y_LP\| for reservoir energy-balance rows; see below
water_dual_clampfloat1e3Symmetric clamp c in [1/k, k] for the water-row factor
kvl_row_scalebooloffEXPERIMENTAL: post-equilibration factor on node-angle KVL rows; see below
kvl_row_clampfloat100Clamp c in [1/k, k] of the KVL row factor
kvl_x_reffloatmedian(X/V²)Reference x_tau of the KVL factor c = x_ref / x_tau (setting it also enables the factor)
compute_statsboolfalseCompute and log coefficient min/max/ratio during flatten()
label_meta_without_namesboolfalseKeep each cell's label metadata even when LP names are off. Default drops it (diagnostics fall back to row / column indices); true restores the previous behaviour
share_label_metabooltrueShare the label metadata between a cell's LP and its flat-LP snapshot; false restores the previous per-LP copy
drop_element_collectionsbooltrueSDDP / cascade under low_memory_mode = off: drop the disposable element wrappers after the build and rebuild them for output, as compress does; false keeps them resident (previous behaviour). Monolithic always keeps them
lp_coeff_ratio_thresholdfloat1e7When global max/min coefficient ratio exceeds this, print a per-scene/phase breakdown
solver_namestring–Solver backend pin (--solver wins; beats .gtopt.conf solver, $GTOPT_SOLVER and plugin priority). gtopt writes the solver it resolved here in gtopt_state.json, so replaying the snapshot uses the same backend
validationLpValidationOptionsonIncremental checks while the LP is assembled; one warning per offending entry, at most max_warnings_per_kind per kind. Fields: enable (true), coeff_warn_max (1e10), coeff_warn_min (1e-10, non-zero coefficients below it), bound_warn_max (1e12, finite bounds), rhs_warn_max (1e12), obj_warn_max (1e10), max_warnings_per_kind (50)

These fields are resolved for every LP build (PlanningOptionsLP::resolve_lp_matrix_options): the gtopt binary, each cascade level, SDDP aperture systems and a PlanningLP built directly from C++ all use the same options. The topology default of equilibration_method follows the model_options of the LP being built, so a cascade level that rebuilds its LP with use_single_bus = true defaults to "row_max" and a multi-bus Kirchhoff level to "ruiz"; an explicit equilibration_method applies to every level.

LP naming: There is no names_level field or --lp-names-level flag. Pass --lp-file <path> or --lp-debug to have GTOpt enable all four naming fields on LpMatrixOptions so the generated .lp dump is human-readable.

SanityOptions Fields

validate_planning runs data-quality checks on every case at load time. They never reject a case: each category emits ONE Validation: Sanity: ... warning with the count and the top offenders; the full list is logged at debug level (--log-level debug). Only inline values are inspected — file-backed schedules resolve at LP-build time (the converters' post-conversion report, gtopt_shared.sanity_report, also reads the files).

CategoryFlags
phantom rewardFlowRight.uvalue > 0, FlowRight.fcost < 0 or model_options.hydro_use_value above reward_fail_cost_ratio × demand fail cost (global demand_fail_cost, else the cheapest per-demand fcost) — the LP sheds load to collect it (Maule Res. 105: reward 1100 > deficit 1000 gave −2.1 G$ of phantom reward)
coupled phantom rewarda FlowRight with uvalue > 0 that shares a user constraint (inline or loaded from PAMPL) with a right whose shortfall penalty (fcost > 0, or uvalue < 0 on a target-0 deficit right) is below reward_fail_cost_ratio × the reward — the LP books shortfall to collect the reward (Maule Res. 105, review R3: reward 1100 vs deficit_Melado 1000)
profile rangeGeneratorProfile / DemandProfile / CapacityProfile values outside [0, 1] (per-unit factors)
dead commitmentgenerators with pmax (or capacity, no expcap) <= 0 over the whole horizon that still have a Commitment or pmin > 0; batteries with zero pmax_charge and pmax_discharge that keep commitment or a pmin_*

| line X/R | |X| / R > line_xr_max | | line x p.u. | 100·|X|/V² > line_x_pu_max (100 MVA base; lines with voltage set) | | line x outlier | |X|/V² more than line_x_outlier_factor times off the median of its kV class (bus voltage, else line voltage; both bus voltages set and different = transformer class) — mistyped kV, impedance read in the wrong unit | | reserve level | a reservoir without emin (unset or 0) whose volume drives a FlowRight / VolumeRight bound_rule with a breakpoint above 0 (an agreement reserve level the LP may cross) |

FieldTypeDefaultDescription
enablebooltrueMaster switch
reward_fail_cost_ratiofloat1.0Reward / demand-fail-cost ratio above which a reward is flagged
profile_tolerancefloat1e-6Slack on [0, 1]

| line_x_outlier_factor | float | 50 | Allowed ratio to the kV-class median of |X|/V² | | line_x_min_class_size | int | 5 | Minimum lines in a kV class for the outlier test | | line_x_pu_max | float | 5.0 | Reactance ceiling [p.u., 100 MVA base] | | line_xr_max | float | 100 | X/R ceiling | | max_offenders | int | 5 | Offenders named per summary line |

{ "options": { "sanity_options": { "line_xr_max": 200, "max_offenders": 10 } } }

SddpOptions Fields

See SDDP Method for full documentation with examples.

Iteration Control

FieldTypeDefaultDescription
max_iterationsint100Maximum forward/backward iterations
min_iterationsint1Minimum iterations before convergence is checked
convergence_tolfloat0.01Relative gap tolerance; the stop criterion only when ΔUB stationarity is disabled (stationary_tol = 0)

Convergence Criteria

FieldTypeDefaultDescription
convergence_modestring"gap_stationary"Criterion mode: "gap_only", "gap_stationary", "statistical" (opt-in; needs convergence_confidence > 0)
stationary_tolfloat0.005ΔUB stationarity tolerance (0 = disabled)
stationary_windowint4Look-back window (iterations) for the stationarity check
stationary_gap_ceilingfloat0.02A stationary stop needs signed gap below this (negative passes) and stationary_window own iterations with cuts; 1.0 disables
convergence_confidencefloat0.0Confidence level for the PLP-style statistical criterion (0 = disabled)

Cuts and Recovery

FieldTypeDefaultDescription
cut_directorystring"cuts"Directory for Benders cut files
cut_sharing_modestring"none"Cut sharing between scenes: "none", "multicut" (one α per source scene) or "markov" (experimental; see markov_states / markov_transition and SDDP Markov). The removed "expected", "broadcast_mean", "accumulate", "max" names are rejected
markov_statesint array–markov only: Markov state of each scene, in [0, M)
markov_transitionfloat array–markov only: row-major M×M row-stochastic transition matrix
forward_sampling_modestring"persistent""persistent" (each scene follows its own path) or "resampled" (probability-weighted re-draw at each phase boundary, matching the multicut bound)
integer_cuts_modestring"none"Cuts on cells with integer columns: "none" or "strengthened" (LP-relaxation cut with a Lagrangian intercept from one MIP; needs a MIP-capable solver)
cut_drain_modestring"iteration"Asynchronous runs: which in-flight cuts are kept after the stop signal: "iteration" (cuts of certified iterations; deterministic), "count", "all"
cut_coeff_epsfloat1e-8Drop cut coefficients below this absolute value (and their RHS term)
scale_alphafloat0 (auto)Divisor of the future-cost column α (auto = the largest state-variable scale)
alpha_minfloat–Lower bound on α [$]; set 0 when every stage cost is non-negative. Not valid with negative-cost elements or boundary_cuts_mean_shift
max_cuts_per_phaseint0Maximum stored cuts per (scene, phase) (0 = unlimited)
cut_prune_intervalint10Iterations between cut pruning passes
prune_dual_thresholdfloat1e-8Dual threshold for inactive cut detection
single_cut_storageboolfalseUse single-cut storage mode
max_stored_cutsint0Maximum total stored cuts per scene (0 = unlimited)
save_per_iterationbooltrueSave cuts after every iteration (not just at end)
cut_recovery_modestring"none"Cut persistence: "none", "keep", "append", "replace"
recovery_modestring"full"Recovery from a previous run (with cut_recovery_mode): "none", "cuts", "full"
cuts_input_filestring–CSV file for hot-start cuts
boundary_cuts_filestring–Deprecated alias → future_cost_array[].cuts_file (sddp/cascade only)
boundary_cuts_modestring–Deprecated alias → future_cost_array[].mode (sddp/cascade only)
boundary_cut_sharing_modestring–Deprecated alias → future_cost_array[].sharing (sddp/cascade only)
boundary_cuts_mean_shiftbool–Deprecated alias → future_cost_array[].mean_shift (sddp/cascade only)
boundary_max_iterationsint–Deprecated alias → future_cost_array[].iteration_limit (sddp/cascade only)
missing_cut_var_modestring–Deprecated alias → future_cost_array[].missing_cut_var_mode (sddp/cascade only)

The FCF boundary cuts are configured on the FutureCost element (system.future_cost_array, see Input Data — Future Cost).

Feasibility and Elastic Filter

FieldTypeDefaultDescription
elastic_penaltyfloat1.0Penalty for elastic slack variables in feasibility
elastic_modestring"farkas_recursive"Elastic filter mode: "chinneck" (alias "iis"), "single_cut" (alias "cut"), "multi_cut", "state_repair" (alias "plp"), "farkas_recursive" (see docs/methods/sddp.md §5.4)
fact_epsfloat1e-8PLP FactEPS tolerance for state_repair / farkas_recursive
fact_max_cyclesint500PLP FactMXC per-(scene, phase) solve-cycle cap for state_repair / farkas_recursive
fcut_logboolfalseWrite the PLP-style feasibility-cut debug log gtopt_fcut.log (plpfact.log analogue) to log_directory; CLI shorthand --fcut-log (see docs/methods/sddp.md §5.4)
multi_cut_thresholdint100Persistent cumulative infeasibility count at a (scene, phase) before switching to multi_cut (0 = always; <0 = disabled)
terminal_failure_thresholdint2Consecutive iterations in which the elastic filter produced no feasibility cut for a scene before that scene's forward pass is skipped until new cuts arrive (0 = off)
forward_fail_stopboolfalsetrue: an infeasible phase installs its feasibility cut and ends the scene's forward pass for this iteration; false: PLP-style backtracking (re-solve the previous phase under the new cut)
forward_infeas_rollbackbooltrueDelete the cuts of a scene declared infeasible in the forward pass; the run aborts if every failed scene stalls without new cuts
forward_max_fallbacksintsolver_options.max_fallbacksAlgorithm-fallback attempts for forward-pass solves
backward_max_fallbacksint0Algorithm-fallback attempts for backward-pass and aperture solves (0 = fail at once)
backward_resolve_targetbooltrueRe-solve phase t at the trial state before building the cut for phase t−1, so cuts added earlier in the same backward pass are reflected
max_async_spreadint0Asynchronous scenes (with cut_sharing_mode = none): maximum iteration spread between the fastest and slowest scene; 0 = synchronous

Apertures (Backward-Pass Sampling)

FieldTypeDefaultDescription
aperturesarray of UIDs–Aperture UIDs (absent = from Phase, [] = pure Benders)
aperture_directorystring–Alternate data directory for aperture scenarios
num_aperturesint–First-N selector on each phase's Phase.apertures (unset = all, 0 = pure Benders). With the wettest-first order written by plp2gtopt, picks the N wettest
aperture_selection_modestring"head"How num_apertures picks: "head" (first N), "stride" (alias interleave / spread: evenly spaced), "tail" (alias last: last N)
aperture_system_filestring–Planning JSON whose system replaces the forward system in the backward aperture solves (a cheaper model with the same state elements). Overridden by CascadeLevel / Phase.aperture_system_file
aperture_solve_modestring"warm"Per-aperture solve and cut recovery: "cold", "warm" (re-optimise the chunk-resident basis), "reduced_cost" (barrier without crossover), "dual_shared" (one representative solve, the other cuts synthesised), "screened" (dual_shared plus exact re-solves of the loosest cuts). See SDDP §4.4
aperture_screen_countint2screened only: synthesised cuts re-solved exactly
aperture_seed_basisboolfalseSeed each iteration's first aperture from the previous iteration's basis (vertex modes only)
aperture_use_manual_clonebooltrueBuild aperture clones from the flat-LP snapshot (load_flat) instead of the backend's native clone, so clones are built in parallel; falls back to the native clone when no snapshot is held
aperture_drop_fcutsbool–Deprecated and ignored (a warning is logged)
aperture_timeoutfloat30.0Per-aperture LP solve timeout in seconds (0 = no limit)
save_aperture_lpboolfalseSave LP files for infeasible apertures to log directory
aperture_chunk_modestring"per_scene"Backward aperture grouping into pool tasks: "per_scene" (all apertures of a (scene, phase) in series on one LP clone, warm-start reuse; parallelism capped at the scene count), "per_aperture" (one task per aperture, fresh clone, cold solve), "chunked" (aperture_chunk_size = K per task). CLI: --aperture-chunk-mode (see docs/methods/sddp.md, "Aperture task grouping")
aperture_chunk_sizeint–K apertures per task for aperture_chunk_mode = "chunked" (unset = auto formula). Deprecated as a mode selector when no mode is set: -1 → per_scene, 1 → per_aperture, K > 1 → chunked (warning logged); 0 → default per_scene. CLI: --aperture-chunk-size
aperture_cut_resolveboolfalseRe-solve the source phase LP after installing each aperture-built cut (an optimality check only; nothing reads that solution). Off by default since 1.2.0

Infeasible apertures. An infeasible (or timed-out) aperture is dropped and the expected cut renormalised over the remaining ones. With a hard terminal target (efin without efin_cost) the model lacks relatively complete recourse and the same aperture is dropped every iteration: the LB is then over a rescaled distribution. gtopt warns once per (scene, phase, aperture) after 3 consecutive drops, reports apertures_dropped per iteration, and never reports converged for an iteration that dropped apertures. For aperture runs prefer a soft efin (efin_cost) — but a meaningful penalty may not be available, and with a soft target the solution may never reach efin (it just pays the penalty, so the target is silently unmet). Details: SDDP §4.4, Infeasible apertures.

LP Updates and State Variables

FieldTypeDefaultDescription
update_lp_skipint0Iterations to skip between LP coefficient updates (0 = every iteration)
state_variable_lookup_modestring"warm_start"Volume lookup for LP updates: "warm_start" or "cross_phase"
low_memory_modestring"compress" (SDDP/cascade) / "off" (monolithic)One of off or compress (snapshot and rebuild are back-compat aliases for compress; see SDDP docs §7.6)
memory_codecstring"auto"Compression codec for compress mode (auto = zstd level 1, lz4, snappy, zstd, gzip, none)
release_backendsbooltrueUnder low_memory_mode = off, release each solver backend after its solve and rebuild it from an uncompressed flat-LP snapshot on the next visit, warm-starting from the saved basis (same as compress with memory_codec = uncompressed). false keeps every LP live (the behaviour before this became the default)
release_after_alphabooltrueRelease each low-memory backend right after α registration; false keeps them live until the post-initialisation sweep (previous behaviour)
free_solver_scratchbooltrueUnder off, free the CPLEX / Gurobi / MindOpt copy-out getter buffers after each forward solve and each iteration; false keeps them (previous behaviour)
basis_cross_modestring"full_cross"Simplex-basis reuse between the forward and backward solves of a (scene, phase): off, warm, forward_to_backward, backward_to_forward, full_cross. Correctness-neutral
lp_debug_passesstring"forward,aperture"With lp_debug = true: SDDP passes whose LPs are dumped (forward, backward, aperture, all)

Work Pool Swap Gate

These two fields live in sddp_options but apply to every work pool of the run (LP build, SDDP forward/backward, monolithic, output writing).

FieldTypeDefaultDescription
pool_max_process_swap_mbfloat2048Process swap usage (VmSwap, MB) at/above which the pool throttles task dispatch — but only while VmSwap is still growing (see next field). 0 = gate off. CLI: --swap-limit
pool_swap_growth_mbfloat64VmSwap growth (MB per 5 s window) above which the process counts as actively swapping. 0 = any net growth counts. CLI: --swap-growth

VmSwap counts pages that are on swap, not pages being moved. Cold pages the kernel evicted because of other load on the host stay there with no swap I/O at all, so the gate looks at the growth of VmSwap rather than its level: a process with a large but static VmSwap is never throttled. The pool logs one swap gate ENGAGED line (info) when the gate closes and one swap gate RELEASED line, with the reason, when it opens again (one quiet 5 s window). Growth is a per-process signal, so paging caused by other tenants of a shared host does not throttle this run; the host-wide swap I/O rate is not used.

Monitoring and Control

FieldTypeDefaultDescription
api_enabledbooltrueWrite JSON status file each iteration (for monitoring tools)
sentinel_filestring–File path; if it exists, solver stops gracefully after current iteration
simulation_modeboolfalseSkip training (max_iterations=0), run forward-only policy evaluation

Per-Pass Solver Options

FieldTypeDescription
forward_solver_optionsSolverOptionsLP solver overrides for SDDP forward pass
backward_solver_optionsSolverOptionsLP solver overrides for SDDP backward pass

Forward-pass crossover

With a barrier (or solver-default) forward algorithm, the forward pass runs crossover (auto) only where its vertex solution is consumed:

  • Benders cuts from the forward duals: no aperture set resolves (apertures: [], or no aperture_array / per-phase apertures), so the backward pass builds the cut from the forward reduced costs;
  • forward basis capture: basis_cross_mode is warm, forward_to_backward or full_cross (the default).

Otherwise (aperture cuts with basis_cross_mode off or backward_to_forward) the forward pass is barrier with crossover: none. An explicit non-auto crossover (primal / dual / none) in forward_solver_options — or in the global solver_options, which the forward options inherit — always wins; simplex algorithms are left untouched. With basis_cross_mode warm / full_cross the forward pass is seeded from a captured basis from iteration 2 on and solved by warm dual simplex (a vertex anyway); an interior forward solve leaves no basis to capture, so crossover: none there only affects cold solves — pair it with basis_cross_mode: off to run the forward pass by barrier throughout. The final simulation pass always crosses over (output duals). The rule applies per cascade level.

Cuts built from interior forward data — the aperture pass's fallback cut, or Benders cuts under an explicit crossover: none — have their intercept lowered by 1e-8 · max(1, |z|) (the barrier relative gap), so primal–dual gap noise cannot lift the lower bound above the upper bound.

Solver Options Precedence

Each planning method can specify per-pass solver options that override the global solver_options. The merge chain (highest priority first):

MethodMerge chain
Monolithicmonolithic_options.solver_options -> solver_options
SDDP forwardsddp_options.forward_solver_options -> solver_options
SDDP backwardsddp_options.backward_solver_options -> solver_options

For each field in SolverOptions, the per-pass value is used if set; otherwise the global solver_options value applies.

JSON Example

{
  "options": {
    "solver_options": {
      "algorithm": 3,
      "threads": 4,
      "optimal_eps": 1e-8
    },
    "sddp_options": {
      "forward_solver_options": {
        "algorithm": 1
      },
      "backward_solver_options": {
        "threads": 1
      }
    }
  }
}

In this example, the forward pass uses algorithm 1 (primal) with 4 threads and 1e-8 tolerance (from global), while the backward pass uses algorithm 3 (barrier) with 1 thread and 1e-8 tolerance.

Variable Scales Precedence

Variable scaling factors are resolved in this order (highest priority first):

  1. Global options (scale_theta for bus voltage angles; it ENLARGES θ, θ_LP = scale_theta · θ, so its Bus.theta entry is 1 / scale_theta)
  2. variable_scales entries matching by (class_name, variable, uid)
  3. variable_scales entries matching by (class_name, variable, uid=-1) (wildcard)
  4. Default scale = 1.0

JSON Example

{
  "options": {
    "model_options": {
      "scale_theta": 1000
    },
    "variable_scales": [
      {"class_name": "Reservoir", "variable": "energy", "uid": -1, "scale": 1000.0},
      {"class_name": "Battery", "variable": "energy", "uid": 1, "scale": 10.0}
    ]
  }
}

Merge Semantics

When multiple JSON files are passed to GTOpt, their "options" sections are merged left to right. For each field:

  • Optional scalars: the last file that sets the field wins (unset fields in later files leave earlier values alone)
  • Sub-objects: merged recursively (same rule per field)
  • Non-optional solver_options fields (algorithm, threads, presolve, log_level): the first file wins
  • variable_scales: appended (later files add entries, earlier entries take precedence for the same key)

Precedence layers

The more explicit, the closer to the run, wins:

  1. Dedicated CLI flags (--solver highs, --output-format csv)
  2. --set (--set use_single_bus=true; the last --set of a key wins)
  3. JSON files (last file that sets a field wins, see above)
  4. Config file (.gtopt.conf [gtopt] section; only fills fields the layers above left unset)
  5. Built-in defaults (PlanningOptionsLP compile-time defaults)

MainOptions (CLI-only)

MainOptions is used only by the standalone binary and is not part of the JSON interface. It carries all CLI-parsed values plus the list of planning files.

FieldCLI flagDescription
planning_filespositional / -sSystem JSON file paths
solver--solverLP solver backend
(start-up only)--plugin-checkWhat a failed solver-plugin integrity check does (error / warning)
(start-up only)--config FILEOption-defaults file (instead of $GTOPT_CONFIG / ~/.gtopt.conf)
(any option)--set key=valueSet any planning option (see below)

The full flag list is in the Usage Guide. There are no --method, --demand-fail-cost or --scale-objective flags: use --set method=sddp, --set model_options.demand_fail_cost=500 or --set model_options.scale_objective=1000.

--set key=value: all other options are now set via --set. Examples: --set use_single_bus=true, --set output_directory=results/, --set solver_options.algorithm=barrier, --set sddp_options.max_iterations=300.

Deprecated aliases (still work, emit a warning): -b, -k, -D, -F, -d, -f, -C, -a / --algorithm, -t / --threads, --sddp-max-iterations, --sddp-min-iterations, --sddp-convergence-tol, --sddp-elastic-penalty, --sddp-elastic-mode, --lp-debug, --lp-error, --log-directory, --cut-directory, --lp-compression, --lp-coeff-ratio.

Full JSON Example

{
  "options": {
    "input_directory": "system_data",
    "input_format": "parquet",
    "output_directory": "output",
    "output_format": "parquet",
    "output_compression": "zstd",
    "method": "sddp",
    "lp_debug": false,
    "model_options": {
      "demand_fail_cost": 1000,
      "use_kirchhoff": true,
      "use_single_bus": false,
      "use_line_losses": true,
      "scale_objective": 1000
    },
    "solver_options": {
      "algorithm": 3,
      "threads": 4,
      "optimal_eps": 1e-8,
      "feasible_eps": 1e-8
    },
    "sddp_options": {
      "max_iterations": 200,
      "convergence_tol": 1e-4,
      "forward_solver_options": {
        "algorithm": 1
      }
    },
    "lp_matrix_options": {
      "equilibration_method": "ruiz",
      "compute_stats": true
    },
    "variable_scales": [
      {"class_name": "Reservoir", "variable": "energy", "uid": -1, "scale": 1000.0}
    ]
  },
  "simulation": {
    "annual_discount_rate": 0.1
  },
  "system": {
    "future_cost_array": [
      {
        "uid": 1,
        "name": "fcf",
        "cuts_file": "boundary_cuts.csv",
        "valuation": "end_of_horizon"
      }
    ]
  }
}

See Also

Water-row dual conditioning (water_dual_target) — EXPERIMENTAL

Experimental, off by default. Measured on a 5-year hydrothermal case (3 SDDP iterations): exact (same LB at iteration 1, unit tests over none/row_max/ruiz) but no gain in kappa or solver effort with one factor per reservoir, and a clamp of 1e3 raises the coefficient ratio from ~5e5 to ~5e8. Keep k small.

Reservoir energy-balance rows carry the water value, typically 1e3-1e5 $/hm3 once boundary / Benders cuts are present, i.e. LP duals 2-3 decades above the [1, 100] band solvers handle best. Row-max / Ruiz scale rows by their coefficients, not by dual size, and undo any pre-scaling, so the correction is applied after equilibration: the row is multiplied by c (coefficients and bounds) and its stored row scale divided by c.

  • LP dual becomes y_LP / c; the physical dual y_LP * scale_objective / row_scale, SDDP cut coefficients, outputs and saved cuts are unchanged (exactness tests in test_sddp_cut_exactness.cpp).
  • c = clamp(expected|y_LP| / water_dual_target, 1/k, k) with expected|y_LP| = water_value_hint * prob*disc * row_scale / scale_objective.
  • Per reservoir: water_value_hint ($/hm3, default = the state-violation cost) and dual_scale (explicit c, overrides the auto rule).
  • Trade-off: the row's coefficients now have max c instead of 1 after equilibration (spread vs. the junction rows grows by c); keep k small (default 1e3 is an upper bound, 1e1-1e2 is safer).

KVL row dual conditioning (kvl_row_scale) — EXPERIMENTAL

Node-angle KVL rows (Line.theta) have duals dLMP / x_tau (1e5-1e7 on congested 220/500 kV corridors). With kvl_row_scale each row is multiplied after equilibration by c = clamp(x_ref / x_tau, 1/k, k) (same exact mechanism as water_dual_target: stored row scale divided by c, physical duals / cuts / outputs unchanged). Because y * x_tau is invariant per flow column, shrinking the dual by 1/x_tau inflates the row's coefficients by the same factor, so only a mild x_ref is useful. Measured on the same case, the first-order lever is not this option but scale_theta: leave it UNSET (auto = 1 / (3 median(X/V²))). A case that pins scale_theta: 1 (older plp2gtopt conversions) runs with ~10x higher kappa.