pub struct MasterLp<F> {
pub n_constraints: usize,
pub columns: Vec<Column<F>>,
pub rhs: Vec<F>,
pub constraint_sense: Vec<ConstraintSense>,
}Expand description
The restricted master LP (RMP).
Maintains the set of currently active columns. The LP is:
min Σ_j cost_j · λ_j
s.t. Σ_j A_{ij} · λ_j ~ b_i for each constraint i
λ_j ≥ 0Fields§
§n_constraints: usizeNumber of constraints.
columns: Vec<Column<F>>Currently active columns.
rhs: Vec<F>RHS of each constraint.
constraint_sense: Vec<ConstraintSense>Sense of each constraint.
Implementations§
Source§impl<F: Float + FromPrimitive + Debug + Clone> MasterLp<F>
impl<F: Float + FromPrimitive + Debug + Clone> MasterLp<F>
Sourcepub fn new(
n_constraints: usize,
rhs: Vec<F>,
constraint_sense: Vec<ConstraintSense>,
) -> OptimizeResult<Self>
pub fn new( n_constraints: usize, rhs: Vec<F>, constraint_sense: Vec<ConstraintSense>, ) -> OptimizeResult<Self>
Create a new, empty master LP.
§Arguments
n_constraints– number of rows.rhs– right-hand side vector (lengthn_constraints).constraint_sense– sense for each constraint row.
Sourcepub fn add_column(&mut self, col: Column<F>) -> OptimizeResult<()>
pub fn add_column(&mut self, col: Column<F>) -> OptimizeResult<()>
Add a column to the master LP.
Returns an error if the column has incorrect length.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for MasterLp<F>
impl<F> RefUnwindSafe for MasterLp<F>where
F: RefUnwindSafe,
impl<F> Send for MasterLp<F>where
F: Send,
impl<F> Sync for MasterLp<F>where
F: Sync,
impl<F> Unpin for MasterLp<F>where
F: Unpin,
impl<F> UnsafeUnpin for MasterLp<F>
impl<F> UnwindSafe for MasterLp<F>where
F: 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.