Numerical Analysis

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

ModelAnalyzer.Numerical.AnalyzerType
Analyzer() <: ModelAnalyzer.AbstractAnalyzer

The Analyzer type is used to analyze the coefficients of a model for numerical issues.

Example

julia> data = ModelAnalyzer.analyze(
    ModelAnalyzer.Numerical.Analyzer(),
    model;
    threshold_dense_fill_in = 0.10,
    threshold_dense_entries = 1000,
    threshold_small = 1e-5,
    threshold_large = 1e+5,
)

The additional parameters:

  • threshold_dense_fill_in: The threshold for the fraction of non-zero entries in a constraint to be considered dense.
  • threshold_dense_entries: The minimum number of non-zero entries for a constraint to be considered dense.
  • threshold_small: The threshold for small coefficients in the model.
  • threshold_large: The threshold for large coefficients in the model.
source

The analysis will return issues of the abstract type:

Specifically the possible issues are:

ModelAnalyzer.Numerical.VariableNotInConstraintsType
VariableNotInConstraints <: AbstractNumericalIssue

The VariableNotInConstraints issue is identified when a variable appears in no constraints.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.VariableNotInConstraints)
source
ModelAnalyzer.Numerical.EmptyConstraintType
EmptyConstraint <: AbstractNumericalIssue

The EmptyConstraint issue is identified when a constraint has no coefficients different from zero.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.EmptyConstraint)
source
ModelAnalyzer.Numerical.VariableBoundAsConstraintType
VariableBoundAsConstraint <: AbstractNumericalIssue

The VariableBoundAsConstraint issue is identified when a constraint is equivalent to a variable bound, that is, the constraint has only one non-zero coefficient, and this coefficient is equal to one.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.VariableBoundAsConstraint)
source
ModelAnalyzer.Numerical.DenseConstraintType
DenseConstraint <: AbstractNumericalIssue

The DenseConstraint issue is identified when a constraint has a fraction of non-zero entries greater than threshold_dense_fill_in and the number of non-zero entries is greater than threshold_dense_entries.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.DenseConstraint)
source
ModelAnalyzer.Numerical.SmallMatrixCoefficientType
SmallMatrixCoefficient <: AbstractNumericalIssue

The SmallMatrixCoefficient issue is identified when a matrix coefficient in a constraint is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.SmallMatrixCoefficient)
source
ModelAnalyzer.Numerical.LargeMatrixCoefficientType
LargeMatrixCoefficient <: AbstractNumericalIssue

The LargeMatrixCoefficient issue is identified when a matrix coefficient in a constraint is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.LargeMatrixCoefficient)
source
ModelAnalyzer.Numerical.SmallBoundCoefficientType
SmallBoundCoefficient <: AbstractNumericalIssue

The SmallBoundCoefficient issue is identified when a variable's bound (coefficient) is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.SmallBoundCoefficient)
source
ModelAnalyzer.Numerical.LargeBoundCoefficientType
LargeBoundCoefficient <: AbstractNumericalIssue

The LargeBoundCoefficient issue is identified when a variable's bound (coefficient) is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.LargeBoundCoefficient)
source
ModelAnalyzer.Numerical.SmallRHSCoefficientType
SmallRHSCoefficient <: AbstractNumericalIssue

The SmallRHSCoefficient issue is identified when the right-hand-side (RHS) coefficient of a constraint is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.SmallRHSCoefficient)
source
ModelAnalyzer.Numerical.LargeRHSCoefficientType
LargeRHSCoefficient <: AbstractNumericalIssue

The LargeRHSCoefficient issue is identified when the right-hand-side (RHS) coefficient of a constraint is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.LargeRHSCoefficient)
source
ModelAnalyzer.Numerical.SmallObjectiveCoefficientType
SmallObjectiveCoefficient <: AbstractNumericalIssue

The SmallObjectiveCoefficient issue is identified when a coefficient in the objective function is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.SmallObjectiveCoefficient)
source
ModelAnalyzer.Numerical.LargeObjectiveCoefficientType
LargeObjectiveCoefficient <: AbstractNumericalIssue

The LargeObjectiveCoefficient issue is identified when a coefficient in the objective function is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(ModelAnalyzer.Numerical.LargeObjectiveCoefficient)
source
ModelAnalyzer.Numerical.SmallObjectiveQuadraticCoefficientType
SmallObjectiveQuadraticCoefficient <: AbstractNumericalIssue

The SmallObjectiveQuadraticCoefficient issue is identified when a quadratic coefficient in the objective function is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.SmallObjectiveQuadraticCoefficient
)
source
ModelAnalyzer.Numerical.LargeObjectiveQuadraticCoefficientType
LargeObjectiveQuadraticCoefficient <: AbstractNumericalIssue

The LargeObjectiveQuadraticCoefficient issue is identified when a quadratic coefficient in the objective function is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.LargeObjectiveQuadraticCoefficient
)
source
ModelAnalyzer.Numerical.SmallMatrixQuadraticCoefficientType
SmallMatrixQuadraticCoefficient <: AbstractNumericalIssue

The SmallMatrixQuadraticCoefficient issue is identified when a quadratic coefficient in a constraint is smaller than threshold_small.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.SmallMatrixQuadraticCoefficient
)
source
ModelAnalyzer.Numerical.LargeMatrixQuadraticCoefficientType
LargeMatrixQuadraticCoefficient <: AbstractNumericalIssue

The LargeMatrixQuadraticCoefficient issue is identified when a quadratic coefficient in a constraint is larger than threshold_large.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.LargeMatrixQuadraticCoefficient
)
source
ModelAnalyzer.Numerical.NonconvexQuadraticObjectiveType
NonconvexQuadraticObjective <: AbstractNumericalIssue

The NonconvexQuadraticObjective issue is identified when a quadratic objective function is non-convex.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.NonconvexQuadraticObjective
)
source
ModelAnalyzer.Numerical.NonconvexQuadraticConstraintType
NonconvexQuadraticConstraint

The NonconvexQuadraticConstraint issue is identified when a quadratic constraint is non-convex.

For more information, run:

julia> ModelAnalyzer.summarize(
    ModelAnalyzer.Numerical.NonconvexQuadraticConstraint
)
source

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

ModelAnalyzer.Numerical.DataType
Data

The Data structure holds the results of the analysis performed by the ModelAnalyzer.Numerical.Analyzer. It contains various thresholds and the information about the model's variables, constraints, and objective function.

source