pub struct NlProblem {Show 17 fields
pub n: usize,
pub m: usize,
pub num_obj: usize,
pub minimize: bool,
pub obj_nonlinear: Expr,
pub obj_linear: Vec<(usize, Number)>,
pub obj_constant: Number,
pub con_nonlinear: Vec<Expr>,
pub con_linear: Vec<Vec<(usize, Number)>>,
pub x_l: Vec<Number>,
pub x_u: Vec<Number>,
pub g_l: Vec<Number>,
pub g_u: Vec<Number>,
pub x0: Vec<Number>,
pub lambda0: Vec<Number>,
pub suffixes: NlSuffixes,
pub imported_funcs: Vec<ImportedFunc>,
}Expand description
Parsed .nl problem in the form needed by NlTnlp.
Fields§
§n: usize§m: usize§num_obj: usize§minimize: bool§obj_nonlinear: Expr§obj_linear: Vec<(usize, Number)>§obj_constant: Number§con_nonlinear: Vec<Expr>Per-constraint nonlinear part (length m).
con_linear: Vec<Vec<(usize, Number)>>Per-constraint linear part (length m), each a list of (var, coef).
x_l: Vec<Number>§x_u: Vec<Number>§g_l: Vec<Number>§g_u: Vec<Number>§x0: Vec<Number>§lambda0: Vec<Number>§suffixes: NlSuffixesAMPL suffix dictionaries. Variable / constraint / objective
suffixes are stored as dense vectors (length n / m / num_obj)
with the sparse .nl S-segment entries scattered in, default
zero. The integer / real split matches the S-segment header’s
kind bit (0x4 ⇒ real, else integer). See
https://ampl.com/REFS/hooking2.pdf §6 and the upstream .nl
reader in ref/Ipopt/src/Apps/AmplSolver/AmplTNLP.cpp.
imported_funcs: Vec<ImportedFunc>AMPL imported (external) functions declared via top-level F segments.
Empty unless the .nl file calls compiled-C user functions (typically
emitted by IDAES property packages — see issue #49).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NlProblem
impl RefUnwindSafe for NlProblem
impl !Send for NlProblem
impl !Sync for NlProblem
impl Unpin for NlProblem
impl UnsafeUnpin for NlProblem
impl UnwindSafe for NlProblem
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 more