Feasibility Analysis

This module provides functionality to perform feasibility analysis on a JuMP model. This module follows the main API and is activated by the struct:

MathOptAnalyzer.Feasibility.AnalyzerType
Analyzer() <: MathOptAnalyzer.AbstractAnalyzer

The Analyzer type is used to perform feasibility analysis on a model.

Example

julia> data = MathOptAnalyzer.analyze(
    MathOptAnalyzer.Feasibility.Analyzer(),
    model;
    primal_point::Union{Nothing, Dict} = nothing,
    dual_point::Union{Nothing, Dict} = nothing,
    primal_objective::Union{Nothing, Float64} = nothing,
    dual_objective::Union{Nothing, Float64} = nothing,
    atol::Float64 = 1e-6,
    skip_missing::Bool = false,
    dual_check = true,
);

The additional parameters:

  • primal_point: The primal solution point to use for feasibility checking. If nothing, it will use the current primal solution from optimized model.
  • dual_point: The dual solution point to use for feasibility checking. If nothing and the model can be dualized, it will use the current dual solution from the model.
  • primal_objective: The primal objective value considered as the solver objective. If nothing, it will use the current primal objective value from the model (solver).
  • dual_objective: The dual objective value considered as the solver objective. If nothing, it will use the current dual objective value from the model (solver).
  • atol: The absolute tolerance for feasibility checking.
  • skip_missing: If true, constraints with missing variables in the provided point will be ignored.
  • dual_check: If true, it will perform dual feasibility checking. Disabling the dual check will also disable complementarity checking and dual objective checks.
source

The analysis will return issues of the abstract type:

Specifically, the possible issues are:

MathOptAnalyzer.Feasibility.PrimalViolationType
PrimalViolation <: AbstractFeasibilityIssue

The PrimalViolation issue is identified when a primal constraint has a left-hand-side value that is not within the constraint's set.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.PrimalViolation)
source
MathOptAnalyzer.Feasibility.DualConstraintViolationType
DualConstraintViolation <: AbstractFeasibilityIssue

The DualConstraintViolation issue is identified when a dual constraint has a value that is not within the dual constraint's set. This dual constraint corresponds to a primal variable.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.DualConstraintViolation)
source
MathOptAnalyzer.Feasibility.DualConstrainedVariableViolationType
DualConstrainedVariableViolation <: AbstractFeasibilityIssue

The DualConstrainedVariableViolation issue is identified when a dual constraint, which is a constrained varaible constraint, has a value that is not within the dual constraint's set. During the dualization process, each primal constraint is mapped to a dual variable, this dual variable is tipically a constrained variable with the dual set of the primal constraint. If the primal constraint is a an equality type constraint, the dual variable is a free variable, hence, not constrained (dual) variable. This dual constraint corresponds to a primal (non-equality) constraint.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.DualConstrainedVariableViolation)
source
MathOptAnalyzer.Feasibility.ComplemetarityViolationType
ComplemetarityViolation <: AbstractFeasibilityIssue

The ComplemetarityViolation issue is identified when a pair of primal constraint and dual variable has a nonzero complementarity value, i.e., the inner product of the primal constraint's slack and the dual variable's violation is not zero.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.ComplemetarityViolation)
source
MathOptAnalyzer.Feasibility.DualObjectiveMismatchType
DualObjectiveMismatch <: AbstractFeasibilityIssue

The DualObjectiveMismatch issue is identified when the dual objective value computed from problem data and the dual solution does not match the solver's dual objective value.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.DualObjectiveMismatch)
source
MathOptAnalyzer.Feasibility.PrimalObjectiveMismatchType
PrimalObjectiveMismatch <: AbstractFeasibilityIssue

The PrimalObjectiveMismatch issue is identified when the primal objective value computed from problem data and the primal solution does not match the solver's primal objective value.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.PrimalObjectiveMismatch)
source
MathOptAnalyzer.Feasibility.PrimalDualMismatchType
PrimalDualMismatch <: AbstractFeasibilityIssue

The PrimalDualMismatch issue is identified when the primal objective value computed from problem data and the primal solution does not match the dual objective value computed from problem data and the dual solution.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.PrimalDualMismatch)
source
MathOptAnalyzer.Feasibility.PrimalDualSolverMismatchType
PrimalDualSolverMismatch <: AbstractFeasibilityIssue

The PrimalDualSolverMismatch issue is identified when the primal objective value reported by the solver does not match the dual objective value reported by the solver.

For more information, run:

julia> MathOptAnalyzer.summarize(MathOptAnalyzer.Feasibility.PrimalDualSolverMismatch)
source

These issues are saved in the data structure that is returned from the MathOptAnalyzer.analyze function:

MathOptAnalyzer.Feasibility.DataType
Data

The Data structure holds the results of the feasibility analysis performed by the MathOptAnalyzer.analyze function for a model. It contains the configuration used for the analysis, the primal and dual points, and the lists of various feasibility issues found during the analysis.

source