Summary
When a cycle length is longer than the period being modelled, the corresponding constraints are
created with no rows. The model then solves and reports a lower cost, without any error or warning.
Two constraint groups are affected: the energy limits of a unit, and the energy outflows of a storage
unit.
Observed behaviour
Both cases below use the 7-day horizon of the existing test fixture, which is 84 load levels, and are
solved with Gurobi on 96c8d56a.
Case 1. The energy limit of a unit is ignored. Case 9n, with CCGT_4 limited to 100 MW through
VariableMaxEnergy.
|
Weekly cycle |
Monthly cycle |
eMaximumEnergy rows |
1 |
0 |
CCGT_4 output |
16.8000 GWh |
55.9730 GWh |
| Total cost |
266.16022423 MEUR |
238.51419065 MEUR |
The limit is not applied, the unit produces 3.3 times the permitted energy, and the total cost is 10.4
per cent lower than it should be.
Case 2. The production requirement of an electrolyzer is ignored. Case 9n_H2, with the two
electrolyzers modelled as storage units with energy outflows of 9 MW each.
|
Weekly cycle |
Monthly cycle |
eEnergyOutflows rows |
2 |
0 |
| Electricity consumed |
3.0240 GWh |
0.0000 GWh |
| Total cost |
242.89492215 MEUR |
238.51419065 MEUR |
The electrolyzers stop consuming altogether, and the reported cost becomes that of a system without
them.
Expected behaviour
The condition is already documented in InputData.md, which states that the stage duration must be at
least as long as the shortest storage type, outflow type or energy type. A case that does not meet
this condition should therefore be rejected, or corrected, rather than solved with the affected
constraints absent.
Cause
Four cycle lengths are derived in openTEPES_DataConfiguration.py. Two are limited to the stage
duration and two are not.
| Parameter |
Limited to stage duration |
Set |
Constraints |
pStorageTimeStep |
Yes, line 514 |
nesc |
eESSInventory |
pReservoirTimeStep |
Yes, line 541 |
— |
Reservoir volume |
pOutflowsTimeStep |
No |
neso, line 1239 |
eEnergyOutflows |
pEnergyTimeStep |
No |
ngen, line 1240 |
eMinimumEnergy, eMaximumEnergy |
Each set is formed from the condition ord(n) % <cycle> == 0. When the cycle exceeds the number of
load levels, no load level satisfies it, the set is empty, and the constraint is created with no rows.
Suggested resolution
Either apply the same limit to pOutflowsTimeStep and pEnergyTimeStep that lines 514 and 541 apply
to the other two, or raise an error when the documented condition is not met. An error is preferable,
since shortening the cycle silently replaces the requested cycle with a different one.
Reproduction
- Copy case
9n. Set VariableMaxEnergy for CCGT_4 to 100, and EnergyType to Monthly.
- Truncate
Duration to the first 168 hours, as the test fixture does.
- Solve. The
eMaximumEnergy constraint contains no rows and the limit has no effect.
- Repeat with
EnergyType set to Weekly. The constraint contains one row and the limit applies.
Summary
When a cycle length is longer than the period being modelled, the corresponding constraints are
created with no rows. The model then solves and reports a lower cost, without any error or warning.
Two constraint groups are affected: the energy limits of a unit, and the energy outflows of a storage
unit.
Observed behaviour
Both cases below use the 7-day horizon of the existing test fixture, which is 84 load levels, and are
solved with Gurobi on
96c8d56a.Case 1. The energy limit of a unit is ignored. Case
9n, withCCGT_4limited to 100 MW throughVariableMaxEnergy.eMaximumEnergyrowsCCGT_4outputThe limit is not applied, the unit produces 3.3 times the permitted energy, and the total cost is 10.4
per cent lower than it should be.
Case 2. The production requirement of an electrolyzer is ignored. Case
9n_H2, with the twoelectrolyzers modelled as storage units with energy outflows of 9 MW each.
eEnergyOutflowsrowsThe electrolyzers stop consuming altogether, and the reported cost becomes that of a system without
them.
Expected behaviour
The condition is already documented in
InputData.md, which states that the stage duration must be atleast as long as the shortest storage type, outflow type or energy type. A case that does not meet
this condition should therefore be rejected, or corrected, rather than solved with the affected
constraints absent.
Cause
Four cycle lengths are derived in
openTEPES_DataConfiguration.py. Two are limited to the stageduration and two are not.
pStorageTimeStepnesceESSInventorypReservoirTimeSteppOutflowsTimeStepneso, line 1239eEnergyOutflowspEnergyTimeStepngen, line 1240eMinimumEnergy,eMaximumEnergyEach set is formed from the condition
ord(n) % <cycle> == 0. When the cycle exceeds the number ofload levels, no load level satisfies it, the set is empty, and the constraint is created with no rows.
Suggested resolution
Either apply the same limit to
pOutflowsTimeStepandpEnergyTimeStepthat lines 514 and 541 applyto the other two, or raise an error when the documented condition is not met. An error is preferable,
since shortening the cycle silently replaces the requested cycle with a different one.
Reproduction
9n. SetVariableMaxEnergyforCCGT_4to 100, andEnergyTypetoMonthly.Durationto the first 168 hours, as the test fixture does.eMaximumEnergyconstraint contains no rows and the limit has no effect.EnergyTypeset toWeekly. The constraint contains one row and the limit applies.