Commit ec74d221 authored by Erkka Rinne's avatar Erkka Rinne
Browse files

Use scenarios with positive probability

Only use scenarios with positive probability in building the long-term
stochastic tree. Previously this was limited to the number of scenarios,
but this allows excluding a scenario (setting its prob. to zero).

(cherry picked from commit 333f6020)
parent d34d522f
......@@ -284,7 +284,7 @@ $ifthen defined scenario
loop((ms_initial(mSolve, s_), mf_central(mSolve, f)),
s_active(s_) = yes;
p_msProbability(mSolve, s_)$mSettings(mSolve, 'scenarios') = 1;
loop(scenario$(ord(scenario) <= mSettings(mSolve, 'scenarios')),
loop(scenario $p_scenProbability(scenario),
s_scenario(s_, scenario) = yes;
if(mSettings(mSolve, 'scenarios') > 1,
loop(ft(f, t)$(ord(t) >= msEnd(mSolve, s_) + tSolveFirst),
......@@ -334,7 +334,7 @@ fts(ft(f, t), s)$sft(s, f, t) = yes;
* Build stochastic tree by definfing previous samples
$ifthen defined scenario
Option clear = s_prev;
loop(scenario$(ord(scenario) <= mSettings(mSolve, 'scenarios')),
loop(scenario $p_scenProbability(scenario),
loop(s_scenario(s, scenario),
if(not ms_initial(mSolve, s), ss(s, s_prev) = yes);
Option clear = s_prev; s_prev(s) = yes;
......
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