#[non_exhaustive]pub struct ConstraintSensitivity {
pub shadow_price: Rational,
pub slack: Rational,
pub binding: bool,
pub rhs_range: Interval,
pub redundant: bool,
pub source: Option<Source>,
}Expand description
Sensitivity of one constraint.
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.shadow_price: RationalShadow price y_i: the change of the optimal objective per unit increase of the
right-hand side b_i, valid while b_i stays within rhs_range.
This is the rate of change of z itself (as in Hillier & Lieberman or Excel), so it
is positive when raising b_i increases z, also when minimizing. LINDO’s “dual
price” is the improvement instead: the same value when maximizing, negated when
minimizing.
slack: RationalUnused amount at the optimum: b_i - a_i x for <=, a_i x - b_i for >=, and 0
for =.
binding: boolThe constraint holds with equality at the optimum (slack == 0).
rhs_range: IntervalValues of b_i (all else equal) for which the final basis stays feasible, hence
optimal, with the same shadow prices. A free variable may change sign inside the range
(its two columns trade places, which keeps the prices). A single point [b_i, b_i] for
a redundant
equality and for the equalities it depends on: moving any of them alone makes the
constraints inconsistent.
redundant: boolAn equality that is a linear combination of other constraints, removed from the basis. Its shadow price is reported as 0 (it is not unique), and its right-hand side cannot change alone without making the problem infeasible.
source: Option<Source>Where the shadow price can be read in the final tableau, if anywhere.