How is storage_state_fix (datastructure_update) supposed to work with time series? #1318
Karlis-Baltputnis
started this conversation in
Support
Replies: 1 comment 1 reply
|
My suspicion is that the variable resolution of the fix state glues the values to each other instead of treating them as separate fixed values. I was trying to look for this in the code, but in the half hour that I searched, I was not able to pinpoint exactly how the fixed value is treated during the variable creation. Maybe I'll find another random half hour some time later. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe your problem
I have a simple model in which the initial and final hydro-reservoir state is set not by storage_state_initial and the cyclic_condition (with == sense), but instead by storage_state_fix with two timesteps like this:
So the first value is for time step before model start, and the final is for model end.
In results, I would expect the inbetween node_state to vary. However, instead I get the same node_state trajectory as in the input visualization.

So it seems that the constraint has been created by forward-filling for the inbetween time steps, instead of just setting it for the specific, defined time steps.
If I delete the first storage_state_fix row and instead define the beginning level via storage_state_initial, I do get varying node_state inbetween in the results, as expected.

I would have expected both approaches to lead to the same results, but perhaps I misunderstand the intention of storage_state_fix
Attach your model as a JSON file (encouraged)
simple_HPP.json
What versions are you using?
SpineOpt: 1.0.0 (git hash: 03a9317) / datastructure_update
SpineInterface: 0.18.0
SpineToolbox:0 .10.9.dev13
Julia: 1.12.6
All reactions