pub struct CbfModel {
pub minimize: bool,
pub num_var: usize,
pub var_cones: Vec<ConeDecl>,
pub num_con: usize,
pub con_cones: Vec<ConeDecl>,
pub c: Vec<f64>,
pub c0: f64,
pub a: Vec<(usize, usize, f64)>,
pub b: Vec<f64>,
pub psdcon_dims: Vec<usize>,
pub hcoord: Vec<(usize, usize, usize, usize, f64)>,
pub dcoord: Vec<(usize, usize, usize, f64)>,
}Expand description
A parsed CBF instance: the objective, the variable / constraint cone
partitions, and the sparse A/b (and objective c/c₀).
Fields§
§minimize: booltrue for OBJSENSE MIN, false for MAX.
num_var: usize§var_cones: Vec<ConeDecl>§num_con: usize§con_cones: Vec<ConeDecl>§c: Vec<f64>Objective linear term c, dense (length num_var).
c0: f64Objective constant c₀.
a: Vec<(usize, usize, f64)>Constraint matrix A as (row, col, val) triplets.
b: Vec<f64>Constraint constant b, dense (length num_con).
psdcon_dims: Vec<usize>Matrix sizes of the affine PSD constraints (PSDCON): constraint c
asserts D_c + Σ_k x_k H_{c,k} ⪰ 0 over a psdcon_dims[c]-square
matrix.
hcoord: Vec<(usize, usize, usize, usize, f64)>HCOORD entries (con, var, i, j, val): H_{con,var}[i][j] = val
(lower triangle, i ≥ j) — the coefficient of scalar variable var
on entry (i,j) of PSD constraint con.
dcoord: Vec<(usize, usize, usize, f64)>DCOORD entries (con, i, j, val): D_con[i][j] = val (lower
triangle) — the constant term of PSD constraint con.
Implementations§
Source§impl CbfModel
impl CbfModel
Sourcepub fn to_conic(&self) -> Result<ConicProgram, CbfError>
pub fn to_conic(&self) -> Result<ConicProgram, CbfError>
Map this instance to a pounce conic program. Variable cones become
slack blocks s = −Gx ∈ K (a G = −I selection, h = 0);
constraint cones use s = h − Gx = Ax + b ∈ K. L= rows become
equalities Ax = −b. Exponential triples are reversed, and power
triples rotated, into pounce cone order (see the per-arm comments).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CbfModel
impl RefUnwindSafe for CbfModel
impl Send for CbfModel
impl Sync for CbfModel
impl Unpin for CbfModel
impl UnsafeUnpin for CbfModel
impl UnwindSafe for CbfModel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
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>
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