#[non_exhaustive]pub struct EvaluatedConstraint {
pub id: u64,
pub equality: i32,
pub evaluated_value: f64,
pub used_decision_variable_ids: Vec<u64>,
pub subscripts: Vec<i64>,
pub parameters: HashMap<String, String>,
pub name: Option<String>,
pub description: Option<String>,
pub dual_variable: Option<f64>,
pub removed_reason: Option<String>,
pub removed_reason_parameters: HashMap<String, String>,
}Expand description
A constraint evaluated with a state
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64§equality: i32§evaluated_value: f64The value of function for the state
used_decision_variable_ids: Vec<u64>IDs of decision variables used to evaluate this constraint
subscripts: Vec<i64>Integer parameters of the constraint.
parameters: HashMap<String, String>Key-value parameters of the constraint.
name: Option<String>Name of the constraint.
description: Option<String>Detail human-readable description of the constraint.
dual_variable: Option<f64>Value for the Lagrangian dual variable of this constraint. This is optional because not all solvers support to evaluate dual variables.
removed_reason: Option<String>Short removed reason of the constraint. This field exists only if this message is evaluated from a removed constraint.
removed_reason_parameters: HashMap<String, String>Detailed parameters why the constraint is removed. This field exists only if this message is evaluated from a removed constraint.
Implementations§
Source§impl EvaluatedConstraint
impl EvaluatedConstraint
Sourcepub fn equality(&self) -> Equality
pub fn equality(&self) -> Equality
Returns the enum value of equality, or the default if the field is set to an invalid enum value.
Sourcepub fn set_equality(&mut self, value: Equality)
pub fn set_equality(&mut self, value: Equality)
Sets equality to the provided enum value.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the value of description, or the default value if description is unset.
Sourcepub fn dual_variable(&self) -> f64
pub fn dual_variable(&self) -> f64
Returns the value of dual_variable, or the default value if dual_variable is unset.
Sourcepub fn removed_reason(&self) -> &str
pub fn removed_reason(&self) -> &str
Returns the value of removed_reason, or the default value if removed_reason is unset.
Source§impl EvaluatedConstraint
impl EvaluatedConstraint
pub fn is_feasible(&self, atol: ATol) -> Result<bool>
Trait Implementations§
Source§impl Clone for EvaluatedConstraint
impl Clone for EvaluatedConstraint
Source§fn clone(&self) -> EvaluatedConstraint
fn clone(&self) -> EvaluatedConstraint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvaluatedConstraint
impl Debug for EvaluatedConstraint
Source§impl Default for EvaluatedConstraint
impl Default for EvaluatedConstraint
Source§impl From<EvaluatedConstraint> for EvaluatedConstraint
impl From<EvaluatedConstraint> for EvaluatedConstraint
Source§fn from(constraint: EvaluatedConstraint) -> Self
fn from(constraint: EvaluatedConstraint) -> Self
Source§impl Message for EvaluatedConstraint
impl Message for EvaluatedConstraint
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl Parse for EvaluatedConstraint
impl Parse for EvaluatedConstraint
Source§impl PartialEq for EvaluatedConstraint
impl PartialEq for EvaluatedConstraint
impl StructuralPartialEq for EvaluatedConstraint
Auto Trait Implementations§
impl Freeze for EvaluatedConstraint
impl RefUnwindSafe for EvaluatedConstraint
impl Send for EvaluatedConstraint
impl Sync for EvaluatedConstraint
impl Unpin for EvaluatedConstraint
impl UnsafeUnpin for EvaluatedConstraint
impl UnwindSafe for EvaluatedConstraint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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