pub struct GenericConstraint {
pub id: EntityId,
pub name: String,
pub description: Option<String>,
pub expression: ConstraintExpression,
pub sense: ConstraintSense,
pub slack: SlackConfig,
}Expand description
A user-defined generic linear constraint.
Stored in crate::System::generic_constraints after loading and
validation. Constraints are sorted by id after loading to satisfy the
declaration-order invariance requirement.
The expression parser, referential validation (entity IDs exist), and
bounds loading (from generic_constraint_bounds.parquet) are all
performed by cobre-io, not here.
Fields§
§id: EntityIdUnique constraint identifier.
name: StringShort name used in reports and log output.
description: Option<String>Optional human-readable description.
expression: ConstraintExpressionParsed left-hand-side expression of the constraint.
sense: ConstraintSenseComparison sense (>=, <=, or ==).
slack: SlackConfigSlack variable configuration.
Trait Implementations§
Source§impl Clone for GenericConstraint
impl Clone for GenericConstraint
Source§fn clone(&self) -> GenericConstraint
fn clone(&self) -> GenericConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenericConstraint
impl Debug for GenericConstraint
Source§impl PartialEq for GenericConstraint
impl PartialEq for GenericConstraint
impl StructuralPartialEq for GenericConstraint
Auto Trait Implementations§
impl Freeze for GenericConstraint
impl RefUnwindSafe for GenericConstraint
impl Send for GenericConstraint
impl Sync for GenericConstraint
impl Unpin for GenericConstraint
impl UnsafeUnpin for GenericConstraint
impl UnwindSafe for GenericConstraint
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