cons.c
Go to the documentation of this file.
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
47 #define AGERESETAVG_INIT 1000.0 /**< initial value of the exponentially decaying weighted sum for ages */
49 #define AGERESETAVG_DECAY 0.0005 /**< weight of a new addend in the exponentially decyaing sum */
50 #define AGERESETAVG_AGELIMIT 2.0 /**< in dynamic setting, a constraint is deleted if its age exceeds the
52 #define AGERESETAVG_OBSOLETEAGE 1.8 /**< in dynamic setting, a constraint is marked obsolete if its age exceeds the
306 assert(conshdlr->propconss[c]->markpropagate || (conshdlr->propconss[c]->obsolete == (c >= conshdlr->nusefulpropconss)));
317 )
326 )
333 /** updates the exponentially decaying weighted age average for age resets after a constraint age was reset */
358 || (set->cons_agelimit == 0 && cons->age > AGERESETAVG_AGELIMIT * conshdlrGetAgeresetavg(cons->conshdlr))));
373 || (set->cons_obsoleteage == 0 && cons->age > AGERESETAVG_OBSOLETEAGE * conshdlrGetAgeresetavg(cons->conshdlr))));
376 /** marks constraint to be obsolete; it will be moved to the last part of the constraint arrays, such that
449 * thus, we have to reset the enforcement counters in order to enforce all constraints again, especially
451 * this case should occur almost never, because a constraint that was not enforced in the last enforcement
452 * is a newly added one, and it is very unlikely that this constraint will become obsolete before the next
454 * this reset is not performed for separation and propagation, because they are not vital for correctness
476 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
506 * it will be moved to the first part of the constraint arrays, such that it is checked, enforced, separated,
533 assert(conshdlr->nusefulcheckconss <= cons->checkconsspos && cons->checkconsspos < conshdlr->ncheckconss);
551 assert(conshdlr->nusefulsepaconss <= cons->sepaconsspos && cons->sepaconsspos < conshdlr->nsepaconss);
566 assert(conshdlr->nusefulenfoconss <= cons->enfoconsspos && cons->enfoconsspos < conshdlr->nenfoconss);
579 /* in case the constraint is marked to be propagated, we do not move it in the propconss array since the first
585 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
607 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
608 * the first part contains constraints which were marked to be propagated (independently of its age)
609 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
612 * @note if a constraint gets marked for propagation we put it into the first part regardless of its age
628 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
637 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
647 /* if the constraint is obsolete, we need to move it first to the non-obsolete part of the array */
650 assert(conshdlr->nusefulpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->npropconss);
663 assert(conshdlr->nmarkedpropconss <= cons->propconsspos && cons->propconsspos < conshdlr->nusefulpropconss);
682 * @note the propagation array is divided into three parts in contrast to the other constraint arrays;
683 * the first part contains constraints which were marked to be propagated (independently of its age)
684 * the second part contains the useful (non-obsolete) constraints which are not marked to be propagated
687 * @note if a constraint gets unmarked for propagation, it is put into the right part depending on its age
703 /* it may happen that the constraint is deleted while updates are delayed: in this case we just return */
712 /* propagation of the constraint is globally or locally disabled, so we do not have to move the constraint in the
723 /* first, move the constraint out of the first part to the second part of the constraint array */
1002 /* we have to make sure that even this obsolete constraint is enforced in the next enforcement call;
1003 * if the same LP or pseudo solution is enforced again, only the newly added useful constraints are
1005 * enforced again; this is not needed for separation and propagation, because they are not vital for correctness
1054 /* if the constraint that moved to the free position was a newly added constraint and not enforced in the last
1056 * this check is not performed for separation and propagation, because they are not vital for correctness
1104 conshdlr->checkconss[conshdlr->ncheckconss] = conshdlr->checkconss[conshdlr->nusefulcheckconss];
1200 /* if the constraint is marked to be propagated, we have to move it to the first part of the array */
1203 /* temporarily unmark the constraint to be propagated, such that we can use the method below */
1234 /* unmark constraint to be propagated; this will move the constraint to the obsolete or non-obsolete part of the
1291 SCIPsetDebugMsg(set, "enable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1319 SCIPdebugMessage("disable separation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1351 SCIPsetDebugMsg(set, "enable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1379 SCIPdebugMessage("disable propagation of constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1420 SCIPsetDebugMsg(set, "enable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1482 SCIPsetDebugMsg(set, "disable constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1529 int depth, /**< depth in the tree where the activation takes place, or -1 for global problem */
1555 SCIPsetDebugMsg(set, "activate constraint <%s> in constraint handler <%s> (depth %d, focus=%u)\n",
1575 /* add constraint to the initconss array if the constraint is initial and added to the focus node */
1622 SCIPsetDebugMsg(set, "deactivate constraint <%s> in constraint handler <%s>\n", cons->name, conshdlr->name);
1675 * recent obsolete check constraints will be moved to the last positions in the sepa-, enfo-, check-, and prop-arrays;
1676 * recent useful constraints will be moved to the first positions in the sepa-, enfo-, check-, and prop-arrays;
1677 * constraints which were recently marked to be propagated are moved to the first positions in the prop-array;
1698 SCIPsetDebugMsg(set, "processing %d constraints that have to be updated in constraint handler <%s>\n",
1714 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",
1737 SCIP_CALL( conshdlrActivateCons(conshdlr, set, stat, cons, cons->activedepth, cons->updateactfocus) );
1813 /* nothing to do here: the constraint is freed, when it is released from the updateconss array */
1873 /** marks constraint handler to delay all constraint updates until the next conshdlrProcessUpdates() call */
1877 )
1901 SCIPsetDebugMsg(set, "constraint updates of constraint handler <%s> will be processed immediately (count:%d)\n",
1930 SCIPsetDebugMsg(set, "constraint <%s> of age %g has to be updated in constraint handler <%s> (consdata=%p)\n",
1979 SCIPsetDebugMsg(set, "including constraint handler %s in subscip %p\n", SCIPconshdlrGetName(conshdlr), (void*)set->scip);
1997 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
1998 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
1999 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2000 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2002 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2003 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2004 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2005 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2006 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2007 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2008 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2012 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2013 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2014 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2015 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2017 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2018 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2020 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2022 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2039 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2054 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
2059 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
2232 (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);
2234 (int*)(&(*conshdlr)->proptiming), TRUE, proptiming, (int) SCIP_PROPTIMING_BEFORELP, (int) SCIP_PROPTIMING_ALWAYS, NULL, NULL) ); /*lint !e713*/
2238 "frequency for using all instead of only the useful constraints in separation, propagation and enforcement (-1: never, 0: only in first evaluation)",
2257 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "timing mask of the constraint handler's presolving method (%u:FAST, %u:MEDIUM, %u:EXHAUSTIVE, %u:FINAL)",
2258 SCIP_PRESOLTIMING_FAST, SCIP_PRESOLTIMING_MEDIUM, SCIP_PRESOLTIMING_EXHAUSTIVE, SCIP_PRESOLTIMING_FINAL);
2260 (int*)&(*conshdlr)->presoltiming, TRUE, presoltiming, (int) SCIP_PRESOLTIMING_FAST, (int) SCIP_PRESOLTIMING_MAX, NULL, NULL) ); /*lint !e740 !e713*/
2275 int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
2276 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
2277 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
2278 int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
2280 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
2281 SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
2282 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
2283 SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
2284 SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
2285 SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
2286 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
2290 SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
2291 SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
2292 SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
2293 SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
2295 SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
2296 SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
2298 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
2300 SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
2317 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
2329 SCIP_CALL_FINALLY( doConshdlrCreate(conshdlr, set, messagehdlr, blkmem, name, desc, sepapriority, enfopriority,
2330 checkpriority, sepafreq, propfreq, eagerfreq, maxprerounds, delaysepa, delayprop, needscons, proptiming,
2331 presoltiming, conshdlrcopy, consfree, consinit, consexit, consinitpre, consexitpre, consinitsol, consexitsol,
2332 consdelete, constrans, consinitlp, conssepalp, conssepasol, consenfolp, consenforelax, consenfops, conscheck,
2333 consprop, conspresol, consresprop, conslock, consactive, consdeactive, consenable, consdisable, consdelvars,
2474 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2475 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2476 * external method; to avoid this, these changes will be buffered and processed after the method call
2518 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2519 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2520 * external method; to avoid this, these changes will be buffered and processed after the method call
2585 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2586 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2587 * external method; to avoid this, these changes will be buffered and processed after the method call
2604 /* after a restart the LP is empty but the initial constraints are not included in the initialconss array anymore;
2605 * we have to put them back into this array in order to obtain the correct initial root relaxation
2613 /**@todo should only active constraints be added to the initconss array? at least cons->active is asserted in
2631 assert(conshdlr->conss[c]->deleted || conshdlr->conss[c]->initial == (conshdlr->conss[c]->initconsspos >= 0));
2655 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2656 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2657 * external method; to avoid this, these changes will be buffered and processed after the method call
2699 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2700 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2701 * external method; to avoid this, these changes will be buffered and processed after the method call
2736 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2737 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2738 * external method; to avoid this, these changes will be buffered and processed after the method call
2746 SCIP_CALL( conshdlr->consexitsol(set->scip, conshdlr, conshdlr->conss, conshdlr->nconss, restart) );
2758 /** calls LP initialization method of constraint handler to separate all initial active constraints */
2765 SCIP_Bool initkeptconss, /**< Also initialize constraints which are valid at a more global node,
2768 SCIP_Bool* cutoff /**< pointer to store whether infeasibility was detected while building the LP */
2785 SCIPsetDebugMsg(set, "initializing LP with %d initial constraints of handler <%s> (ninitconss=%d, kept=%d, initkept=%u)\n",
2786 initkeptconss ? conshdlr->ninitconss : conshdlr->ninitconss - conshdlr->ninitconsskept, conshdlr->name,
2789 /* no constraints to initialize (or only kept constraints which do not need to be initialized this time) -> return */
2790 if( conshdlr->needscons && (conshdlr->ninitconss == 0 || (!initkeptconss && conshdlr->ninitconss == conshdlr->ninitconsskept)) )
2793 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2794 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2795 * external method; to avoid this, these changes will be buffered and processed after the method call
2806 /* add all kept initial constraints which are currently active to the second part of the initconss array */
2807 /* @todo keep track of where a constraint was already initialized (e.g., in the conssetchg)? */
2820 SCIP_CALL( conshdlr->consinitlp(set->scip, conshdlr, &conshdlr->initconss[conshdlr->ninitconsskept],
2884 || (0 <= conshdlr->lastnusefulsepaconss && conshdlr->lastnusefulsepaconss <= conshdlr->nusefulsepaconss));
2905 /* all constraints that were not yet separated on the new LP solution must be useful constraints, which means,
2934 SCIPsetDebugMsg(set, "separating constraints %d to %d of %d constraints of handler <%s> (%s LP solution)\n",
2955 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
2956 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
2957 * external method; to avoid this, these changes will be buffered and processed after the method call
3003 SCIPerrorMessage("LP separation method of constraint handler <%s> returned invalid result <%d>\n",
3011 SCIPsetDebugMsg(set, "LP separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3086 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3087 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3088 * external method; to avoid this, these changes will be buffered and processed after the method call
3097 SCIP_CALL( conshdlr->conssepasol(set->scip, conshdlr, conss, nconss, nusefulconss, sol, result) );
3130 SCIPerrorMessage("SOL separation method of constraint handler <%s> returned invalid result <%d>\n",
3138 SCIPsetDebugMsg(set, "SOL separation method of constraint handler <%s> was delayed\n", conshdlr->name);
3149 /** calls enforcing method of constraint handler for a relaxation solution for all constraints added after last
3178 || (0 <= conshdlr->lastnusefulenfoconss && conshdlr->lastnusefulenfoconss <= conshdlr->nusefulenfoconss));
3188 * the integrality constraint handler always needs to be enforced for all constraints since external branching
3204 /* if we already enforced the same relaxation solution at this node, we will only enforce new constraints in the
3205 * following; however, the result of the last call for the old constraint is still valid and we have to ensure
3216 /* all constraints that were not yet enforced on the new relaxation solution must be useful constraints, which means,
3248 SCIPdebugMessage("enforcing constraints %d to %d of %d constraints of handler <%s> (%s relaxation solution)\n",
3249 firstcons, firstcons + nconss - 1, conshdlr->nenfoconss, conshdlr->name, relaxchanged ? "new" : "old");
3270 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3271 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3272 * external method; to avoid this, these changes will be buffered and processed after the method call
3280 SCIP_CALL( conshdlr->consenforelax(set->scip, relaxsol, conshdlr, conss, nconss, nusefulconss, solinfeasible, result) );
3294 SCIPerrorMessage("enforcing method of constraint handler <%s> for relaxation returned an invalid result %d\n",
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
3759 SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
3777 SCIPsetDebugMsg(set, "checking %d constraints of handler <%s>\n", conshdlr->ncheckconss, conshdlr->name);
3779 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3780 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3781 * external method; to avoid this, these changes will be buffered and processed after the method call
3789 SCIP_CALL( conshdlr->conscheck(set->scip, conshdlr, conshdlr->checkconss, conshdlr->ncheckconss,
3805 SCIPerrorMessage("feasibility check of constraint handler <%s> returned invalid result <%d>\n", conshdlr->name, *result);
3834 || (0 <= conshdlr->lastnusefulpropconss && conshdlr->lastnusefulpropconss <= conshdlr->nusefulpropconss));
3856 if( !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount && conshdlr->nmarkedpropconss == 0 )
3858 /* all constraints that were not yet propagated on the new domains must be useful constraints, which means,
3888 SCIPsetDebugMsg(set, "propagating constraints %d to %d of %d constraints of handler <%s> (%s pseudo solution, %d useful)\n",
3890 !fullpropagation && conshdlr->lastpropdomchgcount == stat->domchgcount ? "old" : "new", nusefulconss);
3907 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
3908 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
3909 * external method; to avoid this, these changes will be buffered and processed after the method call
3924 SCIP_CALL( conshdlr->consprop(set->scip, conshdlr, conss, nconss, nusefulconss, nmarkedpropconss, proptiming, result) );
3965 SCIPerrorMessage("propagation method of constraint handler <%s> returned invalid result <%d>\n",
3973 SCIPsetDebugMsg(set, "propagation method of constraint handler <%s> was delayed\n", conshdlr->name);
4001 int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
4029 SCIPsetDebugMsg(set, "presolving %d constraints of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4069 /* because during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4070 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4071 * external method; to avoid this, these changes will be buffered and processed after the method call
4079 SCIP_CALL( conshdlr->conspresol(set->scip, conshdlr, conshdlr->conss, conshdlr->nactiveconss, nrounds, timing,
4111 SCIPerrorMessage("presolving method of constraint handler <%s> returned invalid result <%d>\n",
4121 SCIPsetDebugMsg(set, "after presolving %d constraints left of handler <%s>\n", conshdlr->nactiveconss, conshdlr->name);
4142 /* during constraint processing, constraints of this handler may be deleted, activated, deactivated,
4143 * enabled, disabled, marked obsolete or useful, which would change the conss array given to the
4144 * external method; to avoid this, these changes will be buffered and processed after the method call
4158 /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4173 /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
4191 )
4201 )
4211 )
4233 SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
4234 int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
4236 SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
4250 /** sets both the propagation callback and the propagation frequency of the constraint handler */
4254 int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
4255 SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
4256 SCIP_PROPTIMING timingmask /**< positions in the node solving loop where propagators should be executed */
4283 SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
4331 SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
4342 SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */
4353 SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
4364 SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
4376 int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
4377 SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
4385 /* the interface change from delay flags to timings cannot be recognized at compile time: Exit with an appropriate
4390 SCIPmessagePrintError("ERROR: 'PRESOLDELAY'-flag no longer available since SCIP 3.2, use an appropriate "
4412 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */
4415 SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
4423 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */
4426 SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
4547 SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
4555 /** gets array with constraints of constraint handler; the first SCIPconshdlrGetNActiveConss() entries are the active
4556 * constraints, the last SCIPconshdlrGetNConss() - SCIPconshdlrGetNActiveConss() constraints are deactivated
4558 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4563 )
4573 )
4583 )
4593 )
4603 )
4613 )
4622 * @note A constraint is active if it is global and was not removed or it was added locally (in that case the local
4627 )
4637 )
4646 SCIP_CONSHDLR* conshdlr, /**< the constraint handler for which all clocks should be enabled or disabled */
4667 )
4677 )
4687 )
4697 )
4707 )
4717 )
4727 )
4734 /** gets time in seconds used for propagation in this constraint handler during strong branching */
4737 )
4747 )
4757 )
4767 )
4777 )
4787 )
4797 )
4807 )
4817 )
4827 )
4837 )
4847 )
4857 )
4867 )
4877 )
4887 )
4897 )
4907 )
4914 /** gets maximum number of active constraints of constraint handler existing at the same time */
4917 )
4927 )
4937 )
4947 )
4957 )
4967 )
4974 /** gets number of holes added to domains of variables in presolving method of constraint handler */
4977 )
4987 )
4997 )
5007 )
5017 )
5027 )
5034 /** gets number of times the presolving method of the constraint handler was called and tried to find reductions */
5037 )
5047 )
5057 )
5067 )
5077 )
5087 )
5094 /** gets frequency of constraint handler for eager evaluations in separation, propagation and enforcement */
5097 )
5107 )
5117 )
5127 )
5137 )
5147 )
5157 )
5167 )
5177 )
5187 )
5197 )
5219 )
5310 BMSfreeBlockMemoryArrayNull(blkmem, &(*conssetchg)->addedconss, (*conssetchg)->addedconsssize);
5311 BMSfreeBlockMemoryArrayNull(blkmem, &(*conssetchg)->disabledconss, (*conssetchg)->disabledconsssize);
5334 SCIP_ALLOC( BMSreallocBlockMemoryArray(blkmem, &conssetchg->addedconss, conssetchg->addedconsssize, newsize) );