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

All parameters in the model definition files now include the mType dimension...

All parameters in the model definition files now include the mType dimension to avoid overwriting of parameters if multiple models are declared.
parent 9ad97d78
......@@ -56,7 +56,7 @@ loop(m,
df(f, t)${ mf(m, f)
and ord(t) = mSettings(m, 't_start')
}
= sum(fRealization(f_), ord(f_) - ord(f));
= sum(mfRealization(m, f_), ord(f_) - ord(f));
// Increase the t_skip counter
t_skip_counter = t_skip_counter + 1;
......
......@@ -110,7 +110,7 @@ $endif.debug
// Select the forecasts included in the current solve
Option clear = fSolve;
fSolve(f)$mf(mSolve,f) = yes;
fSolve(f)${mf(mSolve,f)} = yes;
// Determine the first and last timesteps of the current solve
tSolveFirst = ord(tSolve); // tSolveFirst: the start of the current solve, t0 used only for initial values
......@@ -119,8 +119,9 @@ tSolveLast = ord(tSolve) + max(mSettings(mSolve, 't_forecastLength'), mSettings(
// Initializing sets and counters
Option clear = tCounter;
Option clear = p_stepLength;
Option clear = mft;
Option clear = ft;
Option clear = ft_nReserves;
Option clear = mft_nReserves;
// Initialize temporary time series
Option clear = ts_influx_;
......@@ -156,27 +157,30 @@ loop(counter${mInterval(mSolve, 'intervalLength', counter)},
// Determine the forecast-time steps
// Include the t_jump for the realization
ft(fRealization(fSolve), tInterval(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
mft(mfRealization(mSolve, fSolve), tInterval(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
= yes;
// Include the full horizon for the central forecast
ft(fCentral(fSolve), tInterval(t))${ ord(t) > tSolveFirst + mSettings(mSolve, 't_jump') }
mft(mfCentral(mSolve, fSolve), tInterval(t))${ ord(t) > tSolveFirst + mSettings(mSolve, 't_jump') }
= yes;
// Include up to forecastLength for remaining forecasts
ft(fSolve, tInterval(t))${ not fCentral(fSolve)
and not fRealization(fSolve)
and ord(t) > tSolveFirst + mSettings(mSolve, 't_jump')
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_forecastLength')
}
mft(mf(mSolve, fSolve), tInterval(t))${ not mfCentral(mSolve, fSolve)
and not mfRealization(mSolve, fSolve)
and ord(t) > tSolveFirst + mSettings(mSolve, 't_jump')
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_forecastLength')
}
= yes;
// Set of locked forecast-time steps for the reserves
ft_nReserves(node, restype, fRealization(f), tInterval(t))${ p_nReserves(node, restype, 'update_frequency')
and p_nReserves(node, restype, 'gate_closure')
and ord(t) > tSolveFirst
and ord(t) <= tSolveFirst + p_nReserves(node, restype, 'gate_closure') - mod(tSolveFirst, p_nReserves(node, restype, 'update_frequency'))
}
mft_nReserves(node, restype, mfRealization(mSolve, f), tInterval(t))${ p_nReserves(node, restype, 'update_frequency')
and p_nReserves(node, restype, 'gate_closure')
and ord(t) > tSolveFirst
and ord(t) <= tSolveFirst + p_nReserves(node, restype, 'gate_closure') - mod(tSolveFirst - 1, p_nReserves(node, restype, 'update_frequency'))
}
= yes;
// Reduce the model dimension
ft(fSolve, tInterval(t)) = mft(mSolve, fSolve, t);
// Select time series data matching the intervals, for intervalLength = 1, this is trivial.
ts_influx_(gn(grid, node), ft(fSolve, tInterval(t))) = ts_influx(grid, node, fSolve, t+dt_circular(t));
ts_cf_(flow, node, ft(fSolve, tInterval(t)))${ sum(grid, gn(grid, node)) } // Only include nodes that have a grid attributed to them
......@@ -206,19 +210,22 @@ loop(counter${mInterval(mSolve, 'intervalLength', counter)},
// Determine the forecast-time steps
// Include the full horizon for the central forecast
ft(fCentral(fSolve), tInterval(t))${ ord(t) > tSolveFirst + mSettings(mSolve, 't_jump') }
mft(mfCentral(mSolve, fSolve), tInterval(t))${ ord(t) > tSolveFirst + mSettings(mSolve, 't_jump') }
= yes;
// Include the t_jump for the realization
ft(fRealization(fSolve), tInterval(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
mft(mfRealization(mSolve, fSolve), tInterval(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
= yes;
// Include up to forecastLength for remaining forecasts
ft(fSolve, tInterval(t))${ not fCentral(fSolve)
and not fRealization(fSolve)
and ord(t) > tSolveFirst + mSettings(mSolve, 't_jump')
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_forecastLength')
}
mft(mf(mSolve,fSolve), tInterval(t))${ not mfCentral(mSolve, fSolve)
and not mfRealization(mSolve, fSolve)
and ord(t) > tSolveFirst + mSettings(mSolve, 't_jump')
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_forecastLength')
}
= yes;
// Reduce the model dimension
ft(fSolve, tInterval(t)) = mft(mSolve, fSolve, t)
// Select and average time series data matching the intervals, for intervalLength > 1
// Loop over the t:s of the interval
loop(ft(fSolve, tInterval(t)),
......@@ -252,10 +259,6 @@ loop(counter${mInterval(mSolve, 'intervalLength', counter)},
); // END IF intervalLenght
// The nodeState at the the end of the horizon doesn't have a defined p_stepLength (and isn't included in the tIntervals), so using raw data value.
* ts_nodeState_(gn_state(grid, node), param_gnBoundaryTypes, ft_dynamic(fSolve, t))${ord(t) = tSolveLast
* } = ts_nodeState(grid, node, param_gnBoundaryTypes, fSolve, t+ct(t));
// Update tActive
tActive(tInterval) = yes;
......@@ -264,61 +267,45 @@ loop(counter${mInterval(mSolve, 'intervalLength', counter)},
); // END LOOP COUNTER
// Initial model ft
Option clear = mftStart;
mftStart(mfRealization(mSolve, f), tSolve)
= yes
;
// Last steps of model fts
Option clear = mftLastSteps;
// !!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Why is the realization not used? Because it "continues" in the form of the
// central forecast? Is it necessary to account for anything but the central-f?
mftLastSteps(mSolve, ft(f,t))${ord(t)-dt(t) = tSolveLast}
= yes
;
* --- Determine various other forecast-time sets required for the model -------
// Set of realized time steps in the solve
Option clear = ft_realized;
ft_realized(ft(fRealization(f), t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
= yes
;
*Option clear = ft_realizedLast;
*ft_realizedLast(ft_realized(f,t))${ ord(t) = tSolveFirst + mSettings(mSolve, 't_jump') }
* = yes;
ft_realized(fSolve, tActive(t))${mfRealization(mSolve, fSolve)}
= ft(fSolve, t);
// Forecast index displacement between realized and forecasted timesteps
Option clear = ff;
ff(f) = mf(mSolve, f);
df(ff(f), tActive(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
= sum(fRealization(f_), ord(f_) - ord(f));
df(fSolve(f), tActive(t))${ ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') }
= sum(mfRealization(mSolve, f_), ord(f_) - ord(f));
// Forecast displacement between central and forecasted timesteps at the end of forecast horizon
Option clear = df_central; // This can be reset.
df_central(ft(f,t+dt(t)))${ not ft(f,t)
and not fRealization(f)
and not mfRealization(mSolve, f)
}
= sum(fCentral(f_), ord(f_) - ord(f));
= sum(mfCentral(mSolve, f_), ord(f_) - ord(f));
// Forecast index displacement between realized and forecasted timesteps, required for locking reserves ahead of (dispatch) time.
Option clear = df_nReserves;
df_nReserves(node, restype, ft(f, t))${ p_nReserves(node, restype, 'update_frequency')
and p_nReserves(node, restype, 'gate_closure')
and ord(t) <= tSolveFirst + p_nReserves(node, restype, 'gate_closure') - mod(tSolveFirst - 1 + mSettings(mSolve, 't_jump'), p_nReserves(node, restype, 'update_frequency')) + mSettings(mSolve, 't_jump')
and ord(t) <= tSolveFirst + mSettings(mSolve, 't_jump') + p_nReserves(node, restype, 'gate_closure') - mod(tSolveFirst - 1 + mSettings(mSolve, 't_jump'), p_nReserves(node, restype, 'update_frequency'))
}
= sum(f_${fRealization(f_)}, ord(f_) - ord(f));
// Model ft
Option clear = mft;
mft(mSolve, ft) = yes;
// Initial model ft
Option clear = mftStart;
mftStart(mSolve, fRealization(f), tSolve)
= yes
;
// Last steps of model fts
Option clear = mftLastSteps;
// !!! NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Why is the realization not used? Because it "continues" in the form of the
// central forecast? Is it necessary to account for anything but the central-f?
mftLastSteps(mSolve, ft(f,t))${ord(t)-dt(t) = tSolveLast}
= yes
;
*mftLastSteps(mSolve, ft(f,t))${ord(t) = tSolveFirst + mSettings(mSolve, 't_forecastLength')
* and not fCentral(f)
* and not fRealization(f)
* }
* = yes
*;
= sum(f_${mfRealization(mSolve, f_)}, ord(f_) - ord(f));
// Samples
Option clear = msft;
......@@ -435,15 +422,6 @@ loop(effLevelGroupUnit(effLevel, effGroup, unit)${ mSettingsEff(mSolve, effLeve
* -----------------------------------------------------------------------------
// Update probabilities
Option clear = p_sft_probability;
p_sft_probability(s, ft(f,t))${ msft(mSolve, s, f, t)}
= p_fProbability(f+df_central(f,t)) / sum(f_${ft(f_,t)}, p_fProbability(f_)) * p_sProbability(s);
p_sft_probability(s, ft_realized(f,t))${ msft(mSolve, s, f, t)}
= p_fProbability(f) * p_sProbability(s);
*p_sft_probability(s, ft_full(f,t))${ mftLastSteps(mSolve, f, t)
* and msft(mSolve, s, f, t)
* and not cf_Central(f,t)
* } = p_fProbability(f) / sum(f_${ft_full(f_,t)}, p_fProbability(f_)) * p_sProbability(s);
Option clear = p_msft_probability;
p_msft_probability(msft(mSolve, s, f, t))
= p_mfProbability(mSolve, f) / sum(f_${ft(f_, t)}, p_mfProbability(mSolve, f_)) * p_msProbability(mSolve, s);
\ No newline at end of file
......@@ -188,7 +188,7 @@ $if exist 'params.inc' $include 'params.inc'
/;
// Activate model features if found
Set active(feature) "Set membership tells active model features" /
Set active(mType, feature) "Set membership tells active model features" /
$if exist 'features.inc' $include 'features.inc'
/;
......
......@@ -85,16 +85,16 @@ Sets
mstStart(mType, s, t) "Start point of samples"
ft(f, t) "Combination of forecasts and time periods in the current model"
ft_realized(f, t) "Realized ft"
ft_nReserves(node, restype, f, t) "Forecast-time steps locked due to committing reserves ahead of time."
mft_nReserves(node, restype, mType, f, t) "Forecast-time steps locked due to committing reserves ahead of time."
mft(mType, f, t) "Combination of forecasts and time periods in the models"
mft_(mType, f, t) "Combination of forecasts and time periods in the models"
* mft_(mType, f, t) "Combination of forecasts and time periods in the models"
msf(mType, s, f) "Model, sample, forecast"
msft(mType, s, f, t) "Combination of samples, forecasts and time periods in the models"
mftStart(mType, f, t) "Start point of simulation"
fRealization(f) "fRealization of the forecasts"
fCentral(f) "Forecast that continues as sample(s) after the forecast horizon ends"
sInitial(s) "Sample that presents the realized/forecasted period"
sCentral(s) "Sample that continues the central forecast after the forecast horizon ends"
mfRealization(mType, f) "fRealization of the forecasts"
mfCentral(mType, f) "Forecast that continues as sample(s) after the forecast horizon ends"
msInitial(mType, s) "Sample that presents the realized/forecasted period"
msCentral(mType, s) "Sample that continues the central forecast after the forecast horizon ends"
mftLastForecast(mType, f, t) "Last time period where the forecast extends"
mftLastSteps(mType, f, t) "Last time periods of the model (can be end of forecasts or end of samples)"
modelSolves(mType, t) "when different models are to be solved"
......@@ -117,7 +117,7 @@ Sets
effGroupSelectorUnit(effSelector, unit, effSelector) "Group name for efficiency selector set, e.g. Lambda02 contains Lambda01 and Lambda02"
;
* Set initial values to avoid errors when checking if parameter contents have been loaded from input data
fRealization('f00') = yes;
mfRealization(mType, 'f00') = yes;
ms(mType, s) = no;
modelSolves(mType, t) = no;
......
......@@ -70,10 +70,10 @@ Parameters
* --- Probability -------------------------------------------------------------
Parameters
p_sWeight(s) "Weight of sample"
p_sProbability(s) "Probability to reach sample conditioned on anchestor samples"
p_fProbability(f) "Probability of forecast"
p_sft_probability(s, f, t) "Probability of forecast"
p_msWeight(mType, s) "Weight of sample"
p_msProbability(mType, s) "Probability to reach sample conditioned on anchestor samples"
p_mfProbability(mType, f) "Probability of forecast"
p_msft_probability(mType, s, f, t) "Probability of forecast"
;
Scalar p_sWeightSum "Sum of sample weights";
......
......@@ -101,7 +101,7 @@ q_obj ..
// Sum over all the samples, forecasts, and time steps in the current model
+ sum(msft(m, s, f, t),
// Probability (weight coefficient) of (s,f,t)
+ p_sft_Probability(s, f, t)
+ p_msft_Probability(m, s, f, t)
* [
// Time step length dependent costs
+ p_stepLength(m, f, t)
......@@ -186,19 +186,21 @@ $offtext
) // END sum over msft(m, s, f, t)
// Value of energy storage change
+ sum(gn_state(grid, node)${active('storageValue')},
+ sum(mftStart(m, f, t)${p_storageValue(grid, node, t)},
+ sum(gn_state(grid, node),
+ sum(mftStart(m, f, t)${ p_storageValue(grid, node, t)
and active(m, 'storageValue')
},
+ v_state(grid, node, f, t)
* p_storageValue(grid, node, t)
* sum(ms(m, s)${p_sft_probability(s, f, t)},
+ p_sft_probability(s, f, t)
* sum(ms(m, s)${ p_msft_probability(m, s, f, t) },
+ p_msft_probability(m, s, f, t)
) // END sum(s)
) // END sum(mftStart)
- sum(mftLastSteps(m, f, t)${p_storageValue(grid, node, t)},
+ v_state(grid, node, f, t)
* p_storageValue(grid, node, t)
* sum(ms(m, s)${p_sft_probability(s, f, t)},
+ p_sft_probability(s, f, t)
* sum(ms(m, s)${p_msft_probability(m, s, f, t)},
+ p_msft_probability(m, s, f, t)
) // END sum(s)
) // END sum(mftLastSteps)
) // END sum(gn_state)
......@@ -1364,12 +1366,12 @@ q_boundCyclic(gn_state(grid, node), ms(m, s), s_)${ ms(m, s_)
=E=
// State of the node at the end of horizon
+ sum(mftLastSteps(m, fCentral(f_), t_)${ p_gn(grid, node, 'boundCyclic')},
+ sum(mftLastSteps(mfCentral(m, f_), t_)${ p_gn(grid, node, 'boundCyclic') },
+ v_state(grid, node, f_, t_)
) // END sum(mftLastSteps)
// State of the node at the end of the sample, BoundCyclicBetweenSamples
+ sum(mftLastSteps(m, fCentral(f_), t_)${ p_gn(grid, node, 'boundCyclicBetweenSamples')
+ sum(mftLastSteps(mfCentral(m, f_), t_)${ p_gn(grid, node, 'boundCyclicBetweenSamples')
and ord(t_) = msEnd(m, s_)
},
+ v_state(grid, node, f_, t_)
......@@ -1453,7 +1455,7 @@ q_emissioncap(gngroup, emission)${ p_gngroupPolicy(gngroup, 'emissionCap', emis
} ..
+ sum(msft(m, s, f, t),
+ p_sft_Probability(s,f,t)
+ p_msft_Probability(m,s,f,t)
* [
// Time step length dependent emissions
+ p_stepLength(m, f, t)
......@@ -1578,7 +1580,7 @@ q_energyShareMax(gngroup, group)${ p_gngroupPolicy(gngroup, 'energyShareMax', g
} ..
+ sum(msft(m, s, f, t),
+ p_sft_Probability(s,f,t)
+ p_msft_Probability(m,s,f,t)
* p_stepLength(m, f, t)
* [
// Generation of units in the group
......@@ -1615,7 +1617,7 @@ q_energyShareMin(gngroup, group)${ p_gngroupPolicy(gngroup, 'energyShareMin', g
} ..
+ sum(msft(m, s, f, t),
+ p_sft_Probability(s,f,t)
+ p_msft_Probability(m,s,f,t)
* p_stepLength(m, f, t)
* [
// Generation of units in the group
......
......@@ -51,7 +51,7 @@ if (mSettings(mSolve, 'readForecastsInTheLoop') and ord(tSolve) >= tForecastNext
execute_load ts_tertiary;
ts_reserveDemand('tertiary', up_down, node, f, tt_(t))${ mf(mSolve, f)
and gn('elec', node)
and not fRealization(f)
and not mfRealization(mSolve, f)
}
* = min(500, ts_tertiary('wind', node, tSolve, up_down, t) * sum(flowUnit('wind', unit), p_gnu('elec', node, unit, 'maxGen')));
= max(p_nReserves(node, 'primary', up_down), ts_tertiary('wind', node, tSolve, up_down, t) * sum(flowUnit('wind', unit), p_gnu('elec', node, unit, 'maxGen')));
......@@ -73,9 +73,9 @@ if(mSettings(mSolve, 'forecasts') > 0,
= yes;
// Improve capacity factors, linear improvement towards fRealization
loop(fRealization(f_),
ts_cf(flow, node, f, tt_(t))${ not fRealization(f)
and fRealization(f_)
loop(mfRealization(mSolve, f_),
ts_cf(flow, node, f, tt_(t))${ not mfRealization(mSolve, f)
and mfRealization(mSolve, f_)
and mf(mSolve, f)
} = (
(ord(t) - ord(tSolve)) * ts_cf(flow, node, f, t)
......
......@@ -202,8 +202,8 @@ v_reserve.up(nuRescapable(restype, 'up', node, unit), f+df_nReserves(node, resty
v_gen.up('elec', node, unit, f, t) - v_gen.lo('elec', node, unit, f, t) // Generator + consuming unit available unit_elec. output delta
) // END min
* [
+ 1${ft_nReserves(node, restype, f+df_nReserves(node, restype, f, t), t)} // reserveContribution limits the reliability of reserves locked ahead of time.
+ p_nuReserves(node, unit, restype, 'reserveContribution')${not ft_nReserves(node, restype, f+df_nReserves(node, restype, f, t), t)}
+ 1${mft_nReserves(node, restype, mSolve, f+df_nReserves(node, restype, f, t), t)} // reserveContribution limits the reliability of reserves locked ahead of time.
+ p_nuReserves(node, unit, restype, 'reserveContribution')${not mft_nReserves(node, restype, mSolve, f+df_nReserves(node, restype, f, t), t)}
] // END * min
;
v_reserve.up(nuRescapable(restype, 'down', node, unit), f+df_nReserves(node, restype, f, t), t)${ gnuft('elec', node, unit, f, t)
......@@ -214,34 +214,34 @@ v_reserve.up(nuRescapable(restype, 'down', node, unit), f+df_nReserves(node, res
v_gen.up('elec', node, unit, f, t) - v_gen.lo('elec', node, unit, f, t) // Generator + consuming unit available unit_elec. output delta
) // END min
* [
+ 1${ft_nReserves(node, restype, f+df_nReserves(node, restype, f, t), t)} // reserveContribution limits the reliability of reserves locked ahead of time.
+ p_nuReserves(node, unit, restype, 'reserveContribution')${not ft_nReserves(node, restype, f+df_nReserves(node, restype, f, t), t)}
+ 1${mft_nReserves(node, restype, mSolve, f+df_nReserves(node, restype, f, t), t)} // reserveContribution limits the reliability of reserves locked ahead of time.
+ p_nuReserves(node, unit, restype, 'reserveContribution')${not mft_nReserves(node, restype, mSolve, f+df_nReserves(node, restype, f, t), t)}
] // END * min
;
// Fix reserves between t_jump and gate_closure based on previous allocations
loop(restypeDirectionNode(restypeDirection(restype, up_down), node),
// Fix non-flow unit reserves ahead of time
v_reserve.fx(nuRescapable(restype, up_down, node, unit), f, t)${ ft_nReserves(node, restype, f, t)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and not unit_flow(unit) // NOTE! Units using flows can change their reserve (they might not have as much available in real time as they had bid)
}
v_reserve.fx(nuRescapable(restype, up_down, node, unit), fSolve(f), tActive(t))${ mft_nReserves(node, restype, mSolve, f, t)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and not unit_flow(unit) // NOTE! Units using flows can change their reserve (they might not have as much available in real time as they had bid)
}
= r_reserve(restype, up_down, node, unit, f, t);
// Fix transfer of reserves ahead of time
// Rightward
v_resTransferRightward.fx(restype, up_down, node, node_, f, t)${ ft_nReserves(node, restype, f, t)
and restypeDirectionNode(restype, up_down, node_)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and sum(grid, gn2n(grid, node, node_))
}
v_resTransferRightward.fx(restype, up_down, node, node_, fSolve(f), tActive(t))${ mft_nReserves(node, restype, mSolve, f, t)
and restypeDirectionNode(restype, up_down, node_)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and sum(grid, gn2n(grid, node, node_))
}
= r_resTransferRightward(restype, up_down, node, node_, f, t);
// Leftward
v_resTransferLeftward.fx(restype, up_down, node, node_, f, t)${ ft_nReserves(node, restype, f, t)
and restypeDirectionNode(restype, up_down, node_)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and sum(grid, gn2n(grid, node, node_))
}
v_resTransferLeftward.fx(restype, up_down, node, node_, fSolve(f), tActive(t))${ mft_nReserves(node, restype, mSolve, f, t)
and restypeDirectionNode(restype, up_down, node_)
and ord(t) >= mSettings(mSolve, 't_start') + p_nReserves(node, restype, 'update_frequency') // Don't lock reserves before the first update
and sum(grid, gn2n(grid, node, node_))
}
= r_resTransferLeftward(restype, up_down, node, node_, f, t);
// Free the tertiary reserves for the realization
......@@ -393,7 +393,7 @@ $offtext
v_state.fx(grid, node, ft(f,t))${ mftLastSteps(mSolve, f, t)
and p_gn(grid, node, 'boundStartToEnd')
}
= sum(fRealization(f_),
= sum(mfRealization(mSolve, f_),
+ r_state(grid, node, f_, tSolve)
) // END sum(fRealization)
;
......@@ -34,24 +34,24 @@ r_online(uft_online(unit, ft_realized(f, t)))
+ v_online_MIP.l(unit, f, t)${ uft_onlineMIP(unit, f, t) }
;
// Reserve provisions of units
r_reserve(nuRescapable(restype, up_down, node, unit), fRealization(f), t)${ ft_nReserves(node, restype, f, t)
or sum(f_, df_nReserves(node, restype, f_, t))
}
r_reserve(nuRescapable(restype, up_down, node, unit), fSolve(f), tActive(t))${ mft_nReserves(node, restype, mSolve, f, t)
or sum(f_, df_nReserves(node, restype, f_, t))
}
= v_reserve.l(restype, up_down, node, unit, f, t)
;
// Reserve transfer capacity
r_resTransferRightward(restypeDirectionNode(restype, up_down, from_node), to_node, fRealization(f), t)${ restypeDirectionNode(restype, up_down, to_node)
and [ ft_nReserves(from_node, restype, f, t)
r_resTransferRightward(restypeDirectionNode(restype, up_down, from_node), to_node, fSolve(f), tActive(t))${ restypeDirectionNode(restype, up_down, to_node)
and [ mft_nReserves(from_node, restype, mSolve, f, t)
or sum(f_, df_nReserves(from_node, restype, f_, t))
]
}
= v_resTransferRightward.l(restype, up_down, from_node, to_node, f, t)
;
r_resTransferLeftward(restypeDirectionNode(restype, up_down, from_node), to_node, fRealization(f), t)${ restypeDirectionNode(restype, up_down, to_node)
and [ ft_nReserves(from_node, restype, f, t)
or sum(f_, df_nReserves(from_node, restype, f_, t))
]
}
r_resTransferLeftward(restypeDirectionNode(restype, up_down, from_node), to_node, fSolve(f), tActive(t))${ restypeDirectionNode(restype, up_down, to_node)
and [ mft_nReserves(from_node, restype, mSolve, f, t)
or sum(f_, df_nReserves(from_node, restype, f_, t))
]
}
= v_resTransferLeftward.l(restype, up_down, from_node, to_node, f, t)
;
// Unit startup and shutdown history
......
......@@ -43,7 +43,7 @@ put /;
put ""/;
put " MODEL FEATURES "/;
put ""/;
loop(feature $active(feature),
loop((m, feature)$active(m, feature),
put feature.tl:20, feature.te(feature):0 /;
);
put /;
......
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