Open rtimms opened 2 years ago
Or at least do that in our drive cycle examples
Hey @rtimms What are you excatly expecting out of this? Where can I find this? Thanks!
I wanted to add a max_step
parameter to BaseSolver
which controls the maximum step size the solver can take. You'll need to look at the docs for the each of the solvers we use as they may all have different interfaces. E.g. for scipy integrate you can directly pass max_step
as an extra option. We should probably follow their syntax so that the default is inf
, i.e., the step size is not bounded and determined solely by the solver.
Note this is different from dt_max
used in the CasadiSolver
to set the step size for event checking. I propose we rename dt_max
to dt_event
.
This might be more like medium rather than easy.
I see. Can you provide a basic example for the same because I'm not getting where other parameters are gettiing called in https://github.com/pybamm-team/PyBaMM/blob/develop/pybamm/models/submodels/base_submodel.py
I think you are looking at the wrong class (based on the link you attached). BaseSolver
-
@rtimms Any update on this?
What do you need an update on? I think you were looking at the wrong class, as suggested by @Saransh-cpp .
@rtimms I was expecting the example on above. That would be helpful if you can provide it.
Hi there @rtimms I had gone through the scipy integrate to try to understand what exacty could be done, but I don't find any parameter like max_step there. Would you like to suggest me anything in regards?
max_step
is in the **options
part of the scipy docs
Add a
max_step
parameter toBaseSolver
and pass it to the solvers in the appropriate way. Then for drive cycle simulations we should setmax_step
to the step size in the data.