Commit 0da96161 authored by Topi Rasku's avatar Topi Rasku
Browse files

*effLevelGroup* is now expanded so that subsequent *effLevels* are repeated...

*effLevelGroup* is now expanded so that subsequent *effLevels* are repeated from the previous *effLevel* if definition is missing. Execution is aborted if *level1* information is missing for any unit.
parent 35594684
......@@ -477,6 +477,20 @@ Option clear = tmp;
// Find the largest effLevel used in the data
tmp = smax(effLevelGroupUnit(effLevel, effSelector, unit), ord(effLevel));
// Expand the effLevelGroupUnit when possible, abort if impossible
loop(effLevel${ord(effLevel)<=tmp},
effLevelGroupUnit(effLevel, effSelector, unit)
${not effLevelGroupUnit(effLevel, effSelector, unit)}
= effLevelGroupUnit(effLevel - 1, effSelector, unit) // Expand previous (effLevel, effSelector) when applicable
loop(unit${not unit_flow(unit)},
If(not sum(effLevelGroupUnit(effLevel, effSelector, unit), 1),
put log '!!! Error on unit ' unit.tl:0 /;
put log '!!! Abort: Insufficient effLevelGroupUnit definitions!' /;
abort "Insufficient effLevelGroupUnit definitions!"
);
);
);
loop( unit,
// Check that 'op' is defined correctly
Option clear = count; // Initialize the previous op to zero
......
Markdown is supported
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