Parma Polyhedra Library requirements
C++ mip incremental

C++ mip incremental

PPL-SPEC-001472
1. Mixed integer constraint and dimension additions
UID: PPL-SPEC-001472
STATUS: APPROVED
COMPONENT: MIP_SOLVER
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Constraint additions shall conjoin canonical admitted copies of the supplied constraints under 🔗 1. Integer-supported strict MIP admission. Unsupported continuous-support strict rows and dimension-incompatible descriptors shall raise std::invalid_argument. Dimension growth shall append unrestricted real coordinates, preserve old coordinates and reject m > max - dimension with std::length_error before adding extents. Subsequent completed queries shall refer to the modified problem; earlier results may be reused only when still valid for it.

If allocation fails during add_constraints, an already appended prefix may remain. The surviving problem shall remain valid for subsequent queries under the common valid-use conditions. Those queries shall describe exactly the retained constraints, objective and integer subset. Cached non-infeasibility results invalidated by retained rows shall be recomputed; known infeasibility shall remain valid. Input descriptors shall be preserved. Rollback to the entry constraint sequence is not required.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply, with the allocation-failure recovery guarantee specified above.

RATIONALE:

Incremental storage reuse must agree with a fresh problem containing exactly the retained constraints and coordinates. Conjoining constraints can invalidate feasible points and optima, whereas an empty feasible set remains empty after further constraints.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

void add_constraint(const Constraint&);
void add_constraints(const Constraint_System&);
void add_space_dimensions_and_embed(dimension_type m);
VERIFICATION_CRITERIA:

Compare incremental and fresh instances after feasible/infeasible changes, growth after optimization, empty systems and invalid/extreme dimensions. Inject allocation failures before any append and after retained prefixes from pending, feasible, optimized, unbounded and infeasible states. Check subsequent satisfiability, witnesses, optimization status and exact values, together with input and original-source preservation.

SOURCE:

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/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/constraintrecovery1.cc.

PPL-SPEC-001473
2. Mixed integer integrality additions
UID: PPL-SPEC-001473
STATUS: APPROVED
COMPONENT: MIP_SOLVER
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Adding i_vars shall union those indices into the existing integer coordinate subset. An incompatible index shall raise std::invalid_argument. Repeated addition and an empty subset shall preserve the mathematical problem. Any cached feasible or optimal point invalidated by a newly required integral coordinate shall be recomputed before a subsequent successful result is returned.

If allocation of integer-set nodes fails, indices already inserted may remain. The surviving problem shall remain valid for subsequent queries under the common valid-use conditions. Those queries shall use exactly the retained integer subset; invalidated cached feasibility, optima and witnesses shall be recomputed. Known infeasibility shall remain valid. If no new index was inserted, the mathematical problem shall be preserved. The supplied index set shall be preserved. Rollback to the entry subset is not required.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply, with the allocation-failure recovery guarantee specified above.

RATIONALE:

A point feasible over the real relaxation need not remain feasible under new integer restrictions. A retained integral coordinate must therefore affect subsequent queries even if insertion of a later coordinate fails; no new restriction can make an infeasible problem feasible.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

void add_to_integer_space_dimensions(const Variables_Set& i_vars);
VERIFICATION_CRITERIA:

Add integrality before and after feasibility/optimization; include fractional cached points, duplicate indices, infeasibility and fresh-model comparisons. Inject allocation failures before and after retained indices from pending, feasible, optimized, unbounded and infeasible states. Compare subsequent satisfiability, witnesses and exact optimization results with a fresh model. Check that empty and duplicate-only selections allocate no new nodes, input sets remain unchanged and invalid indices are rejected before mutation.

SOURCE:

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/integerrecovery1.cc.

PPL-SPEC-001474
3. Mixed integer objective and mode updates
UID: PPL-SPEC-001474
STATUS: APPROVED
COMPONENT: MIP_SOLVER
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Setting an objective shall copy its affine expression and reject an expression dimension greater than the ambient dimension with std::invalid_argument. Setting mode shall select a valid MINIMIZATION or MAXIMIZATION value. Changes shall preserve the feasible region and invalidate optimality conclusions for a different objective or direction. Subsequent completed queries shall optimize the current objective and mode.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

RATIONALE:

Feasibility survives objective changes, whereas finite and unbounded optimality are direction-dependent.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

void set_objective_function(const Linear_Expression&);
void set_optimization_mode(Optimization_Mode);
VERIFICATION_CRITERIA:

Change signs, constants and modes after each solver status; compare optimal witnesses and values against a fresh equivalent problem.

SOURCE:

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/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/constraintrecovery1.cc.