pub struct Copp3ProblemBuilder<'a, M: RobotTorque> {
pub robot: &'a mut Robot<M>,
pub objectives: &'a [CoppObjective<'a>],
pub idx_s_start: usize,
pub a_linearization: &'a [f64],
pub a_boundary: (f64, f64),
pub b_boundary: (f64, f64),
pub num_stationary_max: (usize, usize),
}Expand description
Builder for Copp3Problem.
Fields§
§robot: &'a mut Robot<M>A robot with torque implemented, which defines the constraints and dynamic of the problem.
objectives: &'a [CoppObjective<'a>]Objectives for COPP3 optimization.
idx_s_start: usizeThe starting index along the path (reached).
a_linearization: &'a [f64]Linearization reference profile for third-order constraints.
a_boundary: (f64, f64)a_boundary=(a_start,a_final) - The initial and final acceleration at the start and end of the path.
b_boundary: (f64, f64)b_boundary=(b_start,b_final) - The initial and final boundary conditions for b.
num_stationary_max: (usize, usize)User-input upper bound of stationary intervals at (start, end).
Implementations§
Source§impl<'a, M: RobotTorque> Copp3ProblemBuilder<'a, M>
impl<'a, M: RobotTorque> Copp3ProblemBuilder<'a, M>
Sourcepub fn new(
robot: &'a mut Robot<M>,
objectives: &'a [CoppObjective<'a>],
idx_s_start: usize,
a_linearization: &'a [f64],
a_boundary: (f64, f64),
b_boundary: (f64, f64),
) -> Self
pub fn new( robot: &'a mut Robot<M>, objectives: &'a [CoppObjective<'a>], idx_s_start: usize, a_linearization: &'a [f64], a_boundary: (f64, f64), b_boundary: (f64, f64), ) -> Self
Create a COPP3 builder with required fields.
Default:
num_stationary_max = (1, 1)
Sourcepub fn with_num_stationary_max(self, num_stationary_max: usize) -> Self
pub fn with_num_stationary_max(self, num_stationary_max: usize) -> Self
Set symmetric stationary upper bound: num_stationary_max=(n,n).
See module-level Stationary-boundary modeling note for guidance.
Sourcepub fn with_num_stationary_max_pair(
self,
num_stationary_max: (usize, usize),
) -> Self
pub fn with_num_stationary_max_pair( self, num_stationary_max: (usize, usize), ) -> Self
Set asymmetric stationary upper bound: num_stationary_max=(start,end).
See module-level Stationary-boundary modeling note for guidance.
Sourcepub fn build_with_linearization(self) -> Result<Copp3Problem<'a, M>, CoppError>
pub fn build_with_linearization(self) -> Result<Copp3Problem<'a, M>, CoppError>
Build a validated COPP3 problem and linearize third-order constraints in one step.
Auto Trait Implementations§
impl<'a, M> Freeze for Copp3ProblemBuilder<'a, M>
impl<'a, M> RefUnwindSafe for Copp3ProblemBuilder<'a, M>where
M: RefUnwindSafe,
impl<'a, M> Send for Copp3ProblemBuilder<'a, M>where
M: Send,
impl<'a, M> Sync for Copp3ProblemBuilder<'a, M>where
M: Sync,
impl<'a, M> Unpin for Copp3ProblemBuilder<'a, M>
impl<'a, M> !UnwindSafe for Copp3ProblemBuilder<'a, M>
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
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.