-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
[Bug]: starting_solution
does not work if last cycle is not saved
#3101
Comments
Maybe not strictly related to this (but could be addressed at the same time as this), but another issue is that the way |
It should be reasonably easy to fix, we just need to save |
This issue might also align with #2484 |
I found an easier way: save always the final cycle. It is a bit more memory consuming but a lot more robust (IMO). This also fixes the fact that the |
PyBaMM Version
23.5
Python Version
3.9.17
Describe the bug
When using
starting_solution
in solving a simulation, if the last cycle of thestarting_solution
is not saved, then the initialisation doesn't work: the new solution starts att=0
and does not contain the previous states (not even the first cycle which should be always saved).My guess is that when checking the solution for the last cycle it finds it is None and thus it treats it as if no
starting_solution
has been provided.Steps to Reproduce
Plotting
new_solution
yields:If, instead, I do
save_at_cycles=None
in the first solve, I get the expected result:Relevant log output
No response
The text was updated successfully, but these errors were encountered: