Commit ec74d221 by Erkka Rinne

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