gtopt::Converter struct

Couples a battery to a generator (discharge) and a demand (charge).

A converter links:

  • A Battery as the energy source/sink
  • A Generator for the discharge (generation) path
  • A Demand for the charge (load) path

The conversion_rate scales the electrical output (MW) relative to the rate at which stored energy (MWh/h) is withdrawn from the battery.

Public static variables

static LPClassName class_name

Public variables

OptActive active
Activation status (default: active).
OptTRealFieldSched annual_capcost
Annualized investment cost [$/MW-year].
OptTRealFieldSched annual_derating
Annual capacity derating factor [p.u./year].
SingleId battery
ID of the linked battery.
OptTRealFieldSched capacity
Installed power capacity [MW].
OptTRealFieldSched capmax
Absolute maximum power capacity [MW].
OptBool commitment
OptTRealFieldSched conversion_rate
SingleId demand
ID of the charge demand.
OptReal energy_power_ratio
OptBool exclusive_charge_discharge
OptTRealFieldSched expcap
Power capacity per expansion module [MW].
OptTRealFieldSched expmod
Maximum number of expansion modules [dimensionless].
SingleId generator
ID of the discharge generator.
OptBool integer_expmod
Integer-constrain the expmod variable.
Name name
Human-readable name.
Uid uid
Unique identifier.

Annuity from overnight cost (per-candidate private rate)

Used only when annual_capcost is unset: the LP charges annual_capcost = overnight_capcost × CRF(wacc, economic_life), CRF(r, n) = r(1+r)^n / ((1+r)^n − 1). wacc unset → the social annual_discount_rate (the stage discount factors are never changed). All unset (default) → today's LP.

OptTRealFieldSched overnight_capcost
OptTRealFieldSched economic_life
Annuity life [years].
OptTRealFieldSched wacc
OptTRealFieldSched fixed_om_cost

Variable documentation

static LPClassName gtopt::Converter::class_name

Canonical class-name constant used in LP row labels and config fields like VariableScale::class_name. Single source of truth — ConverterLP exposes no separate ClassName member; callers reach the constant via Converter::class_name directly (or ConverterLP::Element::class_name in generic contexts).

OptBool gtopt::Converter::commitment

Gate the inner Demand.{lmin,lmax} and Generator.{pmin,pmax} bounds with per-block INTEGER commitment binaries. When set, the LP adds two integer columns per block — u_charge, u_discharge, each in {0, 1} — plus C2-style rows:

load    ≥ lmin × u_charge       load    ≤ lmax × u_charge
gen     ≥ pmin × u_discharge    gen     ≤ pmax × u_discharge

and resets the static col floors on load / gen to 0 so the bounds only fire when the corresponding binary is 1. Mirrors UC.jl's conditional Minimum charge/discharge rate (MW) semantics. Always integer (commitment is a MIP feature by convention — for LP-only solves leave commitment unset and accept hard static floors). Set by System::expand_batteries() when Battery.commitment is enabled.

OptTRealFieldSched gtopt::Converter::conversion_rate

Electrical output per unit stored energy withdrawn [dimensionless] (ratio of generator_output [MW] to battery_discharge_rate [MW-equivalent]); simplifies to dimensionless since MW/(MWh/h) = 1; default = 1.0

OptReal gtopt::Converter::energy_power_ratio

Fixed storage duration [h] of the linked battery: per stage battery capainst = energy_power_ratio × converter capainst (added only when both capacity columns exist). Set by System::expand_batteries() from Battery.energy_power_ratio.

OptBool gtopt::Converter::exclusive_charge_discharge

Charge/discharge exclusivity constraint u_charge + u_discharge ≤ 1 per block (row charge_discharge_exclusive). Only used with commitment = true; unset means true. Set by System::expand_batteries() from Battery.exclusive_charge_discharge.

OptTRealFieldSched gtopt::Converter::overnight_capcost

Overnight investment cost per unit of capacity [$/MW]

OptTRealFieldSched gtopt::Converter::wacc

Private discount rate of the annuity (WACC / hurdle rate) [p.u./year]

OptTRealFieldSched gtopt::Converter::fixed_om_cost

Fixed O&M of the expansion capacity [$/unit-year], charged on the capacity built from this stage on, next to the annuity and with the same stage discounting. Unset → no fixed O&M.