cons.c
Go to the documentation of this file.
32 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
57 #define AGERESETAVG_INIT 1000.0 /**< initial value of the exponentially decaying weighted sum for ages */
59 #define AGERESETAVG_DECAY 0.0005 /**< weight of a new addend in the exponentially decyaing sum */
60 #define AGERESETAVG_AGELIMIT 2.0 /**< in dynamic setting, a constraint is deleted if its age exceeds the
62 #define AGERESETAVG_OBSOLETEAGE 1.8 /**< in dynamic setting, a constraint is marked obsolete if its age exceeds the
316 assert(conshdlr->propconss[c]->markpropagate || (conshdlr->propconss[c]->obsolete == (c >= conshdlr->nusefulpropconss)));
327 )
336 )
343 /** updates the exponentially decaying weighted age average for age resets after a constraint age was reset */
368 || (set->cons_agelimit == 0 && cons->age > AGERESETAVG_AGELIMIT * conshdlrGetAgeresetavg(cons->conshdlr))));
383 || (set->cons_obsoleteage == 0 && cons->age > AGERESETAVG_OBSOLETEAGE * conshdlrGetAgeresetavg(cons->conshdlr))));
386 /** marks constraint to be obsolete; it will be moved to the last part of the constraint arrays, such that
459 * thus, we have to reset the enforcement counters in order to enforce all constraints again, especially
461 * this case should occur almost never, because a constraint that was not enforced in the last enforcement
462 * is a newly added one, and it is very unlikely that this constraint will become obsolete before the next
464 * this reset is not performed for separation and propagation, because they are not vital for correctness
486 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
516 * it will be moved to the first part of the constraint arrays, such that it is checked, enforced, separated,
543 assert(conshdlr->nusefulcheckconss <= cons->checkconsspos && cons->checkconsspos < conshdlr->ncheckconss);
561 assert(conshdlr->nusefulsepaconss <= cons->sepaconsspos && cons->sepaconsspos < conshdlr->nsepaconss);
576 assert(conshdlr->nusefulenfoconss <= cons->enfoconsspos && cons->enfoconsspos < conshdlr->nenfoconss);
589 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
595 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
617 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
618 * the first part contains constraints which were marked to be propagated (independently of its age)
619 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
622 * @note if a constraint gets marked for propagation we put it into the first part regardless of its age
638 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
647 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
657 /* if the constraint is obsolete, we need to move it first to the non-obsolete part of the array */
660 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
673 assert(conshdlr->nmarkedpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->nusefulpropconss);
692 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
693 * the first part contains constraints which were marked to be propagated (independently of its age)
694 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
697 * @note if a constraint gets unmarked for propagation, it is put into the right part depending on its age
713 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
722 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
733 /* first, move the constraint out of the first part to the second part of the constraint array */
1012 /* we have to make sure that even this obsolete constraint is enforced in the next enforcement call;
1013 * if the same LP or pseudo solution is enforced again, only the newly added useful constraints are
1015 * enforced again; this is not needed for separation and propagation, because they are not vital for correctness
1064 /* if the constraint that moved to the free position was a newly added constraint and not enforced in the last
1066 * this check is not performed for separation and propagation, because they are not vital for correctness
1114 conshdlr->checkconss[conshdlr->ncheckconss] = conshdlr->checkconss[conshdlr->nusefulcheckconss];
1210 /* if the constraint is marked to be propagated, we have to move it to the first part of the array */
1213 /* temporarily unmark the constraint to be propagated, such that we can use the method below */
1244 /* unmark constraint to be propagated; this will move the constraint to the obsolete or non-obsolete part of the
1301 SCIPsetDebugMsg(set, "enable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1329 SCIPdebugMessage("disable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1361 SCIPsetDebugMsg(set, "enable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1389 SCIPdebugMessage("disable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1430 SCIPsetDebugMsg(set, "enable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1492 SCIPsetDebugMsg(set, "disable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1539 int depth, /**< depth in the tree where the activation takes place, or -1 for global problem */
1565 SCIPsetDebugMsg(set, "activate constraint <%s> in constraint handler <%s> (depth %d, focus=%u)\n",
1585 /* add constraint to the initconss array if the constraint is initial and added to the focus node */
1632 SCIPsetDebugMsg(set, "deactivate constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1685 * recent obsolete check constraints will be moved to the last positions in the sepa-, enfo-, check-, and prop-arrays;
1686 * recent useful constraints will be moved to the first positions in the sepa-, enfo-, check-, and prop-arrays;
1687 * constraints which were recently marked to be propagated are moved to the first positions in the prop-array;
1708 SCIPsetDebugMsg(set, "processing %d constraints that have to be updated in constraint handler <%s>\n",
1724 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",
1747 SCIP_CALL( conshdlrActivateCons(conshdlr, set, stat, cons, cons->activedepth, cons->updateactfocus) );
1823 /* nothing to do here: the constraint is freed, when it is released from the updateconss array */
1883 /** marks constraint handler to delay all constraint updates until the next conshdlrProcessUpdates() call */
1887 )
1911 SCIPsetDebugMsg(set, "constraint updates of constraint handler <%s> will be processed immediately (count:%d)\n",
1940 SCIPsetDebugMsg(set, "constraint <%s> of age %g has to be updated in constraint handler <%s> (consdata=%p)\n",
1989 SCIPsetDebugMsg(set, "including constraint handler %s in subscip %p\n", SCIPconshdlrGetName(conshdlr), (void*)set->scip);
2007 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
2008 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
2009 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2010 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2012 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2013 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2014 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2015 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2016 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2017 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2018 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2022 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2023 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2024 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2025 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2027 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2028 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2030 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2032 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2049 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2064 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
2069 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
2242 (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);
2244 (int*)(&(*conshdlr)->proptiming), TRUE, (int) proptiming, (int) SCIP_PROPTIMING_BEFORELP, (int) SCIP_PROPTIMING_ALWAYS, NULL, NULL) ); /*lint !e713*/
2248 "frequency for using all instead of only the useful constraints in separation, propagation and enforcement (-1: never, 0: only in first evaluation)",
2267 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing mask of the constraint handler's presolving method (%u:FAST, %u:MEDIUM, %u:EXHAUSTIVE, %u:FINAL)",
2268 SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FINAL);
2270 (int*)&(*conshdlr)->presoltiming, TRUE, (int) presoltiming, (int) SCIP_PRESOLTIMING_FAST, (int) SCIP_PRESOLTIMING_MAX, NULL, NULL) ); /*lint !e740 !e713*/
2285 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
2286 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
2287 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2288 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2290 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2291 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2292 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2293 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2294 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2295 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2296 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2300 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2301 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2302 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2303 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2305 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2306 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2308 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2310 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2327 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2339 SCIP_CALL_FINALLY( doConshdlrCreate(conshdlr, set, messagehdlr, blkmem, name, desc, sepapriority, enfopriority,
2340 checkpriority, sepafreq, propfreq, eagerfreq, maxprerounds, delaysepa, delayprop, needscons, proptiming,
2341 presoltiming, conshdlrcopy, consfree, consinit, consexit, consinitpre, consexitpre, consinitsol, consexitsol,
2342 consdelete, constrans, consinitlp, conssepalp, conssepasol, consenfolp, consenforelax, consenfops, conscheck,
2343 consprop, conspresol, consresprop, conslock, consactive, consdeactive, consenable, consdisable, consdelvars,
2484 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2485 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2486 * external method; to avoid this, these changes will be buffered and processed after the method call
2528 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2529 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2530 * external method; to avoid this, these changes will be buffered and processed after the method call
2595 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2596 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2597 * external method; to avoid this, these changes will be buffered and processed after the method call
2614 /* after a restart the LP is empty but the initial constraints are not included in the initialconss array anymore;
2615 * we have to put them back into this array in order to obtain the correct initial root relaxation
2623 /**@todo should only active constraints be added to the initconss array? at least cons->active is asserted in
2651 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2652 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2653 * external method; to avoid this, these changes will be buffered and processed after the method call
2695 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2696 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2697 * external method; to avoid this, these changes will be buffered and processed after the method call
2732 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2733 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2734 * external method; to avoid this, these changes will be buffered and processed after the method call
2742 SCIP_CALL( conshdlr->consexitsol(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss, restart) );
2754 /** calls LP initialization method of constraint handler to separate all initial active constraints */
2761 SCIP_Bool initkeptconss, /**< Also initialize constraints which are valid at a more global node,
2764 SCIP_Bool* cutoff /**< pointer to store whether infeasibility was detected while building the LP */
2781 SCIPsetDebugMsg(set, "initializing LP with %d initial constraints of handler <%s> (ninitconss=%d, kept=%d, initkept=%u)\n",
2782 initkeptconss ? conshdlr->ninitconss : conshdlr->ninitconss - conshdlr->ninitconsskept, conshdlr->name,
2785 /* no constraints to initialize (or only kept constraints which do not need to be initialized this time) -> return */
2786 if( conshdlr->needscons && (conshdlr->ninitconss == 0 || (!initkeptconss && conshdlr->ninitconss == conshdlr->ninitconsskept)) )
2789 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2790 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2791 * external method; to avoid this, these changes will be buffered and processed after the method call
2802 /* add all kept initial constraints which are currently active to the second part of the initconss array */
2803 /* @todo keep track of where a constraint was already initialized (e.g., in the conssetchg)? */
2816 SCIP_CALL( conshdlr->consinitlp(set->scip, conshdlr, &conshdlr->initconss[conshdlr->ninitconsskept],
2880 || (0 <= conshdlr->lastnusefulsepaconss && conshdlr->lastnusefulsepaconss <= conshdlr->nusefulsepaconss));
2901 /* all constraints that were not yet separated on the new LP solution must be useful constraints, which means,
2930 SCIPsetDebugMsg(set, "separating constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n",
2951 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2952 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2953 * external method; to avoid this, these changes will be buffered and processed after the method call
2999 SCIPerrorMessage("LP separation method of constraint handler <%s> returned invalid result <%d>\n",
3007 SCIPsetDebugMsg(set, "LP separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3082 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3083 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3084 * external method; to avoid this, these changes will be buffered and processed after the method call
3093 SCIP_CALL( conshdlr->conssepasol(set->scip, conshdlr, conss, nconss, nusefulconss, sol, result) );
3126 SCIPerrorMessage("SOL separation method of constraint handler <%s> returned invalid result <%d>\n",
3134 SCIPsetDebugMsg(set, "SOL separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3145 /** calls enforcing method of constraint handler for a relaxation solution for all constraints added after last
3174 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3184 * the integrality constraint handler always needs to be enforced for all constraints since external branching
3200 /* if we already enforced the same relaxation solution at this node, we will only enforce new constraints in the
3201 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3212 /* all constraints that were not yet enforced on the new relaxation solution must be useful constraints, which means,
3244 SCIPdebugMessage("enforcing constraints %d to %d of %d constraints of handler <%s> (%s relaxation solution)\n",
3245 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, relaxchanged ? "new" : "old");
3266 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3267 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3268 * external method; to avoid this, these changes will be buffered and processed after the method call
3276 SCIP_CALL( conshdlr->consenforelax(set->scip, relaxsol, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
3317 SCIPerrorMessage("enforcing method of constraint handler <%s> for relaxation solutions returned invalid result <%d>\n",
3322 /* if the same relaxation solution was already enforced at this node, we only enforced new constraints this time;
3323 * if the enforelax call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3324 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3333 /** calls enforcing method of constraint handler for LP solution for all constraints added after last
3356 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3378 assert(conshdlr->lastenfolpresult == SCIP_FEASIBLE || conshdlr->lastenfolpresult == SCIP_INFEASIBLE
3381 /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the
3382 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3389 assert(conshdlr->lastenfolpresult == SCIP_INFEASIBLE || conshdlr->lastenfolpresult == SCIP_SEPARATED);
3394 /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means,
3424 SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n",
3425 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, lpchanged ? "new" : "old");
3446 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3447 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3448 * external method; to avoid this, these changes will be buffered and processed after the method call
3456 SCIP_CALL( conshdlr->consenfolp(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
3496 SCIPerrorMessage("enforcing method of constraint handler <%s> for LP solutions returned invalid result <%d>\n",
3501 /* if the same LP solution was already enforced at this node, we only enforced new constraints this time;
3502 * if the enfolp call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3503 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3519 SCIP_Bool* success, /**< pointer to store whether constraint handler successfully found a variable */
3520 SCIP_Bool* infeasible /**< pointer to store whether the current node was detected to be infeasible */
3532 SCIP_CALL( conshdlr->consgetdivebdchgs(set->scip, conshdlr, diveset, sol, success, infeasible) );
3538 /** calls enforcing method of constraint handler for pseudo solution for all constraints added after last
3549 SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
3562 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3596 /* if we already enforced the same pseudo solution at this node, we will only enforce new constraints in the
3597 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3608 /* all constraints that were not yet enforced on the new LP solution must be useful constraints, which means,
3636 SCIPsetDebugMsg(set, "enforcing constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, objinfeasible=%u)\n",
3637 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, pschanged ? "new" : "old", objinfeasible);
3655 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3656 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3657 * external method; to avoid this, these changes will be buffered and processed after the method call
3665 SCIP_CALL( conshdlr->consenfops(set->scip, conshdlr, conss, nconss, nusefulconss, solinfeasible, objinfeasible, result) );
3679 SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions was skipped, even though the solution was not objective-infeasible\n",
3685 /* A constraint handler might return SCIP_DIDNOTRUN and not check any constraints in case objinfeasible was
3719 SCIPerrorMessage("enforcing method of constraint handler <%s> for pseudo solutions returned invalid result <%d>\n",
3724 /* if the same pseudo solution was already enforced at this node, we only enforced new constraints this time;
3725 * if the enfops call returns feasible now, the solution is only feasible w.r.t. the new constraints, if the
3726 * last call detected infeasibility for the old constraints, we have to change the result to infeasible
3734 * Even if nothing is enforced, the solution might still be infeasible due to violating lower bound.
3752 SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
3770 SCIPsetDebugMsg(set, "checking %d constraints of handler <%s>\n", conshdlr->ncheckconss, conshdlr->name);
3772 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3773 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3774 * external method; to avoid this, these changes will be buffered and processed after the method call
3782 SCIP_CALL( conshdlr->conscheck(set->scip, conshdlr, conshdlr->checkconss, conshdlr->ncheckconss,
3798 SCIPerrorMessage("feasibility check of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result);
3827 || (0 <= conshdlr->lastnusefulpropconss && conshdlr->lastnusefulpropconss <= conshdlr->nusefulpropconss));
3849 if( !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount && conshdlr->nmarkedpropconss == 0 )
3851 /* all constraints that were not yet propagated on the new domains must be useful constraints, which means,
3881 SCIPsetDebugMsg(set, "propagating constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, %d useful)\n",
3883 !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount ? "old" : "new", nusefulconss);
3900 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3901 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3902 * external method; to avoid this, these changes will be buffered and processed after the method call
3917 SCIP_CALL( conshdlr->consprop(set->scip, conshdlr, conss, nconss, nusefulconss, nmarkedpropconss, proptiming, result) );
3958 SCIPerrorMessage("propagation method of constraint handler <%s> returned invalid result <%d>\n",
3966 SCIPsetDebugMsg(set, "propagation method of constraint handler <%s> was delayed\n", conshdlr->name);
3994 int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
4022 SCIPsetDebugMsg(set, "presolving %d constraints of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4062 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4063 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4064 * external method; to avoid this, these changes will be buffered and processed after the method call
4072 SCIP_CALL( conshdlr->conspresol(set->scip, conshdlr, conshdlr->conss, conshdlr->nactiveconss, nrounds, timing,
4104 SCIPerrorMessage("presolving method of constraint handler <%s> returned invalid result <%d>\n",
4114 SCIPsetDebugMsg(set, "after presolving %d constraints left of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4135 /* during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4136 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4137 * external method; to avoid this, these changes will be buffered and processed after the method call
4151 /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4166 /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4184 )
4194 )
4204 )
4226 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
4227 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
4229 SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
4243 /** sets both the propagation callback and the propagation frequency of the constraint handler */
4247 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
4248 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
4249 SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */
4276 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
4324 SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
4335 SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */
4346 SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
4357 SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
4369 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
4370 SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
4378 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
4383 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
4405 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */
4408 SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
4416 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */
4419 SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
4540 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
4548 /** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
4549 * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
4551 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4556 )
4566 )
4576 )
4585 * @attention Usually, there should be no need to access this array. Use this only if you are absolutely sure what you are doing.
4589 )
4599 )
4609 )
4619 )
4628 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4633 )
4643 )
4653 )
4662 SCIP_CONSHDLR* conshdlr, /**< the constraint handler for which all clocks should be enabled or disabled */
4683 )
4693 )
4703 )
4713 )
4723 )
4733 )
4743 )
4750 /** gets time in seconds used for propagation in this constraint handler during strong branching */
4753 )
4763 )
4773 )
4783 )
4793 )
4803 )
4813 )
4823 )
4833 )
4843 )
4853 )
4863 )
4873 )
4883 )
4893 )
4903 )
4913 )
4923 )
4930 /** gets maximum number of active constraints of constraint handler existing at the same time */
4933 )
4943 )
4953 )
4963 )
4973 )
4983 )
4990 /** gets number of holes added to domains of variables in presolving method of constraint handler */
4993 )
5003 )
5013 )
5023 )
5033 )
5043 )
5050 /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
5053 )
5063 )
5073 )
5083 )
5093 )
5103 )
5110 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
5113 )
5123 )
5133 )
5143 )
5153 )
5163 )
5173 )
5183 )
5193 )
5203 )
5213 )
5235 )