gtopt/fuel_lp.hpp file

LP wrapper for the Fuel data struct.

FuelLP resolves the time-schedulable fuel price + emission factors that GeneratorLP consumes via system_context.element<FuelLP>.

LP-active constraints (only when explicitly configured)

When Fuel.max_offtake is set the FuelLP creates a per-(scenario, stage) cap row enforcing

Σ_{g : Generator(g).fuel = this_fuel} (heat_rate_g(s, b) · generation_g(s, t, b) · duration_b) ≤ max_offtake(s)

with an optional slack column priced at max_offtake_cost when the cap is soft. Mirrors PLEXOS's FueMaxOffWeek_<fuel> / FueMaxOffDay_<fuel> Constraint pattern. Symmetrically, when Fuel.min_offtake is set FuelLP creates a per-(scenario, stage) FLOOR row.

The cap/floor coefficients are stamped DIRECTLY on the consuming generators' dispatch columns: the LHS is the linear combination Σ heat_rate · dur · generation_g evaluated on the existing Generator/generation columns — no auxiliary LP column is created.

PAMPL fuel("X").offtake accessor

The user-constraint expression fuel("X").offtake resolves at constraint-build time to the same weighted sum Σ_g heat_rate_g · dur_b · generation_g[b]. This is registered as an AMPL weighted sum-of-cols attribute (see AmplVariable::block_cols_weighted_sum); no aggregator LP column is created. The previous design carried a per-(scenario, stage, block) Y_f[b] LP column plus an equality binding row Y_f[b] − Σ hr·dur·gen = 0; both have been substituted out (mirror of the EmissionZone.production removal). Reporting is unaffected — gtopt never emitted a Fuel/offtake_sol.parquet stream; only cap/floor row duals + slack columns are written.

Namespaces

namespace gtopt

Classes

class gtopt::FuelLP