cons.c
Go to the documentation of this file.
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
55 #define AGERESETAVG_INIT 1000.0 /**< initial value of the exponentially decaying weighted sum for ages */
57 #define AGERESETAVG_DECAY 0.0005 /**< weight of a new addend in the exponentially decyaing sum */
58 #define AGERESETAVG_AGELIMIT 2.0 /**< in dynamic setting, a constraint is deleted if its age exceeds the
60 #define AGERESETAVG_OBSOLETEAGE 1.8 /**< in dynamic setting, a constraint is marked obsolete if its age exceeds the
314 assert(conshdlr->propconss[c]->markpropagate || (conshdlr->propconss[c]->obsolete == (c >= conshdlr->nusefulpropconss)));
325 )
334 )
341 /** updates the exponentially decaying weighted age average for age resets after a constraint age was reset */
366 || (set->cons_agelimit == 0 && cons->age > AGERESETAVG_AGELIMIT * conshdlrGetAgeresetavg(cons->conshdlr))));
381 || (set->cons_obsoleteage == 0 && cons->age > AGERESETAVG_OBSOLETEAGE * conshdlrGetAgeresetavg(cons->conshdlr))));
384 /** marks constraint to be obsolete; it will be moved to the last part of the constraint arrays, such that
457 * thus, we have to reset the enforcement counters in order to enforce all constraints again, especially
459 * this case should occur almost never, because a constraint that was not enforced in the last enforcement
460 * is a newly added one, and it is very unlikely that this constraint will become obsolete before the next
462 * this reset is not performed for separation and propagation, because they are not vital for correctness
484 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
514 * it will be moved to the first part of the constraint arrays, such that it is checked, enforced, separated,
541 assert(conshdlr->nusefulcheckconss <= cons->checkconsspos && cons->checkconsspos < conshdlr->ncheckconss);
559 assert(conshdlr->nusefulsepaconss <= cons->sepaconsspos && cons->sepaconsspos < conshdlr->nsepaconss);
574 assert(conshdlr->nusefulenfoconss <= cons->enfoconsspos && cons->enfoconsspos < conshdlr->nenfoconss);
587 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
593 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
615 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
616 * the first part contains constraints which were marked to be propagated (independently of its age)
617 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
620 * @note if a constraint gets marked for propagation we put it into the first part regardless of its age
636 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
645 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
655 /* if the constraint is obsolete, we need to move it first to the non-obsolete part of the array */
658 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
671 assert(conshdlr->nmarkedpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->nusefulpropconss);
690 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
691 * the first part contains constraints which were marked to be propagated (independently of its age)
692 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
695 * @note if a constraint gets unmarked for propagation, it is put into the right part depending on its age
711 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
720 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
731 /* first, move the constraint out of the first part to the second part of the constraint array */
1010 /* we have to make sure that even this obsolete constraint is enforced in the next enforcement call;
1011 * if the same LP or pseudo solution is enforced again, only the newly added useful constraints are
1013 * enforced again; this is not needed for separation and propagation, because they are not vital for correctness
1062 /* if the constraint that moved to the free position was a newly added constraint and not enforced in the last
1064 * this check is not performed for separation and propagation, because they are not vital for correctness
1112 conshdlr->checkconss[conshdlr->ncheckconss] = conshdlr->checkconss[conshdlr->nusefulcheckconss];
1208 /* if the constraint is marked to be propagated, we have to move it to the first part of the array */
1211 /* temporarily unmark the constraint to be propagated, such that we can use the method below */
1242 /* unmark constraint to be propagated; this will move the constraint to the obsolete or non-obsolete part of the
1299 SCIPsetDebugMsg(set, "enable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1327 SCIPdebugMessage("disable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1359 SCIPsetDebugMsg(set, "enable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1387 SCIPdebugMessage("disable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1428 SCIPsetDebugMsg(set, "enable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1490 SCIPsetDebugMsg(set, "disable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1537 int depth, /**< depth in the tree where the activation takes place, or -1 for global problem */
1563 SCIPsetDebugMsg(set, "activate constraint <%s> in constraint handler <%s> (depth %d, focus=%u)\n",
1583 /* add constraint to the initconss array if the constraint is initial and added to the focus node */
1630 SCIPsetDebugMsg(set, "deactivate constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1683 * recent obsolete check constraints will be moved to the last positions in the sepa-, enfo-, check-, and prop-arrays;
1684 * recent useful constraints will be moved to the first positions in the sepa-, enfo-, check-, and prop-arrays;
1685 * constraints which were recently marked to be propagated are moved to the first positions in the prop-array;
1706 SCIPsetDebugMsg(set, "processing %d constraints that have to be updated in constraint handler <%s>\n",
1722 SCIPsetDebugMsg(set, " -> constraint <%s>: insert=%u, activate=%u, deactivate=%u, enable=%u, disable=%u, sepaenable=%u, sepadisable=%u, propenable=%u, propdisable=%u, obsolete=%u, free=%u (consdata=%p)\n",
1745 SCIP_CALL( conshdlrActivateCons(conshdlr, set, stat, cons, cons->activedepth, cons->updateactfocus) );
1821 /* nothing to do here: the constraint is freed, when it is released from the updateconss array */
1881 /** marks constraint handler to delay all constraint updates until the next conshdlrProcessUpdates() call */
1885 )
1909 SCIPsetDebugMsg(set, "constraint updates of constraint handler <%s> will be processed immediately (count:%d)\n",
1938 SCIPsetDebugMsg(set, "constraint <%s> of age %g has to be updated in constraint handler <%s> (consdata=%p)\n",
1976 return ((SCIP_CONS*)elem2)->conshdlr->checkpriority - ((SCIP_CONS*)elem1)->conshdlr->checkpriority;
1993 SCIPsetDebugMsg(set, "including constraint handler %s in subscip %p\n", SCIPconshdlrGetName(conshdlr), (void*)set->scip);
2011 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
2012 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
2013 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2014 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2016 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2017 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2018 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2019 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2020 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2021 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2022 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2026 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2027 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2028 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2029 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2031 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2032 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2034 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2036 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2053 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2054 SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)), /**< constraint permutation symmetry detection graph
2056 SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)), /**< constraint signed permutation
2072 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
2077 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
2252 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing when constraint propagation should be called (%u:BEFORELP, %u:DURINGLPLOOP, %u:AFTERLPLOOP, %u:ALWAYS)", SCIP_PROPTIMING_BEFORELP, SCIP_PROPTIMING_DURINGLPLOOP, SCIP_PROPTIMING_AFTERLPLOOP, SCIP_PROPTIMING_ALWAYS);
2254 (int*)(&(*conshdlr)->proptiming), TRUE, (int) proptiming, (int) SCIP_PROPTIMING_BEFORELP, (int) SCIP_PROPTIMING_ALWAYS, NULL, NULL) ); /*lint !e713*/
2258 "frequency for using all instead of only the useful constraints in separation, propagation and enforcement (-1: never, 0: only in first evaluation)",
2277 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing mask of the constraint handler's presolving method (%u:FAST, %u:MEDIUM, %u:EXHAUSTIVE, %u:FINAL)",
2278 SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FINAL);
2280 (int*)&(*conshdlr)->presoltiming, TRUE, (int) presoltiming, (int) SCIP_PRESOLTIMING_FAST, (int) SCIP_PRESOLTIMING_MAX, NULL, NULL) ); /*lint !e740 !e713*/
2295 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
2296 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
2297 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2298 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2300 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2301 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2302 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2303 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2304 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2305 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2306 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2310 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2311 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2312 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2313 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2315 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2316 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2318 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2320 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2337 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2338 SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)), /**< constraint permutation symmetry detection graph
2340 SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)), /**< constraint signed permutation symmetry
2353 SCIP_CALL_FINALLY( doConshdlrCreate(conshdlr, set, messagehdlr, blkmem, name, desc, sepapriority, enfopriority,
2354 checkpriority, sepafreq, propfreq, eagerfreq, maxprerounds, delaysepa, delayprop, needscons, proptiming,
2355 presoltiming, conshdlrcopy, consfree, consinit, consexit, consinitpre, consexitpre, consinitsol, consexitsol,
2356 consdelete, constrans, consinitlp, conssepalp, conssepasol, consenfolp, consenforelax, consenfops, conscheck,
2357 consprop, conspresol, consresprop, conslock, consactive, consdeactive, consenable, consdisable, consdelvars,
2358 consprint, conscopy, consparse, consgetvars, consgetnvars, consgetdivebdchgs, consgetpermsymgraph,
2499 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2500 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2501 * external method; to avoid this, these changes will be buffered and processed after the method call
2543 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2544 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2545 * external method; to avoid this, these changes will be buffered and processed after the method call
2610 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2611 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2612 * external method; to avoid this, these changes will be buffered and processed after the method call
2629 /* after a restart the LP is empty but the initial constraints are not included in the initialconss array anymore;
2630 * we have to put them back into this array in order to obtain the correct initial root relaxation
2638 /**@todo should only active constraints be added to the initconss array? at least cons->active is asserted in
2666 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2667 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2668 * external method; to avoid this, these changes will be buffered and processed after the method call
2710 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2711 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2712 * external method; to avoid this, these changes will be buffered and processed after the method call
2747 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2748 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2749 * external method; to avoid this, these changes will be buffered and processed after the method call
2757 SCIP_CALL( conshdlr->consexitsol(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss, restart) );
2769 /** calls LP initialization method of constraint handler to separate all initial active constraints */
2776 SCIP_Bool initkeptconss, /**< Also initialize constraints which are valid at a more global node,
2779 SCIP_Bool* cutoff /**< pointer to store whether infeasibility was detected while building the LP */
2796 SCIPsetDebugMsg(set, "initializing LP with %d initial constraints of handler <%s> (ninitconss=%d, kept=%d, initkept=%u)\n",
2797 initkeptconss ? conshdlr->ninitconss : conshdlr->ninitconss - conshdlr->ninitconsskept, conshdlr->name,
2800 /* no constraints to initialize (or only kept constraints which do not need to be initialized this time) -> return */
2801 if( conshdlr->needscons && (conshdlr->ninitconss == 0 || (!initkeptconss && conshdlr->ninitconss == conshdlr->ninitconsskept)) )
2804 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2805 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2806 * external method; to avoid this, these changes will be buffered and processed after the method call
2817 /* add all kept initial constraints which are currently active to the second part of the initconss array */
2818 /* @todo keep track of where a constraint was already initialized (e.g., in the conssetchg)? */
2831 SCIP_CALL( conshdlr->consinitlp(set->scip, conshdlr, &conshdlr->initconss[conshdlr->ninitconsskept],
2895 || (0 <= conshdlr->lastnusefulsepaconss && conshdlr->lastnusefulsepaconss <= conshdlr->nusefulsepaconss));
2916 /* all constraints that were not yet separated on the new LP solution must be useful constraints, which means,
2945 SCIPsetDebugMsg(set, "separating constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n",
2966 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2967 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2968 * external method; to avoid this, these changes will be buffered and processed after the method call
3014 SCIPerrorMessage("LP separation method of constraint handler <%s> returned invalid result <%d>\n",
3022 SCIPsetDebugMsg(set, "LP separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3097 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3098 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3099 * external method; to avoid this, these changes will be buffered and processed after the method call
3108 SCIP_CALL( conshdlr->conssepasol(set->scip, conshdlr, conss, nconss, nusefulconss, sol, result) );
3141 SCIPerrorMessage("SOL separation method of constraint handler <%s> returned invalid result <%d>\n",
3149 SCIPsetDebugMsg(set, "SOL separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3160 /** calls enforcing method of constraint handler for a relaxation solution for all constraints added after last
3189 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3199 * the integrality constraint handler always needs to be enforced for all constraints since external branching
3215 /* if we already enforced the same relaxation solution at this node, we will only enforce new constraints in the
3216 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3227 /* all constraints that were not yet enforced on the new relaxation solution must be useful constraints, which means,
3259 SCIPdebugMessage("enforcing constraints %d to %d of %d constraints of handler <%s> (%s relaxation solution)\n",
3260 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, relaxchanged ? "new" : "old");
3281 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3282 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3283 * external method; to avoid this, these changes will be buffered and processed after the method call
3291 SCIP_CALL( conshdlr->consenforelax(set->scip, relaxsol, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
3332 SCIPerrorMessage("enforcing method of constraint handler <%s> for relaxation solutions returned invalid result <%d>\n",
3337 /* if the same relaxation solution was already enforced at this node, we only enforced new constraints this time;
3338 * if the enforelax call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3339 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3348 /** calls enforcing method of constraint handler for LP solution for all constraints added after last
3371 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3393 assert(conshdlr->lastenfolpresult == SCIP_FEASIBLE || conshdlr->lastenfolpresult == SCIP_INFEASIBLE
3396 /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the
3397 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3404 assert(conshdlr->lastenfolpresult == SCIP_INFEASIBLE || conshdlr->lastenfolpresult == SCIP_SEPARATED);
3409 /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means,
3439 SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n",
3440 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, lpchanged ? "new" : "old");
3461 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3462 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3463 * external method; to avoid this, these changes will be buffered and processed after the method call
3471 SCIP_CALL( conshdlr->consenfolp(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
3511 SCIPerrorMessage("enforcing method of constraint handler <%s> for LP solutions returned invalid result <%d>\n",
3516 /* if the same LP solution was already enforced at this node, we only enforced new constraints this time;
3517 * if the enfolp call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3518 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3534 SCIP_Bool* success, /**< pointer to store whether constraint handler successfully found a variable */
3535 SCIP_Bool* infeasible /**< pointer to store whether the current node was detected to be infeasible */
3547 SCIP_CALL( conshdlr->consgetdivebdchgs(set->scip, conshdlr, diveset, sol, success, infeasible) );
3553 /** calls enforcing method of constraint handler for pseudo solution for all constraints added after last
3564 SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
3577 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3611 /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the
3612 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3623 /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means,
3651 SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, objinfeasible=%u)\n",
3652 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, pschanged ? "new" : "old", objinfeasible);
3670 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3671 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3672 * external method; to avoid this, these changes will be buffered and processed after the method call
3680 SCIP_CALL( conshdlr->consenfops(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, objinfeasible, result) );
3694 SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions was skipped, even though the solution was not objective-infeasible\n",
3700 /* A constraint handler might return SCIP_DIDNOTRUN and not check any constraints in case objinfeasible was
3734 SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions returned invalid result <%d>\n",
3739 /* if the same pseudo solution was already enforced at this node, we only enforced new constraints this time;
3740 * if the enfops call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3741 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3749 * Even if nothing is enforced, the solution might still be infeasible due to violating lower bound.
3767 SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
3785 SCIPsetDebugMsg(set, "checking %d constraints of handler <%s>\n", conshdlr->ncheckconss, conshdlr->name);
3787 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3788 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3789 * external method; to avoid this, these changes will be buffered and processed after the method call
3797 SCIP_CALL( conshdlr->conscheck(set->scip, conshdlr, conshdlr->checkconss, conshdlr->ncheckconss,
3813 SCIPerrorMessage("feasibility check of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result);
3842 || (0 <= conshdlr->lastnusefulpropconss && conshdlr->lastnusefulpropconss <= conshdlr->nusefulpropconss));
3864 if( !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount && conshdlr->nmarkedpropconss == 0 )
3866 /* all constraints that were not yet propagated on the new domains must be useful constraints, which means,
3896 SCIPsetDebugMsg(set, "propagating constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, %d useful)\n",
3898 !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount ? "old" : "new", nusefulconss);
3915 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3916 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3917 * external method; to avoid this, these changes will be buffered and processed after the method call
3932 SCIP_CALL( conshdlr->consprop(set->scip, conshdlr, conss, nconss, nusefulconss, nmarkedpropconss, proptiming, result) );
3973 SCIPerrorMessage("propagation method of constraint handler <%s> returned invalid result <%d>\n",
3981 SCIPsetDebugMsg(set, "propagation method of constraint handler <%s> was delayed\n", conshdlr->name);
4009 int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
4037 SCIPsetDebugMsg(set, "presolving %d constraints of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4077 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4078 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4079 * external method; to avoid this, these changes will be buffered and processed after the method call
4087 SCIP_CALL( conshdlr->conspresol(set->scip, conshdlr, conshdlr->conss, conshdlr->nactiveconss, nrounds, timing,
4119 SCIPerrorMessage("presolving method of constraint handler <%s> returned invalid result <%d>\n",
4129 SCIPsetDebugMsg(set, "after presolving %d constraints left of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4150 /* during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4151 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4152 * external method; to avoid this, these changes will be buffered and processed after the method call
4166 /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4181 /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4199 )
4209 )
4219 )
4241 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
4242 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
4244 SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
4258 /** sets both the propagation callback and the propagation frequency of the constraint handler */
4262 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
4263 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
4264 SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */
4291 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
4339 SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
4350 SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */
4361 SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
4372 SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
4384 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
4385 SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
4393 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
4398 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
4420 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */
4423 SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
4431 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */
4434 SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
4555 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
4566 SCIP_DECL_CONSGETPERMSYMGRAPH((*consgetpermsymgraph)) /**< constraint permutation symmetry detection graph
4578 SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH((*consgetsignedpermsymgraph)) /**< constraint permutation symmetry detection
4587 /** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
4588 * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
4590 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4595 )
4605 )
4615 )
4624 * @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing.
4628 )
4638 )
4648 )
4658 )
4667 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4672 )
4682 )
4692 )
4701 SCIP_CONSHDLR* conshdlr, /**< the constraint handler for which all clocks should be enabled or disabled */
4722 )
4732 )
4742 )
4752 )
4762 )
4772 )
4782 )
4789 /** gets time in seconds used for propagation in this constraint handler during strong branching */
4792 )
4802 )
4812 )
4822 )
4832 )
4842 )
4852 )
4862 )
4872 )
4882 )
4892 )
4902 )
4912 )
4922 )
4932 )
4942 )
4952 )
4962 )
4969 /** gets maximum number of active constraints of constraint handler existing at the same time */
4972 )
4982 )
4992 )
5002 )
5012 )
5022 )
5029 /** gets number of holes added to domains of variables in presolving method of constraint handler */
5032 )
5042 )
5052 )
5062 )
5072 )
5082 )
5089 /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
5092 )
5102 )
5112 )
5122 )
5132 )
5142 )
5149 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
5152 )
5162 )
5172 )
5182 )
5192 )
5202 )
5212 )
5222 )
5232 )
5242 )
5252 )
5274 )
5295 )
5305 )