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.Analyzer — TypeAnalyzer() <: MathOptAnalyzer.AbstractAnalyzerThe 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. Ifnothing, it will use the current primal solution from optimized model.dual_point: The dual solution point to use for feasibility checking. Ifnothingand 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. Ifnothing, it will use the current primal objective value from the model (solver).dual_objective: The dual objective value considered as the solver objective. Ifnothing, it will use the current dual objective value from the model (solver).atol: The absolute tolerance for feasibility checking.skip_missing: Iftrue, constraints with missing variables in the provided point will be ignored.dual_check: Iftrue, it will perform dual feasibility checking. Disabling the dual check will also disable complementarity checking and dual objective checks.
The analysis will return issues of the abstract type:
MathOptAnalyzer.Feasibility.AbstractFeasibilityIssue — TypeAbstractFeasibilityIssue <: AbstractNumericalIssueAbstract type for feasibility issues found during the analysis of a model.
Specifically, the possible issues are:
MathOptAnalyzer.Feasibility.PrimalViolation — TypePrimalViolation <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.DualConstraintViolation — TypeDualConstraintViolation <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.DualConstrainedVariableViolation — TypeDualConstrainedVariableViolation <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.ComplemetarityViolation — TypeComplemetarityViolation <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.DualObjectiveMismatch — TypeDualObjectiveMismatch <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.PrimalObjectiveMismatch — TypePrimalObjectiveMismatch <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.PrimalDualMismatch — TypePrimalDualMismatch <: AbstractFeasibilityIssueThe 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)MathOptAnalyzer.Feasibility.PrimalDualSolverMismatch — TypePrimalDualSolverMismatch <: AbstractFeasibilityIssueThe 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)These issues are saved in the data structure that is returned from the MathOptAnalyzer.analyze function:
MathOptAnalyzer.Feasibility.Data — TypeDataThe 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.