#[non_exhaustive]pub enum Step {
#[non_exhaustive] Tableau {
phase: Phase,
iteration: usize,
snapshot: Snapshot,
},
#[non_exhaustive] Pivot {
phase: Phase,
iteration: usize,
entering: usize,
entering_name: String,
leaving_row: usize,
leaving: usize,
leaving_name: String,
pivot_value: Rational,
ratios: Vec<RatioTest>,
},
#[non_exhaustive] PhaseOneFinished {
artificial_sum: Rational,
feasible: bool,
},
#[non_exhaustive] ArtificialPivotedOut {
row: usize,
entering: usize,
entering_name: String,
},
#[non_exhaustive] RedundantRowRemoved {
row: usize,
},
#[non_exhaustive] ArtificialRemainsPositive {
artificials: Vec<NamedValue>,
unbounded_direction: bool,
},
#[non_exhaustive] DualPivot {
phase: Phase,
iteration: usize,
leaving_row: usize,
leaving: usize,
leaving_name: String,
entering: usize,
entering_name: String,
pivot_value: Rational,
ratios: Vec<DualRatioTest>,
},
#[non_exhaustive] InfeasibleRow {
row: usize,
basic: NamedValue,
},
#[non_exhaustive] ConstraintAdded {
constraint: usize,
row: usize,
satisfied: bool,
},
#[non_exhaustive] Finished {
termination: Termination,
},
}Expand description
One recorded event.
New kinds of steps (for example from future methods) may be added in minor releases, so
matches on Step need a wildcard arm. With the serde feature, a step is a JSON object
whose "type" field is the variant name in snake_case ("tableau", "pivot", …).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]Tableau
The tableau at the start of an iteration (iteration starts at 0).
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Pivot
A pivot: which column enters, which row leaves, and the ratio test behind the choice.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]PhaseOneFinished
Phase 1 of the two-phase method finished.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ArtificialPivotedOut
A zero-valued artificial variable was swapped out of the basis.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]RedundantRowRemoved
A row whose basic variable was artificial and had no usable column: it was redundant.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ArtificialRemainsPositive
Big-M: the penalty row (M part) can no longer improve, yet some artificial variables
are still positive, so the problem is infeasible. unbounded_direction is true when
the run stopped at an unbounded direction rather than at an optimal tableau.
Fields
This variant is marked as non-exhaustive
artificials: Vec<NamedValue>Each positive artificial variable and its value.
#[non_exhaustive]DualPivot
A dual simplex pivot: which row leaves (it has a negative right-hand side), which column enters, and the ratio test over the columns behind the choice.
Fields
This variant is marked as non-exhaustive
ratios: Vec<DualRatioTest>#[non_exhaustive]InfeasibleRow
Dual simplex: the leaving row has a negative right-hand side but no negative entry, so its equation (non-negative terms adding up to a negative number) cannot hold: the problem is infeasible.
Fields
This variant is marked as non-exhaustive
basic: NamedValueThe basic variable of that row and its (negative) value.
#[non_exhaustive]ConstraintAdded
reoptimize: constraint constraint of the extended problem was
appended to the final tableau as row row, expressed in the current basis with its
own slack basic. satisfied tells whether the previous optimum already meets it.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Finished
Final outcome.
Fields
This variant is marked as non-exhaustive
termination: Termination