pub struct PIController<S: Scalar> {
pub safety: S,
pub fac_min: S,
pub fac_max: S,
pub beta1: S,
pub beta2: S,
/* private fields */
}Expand description
PI (Proportional-Integral) step size controller.
This is the standard controller used in most production ODE codes. It provides smoother step size changes than a simple error-based controller.
The new step size is computed as: h_new = h * (1/err)^(beta1/p) * (err_old/err)^(beta2/p)
where p is the method order.
Fields§
§safety: SSafety factor (typically 0.9)
fac_min: SMinimum step size factor
fac_max: SMaximum step size factor
beta1: SI-controller gain (typically 0.7/p)
beta2: SP-controller gain (typically 0.4/p)
Implementations§
Source§impl<S: Scalar> PIController<S>
impl<S: Scalar> PIController<S>
Trait Implementations§
Source§impl<S: Clone + Scalar> Clone for PIController<S>
impl<S: Clone + Scalar> Clone for PIController<S>
Source§fn clone(&self) -> PIController<S>
fn clone(&self) -> PIController<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Scalar> Default for PIController<S>
impl<S: Scalar> Default for PIController<S>
Source§impl<S: Scalar> StepController<S> for PIController<S>
impl<S: Scalar> StepController<S> for PIController<S>
Auto Trait Implementations§
impl<S> Freeze for PIController<S>where
S: Freeze,
impl<S> RefUnwindSafe for PIController<S>where
S: RefUnwindSafe,
impl<S> Send for PIController<S>
impl<S> Sync for PIController<S>
impl<S> Unpin for PIController<S>where
S: Unpin,
impl<S> UnsafeUnpin for PIController<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PIController<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more