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

Fixed ThermalStorageResults having multiple entries #925

Merged

Conversation

danielfeismann
Copy link
Member

resolves #924

@danielfeismann danielfeismann self-assigned this Aug 24, 2024
@danielfeismann danielfeismann added the bug Something isn't working label Aug 24, 2024
@danielfeismann
Copy link
Member Author

ThermalGrid.results() will carry out both, thermalHouse and thermalStorage results whenever one of both got a change of its state. Since the state of the other hasn't changed, it was written out with the tick of the last change of it. This can and should be changed within another PR (Issue needs to be created). As workaround the tick of the result that triggered the output of the results will be used for both.

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.

So now we're setting the result tick to the maximum tick of all results. But wouldn't it make more sense to only send out the results of the entity with the maximum tick? Because the other entity with a smaller result tick clearly has not changed the result.

…-multiple-entries

# Conflicts:
#	CHANGELOG.md
@danielfeismann
Copy link
Member Author

Good idea! Thanks.

@sebastian-peter
Copy link
Member

@danielfeismann Adapted the code a bit for simplicity. Let me know what you think

@danielfeismann
Copy link
Member Author

danielfeismann commented Oct 14, 2024

@sebastian-peter: Looks good to me!

@sebastian-peter sebastian-peter merged commit 0d2f064 into dev Oct 25, 2024
3 checks passed
@sebastian-peter sebastian-peter deleted the df/#924-ThermalStorageResults-have-multiple-entries branch October 25, 2024 11:19
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.

Fix ThermalStorageResults having multiple entries
2 participants