pub struct MiqpProblem {
pub qp: QpProblem,
pub integer_vars: Vec<usize>,
}Expand description
Mixed-Integer convex Quadratic Program: minimize 1/2 x^T Q x + c^T x
over the QpProblem feasible region with x[j] integral for every j in
integer_vars. Only convex (Q PSD) instances are in scope — see
MiqpProblem::is_convex.
Fields§
§qp: QpProblemContinuous QP relaxation (objective, constraints, bounds).
integer_vars: Vec<usize>Sorted, de-duplicated indices of variables required to be integral.
Implementations§
Source§impl MiqpProblem
impl MiqpProblem
Sourcepub fn new(
qp: QpProblem,
integer_vars: Vec<usize>,
) -> Result<Self, MipProblemError>
pub fn new( qp: QpProblem, integer_vars: Vec<usize>, ) -> Result<Self, MipProblemError>
Build an MIQP from a QP relaxation and the integer-variable indices.
Convexity is not enforced here; the solver checks is_convex and
rejects non-PSD Q. integer_vars is sorted and de-duplicated; an empty
set means a plain QP (the solver falls back to the QP path).
Trait Implementations§
Source§impl Clone for MiqpProblem
impl Clone for MiqpProblem
Source§fn clone(&self) -> MiqpProblem
fn clone(&self) -> MiqpProblem
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 moreAuto Trait Implementations§
impl Freeze for MiqpProblem
impl RefUnwindSafe for MiqpProblem
impl Send for MiqpProblem
impl Sync for MiqpProblem
impl Unpin for MiqpProblem
impl UnsafeUnpin for MiqpProblem
impl UnwindSafe for MiqpProblem
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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