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

Fix initialisation freezing on empty primary data. #1016

Merged

Conversation

staudtMarius
Copy link
Member

@staudtMarius staudtMarius commented Nov 12, 2024

Resolves #981

Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adapted the code a tiny bit. Would be great to have tests for this as well, though, I think.

@sebastian-peter sebastian-peter linked an issue Nov 12, 2024 that may be closed by this pull request
@danielfeismann
Copy link
Member

danielfeismann commented Nov 13, 2024

Thank you for taking care of this!

One point to discuss, based on the data in vn_simona: Asuming I would increase the simulation start time by one hour from '2011-01-01T00:00:00Z' to 2011-01-01T01:00:00Z, this would cause the exception because time series 8c04e94e-76b0-4369-a55c-f5e1117fb83e has no entry for 01:00:00. But with our general approach we define values as valid until a new one at a certain tick arrise. In my humble opinion this case would be vaild, while some earlier start date (e.g. 2010-12-31T23:00:00Z') wouldn't.

@sebastian-peter
Copy link
Member

One point to discuss, based on the data in vn_simona: Asuming I would increase the simulation start time by one hour from '2011-01-01T00:00:00Z' to 2011-01-01T01:00:00Z, this would cause the exception because time series 8c04e94e-76b0-4369-a55c-f5e1117fb83e has no entry for 01:00:00. But with our general approach we define values as valid until a new one at a certain tick arrise. In my humble opinion this case would be vaild, while some earlier start date (e.g. 2010-12-31T23:00:00Z') wouldn't.

That's a neat idea, however this sounds more complicated and could rather be handled in a new PR? For now I'm quite happy that there's an error message at all

@danielfeismann
Copy link
Member

One point to discuss, based on the data in vn_simona: Asuming I would increase the simulation start time by one hour from '2011-01-01T00:00:00Z' to 2011-01-01T01:00:00Z, this would cause the exception because time series 8c04e94e-76b0-4369-a55c-f5e1117fb83e has no entry for 01:00:00. But with our general approach we define values as valid until a new one at a certain tick arrise. In my humble opinion this case would be vaild, while some earlier start date (e.g. 2010-12-31T23:00:00Z') wouldn't.

That's a neat idea, however this sounds more complicated and could rather be handled in a new PR? For now I'm quite happy that there's an error message at all

Fair point. Yes we should handle that in a new PR

@danielfeismann danielfeismann added the bug Something isn't working label Nov 13, 2024
Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question I got into my mind

Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully agree with @danielfeismann that this solution is far from ideal, but at least we display an error message now.

We should work on a more flexible solution that just takes the last value before simulation start if no value for tick 0 is present, as Daniel suggested.

One could also talk about sending out some sort of 0 kW data if the time series starts after simulation start, however, this could lead to strange agent behavior that is difficult to detect. It's probably better to require the user to explicitly set the value for tick 0.

Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, @staudtMarius, for fixing this!

Signed-off-by: Sebastian Peter <[email protected]>
@sebastian-peter sebastian-peter merged commit c2def29 into dev Nov 19, 2024
4 checks passed
@sebastian-peter sebastian-peter deleted the ms/#1014-fix-initialisation-freezing-on-empty-primaryData branch November 19, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error handling for invalid time of primary data
3 participants