autopdex.dae.PIDController
- class autopdex.dae.PIDController(pcoeff: float = 0.0, icoeff: float = 1.0, dcoeff: float = 0.0, limiter: Any = None, atol=1e-06, rtol=0.001)[source]
Proportional-Integral-Derivative (PID) Step Size Controller.
Inspired by https://docs.kidger.site/diffrax/api/stepsize_controller and https://docs.sciml.ai/DiffEqDocs/stable/extras/timestepping/
- __init__(pcoeff: float = 0.0, icoeff: float = 1.0, dcoeff: float = 0.0, limiter: Any = None, atol=1e-06, rtol=0.001)[source]
Initialize the PIDController.
- Parameters:
pcoeff (float) – The coefficient of the proportional part of the step size control.
icoeff (float) – The coefficient of the integral part of the step size control.
dcoeff (float) – The coefficient of the derivative part of the step size control.
limiter (callable) – Limiter function. If None the limiter is set to 1.0 + jnp.arctan(x - 1.0).
atol (float) – Absolute tolerance.
rtol (float) – Relative tolerance.
Methods
__delattr__(name, /)Implement delattr(self, name).
__dir__()Default dir() implementation.
__eq__(value, /)Return self==value.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__getstate__()Helper for pickle.
__gt__(value, /)Return self>value.
__hash__()Return hash(self).
__init_subclass__This method is called when a class is subclassed.
__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(value, /)Return self!=value.
__new__(**kwargs)__reduce__()Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__()Return repr(self).
__setattr__(name, value, /)Implement setattr(self, name, value).
__sizeof__()Size of object in memory, in bytes.
__str__()Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
check_accept(state, converged, verbose)Check whether the current step should be accepted.
compute_scaler(error, q, q_n, state, order, ...)Compute the scaling factor step_scaler and update the controller state.
initialize(initial_error)TODO: Initialization of time increment? See diffrax
Attributes
__abstractmethods____annotations____dict____doc____module____slots____weakref__list of weak references to the object
_abc_impl