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);
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip_message.c:208
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip_param.c:307
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
Definition: scip_sol.c:3309
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip_numerics.c:253
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:445
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
Definition: objbenders.h:44
public methods for message output
public data structures and miscellaneous methods
general public methods
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for querying solving statistics
public methods for validation
Definition: struct_sol.h:74
Definition: struct_scip.h:70