type_cons.h
Go to the documentation of this file.
43/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
62typedef struct SCIP_Conshdlr SCIP_CONSHDLR; /**< constraint handler for a specific constraint type */
66typedef struct SCIP_ConsSetChg SCIP_CONSSETCHG; /**< tracks additions and removals of the set of active constraints */
67typedef struct SCIP_LinConsStats SCIP_LINCONSSTATS; /**< linear constraint classification statistics used for MIPLIB */
77 SCIP_LINCONSTYPE_PRECEDENCE = 4, /**< linear constraints of the type \f$ a x - a y \leq b\f$ where \f$x\f$ and \f$y\f$ must have the same type */
78 SCIP_LINCONSTYPE_VARBOUND = 5, /**< linear constraints of the form \f$ ax + by \leq c \, x \in \{0,1\} \f$ */
79 SCIP_LINCONSTYPE_SETPARTITION = 6, /**< linear constraints of the form \f$ \sum x_i = 1\, x_i \in \{0,1\} \forall i \f$ */
80 SCIP_LINCONSTYPE_SETPACKING = 7, /**< linear constraints of the form \f$ \sum x_i \leq 1\, x_i \in \{0,1\} \forall i \f$ */
81 SCIP_LINCONSTYPE_SETCOVERING = 8, /**< linear constraints of the form \f$ \sum x_i \geq 1\, x_i \in \{0,1\} \forall i \f$ */
82 SCIP_LINCONSTYPE_CARDINALITY = 9, /**< linear constraints of the form \f$ \sum x_i = k\, x_i \in \{0,1\} \forall i, \, k\geq 2 \f$ */
83 SCIP_LINCONSTYPE_INVKNAPSACK = 10, /**< linear constraints of the form \f$ \sum x_i \leq b\, x_i \in \{0,1\} \forall i, \, b\in \mathbb{n} \geq 2 \f$ */
84 SCIP_LINCONSTYPE_EQKNAPSACK = 11, /**< linear constraints of the form \f$ \sum a_i x_i = b\, x_i \in \{0,1\} \forall i, \, b\in \mathbb{n} \geq 2 \f$ */
85 SCIP_LINCONSTYPE_BINPACKING = 12, /**< linear constraints of the form \f$ \sum a_i x_i + a x \leq a\, x, x_i \in \{0,1\} \forall i, \, a\in \mathbb{n} \geq 2 \f$ */
86 SCIP_LINCONSTYPE_KNAPSACK = 13, /**< linear constraints of the form \f$ \sum a_k x_k \leq b\, x_i \in \{0,1\} \forall i, \, b\in \mathbb{n} \geq 2 \f$ */
87 SCIP_LINCONSTYPE_INTKNAPSACK = 14, /**< linear constraints of the form \f$ \sum a_k x_k \leq b\, x_i \in \mathbb{Z} \forall i, \, b\in \mathbb{n} \f$ */
88 SCIP_LINCONSTYPE_MIXEDBINARY = 15, /**< linear constraints of the form \f$ \sum a_k x_k + \sum p_j s_j \leq/= b\, x_i \in \{0,1\} \forall i, s_j \in \text{ cont. } \forall j\f$ */
90};
97 * If the copy process was one to one, the valid pointer can be set to TRUE. Otherwise, this pointer has to be set to
98 * FALSE. If all problem defining objects (constraint handlers and variable pricers) return valid = TRUE for all
99 * their copying calls, SCIP assumes that it is an overall one to one copy of the original instance. In this case any
100 * reductions made in the copied SCIP instance can be transfered to the original SCIP instance. If the valid pointer is
101 * set to TRUE and it was not a one to one copy, it might happen that optimal solutions are cut off.
108#define SCIP_DECL_CONSHDLRCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid)
110/** destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
126#define SCIP_DECL_CONSINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
136#define SCIP_DECL_CONSEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
138/** presolving initialization method of constraint handler (called when presolving is about to begin)
140 * This method is called when the presolving process is about to begin, even if presolving is turned off.
143 * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
146 * @note Note that the constraint array might contain constraints that were created but not added to the problem.
147 * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
156#define SCIP_DECL_CONSINITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
158/** presolving deinitialization method of constraint handler (called after presolving has been finished)
160 * This method is called after the presolving has been finished, even if presolving is turned off.
163 * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
166 * Besides necessary modifications and clean up, no time consuming operations should be performed, especially if the
167 * problem has already been solved. Use the method SCIPgetStatus(), which in this case returns SCIP_STATUS_OPTIMAL,
170 * @note Note that the constraint array might contain constraints that were created but not added to the problem.
171 * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
180#define SCIP_DECL_CONSEXITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
182/** solving process initialization method of constraint handler (called when branch and bound process is about to begin)
184 * This method is called when the presolving was finished and the branch and bound process is about to begin.
187 * Besides necessary modifications and clean up, no time consuming operations should be performed, especially if the
188 * problem has already been solved. Use the method SCIPgetStatus(), which in this case returns SCIP_STATUS_OPTIMAL,
191 * @note Note that the constraint array might contain constraints that were created but not added to the problem.
192 * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
201#define SCIP_DECL_CONSINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
203/** solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
206 * The constraint handler should use this call to clean up its branch and bound data, in particular to release
216#define SCIP_DECL_CONSEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart)
220 * @warning There may exist unprocessed events. For example, a variable's bound may have been already changed, but the
229#define SCIP_DECL_CONSDELETE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata)
239#define SCIP_DECL_CONSTRANS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons)
241/** LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
243 * Puts the LP relaxations of all "initial" constraints into the LP. The method should put a canonic LP relaxation
246 * @warning It is not guaranteed that the problem is going to be declared infeasible if the infeasible pointer is set
247 * to TRUE. Therefore, it is recommended that users do not end this method prematurely when an infeasiblity
259#define SCIP_DECL_CONSINITLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible)
263 * Separates all constraints of the constraint handler. The method is called in the LP solution loop,
266 * The first nusefulconss constraints are the ones, that are identified to likely be violated. The separation
267 * method should process only the useful constraints in most runs, and only occasionally the remaining
278 * possible return values for *result (if more than one applies, the first in the list should be used):
283 * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
284 * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
288#define SCIP_DECL_CONSSEPALP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, \
293 * Separates all constraints of the constraint handler. The method is called outside the LP solution loop (e.g., by
297 * The first nusefulconss constraints are the ones, that are identified to likely be violated. The separation
298 * method should process only the useful constraints in most runs, and only occasionally the remaining
310 * possible return values for *result (if more than one applies, the first in the list should be used):
315 * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
316 * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
320#define SCIP_DECL_CONSSEPASOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, \
325 * The method is called at the end of the node processing loop for a node where the LP was solved.
326 * The LP solution has to be checked for feasibility. If possible, an infeasibility should be resolved by
327 * branching, reducing a variable's domain to exclude the solution or separating the solution with a valid
330 * The enforcing methods of the active constraint handlers are called in decreasing order of their enforcing
331 * priorities until the first constraint handler returned with the value SCIP_CUTOFF, SCIP_SEPARATED,
333 * The integrality constraint handler has an enforcing priority of zero. A constraint handler which can
334 * (or wants) to enforce its constraints only for integral solutions should have a negative enforcing priority
336 * A constraint handler which wants to incorporate its own branching strategy even on non-integral
337 * solutions must have an enforcing priority greater than zero (e.g. the SOS-constraint incorporates
340 * The first nusefulconss constraints are the ones, that are identified to likely be violated. The enforcing
341 * method should process the useful constraints first. The other nconss - nusefulconss constraints should only
353 * possible return values for *result (if more than one applies, the first in the list should be used):
355 * - SCIP_CONSADDED : an additional constraint was generated (added constraints must have initial flag = TRUE)
358 * - SCIP_SOLVELP : the LP should be solved again because the LP primal feasibility tolerance has been tightened
359 * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
363#define SCIP_DECL_CONSENFOLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
378 * possible return values for *result (if more than one applies, the first in the list should be used):
380 * - SCIP_CONSADDED : an additional constraint was generated (added constraints must have initial flag = TRUE)
383 * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
384 * - SCIP_SOLVELP : at least one constraint is infeasible, and this can only be resolved by solving the LP
388#define SCIP_DECL_CONSENFORELAX(x) SCIP_RETCODE x (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
393 * The method is called at the end of the node processing loop for a node where the LP was not solved.
394 * The pseudo solution has to be checked for feasibility. If possible, an infeasibility should be resolved by
395 * branching, reducing a variable's domain to exclude the solution or adding an additional constraint.
396 * Separation is not possible, since the LP is not processed at the current node. All LP informations like
399 * Like in the enforcing method for LP solutions, the enforcing methods of the active constraint handlers are
400 * called in decreasing order of their enforcing priorities until the first constraint handler returned with
403 * The first nusefulconss constraints are the ones, that are identified to likely be violated. The enforcing
404 * method should process the useful constraints first. The other nconss - nusefulconss constraints should only
407 * If the pseudo solution's objective value is lower than the lower bound of the node, it cannot be feasible
408 * and the enforcing method may skip it's check and set *result to SCIP_DIDNOTRUN. However, it can also process
421 * possible return values for *result (if more than one applies, the first in the list should be used):
425 * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
426 * - SCIP_SOLVELP : at least one constraint is infeasible, and this can only be resolved by solving the LP
431#define SCIP_DECL_CONSENFOPS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
438 * The check methods of the active constraint handlers are called in decreasing order of their check
440 * The integrality constraint handler has a check priority of zero. A constraint handler which can
441 * (or wants) to check its constraints only for integral solutions should have a negative check priority
443 * A constraint handler which wants to check feasibility even on non-integral solutions must have a
444 * check priority greater than zero (e.g. if the check is much faster than testing all variables for
447 * In some cases, integrality conditions or rows of the current LP don't have to be checked, because their
451 * If the solution is not NULL, SCIP should also be informed about the constraint violation with a call to
452 * SCIPupdateSolConsViolation() and additionally SCIPupdateSolLPRowViolation() for every row of the constraint's current
455 * is represented completely by a set of LP rows, meaning that the current constraint violation is equal to the maximum
474#define SCIP_DECL_CONSCHECK(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, \
475 SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result)
479 * The first nusefulconss constraints are the ones, that are identified to likely be violated. The propagation
480 * method should process only the useful constraints in most runs, and only occasionally the remaining
483 * @note if the constraint handler uses dual information in propagation it is nesassary to check via calling
484 * SCIPallowWeakDualReds and SCIPallowStrongDualReds if dual reductions and propgation with the current cutoff bound, resp.,
503 * - SCIP_DELAYNODE : the current node should be postponed (return value only valid for BEFORELP propagation)
505#define SCIP_DECL_CONSPROP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
522 * - nnewchgvartypes : number of variable type changes since the last call to the presolving method
523 * - nnewchgbds : number of variable bounds tightened since the last call to the presolving method
529 * - nnewchgsides : number of changed left or right hand sides since the last call to the presolving method
531 * @note the counters state the changes since the last call including the changes of this presolving method during its
534 * @note if the constraint handler performs dual presolving it is nesassary to check via calling SCIPallowWeakDualReds
547 * - nchgsides : pointer to count total number of changed left/right hand sides of all presolvers
553 * - SCIP_UNBOUNDED : at least one variable is not bounded by any constraint in obj. direction -> problem is unbounded
554 * - SCIP_CUTOFF : at least one constraint is infeasible in the variable's bounds -> problem is infeasible
560#define SCIP_DECL_CONSPRESOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nrounds, \
561 SCIP_PRESOLTIMING presoltiming, int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, \
564 int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result)
568 * This method is called during conflict analysis. If the constraint handler wants to support conflict analysis,
569 * it should call SCIPinferVarLbCons() or SCIPinferVarUbCons() in domain propagation instead of SCIPchgVarLb() or
571 * In the SCIPinferVarLbCons() and SCIPinferVarUbCons() calls, the handler provides the constraint, that deduced the
573 * The propagation conflict resolving method can then be implemented, to provide a "reason" for the bound
574 * changes, i.e., the bounds of variables at the time of the propagation, that forced the constraint to set the
575 * conflict variable's bound to its current value. It can use the "inferinfo" tag to identify its own propagation
576 * rule and thus identify the "reason" bounds. The bounds that form the reason of the assignment must then be provided
577 * by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
578 * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and/or SCIPaddConflictBinvar() in the propagation conflict
581 * For example, the logicor constraint c = "x or y or z" fixes variable z to TRUE (i.e. changes the lower bound of z
582 * to 1.0), if both, x and y, are assigned to FALSE (i.e. if the upper bounds of these variables are 0.0). It uses
583 * SCIPinferVarLbCons(scip, z, 1.0, c, 0) to apply this assignment (an inference information tag is not needed by the
585 * In the conflict analysis, the constraint handler may be asked to resolve the lower bound change on z with
587 * With a call to SCIPgetVarLbAtIndex(scip, z, bdchgidx, TRUE), the handler can find out, that the lower bound of
588 * variable z was set to 1.0 at the given point of time, and should call SCIPaddConflictUb(scip, x, bdchgidx) and
589 * SCIPaddConflictUb(scip, y, bdchgidx) to tell SCIP, that the upper bounds of x and y at this point of time were
597 * - inferinfo : the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call
599 * - bdchgidx : the index of the bound change, representing the point of time where the change took place
606 * - SCIP_SUCCESS : the conflicting bound change has been successfully resolved by adding all reason bounds
607 * - SCIP_DIDNOTFIND : the conflicting bound change could not be resolved and has to be put into the conflict set
611#define SCIP_DECL_CONSRESPROP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
612 SCIP_VAR* infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, \
618 * It should update the rounding locks of the given type of all associated variables with calls to
622 * potentially rendering the (positive) constraint infeasible and rounding up is potentially rendering the
626 * potentially rendering the constraint's negation infeasible and rounding up is potentially rendering the
628 * - If the constraint may get violated by changing the variable in any direction, it should call
631 * Consider the linear constraint "3x -5y +2z <= 7" as an example. The variable rounding lock method of the
632 * linear constraint handler should call SCIPaddVarLocksType(scip, x, locktype, nlocksneg, nlockspos),
634 * SCIPaddVarLocksType(scip, z, type, nlocksneg, nlockspos) to tell SCIP, that rounding up of x and z and rounding
635 * down of y can destroy the feasibility of the constraint, while rounding down of x and z and rounding up of y can
638 * SCIPaddVarLocksType(scip, ..., nlockspos + nlocksneg, nlockspos + nlocksneg) on all variables, since rounding in both
639 * directions of each variable can destroy both the feasibility of the constraint and it's negation
642 * If the constraint itself contains other constraints as sub constraints (e.g. the "or" constraint concatenation
643 * "c(x) or d(x)"), the rounding lock methods of these constraints should be called in a proper way.
645 * SCIPaddConsLocksType(scip, c, locktype, nlockspos, nlocksneg), saying that infeasibility of c may lead to
646 * infeasibility of the (positive) constraint, and infeasibility of c's negation (i.e. feasibility of c) may lead
648 * - If the constraint may get violated by the feasibility of the sub constraint c, it should call
649 * SCIPaddConsLocksType(scip, c, locktype, nlocksneg, nlockspos), saying that infeasibility of c may lead to
650 * infeasibility of the constraint's negation (i.e. feasibility of the constraint), and infeasibility of c's negation
652 * - If the constraint may get violated by any change in the feasibility of the sub constraint c, it should call
655 * Consider the or concatenation "c(x) or d(x)". The variable rounding lock method of the or constraint handler
657 * SCIPaddConsLocksType(scip, d, locktype, nlockspos, nlocksneg) to tell SCIP, that infeasibility of c and d can lead
660 * As a second example, consider the equivalence constraint "y <-> c(x)" with variable y and constraint c. The
661 * constraint demands, that y == 1 if and only if c(x) is satisfied. The variable lock method of the corresponding
662 * constraint handler should call SCIPaddVarLocksType(scip, y, locktype, nlockspos + nlocksneg, nlockspos + nlocksneg) and
663 * SCIPaddConsLocksType(scip, c, locktype, nlockspos + nlocksneg, nlockspos + nlocksneg), because any modification to the
664 * value of y or to the feasibility of c can alter the feasibility of the equivalence constraint.
669 * - cons : the constraint that should lock rounding of its variables, or NULL if the constraint handler
672 * - nlockspos : number of times, the roundings should be locked for the constraint (may be negative)
673 * - nlocksneg : number of times, the roundings should be locked for the constraint's negation (may be negative)
675#define SCIP_DECL_CONSLOCK(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
679 * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
682 * This method is always called after a constraint of the constraint handler was activated. The constraint
690#define SCIP_DECL_CONSACTIVE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
694 * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
697 * This method is always called before a constraint of the constraint handler is deactivated. The constraint
705#define SCIP_DECL_CONSDEACTIVE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
709 * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
712 * This method is always called after a constraint of the constraint handler was enabled. The constraint
720#define SCIP_DECL_CONSENABLE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
724 * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
727 * This method is always called before a constraint of the constraint handler is disabled. The constraint
735#define SCIP_DECL_CONSDISABLE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
739 * This method is optinal and only of interest if you are using SCIP as a branch-and-price framework. That means, you
740 * are generating new variables during the search. If you are not doing that just define the function pointer to be
743 * If this method gets implemented you should iterate over all constraints of the constraint handler and delete all
752#define SCIP_DECL_CONSDELVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
756 * The constraint handler can store a representation of the constraint into the given text file. Use the method
759 * @note There are several methods which help to display variables. These are SCIPwriteVarName(), SCIPwriteVarsList(),
768#define SCIP_DECL_CONSPRINT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file)
772 * The constraint handler can provide a copy method which copies a constraint from one SCIP data structure into an other
773 * SCIP data structure. If a copy of a constraint is created, the constraint has to be captured. (The capture is usually
776 * If the copy process was one to one, the valid pointer can be set to TRUE. Otherwise, you have to set this pointer to
777 * FALSE. In case all problem defining objects (constraint handlers and variable pricers) return a TRUE valid for all
778 * their copying calls, SCIP assumes that it is a overall one to one copy of the original instance. In this case any
779 * reductions made in the copied SCIP instance can be transfered to the original SCIP instance. If the valid pointer is
780 * set to TRUE and it was not a one to one copy, it might happen that optimal solutions are cut off.
791 * - varmap : a SCIP_HASHMAP mapping variables of the source SCIP to corresponding variables of the target SCIP
792 * - consmap : a SCIP_HASHMAP mapping constraints of the source SCIP to corresponding constraints of the target SCIP
810 SCIP* sourcescip, SCIP_CONSHDLR* sourceconshdlr, SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, \
811 SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, \
812 SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, \
817 * The constraint handler can provide a callback to parse the output created by the display method
820 * @note For parsing there are several methods which are handy. Have a look at: SCIPparseVarName(),
821 * SCIPparseVarsList(), SCIPparseVarsLinearsum(), SCIPparseVarsPolynomial(), SCIPstrToRealValue(), and
844#define SCIP_DECL_CONSPARSE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, \
846 SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, \
847 SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool* success)
851 * The constraint handler can (this callback is optional) provide this callback to return the variables which are
852 * involved in that particular constraint. If this is possible, the variables should be copyied into the variables
853 * array and the success pointers has to be set to TRUE. Otherwise the success has to be set FALSE or the callback
860 * - varssize : available slots in vars array which is needed to check if the array is large enough
866#define SCIP_DECL_CONSGETVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
871 * The constraint handler can (this callback is optional) provide this callback to return the number variable which are
872 * involved in that particular constraint. If this is not possible, the success pointers has to be set to FALSE or the
882 * - success : pointer to store whether the constraint successfully returned the number of variables
884#define SCIP_DECL_CONSGETNVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
889 * This callback is used inside the various diving heuristics of SCIP and does not affect the normal branching of the
890 * actual search. The constraint handler can provide this callback to render the current solution (even more)
891 * infeasible by suggesting one or several variable bound changes. In fact, since diving heuristics do not necessarily
892 * solve LP relaxations at every probing depth, some of the variable local bounds might already be conflicting with the
893 * solution values. The solution is rendered infeasible by determining bound changes that should be applied to the
894 * next explored search node via SCIPaddDiveBoundChange(). An alternative in case that the preferred bound change(s)
897 * The constraint handler must take care to only add bound changes that further shrink the variable domain.
899 * The success pointer must be used to indicate whether the constraint handler succeeded in selecting diving bound
900 * changes. The infeasible pointer should be set to TRUE if the constraint handler found a local infeasibility. If the
901 * constraint handler needs to select between several candidates, it may use the scoring mechanism of the diveset
906 * @note: @p sol is usually the LP relaxation solution unless the caller of the method, usually a diving heuristic,
916 * - success : pointer to store whether the constraint handler succeeded to determine dive bound changes
917 * - infeasible : pointer to store whether the constraint handler detected an infeasibility in the local node
919#define SCIP_DECL_CONSGETDIVEBDCHGS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, \
922/** constraint handler method which returns the permutation symmetry detection graph of a constraint (if possible)
924 * The constraint handler can (this callback is optional) provide this callback to return a graph that encodes the
925 * permutation symmetries of a constraint. If this is not possible, the success pointer has to be set to FALSE or the
935 * - success : pointer to store whether the constraint successfully returned the symmetry detection graph
937#define SCIP_DECL_CONSGETPERMSYMGRAPH(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
940/** constraint handler method providing the signed permutation symmetry detection graph of a constraint (if possible)
942 * The constraint handler can (this callback is optional) provide this callback to return a graph that encodes the
943 * signed permutation symmetries of a constraint. If this is not possible, the success pointer has to be set to FALSE
953 * - success : pointer to store whether the constraint successfully returned the symmetry detection graph
955#define SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
common defines and data types used in all packages of SCIP
Definition: struct_cons.h:116
Definition: struct_cons.h:47
Definition: struct_cons.h:127
Definition: struct_cons.h:292
Definition: struct_symmetry.h:46
type definitions for primal heuristics
type definitions for LP management
result codes for SCIP callback methods
type definitions for return codes for SCIP methods
type definitions for SCIP's main datastructure
type definitions for storing primal CIP solutions
timing definitions for SCIP
type definitions for problem variables