Commit 25758393 authored by Topi Rasku's avatar Topi Rasku
Browse files

#94: Abort if nonsensical `maxFuelFraction` parameters.

parent 0d4bee7d
...@@ -520,7 +520,7 @@ loop( unit, ...@@ -520,7 +520,7 @@ loop( unit,
); // END loop(effLevelGroupUnit) ); // END loop(effLevelGroupUnit)
); );
* --- Check the start-up fuel fraction related data --------------------------- * --- Check fuel fraction related data ----------------------------------------
loop( unit_fuel(unit)${sum(fuel, uFuel(unit_fuel, 'startup', fuel))}, loop( unit_fuel(unit)${sum(fuel, uFuel(unit_fuel, 'startup', fuel))},
if(sum(fuel, p_uFuel(unit, 'startup', fuel, 'fixedFuelFraction')) <> 1, if(sum(fuel, p_uFuel(unit, 'startup', fuel, 'fixedFuelFraction')) <> 1,
...@@ -530,6 +530,14 @@ loop( unit_fuel(unit)${sum(fuel, uFuel(unit_fuel, 'startup', fuel))}, ...@@ -530,6 +530,14 @@ loop( unit_fuel(unit)${sum(fuel, uFuel(unit_fuel, 'startup', fuel))},
); );
); );
loop( unit_fuel(unit)${sum(fuel, p_uFuel(unit, 'main', fuel, 'maxFuelFraction'))},
if(sum(uFuel(unit, 'main', fuel), 1) < 2,
put log '!!! Error occurred on unit ' unit.tl:0 /;
put log '!!! Abort: maxFuelFraction cannot be applied to units with only a single main fuel!' /;
abort "'maxFuelFraction' cannot be applied to units with only a single main fuel!"
);
);
* --- Check the shutdown time related data ------------------------------------ * --- Check the shutdown time related data ------------------------------------
loop( unitStarttype(unit, starttypeConstrained), loop( unitStarttype(unit, starttypeConstrained),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment