Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unintended behaviour reading timeseries values? #84

Open
mihlema opened this issue Jul 20, 2022 · 0 comments
Open

Unintended behaviour reading timeseries values? #84

mihlema opened this issue Jul 20, 2022 · 0 comments

Comments

@mihlema
Copy link
Contributor

mihlema commented Jul 20, 2022

I just came across some unintuitive behaviour when using SpineInterface time-series parameter values. My minimal example is attached
here.

Basically, if I access a TimeSeries that extends beyond the last DateTime, I sometimes get a value, but only if the start DateTime coincides with the last given timestep (here: 2031-01-01T00:00). In my particular example, I'm currently circumventing this by only using the year of the corresponding timeslice (e.g. t=year(start(t))) but I feel in the long run we need some more options on how to deal with timeseries end values.

julia> t = TimeSlice(DateTime(2031,1,1),DateTime(2032,1,1))
2031-01-01T00:00~>2032-01-01T00:00

julia> test_param(testing=testing()[1],t=t)
0.0

julia> t = TimeSlice(DateTime(2031,1,1,0),DateTime(2031,1,1,1))
2031-01-01T00:00~>2031-01-01T01:00

julia> test_param(testing=testing()[1],t=t)
0.0

julia> t = TimeSlice(DateTime(2031,1,1,1),DateTime(2031,1,1,2))
2031-01-01T01:00~>2031-01-01T02:00

julia> test_param(testing=testing()[1],t=t)
#(nothing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant