Commit 4db6b3d6 authored by Niina Helistö's avatar Niina Helistö
Browse files

Updating some checks related to lastStepInIntervalBlock and stepPerInterval...

Updating some checks related to lastStepInIntervalBlock and stepPerInterval that only make sense in the schedule model where all realized time steps need to be modelled with the same accuracy
parent 07d4e924
......@@ -682,11 +682,13 @@ loop(m, // Not ideal, but multi-model functionality is not yet implemented
abort "The 'update_frequency' parameter should be divisible by 't_jump'!";
); // END if(mod('update_frequency'))
// Check if the first interval is long enough for proper commitment of reserves
if(mInterval(m, 'lastStepInIntervalBlock', 'c000') < p_groupReserves(group, restype, 'update_frequency') + p_groupReserves(group, restype, 'gate_closure'),
put log '!!! Error occurred on p_groupReserves ' group.tl:0 ',' restype.tl:0 /;
put log '!!! Abort: The first interval block should not be shorter than update_frequency + gate_closure for proper commitment of reserves!' /;
abort "The first interval block should not be shorter than 'update_frequency' + 'gate_closure' for proper commitment of reserves!";
// Check if the first interval is long enough for proper commitment of reserves in the schedule model
if(sameas(m, 'schedule'),
if(mInterval(m, 'lastStepInIntervalBlock', 'c000') < p_groupReserves(group, restype, 'update_frequency') + p_groupReserves(group, restype, 'gate_closure'),
put log '!!! Error occurred on p_groupReserves ' group.tl:0 ',' restype.tl:0 /;
put log '!!! Abort: The first interval block should not be shorter than update_frequency + gate_closure for proper commitment of reserves!' /;
abort "The first interval block should not be shorter than 'update_frequency' + 'gate_closure' for proper commitment of reserves!";
); // END if
); // END if
); // END loop(restypeDirectionGroup)
......@@ -714,17 +716,19 @@ loop(m, // Not ideal, but multi-model functionality is not yet implemented
abort "t_trajectoryHorizon should be at least as long as t+jump + max trajectory. This may lead to infeasibilities";
); // END if()
* --- Check that the first interval block is compatible with t_jump' ----------
* --- Check that the first interval block is compatible with 't_jump' in the schedule model -----
if (mod(mSettings(m, 't_jump'), mInterval(m, 'stepsPerInterval', 'c000')) <> 0,
put log '!!! Abort: t_jump should be divisible by the first interval!' /;
abort "'t_jump' should be divisible by the first interval!";
); // END if()
if(sameas(m, 'schedule'),
if (mod(mSettings(m, 't_jump'), mInterval(m, 'stepsPerInterval', 'c000')) <> 0,
put log '!!! Abort: t_jump should be divisible by the first interval!' /;
abort "'t_jump' should be divisible by the first interval!";
); // END if()
if (mInterval(m, 'lastStepInIntervalBlock', 'c000') < mSettings(m, 't_jump'),
put log '!!! Abort: The first interval block should not be shorter than t_jump!' /;
abort "The first interval block should not be shorter than 't_jump'!";
); // END if()
if (mInterval(m, 'lastStepInIntervalBlock', 'c000') < mSettings(m, 't_jump'),
put log '!!! Abort: The first interval block should not be shorter than t_jump!' /;
abort "The first interval block should not be shorter than 't_jump'!";
); // END if()
); // END if
); // END loop(m)
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