gtopt::DemandAttrs struct

Technical and economic attributes shared by demand objects.

Used as a lightweight value type when parsing demand-attribute updates separately from the demand identity fields.

Public variables

OptTRealFieldSched annual_capcost
Annualized investment cost [$/MW-year].
OptTRealFieldSched annual_derating
Annual capacity derating factor [p.u./year].
SingleId bus
Bus ID where the demand is connected.
OptTRealFieldSched capacity
Installed demand capacity [MW].
OptTRealFieldSched capmax
Absolute maximum capacity after expansion [MW].
OptName description
OptTRealFieldSched ecost
Energy-shortage cost [$/MWh].
OptTRealFieldSched emin
Minimum energy that must be served per stage [MWh].
OptTRealFieldSched expcap
Capacity added per expansion module [MW].
OptTRealFieldSched expmod
Maximum number of expansion modules [dimensionless].
Array<FailSegment> fail_segments
OptTBRealFieldSched fcost
OptBool forced
When true, load is fixed at lmax (PLP-style).
OptBool integer_expmod
Integer-constrain the expmod variable.
OptTBRealFieldSched lmax
Maximum served load [MW].
OptTBRealFieldSched lmin
OptTBRealFieldSched lossfactor
OptName type
Optional element type/category tag.

Variable documentation

OptName gtopt::DemandAttrs::description

Optional free-text description (e.g. conversion provenance)

Array<FailSegment> gtopt::DemandAttrs::fail_segments

Stepwise VoLL curve; see Demand::fail_segments.

OptTBRealFieldSched gtopt::DemandAttrs::fcost

Demand curtailment cost [$/MWh] per-(stage, block). Accepts a scalar (broadcast), a 2-D nested array [[block0, block1, ...], ...], or a file-backed schedule. Mirrors UC.jl's per-hour Revenue ($/MW) on price-sensitive loads.

OptTBRealFieldSched gtopt::DemandAttrs::lmin

Minimum served load [MW] per-(stage, block). When set, the LP column's lower bound is max(lmin, forced? < lmax : 0), forcing dispatch ≥ lmin every block. Used by System::expand_batteries() to propagate Battery.pmin_charge onto the synthetic charge demand.

OptTBRealFieldSched gtopt::DemandAttrs::lossfactor

Network loss factor [p.u.] per-(stage, block).