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

Adjust indexing for content of InvestStorageBlock #1038

Closed
wants to merge 5 commits into from

Conversation

p-snft
Copy link
Member

@p-snft p-snft commented Jan 18, 2024

Fix #1030

Adjust indexing to be same as for content of storage without investment.
@p-snft p-snft added the bug label Jan 18, 2024
@p-snft p-snft self-assigned this Jan 18, 2024
@p-snft
Copy link
Member Author

p-snft commented Jan 18, 2024

The file has a lot of duplication and should be reworked. But for now, I only want to provide a quick fix.

PS: The code should be good already. Fixing the tests manually is a bit tedious, though. I will check the files that are automatically created and commit them without adjusting the line ordering to minimise changes.

@p-snft
Copy link
Member Author

p-snft commented Jan 18, 2024

Turns out that the changed indexing also changes the results: Before, the initial storage level was given for the -1th time point, so the Flows where right indexed for storages with investment and indexed left for storages without investment. :(

As we just want to test restoring a dumped file, I did not check if
the new number is correct. As the time horozon is smaller, it makes
sense that the storage is smaller, though.
@p-snft
Copy link
Member Author

p-snft commented Jan 19, 2024

This does not work as expected. Unfortunately, there is no real unit test for the storage. I will restart this attempt including a proper unit test.

@p-snft p-snft closed this Jan 19, 2024
@p-snft p-snft deleted the fix/invest_storage_content branch January 19, 2024 16:38
@p-snft p-snft restored the fix/invest_storage_content branch August 14, 2024 08:41
@p-snft p-snft deleted the fix/invest_storage_content branch August 14, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First time step of storage_content sequence is missing
1 participant