-
Notifications
You must be signed in to change notification settings - Fork 132
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
FakeSequences Not Iterating Correctly #1115
Comments
Hi @ahbills, thanks for reporting. Actually, I have to look a bit deeper before I understand why it worked before. Why it does not work now, is rather clear: I will report back once I checked, PS: The hidden magic making it hard to debug is the reason why we got rid of the old code. |
Found it.
True also if no variable costs are set. With the old hidden magic _Sequence , the loop afterwards would access members Flow.variable_costs[0:3] , and thus set the sequence length to 3.
Now, there are two thing we learn:
Let me put this as a question. Would the following be an acceptable (excepted without having the prior experience) result? (I think it would be consistent, as many other values default to
|
Wow thank you so much for all of your work! I think your suggested output is great. Thank you, |
I just released solph v0.5.5 to fix that problem. |
Description
With the changes in the new 0.5.4 update, I've run into a problem when trying to treat FakeSequences as an iterable. I have made the short code below to demonstrate:
Expected behavior
In the previous version, this prints the following:
but now the following error is raised
and if you try to cast it to a list in the process: i.e.
list(v.fix)
, the following error is raisedI believe that this is coming from a problem with the self._length value but I am having a hard time tracing it
Thank you in advance for any help
Note: I am working with:
oemof.solph 0.5.4
Python 3.11.9
pandas 2.2.2
and Windows 11
The text was updated successfully, but these errors were encountered: