Solvers

class condor.solvers.sweeping_gradient_method.SolverSciPyBase(system, atol=1e-12, rtol=1e-06, adaptive_min_steps=0, rootfinder=<function brentq>, max_step_size=0.0, nsteps=10000.0, **kwargs)

Baseclass for using scipy.integrate.ode with advanced features.

Wraps standard scipy integrator class with functionality for event handling, multiple-segment time generators, and adaptive minumum number of steps. Options are generally a pass through to the underlying integrator (e.g., scipy.integrate.ode, dopri5 or dop853 currently). This implementation performs an event function zero-crossing check at each time-step; when an event function zero-crossing is detected, a rootfinding and event update operation is performed. Special options on the sweeping_gradient_method solver which are described below.

Options:
  • adaptive_min_steps (int) – minimum number of steps per time-defined segment

  • max_step_size (float) – maximum step size for the forward evaluation, normalized name to scipy’s max_step

  • rootfinder (callable) – Interval root-finder function. Defaults to scipy.optimize.brentq(), and must take the equivalent positional arguments, f, a, and b, and return x0, where a <= x0 <= b and f(x0) is the zero.

    Keyword arguments with a rootfinder_ prefix are passed to the rootfinder method during the rootfinding step.

class condor.solvers.sweeping_gradient_method.SolverSciPyDopri5(system, atol=1e-12, rtol=1e-06, adaptive_min_steps=0, rootfinder=<function brentq>, max_step_size=0.0, nsteps=10000.0, **kwargs)

SolverSciPyBase for the dopri5 method

class condor.solvers.sweeping_gradient_method.SolverSciPyDop853(system, atol=1e-12, rtol=1e-06, adaptive_min_steps=0, rootfinder=<function brentq>, max_step_size=0.0, nsteps=10000.0, **kwargs)

SolverSciPyBase for the dop853 method