C++ mip solving
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
|
A completed is_satisfiable shall return true exactly when a point satisfies every stored constraint and designated integer restriction. True shall include feasible problems with unbounded objective. The query may update solver caches without changing the problem. If an exception interrupts a solver query, the cache shall be discarded without allocation and the original exception shall propagate. A subsequent query shall solve from the stored model. A real-relaxation witness alone shall not establish mixed integer feasibility. Before solving the real relaxation for a pending result, check each stored equality whose nonzero variable coefficients all belong to declared integer coordinates. If the greatest common divisor of those coefficients fails to divide the constant, report infeasibility. The check shall preserve stored constraints and use exact working integers. Equalities with a nonzero coefficient on a continuous coordinate are outside this check. Use the current constraints and integer selection after model changes. An integer search over an unbounded real relaxation may run indefinitely. Configured deterministic weight limits and supported cancellation are observed at solver checkpoints under 🔗 1. Optimization and ranking valid use. When the initial auxiliary objective is zero, the feasibility phase shall recognize that its upper bound is attained without pricing. Before removing basic artificial variables, it shall discard this completed objective. Cleanup pivots shall prefer a non-artificial column occurring in the fewest current tableau rows, retaining the lowest column index on a tie. Redundant rows shall be removed. These steps shall preserve the feasible point; subsequent optimization shall use the stored client objective. When pending nonnegativity constraints permit merging split variables, the implementation shall stably remove the negative-part columns and renumber all retained basis and variable mappings. Rows losing a basic negative part shall be reported in descending original-variable order. Any such loss shall invalidate cached-point satisfaction hints for pending inequalities. Larger merge batches shall compact row indices together; small batches may retain individual removals. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. |
The mixed integer feasible region can be empty even when its real relaxation is nonempty. |
Schrijver99 | Whole work; background on linear and integer optimization. |
|
|
|
|
Check real-relaxation-only solutions, exact integral witnesses, infeasible and unbounded problems, repeated queries and queries before/after solve. Exercise an incompatible equality over integer coordinates with an unbounded real relaxation, a divisible equality, an equality involving continuous coordinates, and a previously queried problem after constraints or integer selections change. Check homogeneous equalities with a certified feasible origin, dependent rows, and all pricing rules, both fresh and after a feasibility query. Include bounded-coefficient cases where pricing the completed auxiliary objective, retaining it during cleanup, or choosing a more coupled pivot would overflow despite a representable cleanup. Check a later constraint excluding the origin. Check simultaneous noncontiguous merges with basic and nonbasic negative parts, fresh construction, pending cross-row cuts and intermediate feasibility queries. Use independent literal bounds and optimizing points under every pricing rule, including bounded coefficients and both matrix layouts. |
src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/pricing1.cc; tests/MIP_Problem/mipproblem4.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. bool is_satisfiable() const; |
||
|
SW_SPEC
|
2 |
|
|
Incoming link from:
1. Integer-supported strict MIP admission
1 |
A completed solve shall return UNFEASIBLE_MIP_PROBLEM exactly for an empty mixed integer feasible region, UNBOUNDED_MIP_PROBLEM for a nonempty region whose objective is unbounded in the requested direction, and OPTIMIZED_MIP_PROBLEM when a finite optimum is attained. The categories shall be mutually exclusive. Repeated queries and admissible pricing choices shall preserve the mathematical outcome; search effort or arithmetic failure shall not be reported as one of these successful conclusions. The equality divisibility check and the search and interruption conditions in 🔗 1. Mixed integer satisfiability shall apply. For a bounded coefficient profile, simplex row elimination shall evaluate complete two-product combinations and cancel the resulting row's positive common factor before coefficient admission when direct arithmetic has not been proved representable. Magnitude bounds may be reused only while their source rows remain unchanged, or updated conservatively after each combination. Such scratch shall belong to one active simplex invocation, with fresh bounds on a later invocation; it shall not become persistent problem state. After this proof, native updates may omit redundant arithmetic checks while retaining the existing row support merge and cancellation rules. When no proof is available, exact complete-row evaluation shall remain mandatory. This projective row normalization shall include constant and objective coordinates. An unrepresentable primitive row may raise the selected profile's arithmetic exception. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. The exceptional cache-reset guarantee in 🔗 1. Mixed integer satisfiability shall apply. |
Objective unboundedness presupposes feasibility and differs from the absence of any solution. |
Schrijver99 | Whole work; background on linear and integer optimization. |
|
|
|
|
Check all three outcomes in both directions under every pricing rule and compare finite mixed-coordinate models with independent optima. |
tests/MIP_Problem/pricingoverflowpublic1.cc; src/MIP_Problem.cc; src/Exact_Arithmetic.hh; tests/Polyhedron/termination2.cc; tests/MIP_Problem/primitivepivots1.cc; src/Sparse_Row.cc; src/Sparse_Row_defs.hh; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem2.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/mipproblem4.cc; tests/MIP_Problem/exceptions1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. MIP_Problem_Status solve() const; |
||
|
SW_SPEC
|
3 |
|
|
|
Objective evaluation shall assign rational outputs numer and denom whose ratio equals the stored objective evaluated at the supplied point, including its constant term. The denominator shall be positive. The point need not be feasible or integral. A non-point generator or one with coordinate dimension greater than the problem shall raise std::invalid_argument. Missing trailing point coordinates shall mean zero. The numerator and denominator shall be coprime. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. |
Evaluating an affine function is independent of deciding whether its argument is a feasible witness. |
|
|
|
|
|
Evaluate rational, negative, zero-dimensional and shorter points against direct scalar arithmetic, and reject rays, lines, closure points and oversized points. |
src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipproblem1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. void evaluate_objective_function(const Generator&, Coefficient& numer, Coefficient& denom) const; |
||
|
SW_SPEC
|
4 |
|
|
Incoming link from:
1. Integer-supported strict MIP admission
1 |
feasible_point shall establish feasibility as needed and return a borrowed point satisfying every constraint and selected integrality condition. It shall be available for feasible unbounded as well as bounded problems. An infeasible problem shall raise std::domain_error. The returned point need not optimize the objective, and no particular feasible point shall be selected by this contract. Mutation, destruction or a cache-replacing query on the owning problem may invalidate the borrowed point. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. |
A feasible witness certifies membership independently of whether an optimum exists. |
|
|
|
|
|
Substitute returned coordinates into original scalar constraints and integrality restrictions across all solver histories; check unavailable access. |
src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. const Generator& feasible_point() const; |
||
|
SW_SPEC
|
5 |
|
|
Incoming link from:
1. Integer-supported strict MIP admission
1 |
optimizing_point shall solve as needed and return a borrowed feasible point attaining the current optimum. optimal_value shall assign rational outputs with positive denominator whose ratio is that objective value. Both operations shall raise std::domain_error for infeasible or unbounded problems. No particular optimizing point or reduced fraction shall be promised when several representations are possible. Mutation, destruction or a cache-replacing query on the owning problem may invalidate the borrowed optimizing point. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. |
An optimization status, its witness and its rational objective value must describe the same current problem. |
|
|
|
|
|
Independently check feasibility, integrality and objective equality, tied optima, both directions, incremental invalidation and unavailable cases. |
src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/mipproblem4.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. const Generator& optimizing_point() const; void optimal_value(Coefficient& numer, Coefficient& denom) const; |
||
|
SW_SPEC
|
6 |
|
|
|
get_control_parameter(PRICING) shall return the current pricing choice. Setting one of PRICING_STEEPEST_EDGE_FLOAT, PRICING_STEEPEST_EDGE_EXACT or PRICING_TEXTBOOK shall select that search heuristic without changing constraints, integrality or objective. The default shall be floating steepest-edge pricing. Names and values passed to these accessors shall belong to their documented enumerations. A floating heuristic shall not weaken the exact meaning of a completed mathematical result. Exact steepest-edge pricing shall compare the squared reduced costs divided by 1 + sum_i (tableau[i][j] / tableau[i][base[i]])^2. Equal scores shall retain the candidate with the highest column index. Candidate pruning shall exclude a column only when integer bounds prove its score strictly smaller than another candidate's; overlapping bounds shall retain exact comparison. Floating steepest-edge pricing shall approximate the same cost-to-edge ratio. Coefficient magnitudes and normalized edge lengths outside the direct range of double shall remain comparable without infinities or NaNs in the scores. Ties in the computed floating scores shall retain the candidate with the highest column index. When there are no eligible entering columns, both steepest-edge rules shall return zero without pricing arithmetic. When there is exactly one, they shall return its index without computing basis LCMs or edge norms, including when those intermediate calculations would exceed the coefficient range. The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. |
Pivot selection can alter effort and resource use without changing the mathematical optimization task. |
|
|
|
|
|
Compare independent public optimization results before and after objective replacement under both ordinary and reduced-limit exact pricing. Exercise both reduced-limit overflow guards, the exact accumulation boundary and preservation of the complete candidate sequence on fallback. Retain the full-width helper boundary tests. Compare public exact-pricing optimization with independent polygon-vertex optima before and after adding a tighter bound. Include zero, positive and negative objective coefficients, both directions, unused ambient coordinates and valid optimal witnesses; retain the existing large-coefficient pruning and tie oracles. Check defaults, round trips of each control value and independently justified statuses/witnesses under all three choices. Compare exact entering-column choices with independent rational score oracles, including sparse gaps, signed basis coefficients, unequal coefficient sizes, equal scores and near ties. Check outward integer bounds and arithmetic-limit fallbacks against unbounded integer calculations. Check floating selections against rational squared-score oracles for well-separated scores and equal columns. Include reversed cost and edge rankings, signed coefficients, sparse gaps, and coefficient magnitudes beyond the floating exponent range. Scaling a row and its basis coefficient, or all candidate costs, by a common power of two shall preserve these choices. Check zero and sole eligible columns with consecutive basis coefficients near the coefficient limit, whose LCM would overflow, in sparse and dense layouts. |
tests/MIP_Problem/pricingoverflowpublic1.cc; tests/MIP_Problem/pricingoverflow1.cc; tests/MIP_Problem/pricingoverflow1_impl.cc; tests/MIP_Problem/exactpricingkeys1.cc; src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/pricing1.cc; tests/MIP_Problem/pricing1_impl.cc; tests/MIP_Problem/mipproblem4.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below. Control_Parameter_Value get_control_parameter(Control_Parameter_Name) const; void set_control_parameter(Control_Parameter_Value); |
||
|
SW_SPEC
|
7 |
|
|
|
For live finite coefficients numerator and divisor, with a strictly positive divisor, coordinate_is_integral shall return true exactly when numerator ⁄ divisor ∈ ℤ. It shall preserve both arguments. Zero and negative numerators, including the minimum value of a bounded signed coefficient type, shall be admitted. The predicate shall not require the quotient or the absolute numerator to be representable as a coefficient. It shall not construct quotient or GCD coefficient objects, own scratch containers, or introduce floating-point arithmetic. first_fractional_coordinate(point,variables) shall require a valid point with a positive divisor and selected indices within its dimension. It shall preserve its inputs and return the least selected index having a nonintegral coordinate, or not_a_dimension() when all selected coordinates are integral. An empty selection and divisor one shall yield that sentinel. The scan shall check early selected coordinates before sparsity admission, skip only zero coordinates, and retain an ordinary scan for dense suffixes. It shall allocate no scratch containers and shall be used by optimization, heuristic-disabled feasibility, and the cached integer-witness invariant check. Coefficient objects and their backend allocation/lifetime facilities shall satisfy the applicable conditions of 🔗 1. Optimization and ranking valid use. |
A rational point coordinate is integral precisely when its positive divisor divides its numerator. Testing divisibility avoids computing an unused GCD. A positive divisor excludes zero division and the signed minimum divided by minus one, so native remainder admits the complete finite numerator range. |
|
|
|
|
|
Compare with exact unbounded-integer quotient multiplication for zero, positive, negative, minimum and maximum numerators; unit, nonunit and maximum positive divisors; large GMP values and reproducible pseudorandom inputs. Preserve the arguments. Exercise the predicate through optimization, feasibility with and without the branching heuristic, and cached integer witness validation. Inspect coefficient dispatch and scratch allocation. Compare first-fractional selection with an independent exact quotient oracle for dense/sparse points, empty and noncontiguous subsets, early/late fractions, sparsity-admission boundaries, nonselected fractional coordinates, integral nonzero suffixes and zero runs. Include positive GMP divisors with a low limb equal to one, spanning single- and multiple-limb values. Check a late fractional cached integer and wide public mixed-integer histories with independent literal optima. |
src/MIP_Problem.cc; tests/MIP_Problem/integrality1.cc; tests/MIP_Problem/integrality1_impl.cc; tests/MIP_Problem/integralityfallback1_impl.cc; tests/MIP_Problem/branching1.cc. |
|
|
The function is local to the translation unit src/MIP_Problem.cc. The coefficient types belong to Parma_Polyhedra_Library. bool coordinate_is_integral( Coefficient_traits::const_reference numerator, Coefficient_traits::const_reference divisor); dimension_type first_fractional_coordinate( const Generator& point, const Variables_Set& variables); |
||
|
SW_SPEC
|
8 |
|
|
|
choose_branching_variable shall inspect the cached rational point of mip and the variable indices in i_vars without changing either. The cached point shall be valid, have mip.space_dimension() coordinates, and satisfy the input constraints. The helper shall be called at a solver state where this cached point and these input rows are meaningful; it shall not require the tableau to determine this selection. Every index in i_vars shall belong to the ambient dimension. Scalar arithmetic and synchronization shall satisfy 🔗 1. Optimization and ranking valid use. Let C be the indices in i_vars whose cached coordinates are not integers. If C = ⌀, the helper shall return true and preserve branching_index. Otherwise it shall return false and assign a member of C. When |C| = 1, that member shall be selected without evaluating constraint-appearance scores. For more than one candidate, an active input row shall be an equality or an inequality saturated by the cached point. A candidate's score shall be the number of active input rows having a nonzero coefficient at that candidate. Rows shall contribute individually, including repeated rows. Coefficients beyond a row's dimension and constant terms shall not contribute. The helper shall select a maximum-score candidate, choosing the greatest variable index when scores tie, including when all scores are zero. Dense and sparse row representations shall have the same selection semantics. |
Branching must select a fractional integer-constrained coordinate. The appearance heuristic and its tie rule determine a reproducible choice; a singleton needs no scoring. Sparse storage changes which zeros are visited, not the mathematical counts. |
|
|
|
|
|
Use independent exact rational candidate and active-row evaluation. Check divisor one, empty integer subsets, integral zero coordinates, singleton candidates, multiple candidates, ties, equalities, saturated and inactive inequalities, constant/short rows, noncandidate nonzero coefficients and candidate suffixes beyond a row's dimension. Compare both point and row representations and preserve input values and empty-case output sentinels. Include large sparse points, nonselected nonzero coordinates, sparse/dense prefixes and suffixes, integral nonzero coordinates and fractional candidates separated by zero runs. |
src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/MIP_Problem/branching_test.hh; tests/MIP_Problem/branching1.cc; tests/MIP_Problem/sparsebranching1.cc; tests/MIP_Problem/sparsecandidates1.cc. |
|
|
Private static member of Parma_Polyhedra_Library::MIP_Problem; src/MIP_Problem_defs.hh and src/MIP_Problem.cc. static bool choose_branching_variable( const MIP_Problem& mip, const Variables_Set& i_vars, dimension_type& branching_index); |