LngTerminal struct
#include <gtopt/lng_terminal.hpp>
LNG storage terminal in a power system.
The terminal accumulates and releases LNG between time blocks. The volume balance per block is:
V[t+1] = V[t] × (1 − annual_standing_loss/8760 × duration)
+ delivery_rate × duration
− sendout × duration
− vent × durationwhere sendout feeds linked generators via heat-rate coupling, sendout = Σ_g (heat_rate_g × P_g) over each block, bounded by [sendout_min, sendout_max] when set (enforce_sendout, default on). Optional spot cargoes (spot_cargo_volume, spot_cargo_max, spot_cost, spot_integer, spot_annual_max) add spot_cargo_volume × n_spot to the first block of a stage.
Public static variables
- static LPClassName class_name
Public variables
- OptActive active
- Activation status (default: active).
- OptTRealFieldSched annual_standing_loss
- Boil-off gas rate [p.u./year].
- OptTRealFieldSched delivery
- OptTRealFieldSched delivery_cost
- OptTBRealFieldSched ecost
- OptReal efin
- End-of-horizon minimum level [m³].
- OptReal efin_cost
- OptReal eini
- Initial tank level [m³].
- OptTBRealFieldSched emax
- OptTBRealFieldSched emin
- OptBool enforce_sendout
- OptReal flow_conversion_rate
- Converts m³/h × h → m³ (default 1.0).
- Array<LngGeneratorLink> generators
- Linked generators with heat rates.
- OptReal mean_production_factor
- [MWh/m³] for scost computation
- Name name
- Human-readable name.
- OptReal reserve_gas_usage
- OptReal reserve_sustain_hours
- OptTBRealFieldSched scost
- OptReal sendout_max
- Max regasification rate [m³/h].
- OptReal sendout_min
- OptTBRealFieldSched soft_emin
- OptTBRealFieldSched soft_emin_cost
- OptReal spillway_capacity
- Max venting rate [m³/h].
- OptReal spillway_cost
- Venting penalty cost [$/m³].
- OptReal spot_annual_max
- OptTRealFieldSched spot_cargo_max
- Spot arrival slots per stage [cargoes/stage] (0 = none).
- OptReal spot_cargo_volume
- OptTRealFieldSched spot_cost
- Purchase cost of spot LNG [$/m³] per stage (default 0).
- OptBool spot_integer
- Uid uid
- Unique identifier.
- OptBool use_generator_fuel_curve
- OptBool use_state_variable
- Propagate tank level across stages.
Default physical constants
- static Real default_sendout_max
- [m³/h]
- static Real default_spillway_capacity
- [m³/h]
- static Real default_flow_conversion_rate
- [m³/(m³/h·h)]
- static Real default_mean_production_factor
- [MWh/m³] — fallback for scost computation
Variable documentation
static LPClassName gtopt:: LngTerminal:: class_name
Canonical class-name constant used in LP row labels and config fields like VariableScale::class_name. Single source of truth — LngTerminalLP exposes no separate ClassName member; callers reach the constant via LngTerminal::class_name directly (or LngTerminalLP::Element::class_name in generic contexts).
OptTRealFieldSched gtopt:: LngTerminal:: delivery
Scheduled LNG arrival [m³/stage]
OptTRealFieldSched gtopt:: LngTerminal:: delivery_cost
Purchase (contract) price of the scheduled deliveries [$/m³] per stage. Priced on the fixed delivery columns, so for must-take cargoes it is a constant of the objective (total cost right, no effect on dispatch). Unset = costless (former behaviour). The linked generators' gcost must then carry only non-fuel VOM: the tank gas is priced by the tank balance dual (its shadow value).
OptTBRealFieldSched gtopt:: LngTerminal:: ecost
Storage holding cost [$/m³] — per-(stage, block); accepts a scalar (broadcasts), a 2-D nested array, or a file-backed schedule.
OptTBRealFieldSched gtopt:: LngTerminal:: emax
Maximum tank level [m³] — same shapes as emin.
OptTBRealFieldSched gtopt:: LngTerminal:: emin
Minimum tank level [m³] — per-(stage, block); accepts a scalar (broadcasts), a 2-D nested array, or a file-backed schedule.
OptBool gtopt:: LngTerminal:: enforce_sendout
Enforce sendout_min ≤ Σ_g heat_rate_g · P_g ≤ sendout_max per block (default true). The limits apply only when set; false restores the former behaviour (limits parsed but ignored).
OptReal gtopt:: LngTerminal:: reserve_gas_usage
Expected up-reserve deployment [MWh per MW of provision per hour], burnt from the tank: + fcr·a·hr_g·Δ·r_up_g in the tank balance. Only read when reserve_sustain_hours is set (default 0).
OptReal gtopt:: LngTerminal:: reserve_sustain_hours
Gas backing of the linked generators' reserves [h]. Unset (default) => no coupling, the LP is unchanged. When set (>= 0), per block, with r_up_g the sum of generator g's up-reserve provisions:
reserve_up_energy: V_b − fcr·T·Σ_g hr_g·r_up_g >= emin_b (T > 0) reserve_up_sendout: Σ_g hr_g·(P_g + r_up_g) <= sendout_max
V_b is the end-of-block tank level (it already nets the block's deliveries and burn), so up reserve is offered only with gas in stock to sustain it T hours. The send-out row is emitted only when sendout_max is set and enforce_sendout is on. Down reserve is gas-limited through the generic provision row r_dn <= P − Pmin: with no gas P = 0 and r_dn = 0.
OptTBRealFieldSched gtopt:: LngTerminal:: scost
State penalty [$/m³] — per-(stage, block).
OptReal gtopt:: LngTerminal:: sendout_min
Min regasification rate [m³/h]
OptTBRealFieldSched gtopt:: LngTerminal:: soft_emin
Soft minimum tank level [m³] — per-(stage, block); accepts a scalar (broadcasts), a 2-D nested array, or a file-backed schedule.
OptTBRealFieldSched gtopt:: LngTerminal:: soft_emin_cost
Penalty for soft_emin [$/m³] — per-(stage, block).
OptReal gtopt:: LngTerminal:: spot_annual_max
Cap on spot cargoes per planning year [cargoes/year]: one row per 8760-h window of the horizon (a stage belongs to the window of its midpoint) within each LP (phase).
OptReal gtopt:: LngTerminal:: spot_cargo_volume
Volume of one spot cargo [m³] (same unit as delivery). Spot cargoes are modelled only when this and spot_cargo_max are > 0.
OptBool gtopt:: LngTerminal:: spot_integer
Whole cargoes (integer slots → MIP) when true; continuous (fractional cargoes, LP) when unset / false.
OptBool gtopt:: LngTerminal:: use_generator_fuel_curve
Draw the linked generators' tank gas along their own fuel curve (default false = the link's scalar heat_rate × P). When true and the generator has a curve — pmax_segments / heat_rate_segments (convex piecewise incremental), a scalar Generator.heat_rate, or a committed Commitment.noload_fuel — the tank balance, the send-out rows and the PAMPL fuel draw use heat_rate_link × (h₁·P + Σₖ Δhₖ·sₖ + noload_fuel·u) (the same legs as Fuel offtake), so part-load burn (no-load fuel per MWh) and the steeper upper segments cost gas. The up-reserve backing (reserve_sustain_hours) then values r_up at the top segment's heat rate (the most a deployed MW can burn on a convex curve). Without a Fuel on the generator the segment slacks are priced only through the tank balance dual.