Skip to content

Running diffeqsolve for a fixed number of *accepted* steps #740

Description

@BenjaminDAnjou

Is it possible to run diffeqsolve with an adaptive stepsize controller for a fixed number of accepted steps? The solution diffeqsolve(..., max_steps=n, throw=False, t1=jnp.inf) does not distinguish between rejected and accepted steps.

The solution diffeqsolve(..., max_steps=n, throw=False, t1=jnp.inf) can be put in a subloop that checks sol.stats["num_rejected_steps"]. I tried this, but I think this may require explicitly calling adapt_step_size() outside of diffeqsolve. If I pass only the controller_state to diffeqsolve, I get stuck in an infinite loop whenever a rejection occurs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions