-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
generalise simulation, include sensititivies #3834
Comments
Sounds good! I agree the Simulation class should not have anything battery-specific. How does the concept of an Experiment generalize beyond battery models? Specifically, the way to "solve pybamm models in sequence" at the moment is via the Experiment. Should we have a generic Experiment class to generalize this? Or allow passing in a list of models instead? Regarding sensitivities, how do we deal with events? I guess it's ok with forward sensitivities but difficult/impossible with adjoints. |
Agree, that's a great idea! I think a list of models, if possible, might be easier to start with, as it would be hard to abstract what a generic Experiment is without other examples. At the moment, it is just different models ran sequentially with certain events that dictate on when to finish a simulation, so it could all be encapsulated in a list of models. We can always think how to generalise an experiment or to write other |
Passing a list of models for the |
I think you need more than a list of models, you need:
I don't know how you would do adjoints, but we don't do this atm anyway. We only do forward sensitivities |
This is currently handled by How different would the models in the list be? Do you have a particular use case in mind? |
nope, this sounds perfect, happy to use this |
It sounds like a more generic I'm not sure we need to support the use case of solving completely different models as a top-level API (it's always possible to hack it together using |
Description
at the moment simulation is a specific to the battery models and experiment class within pybamm. I'd like to propose a simpler, more general purpose mechanism so that a sequence of pybamm models can be solved (in sequence), with the next model initialised from the previous (including sensitivities). This doesn't have to be anything fancy, just a way to reinitialise a model from the solution of another model (although you could also have a base simulation class that works for a general pybamm model). I'd imagine that the simulation class could use this to simplify some of its logic as well, and it would mean that sensitivities could be used with experiments
Motivation
This was motivated by #3804
and #3176
Possible Implementation
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: