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

First time step of storage_content sequence is missing #1030

Open
SabineHaas opened this issue Nov 30, 2023 · 2 comments · May be fixed by #1039
Open

First time step of storage_content sequence is missing #1030

SabineHaas opened this issue Nov 30, 2023 · 2 comments · May be fixed by #1039
Assignees
Labels
Milestone

Comments

@SabineHaas
Copy link
Member

Describe the bug
The storage_content sequence of an investment optimization problem is missing the first time step.

Energy system consists of: el_bus, load, el-storage, excess, shortage

To Reproduce
invest_storage.txt

Screenshots
Results of the storage, check sequence of storage_content:

{'scalars': variable_name
init_content       0.0
invest          1500.0
total           1500.0
Name: 2020-01-01 00:00:00, dtype: float64, 'sequences': variable_name        storage_content
2020-01-01 00:00:00            250.0
2020-01-01 01:00:00            125.0
2020-01-01 02:00:00              0.0
2020-01-01 03:00:00              NaN}

Expected behavior

2020-01-01 00:00:00            0.0
2020-01-01 01:00:00          250.0
2020-01-01 02:00:00          125.0
2020-01-01 03:00:00            0.0}

Desktop (please complete the following information):

  • Linux Mint 20.3

  • Python version 3.9

  • oemof.solph version 0.5.2.dev0

This might be interesting for you, @nailend

@jokochems
Copy link
Member

Thanks for bringing that up, @SabineHaas. I also noticed that in the course of development, but must have forgotten to open a dedicated issue or it has just not been high enough on my priority list. The inconsistencies seem to have been introduced a while ago when the better distinction between time intervals (TIMESTEPS) and discrete time points (TIMEPOINTS) was introduced.

@nailend and @SabineHaas It only holds for "standard", i.e. single period investment models, as I decided to alter the implementation for the multi-period case (and obviously, I also decided on introducing new bugs in the course of that 🙃).

@p-snft
Copy link
Member

p-snft commented Jan 17, 2024

@jokochems: You are right. This looks like it was not updated when we introduced the new indexing. In the result you see what I would have expected with the old (solph v0.4) behaviour. I'll have a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants