Skip to content

Identify fossil generation by emission rate, not by operating cost - #167

Merged
erikfilias merged 1 commit into
masterfrom
fix/fossil-share-by-emission-rate
Aug 30, 2026
Merged

Identify fossil generation by emission rate, not by operating cost#167
erikfilias merged 1 commit into
masterfrom
fix/fossil-share-by-emission-rate

Conversation

@erikfilias

@erikfilias erikfilias commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #163.

Change

Ratio Fossil Fuel Generation/Total Generation [%] summed generation over mTEPES.tr, which is
every unit with a non-zero rated operating cost — a fair proxy for dispatchable, but not a test for
fuel. This sums over units with a positive CO2 emission rate instead.

Choice of test

The generator taxonomy classifies by operating cost, storage and rated power, and has no notion of
fuel. The model does already have a test for whether a unit emits, used by eMaxSystemEmission and
by pIndEmissionArea in the objective, both keyed on pEmissionRate. This makes the KPI consistent
with them rather than adding a fourth way to classify a unit.

The comparison is > 0.0 rather than truthiness because pEmissionRate is declared within=Reals,
so a unit with negative emissions would otherwise count as fossil.

Cases with no emission data

CO2EmissionRate is optional and four of the ten shipped cases leave it blank, three of them with
Coal, Gas and Oil units. A bare emission-rate test reports 0 % fossil there, which reads as a
decarbonised system rather than as missing data. Where no unit carries a positive rate the ratio is
reported as NaN, with a warning naming the column to populate.

Operating cost is the original behaviour and misclassifies wind, solar, nuclear, hydro and storage.
The technology label is unreliable across datasets — the same plant appears as Gas, CCGT and
Gas_CCGT_w/o CCS in three shipped cases.

Effect

On a 1,716-unit European case, tr contains 1,524 units, and the reported ratio was 36.41 %
where the technology balance from the same solve gives roughly 7 %. After the change the
numerator matches the coal, gas and oil total from oT_Result_BalanceEnergyPerTech exactly. Full
test suite passes, 106 tests including the solve cases.

psntr appears once in the file; the only other uses of tr are eMinUpTime and eMinDownTime,
where "carries a variable cost" is a defensible stand-in for a committable unit. Separately, and not
addressed here, the denominator includes storage discharge — energy already counted when generated,
about 2.5 % of the denominator on that case.

The fossil-fuel share summed generation over mTEPES.tr, which collects every
unit with a non-zero rated operating cost. That is a fair proxy for dispatchable
but not a test for fuel: any unit carrying variable O&M falls into it. On a
European case with 1,716 units, 1,524 of them qualify, including wind, solar,
nuclear, hydro, biomass, geothermal, batteries and demand-side management, which
overstates the ratio several fold.

The set structure has no notion of fuel. It classifies by cost, storage and
rated power. But the model already has a test for whether a unit emits, and uses
it in two places: the area emission cap in eMaxSystemEmission, and
pIndEmissionArea in the objective, both keyed on pEmissionRate. This makes the
KPI consistent with them rather than introducing a new idea.

The comparison is against zero rather than truthiness because pEmissionRate is
declared over the reals, so a unit with negative emissions would otherwise be
counted as fossil.

A case may leave CO2EmissionRate unpopulated. Four of the shipped cases do, and
three of those have coal, gas and oil units, so a bare emission-rate test would
report them as zero per cent fossil, which reads as a decarbonised system rather
than as missing data. Where no unit carries a positive rate the ratio is
reported as NaN and a warning names the column to populate.

Closes #163.
@erikfilias
erikfilias force-pushed the fix/fossil-share-by-emission-rate branch from 6f72c22 to c327d3e Compare August 30, 2026 11:57
@erikfilias
erikfilias merged commit c4d70b2 into master Aug 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SummaryKPIs: fossil-fuel share counts any unit with a non-zero variable cost, including wind and solar

1 participant