pub struct CollocationResult<S: Scalar> {
pub time: Vec<S>,
pub states: Vec<S>,
pub controls: Vec<S>,
pub parameters: Vec<S>,
pub objective: S,
pub final_time: S,
pub converged: bool,
pub message: String,
pub iterations: usize,
pub wall_time_secs: f64,
pub n_states: usize,
pub n_controls: usize,
}Expand description
Result of a direct collocation solve.
Fields§
§time: Vec<S>Time grid at mesh nodes.
states: Vec<S>States at each mesh node (flat row-major: states[i * nx + j]).
controls: Vec<S>Controls at each mesh node (flat row-major: controls[i * nu + j]).
parameters: Vec<S>Optimal parameters (empty if no free parameters).
objective: SOptimal objective value.
final_time: SFinal time (may differ from initial if free).
converged: boolWhether the optimizer converged.
message: StringHuman-readable status message.
iterations: usizeNumber of optimizer iterations.
wall_time_secs: f64Wall-clock time in seconds.
n_states: usizeNumber of states (for interpreting flat arrays).
n_controls: usizeNumber of controls (for interpreting flat arrays).
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for CollocationResult<S>where
S: Freeze,
impl<S> RefUnwindSafe for CollocationResult<S>where
S: RefUnwindSafe,
impl<S> Send for CollocationResult<S>
impl<S> Sync for CollocationResult<S>
impl<S> Unpin for CollocationResult<S>where
S: Unpin,
impl<S> UnsafeUnpin for CollocationResult<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for CollocationResult<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