scip_certificate.c
Go to the documentation of this file.
33/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
158 * @todo add a flag set->certificate_enabled to store the return value of this method for easier and faster access
173 return !(scip->set->certificate_filename[0] == '-' && scip->set->certificate_filename[1] == '\0');
178 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
190 return SCIPisCertified(scip) && scip->set->stage >= SCIP_STAGE_INITSOLVE && !SCIPinProbing(scip);
195 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
218 SCIP_CALL( SCIPcheckStage(scip, "SCIPcertifyCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE) );
220 SCIP_CALL( SCIPcertificatePrintCons(scip->stat->certificate, isorigfile, consname, sense, side, len, ind, val) );
227 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
239 SCIP_Real newbound, /**< pointer to lower bound on the objective, NULL indicating infeasibility */
243 SCIP_ROWEXACT* row, /**< the corresponding row, or NULL if constraint has no row representation */
251 /* It would be more efficient if we could do this all in fp artihmetic. However, this is not trivial because the
256 SCIP_CALL( SCIPcheckStage(scip, "SCIPcertifyActivityVarBound", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
269 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
281 SCIP_RATIONAL* newbound, /**< pointer to lower bound on the objective, NULL indicating infeasibility */
285 SCIP_ROWEXACT* row, /**< the corresponding row, or NULL if constraint has no row representation */
299 SCIP_CALL( SCIPcheckStage(scip, "SCIPcertifyActivityVarBoundExact", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
331 (boundtype == SCIP_BOUNDTYPE_UPPER) == SCIPrationalIsPositive(variable->exactdata->aggregate.scalar) ? SCIP_BOUNDTYPE_UPPER: SCIP_BOUNDTYPE_LOWER,
332 newbound, ismaxactivity, constraint, variable->data.aggregate.var, row, vals, lhs, rhs, vars, nvars);
373 SCIPcertificatePrintProofMessage(certificate, "%c ", getInequalitySense(upperboundcontribution));
414 certificateindex = is_upper_bound ? SCIPvarGetUbCertificateIndexLocal(ivar) : SCIPvarGetLbCertificateIndexLocal(ivar);
422 SCIPcertificatePrintProofMessage(certificate, "ACT_L%d %c ", certificate->indexcounter - 1, getInequalitySense(boundtype == SCIP_BOUNDTYPE_LOWER));
424 SCIPcertificatePrintProofMessage(certificate, " 1 %d 1 { lin 1 %d ", SCIPvarGetCertificateIndex(variable), certificate->indexcounter - 2);
432 SCIPcertificatePrintProofMessage(certificate, " } -1\n", SCIPvarGetCertificateIndex(variable), certificate->indexcounter - 2);
435 if( !SCIPrationalIsAbsInfinity(newbound) && SCIPvarGetType(variable) != SCIP_VARTYPE_CONTINUOUS && !SCIPrationalIsIntegral(newbound) )
439 SCIPcertificatePrintProofMessage(certificate, "ACT_R%d %c ", certificate->indexcounter - 1, getInequalitySense(boundtype == SCIP_BOUNDTYPE_LOWER));
440 SCIPrationalRoundInteger(newbound, newbound, boundtype == SCIP_BOUNDTYPE_UPPER ? SCIP_R_ROUND_DOWNWARDS : SCIP_R_ROUND_UPWARDS);
445 SCIPcertificatePrintProofMessage(certificate, " { rnd 1 %d 1 } -1\n", certificate->indexcounter - 2);
463 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
474 SCIP_ROWEXACT* row, /**< corresponding row, or NULL if constraint does not have representation as row */
487 SCIP_CALL( SCIPcheckStage(scip, "SCIPcertifyActivityConflict", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
501 SCIPcertificatePrintProofMessage(certificate, "ActivityConflict%d ", certificate->indexcounter);
505 SCIPcertificatePrintProofMessage(certificate, " 0 { lin %d %d -1", nvals + 1, conscertificateindex);
513 certificateindex = is_upper_bound ? SCIPvarGetUbCertificateIndexLocal(var) : SCIPvarGetLbCertificateIndexLocal(var);
519 SCIP_CALL( SCIPcertificateUpdateParentData(certificate, SCIPgetCurrentNode(scip), certificate->indexcounter, NULL) );
526 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
548 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddCertificateAggrInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
550 SCIP_CALL( SCIPcertificateNewAggrInfo(scip, aggrrow, aggrrows, weights, naggrrows, negslackrows, negslackweights, nnegslackrows) );
557 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
573 SCIP_CALL( SCIPcheckStage(scip, "SCIPstoreCertificateActiveAggrInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
595 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
610 SCIP_CALL( SCIPcheckStage(scip, "SCIPfreeCertificateActiveAggrInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
636 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
651 SCIP_CALL( SCIPcheckStage(scip, "SCIPaddCertificateMirInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
660 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
678 SCIP_CALL( SCIPcheckStage(scip, "SCIPstoreCertificateActiveMirInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
714 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(mirinfo->splitcoefficients), SCIPgetNVars(scip), mirinfo->nsplitvars) );
715 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(mirinfo->varinds), SCIPgetNVars(scip), mirinfo->nsplitvars) );
716 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(mirinfo->upperused), SCIPgetNVars(scip), mirinfo->nsplitvars) );
717 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &(mirinfo->localbdused), SCIPgetNVars(scip), mirinfo->nsplitvars) );
719 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackrows, SCIPgetNVars(scip), mirinfo->nslacks) );
720 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slacksign, SCIPgetNVars(scip), mirinfo->nslacks) );
721 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackcoefficients, SCIPgetNVars(scip), mirinfo->nslacks) );
722 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackweight, SCIPgetNVars(scip), mirinfo->nslacks) );
723 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackscale, SCIPgetNVars(scip), mirinfo->nslacks) );
724 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackusedcoef, SCIPgetNVars(scip), mirinfo->nslacks) );
725 SCIP_CALL( SCIPreallocBlockMemoryArray(scip, &mirinfo->slackroundeddown, SCIPgetNVars(scip), mirinfo->nslacks) );
734 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
749 SCIP_CALL( SCIPcheckStage(scip, "SCIPcertifyMirCut", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
755 SCIP_CALL( SCIPcertificatePrintMirCut(scip->set, scip->lp, certificate, scip->transprob, row, 'L') );
762 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
778 SCIP_CALL( SCIPcheckStage(scip, "SCIPfreeCertificateActiveMirInfo", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
internal methods for Benders' decomposition cuts
internal methods for branching rules and branching candidate storage
nodereopt branching rule
SCIP_Longint SCIPcertificateGetRowIndex(SCIP_CERTIFICATE *certificate, SCIP_ROWEXACT *row, SCIP_Bool rhs)
Definition: certificate.cpp:2541
SCIP_RETCODE SCIPcertificatePrintMirCut(SCIP_SET *set, SCIP_LP *lp, SCIP_CERTIFICATE *certificate, SCIP_PROB *prob, SCIP_ROW *row, const char sense)
Definition: certificate.cpp:1778
SCIP_RETCODE SCIPcertificateUpdateParentData(SCIP_CERTIFICATE *certificate, SCIP_NODE *node, SCIP_Longint fileindex, SCIP_RATIONAL *newbound)
Definition: certificate.cpp:2149
SCIP_RETCODE SCIPcertificateSetLastBoundIndex(SCIP_CERTIFICATE *certificate, SCIP_Longint index)
Definition: certificate.cpp:3283
SCIP_RETCODE SCIPcertificatePrintProofRational(SCIP_CERTIFICATE *certificate, SCIP_RATIONAL *val)
Definition: certificate.cpp:1228
SCIP_Bool SCIPcertificateIsEnabled(SCIP_CERTIFICATE *certificate)
Definition: certificate.cpp:896
SCIP_Longint SCIPcertificateGetConsIndex(SCIP_CERTIFICATE *certificate, SCIP_CONS *cons, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs, SCIP_Bool useRhs)
Definition: certificate.cpp:3550
SCIP_RETCODE SCIPcertificateFreeAggrInfo(SCIP_SET *set, SCIP_CERTIFICATE *certificate, SCIP_LP *lp, SCIP_AGGREGATIONINFO *aggrinfo, SCIP_ROW *row)
Definition: certificate.cpp:2862
SCIP_RETCODE SCIPcertificatePrintCons(SCIP_CERTIFICATE *certificate, SCIP_Bool isorigfile, const char *consname, const char sense, SCIP_RATIONAL *side, int len, int *ind, SCIP_RATIONAL **val)
Definition: certificate.cpp:1399
void SCIPcertificatePrintProofMessage(SCIP_CERTIFICATE *certificate, const char *formatstr,...)
Definition: certificate.cpp:1175
SCIP_RETCODE SCIPcertificateNewAggrInfo(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW **aggrrows, SCIP_Real *weights, int naggrrows, SCIP_ROW **negslackrows, SCIP_Real *negslackweights, int nnegslackrows)
Definition: certificate.cpp:3004
SCIP_RETCODE SCIPcertificateNewMirInfo(SCIP *scip)
Definition: certificate.cpp:3074
methods for certificate output
internal methods for clocks and timing issues
internal methods for tree compressions
datastructures for concurrent solvers
helper functions for concurrent scip solvers
internal methods for conflict analysis
internal methods for storing conflicts
internal methods for constraints and constraint handlers
Constraint handler for linear constraints in their most general form, .
internal methods for storing cuts in a cut pool
methods for the aggregation rows
methods for debugging
#define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
Definition: debug.h:364
common defines and data types used in all packages of SCIP
internal methods for user interface dialog
default user interface dialog
internal methods for displaying runtime statistics
internal methods for managing events
methods to interpret (evaluate) an expression "fast"
SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image)
Definition: misc.c:3366
SCIP_RETCODE SCIPcertifyCons(SCIP *scip, SCIP_Bool isorigfile, const char *consname, const char sense, SCIP_RATIONAL *side, int len, int *ind, SCIP_RATIONAL **val)
Definition: scip_certificate.c:203
SCIP_RETCODE SCIPaddCertificateMirInfo(SCIP *scip)
Definition: scip_certificate.c:644
SCIP_RETCODE SCIPfreeCertificateActiveMirInfo(SCIP *scip)
Definition: scip_certificate.c:770
SCIP_RETCODE SCIPstoreCertificateActiveAggrInfo(SCIP *scip, SCIP_ROW *row)
Definition: scip_certificate.c:565
SCIP_RETCODE SCIPcertifyActivityVarBound(SCIP *scip, const char *linename, SCIP_BOUNDTYPE boundtype, SCIP_Real newbound, SCIP_Bool ismaxactivity, SCIP_CONS *constraint, SCIP_VAR *variable, SCIP_ROWEXACT *row, SCIP_RATIONAL **vals, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs, SCIP_VAR **vars, int nvars)
Definition: scip_certificate.c:235
SCIP_RETCODE SCIPcertifyActivityConflict(SCIP *scip, SCIP_CONS *cons, SCIP_ROWEXACT *row, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs, int nvals, SCIP_RATIONAL **vals, SCIP_VAR **vars, SCIP_RATIONAL *diff, SCIP_Bool userhs)
Definition: scip_certificate.c:471
SCIP_RETCODE SCIPcertifyActivityVarBoundExact(SCIP *scip, const char *linename, SCIP_BOUNDTYPE boundtype, SCIP_RATIONAL *newbound, SCIP_Bool ismaxactivity, SCIP_CONS *constraint, SCIP_VAR *variable, SCIP_ROWEXACT *row, SCIP_RATIONAL **vals, SCIP_RATIONAL *lhs, SCIP_RATIONAL *rhs, SCIP_VAR **vars, int nvars)
Definition: scip_certificate.c:277
SCIP_RETCODE SCIPaddCertificateAggrInfo(SCIP *scip, SCIP_AGGRROW *aggrrow, SCIP_ROW **aggrrows, SCIP_Real *weights, int naggrrows, SCIP_ROW **negslackrows, SCIP_Real *negslackweights, int nnegslackrows)
Definition: scip_certificate.c:534
SCIP_Bool SCIPshouldCertificateTrackBounds(SCIP *scip)
Definition: scip_certificate.c:186
SCIP_RETCODE SCIPfreeCertificateActiveAggrInfo(SCIP *scip)
Definition: scip_certificate.c:603
SCIP_RETCODE SCIPcertifyMirCut(SCIP *scip, SCIP_ROW *row)
Definition: scip_certificate.c:742
SCIP_RETCODE SCIPstoreCertificateActiveMirInfo(SCIP *scip, SCIP_ROW *row)
Definition: scip_certificate.c:668
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
Definition: scip_mem.h:99
void SCIPrationalMult(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
Definition: rational.cpp:1066
void SCIPrationalInvert(SCIP_RATIONAL *res, SCIP_RATIONAL *op)
Definition: rational.cpp:1323
void SCIPrationalFreeBlock(BMS_BLKMEM *mem, SCIP_RATIONAL **rational)
Definition: rational.cpp:461
void SCIPrationalRoundInteger(SCIP_RATIONAL *res, SCIP_RATIONAL *src, SCIP_ROUNDMODE_RAT roundmode)
Definition: rational.cpp:2158
void SCIPrationalDiv(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_RATIONAL *op2)
Definition: rational.cpp:1132
SCIP_Bool SCIPrationalIsAbsInfinity(SCIP_RATIONAL *rational)
Definition: rational.cpp:1680
void SCIPrationalSetReal(SCIP_RATIONAL *res, SCIP_Real real)
Definition: rational.cpp:603
void SCIPrationalFreeBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition: rational.cpp:473
SCIP_Bool SCIPrationalIsPositive(SCIP_RATIONAL *rational)
Definition: rational.cpp:1640
SCIP_RETCODE SCIPrationalCreateBuffer(BMS_BUFMEM *bufmem, SCIP_RATIONAL **rational)
Definition: rational.cpp:123
void SCIPrationalSetRational(SCIP_RATIONAL *res, SCIP_RATIONAL *src)
Definition: rational.cpp:569
SCIP_Bool SCIPrationalIsIntegral(SCIP_RATIONAL *rational)
Definition: rational.cpp:1691
void SCIPrationalNegate(SCIP_RATIONAL *res, SCIP_RATIONAL *op)
Definition: rational.cpp:1297
void SCIPrationalMultReal(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_Real op2)
Definition: rational.cpp:1097
void SCIPrationalAddReal(SCIP_RATIONAL *res, SCIP_RATIONAL *rat, SCIP_Real real)
Definition: rational.cpp:961
void SCIPrationalAddProdReal(SCIP_RATIONAL *res, SCIP_RATIONAL *op1, SCIP_Real op2)
Definition: rational.cpp:1210
SCIP_Longint SCIPvarGetUbCertificateIndexLocal(SCIP_VAR *var)
Definition: var.c:25188
SCIP_Real SCIPvarGetNegationConstant(SCIP_VAR *var)
Definition: var.c:23889
SCIP_Longint SCIPvarGetLbCertificateIndexLocal(SCIP_VAR *var)
Definition: var.c:25176
internal methods for primal heuristics
OFINS - Objective Function Induced Neighborhood Search - a primal heuristic for reoptimization.
reoptsols primal heuristic
trivialnegation primal heuristic
methods commonly used by primal heuristics
internal methods for branching and inference history
methods for implications, variable bounds, and cliques
methods for catching the user CTRL-C interrupt
internal methods for LP management
safe exact rational bounding methods
interface methods for specific LP solvers
methods for block memory pools and memory buffers
default message handler
internal miscellaneous methods
Definition: multiprecision.hpp:66
internal methods for NLP management
internal methods for NLP solver interfaces
internal methods for node selectors and node priority queues
internal methods for handling parameter settings
internal methods for presolvers
methods commonly used for presolving
internal methods for variable pricers
internal methods for storing priced variables
internal methods for collecting primal CIP solutions and primal informations
internal methods for storing and manipulating the main problem
internal methods for propagators
public methods for managing constraints
wrapper functions to map file i/o to standard or zlib file i/o
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
public methods for primal CIP solutions
public methods for problem variables
internal methods for input file readers
internal methods for relaxators
data structures and methods for collecting reoptimization information
internal methods for return codes for SCIP methods
static char getInequalitySense(SCIP_Bool isgreaterthan)
Definition: scip_certificate.c:149
public methods for certified solving
public methods for constraint handler plugins and constraints
public methods for problem copies
general public methods
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public solving methods
public methods for querying solving statistics
public methods for SCIP variables
build flags methods
register additional core functionality that is designed as plugins
git hash methods
internal methods for separators
internal methods for storing separated cuts
internal methods for storing separated exact cuts
internal methods for global SCIP settings
internal methods for storing primal CIP solutions
internal methods for main solving loop and node processing
internal methods for Benders' decomposition
internal methods for problem statistics
Definition: struct_cuts.h:41
Definition: struct_certificate.h:63
SCIP_Longint certificateindex
Definition: struct_certificate.h:58
Definition: struct_certificate.h:122
Definition: struct_cons.h:47
Definition: struct_certificate.h:78
Definition: struct_rational.h:47
Definition: struct_lpexact.h:187
Definition: struct_lp.h:205
Definition: struct_var.h:262
union SCIP_Var::@24 data
Definition: struct_scip.h:72
data structures for certificate output
data structures for exact LP management
SCIP main data structure.
the function declarations for the synchronization store
internal methods for displaying statistics tables
internal methods for branch and bound tree
internal methods for problem variables
methods for creating output for visualization tools (VBC, BAK)
declarations for XML parsing