scip_validation.c
Go to the documentation of this file.
43 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
60 * - checking the feasibility of the incumbent solution in the original problem (using SCIPcheckSolOrig())
62 * - checking if the objective bounds computed by SCIP agree with external primal and dual reference bounds.
66 * For infeasible problems, +/-SCIPinfinity() should be passed as reference bounds depending on the objective sense
71 SCIP_Real primalreference, /**< external primal reference value for the problem, or SCIP_UNKNOWN */
75 SCIP_Bool* feasible, /**< pointer to store if the best solution is feasible in the original problem,
77 SCIP_Bool* primalboundcheck, /**< pointer to store if the primal bound respects the given dual reference
79 SCIP_Bool* dualboundcheck /**< pointer to store if the dual bound respects the given primal reference
138 /* check the primal and dual bounds computed by SCIP against the external reference values within reference tolerance */
140 if( SCIPgetNSols(scip) > 0 && ((SCIPgetObjsense(scip) == SCIP_OBJSENSE_MINIMIZE && SCIPisInfinity(scip, dualreference))
145 /* check if reference primal bound is not better than the proven dual bound and, if SCIP claims to be optimal,
151 /* compute the relative violation between the primal bound and dual reference value, and vice versa */
187 SCIPinfoMessage(scip, NULL, " %-17s: %10.8g (reference: %16.9e)\n", "primal violation", primviol, dualreference);
188 SCIPinfoMessage(scip, NULL, " %-17s: %10.8g (reference: %16.9e)\n", "dual violation", dualviol, primalreference);
public methods for SCIP parameter handling
Definition: struct_scip.h:68
Definition: type_prob.h:47
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:307
public methods for validation
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:447
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:208
public methods for numerical tolerances
public methods for querying solving statistics
Definition: struct_sol.h:73
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
Definition: scip_sol.c:3506
Definition: type_retcode.h:42
public data structures and miscellaneous methods
SCIP_RETCODE SCIPvalidateSolve(SCIP *scip, SCIP_Real primalreference, SCIP_Real dualreference, SCIP_Real reftol, SCIP_Bool quiet, SCIP_Bool *feasible, SCIP_Bool *primalboundcheck, SCIP_Bool *dualboundcheck)
Definition: scip_validation.c:69
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip_numerics.c:255
Definition: type_set.h:45
general public methods
public methods for solutions
public methods for message output
public methods for message handling
Definition: type_prob.h:48
Definition: objbenders.h:43
public methods for global and local (sub)problems