Open Tasqu opened 1 year ago
We could e.g. check for scenarios not used in the stochastic structure and filter them out in preprocessing. Also, I think at the moment each stochastic structure needs to be connected to each stochastic scenario, which can be tedious. We could hence first filter out scenarios that don't appear in any structure, and then add "half-missing" scenarios. That latter part is somewhat more tricky I believe, but it felt a bit odd to having to create a "deterministic" structure that has all the child scenarios.
There is actually some filtering in the code it attempts to do, but it doesn't seem to do a sufficiently thorough job to avoid errors.
Also, I think at the moment each stochastic structure needs to be connected to each stochastic scenario, which can be tedious. We could hence first filter out scenarios that don't appear in any structure, and then add "half-missing" scenarios. That latter part is somewhat more tricky I believe, but it felt a bit odd to having to create a "deterministic" structure that has all the child scenarios.
@mihlema I don't think this is true? (At least I've gotten this to work without this?) All stochastic scenarios need to be mentioned in the parent_stochastic_scenario__child_stochastic_scenario
relationship (if they are to be used anywhere), but stochastic_structure__stochastic_scenario
only needs to account for the ones it actually includes. However, at the moment with this filtering being a little unreliable, I there are cases where one needs to filter out unused stochastic scenarios with the is_active
flag from the database.
@Tasqu What's the current status of this? Is it still relevant / is it necessary / is it nice to have?
@clizbe I honestly had forgotten all about this 😅 It's probably still relevant, as I imagine no-one has happened to fix this by accident. I don't imagine I'll have the time and/or a reason to fix this in the near-term, though.
Mostly a TODO for myself, but if anyone else wants to tackle this, be my guest.
There seems to be a bug if providing a model with input data defining a branching stochastic structure. E.g. defining
but limiting the branching on the
stochastic_structure__stochastic_scenario
stage seems to result in a couple of issues, e.g.Essentially, the structure is intended to use only the
mean
scenario forecast and discard theoptimistic
andpessimistic
. At the moment, this seems to result in the following issues:stochastic_structure.jl:149-151
whenchild_relative_weight
is not defined for non-existing scenarios.Current workaround is to disable the unused
stochastic_scenario
s with theis_active
feature.