A warning similar to
Warning: max constraint violation (6.1056e-06) exceeds tolerance Warning: max general constraint violation (6.3988e-06) exceeds tolerance
in the Gurobi log indicates that Gurobi has found and returned a solution to the model, but the solution violates the constraints by an amount above our feasibility tolerance.
The default value of the feasibility tolerance is 1e-6, and it can be adjusted by setting the parameter FeasibilityTol. Most computations within Gurobi are performed using double-precision floating-point arithmetic; since the numbers are not represented in exact, infinite precision, this requires such numerical tolerances. They are considered satisfied if the constraints are violated by no more than the value of FeasibilityTol.
Violation warnings such as this can be caused by numerical issues with the model. One potential remedy is to set the NumericFocus parameter to a non-default value, for example, NumericFocus=1. This will increase the care made in the numerical computations and may improve the numerical quality of the solutions, potentially eliminating such errors.
Our Guidelines for Numerical Issues provide a more in-depth discussion of numerical computation as it applies to Gurobi.
Comments
0 comments
Article is closed for comments.