pub struct MultipleShootingProblem<S: Scalar> { /* private fields */ }Expand description
Builder for multiple shooting optimal control problems.
Implementations§
Source§impl<S: Scalar> MultipleShootingProblem<S>
impl<S: Scalar> MultipleShootingProblem<S>
Sourcepub fn dynamics<F>(self, f: F) -> Self
pub fn dynamics<F>(self, f: F) -> Self
Set the controlled ODE right-hand side: f(t, x, dxdt, u).
Sourcepub fn initial_state(self, y0: Vec<S>) -> Self
pub fn initial_state(self, y0: Vec<S>) -> Self
Set the initial state y(t0).
Sourcepub fn n_segments(self, n: usize) -> Self
pub fn n_segments(self, n: usize) -> Self
Set the number of shooting segments.
Sourcepub fn control_bounds(self, bounds: Vec<Option<(S, S)>>) -> Self
pub fn control_bounds(self, bounds: Vec<Option<(S, S)>>) -> Self
Set bounds for each control variable (applied to every segment).
Sourcepub fn terminal_cost<F>(self, f: F) -> Self
pub fn terminal_cost<F>(self, f: F) -> Self
Set the terminal cost phi(y(T)).
Sourcepub fn running_cost<F>(self, f: F) -> Self
pub fn running_cost<F>(self, f: F) -> Self
Set the running cost L(t, y, u).
Sourcepub fn terminal_constraint<F>(self, f: F) -> Self
pub fn terminal_constraint<F>(self, f: F) -> Self
Set terminal equality constraints h(y(T)) = 0.
Sourcepub fn ode_tolerances(self, rtol: S, atol: S) -> Self
pub fn ode_tolerances(self, rtol: S, atol: S) -> Self
Set ODE solver tolerances.
Sourcepub fn solve(self) -> Result<MultipleShootingResult<S>, OcpError>
pub fn solve(self) -> Result<MultipleShootingResult<S>, OcpError>
Execute the multiple shooting optimal control solve.
Auto Trait Implementations§
impl<S> Freeze for MultipleShootingProblem<S>where
S: Freeze,
impl<S> !RefUnwindSafe for MultipleShootingProblem<S>
impl<S> Send for MultipleShootingProblem<S>
impl<S> Sync for MultipleShootingProblem<S>
impl<S> Unpin for MultipleShootingProblem<S>where
S: Unpin,
impl<S> UnsafeUnpin for MultipleShootingProblem<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for MultipleShootingProblem<S>
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> 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