This predicate checks the current solution for the problem associated with EplexInstance. It verifies that all the constraints are satisfied by the solution values for the problem variables, and that the solution values do not violate their bounds, and the values are integral for integer variables. Violated Constraints are returned in ViolatedCstrs, and violated variables in ViolatedVars.
Under normal circumstances, if the external solver produces a solution, it should produce no violations. Any violations probably indicates a problem with the external solver. However, because the external solver is a complex piece of software and may contain problems, it is a good idea to verify the solution, and this predicate provides an easy way to do this.
Each violation is returned as a structure of the following form:
For checking of constraints, a fresh copy of the constraint is made with the solution values, as this avoids binding the original variables. Any active cutpool constraints in the (logically) last solve of the problem are checked, along with the normal constraints. A constraint is considered to be violated if the difference between the sum of the left-hand side and the right-hand side for the constraint is greater than the feasibility tolerance (feasibility_tol) parameter for the instance. For variables, a bound is considered violated if the solution value falls outside the bound by more than feasibility tolerance, and integrarity is considered to be violated if the fractional part of the soltuion is greater than the integrarity parameter for the instance.