Commit 6df151fa authored by Niina Helistö's avatar Niina Helistö
Browse files

Updating a few lines related to ms_initial ('realized samples')

parent b3fd5104
......@@ -16,7 +16,7 @@ along with Backbone. If not, see <>.
* =============================================================================
* --- Model Definition - Schedule ---------------------------------------------
* --- Model Definition - Invest -----------------------------------------------
* =============================================================================
if (mType('invest'),
......@@ -43,6 +43,9 @@ if (mType('invest'),
// Clear Initial and Central samples
ms_initial('invest', s) = no;
ms_initial('invest', 's000') = yes;
ms_initial('invest', 's001') = yes;
ms_initial('invest', 's002') = yes;
ms_central('invest', s) = no;
// Define time span of samples
......@@ -54,7 +54,8 @@ if (mType('schedule'),
// Define Initial and Central samples
ms_initial('schedule', s) = no;
ms_central('schedule', s) = no;
ms_initial('schedule', 's000') = yes;
ms_central('schedule', s) = no;
// Define time span of samples
msStart('schedule', 's000') = 1;
......@@ -283,7 +283,6 @@ $ifthen defined scenario
// Select root sample and central forecast
loop((ms_initial(mSolve, s_), mf_central(mSolve, f)),
s_active(s_) = yes;
p_msProbability(mSolve, s_) = 1;
  • @nhniina Removing this breaks scenario reduction :'( The whole block is inside conditional to defined long-term scenarios anyway (ifthen defined scenarios), so does this affect other cases?

  • Sorry for causing the bug earlier! The block is inside "$ifthen defined scenario" and I have understood that you need to define at least one scenario in for all models. Maybe that has changed? If I need to define at least one scenario in, then that "p_msProbability(mSolve, s_) ) = 1" messes up investment model probabilities.

  • No, I don’t think one needs to define any scenarios at all if not using the long-term scenarios for hydro scheduling etc.

  • Alternatively, we could check for more than one scenario.

  • Maybe safer to check for more than one scenario in the current mSolve. Users may use the same for multiple models (invest, schedule, etc.). It may also be enough to check for "mSettings(mSolve, 'scenarios') >= 1".

  • I’m taking this line back with a twist:

    p_msProbability(mSolve, s_)$mSettings(mSolve, 'scenarios') = 1;

    Does this look ok?

Please register or sign in to reply
loop(scenario$(ord(scenario) <= mSettings(mSolve, 'scenarios')),
s_scenario(s_, scenario) = yes;
if(mSettings(mSolve, 'scenarios') > 1,
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