Scippy

SCIP

Solving Constraint Integer Programs

cons.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file cons.h
17  * @brief internal methods for constraints and constraint handlers
18  * @author Tobias Achterberg
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_CONS_H__
24 #define __SCIP_CONS_H__
25 
26 
27 #include "scip/def.h"
28 #include "blockmemshell/memory.h"
29 #include "scip/type_retcode.h"
30 #include "scip/type_result.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_mem.h"
34 #include "scip/type_misc.h"
35 #include "scip/type_timing.h"
36 #include "scip/type_lp.h"
37 #include "scip/type_var.h"
38 #include "scip/type_prob.h"
39 #include "scip/type_sol.h"
40 #include "scip/type_tree.h"
41 #include "scip/type_sepastore.h"
42 #include "scip/type_cons.h"
43 #include "scip/pub_cons.h"
44 
45 #ifndef NDEBUG
46 #include "scip/struct_cons.h"
47 #endif
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 /*
54  * Constraint handler methods
55  */
56 
57 /** copies the given constraint handler to a new scip */
58 extern
60  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
61  SCIP_SET* set, /**< SCIP_SET of SCIP to copy to */
62  SCIP_Bool* valid /**< was the copying process valid? */
63  );
64 
65 /** creates a constraint handler */
66 extern
68  SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */
69  SCIP_SET* set, /**< global SCIP settings */
70  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
71  BMS_BLKMEM* blkmem, /**< block memory for parameter settings */
72  const char* name, /**< name of constraint handler */
73  const char* desc, /**< description of constraint handler */
74  int sepapriority, /**< priority of the constraint handler for separation */
75  int enfopriority, /**< priority of the constraint handler for constraint enforcing */
76  int checkpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
77  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
78  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
79  int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
80  * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
81  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
82  SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
83  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
84  SCIP_Bool delaypresol, /**< should presolving method be delayed, if other presolvers found reductions? */
85  SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
86  SCIP_PROPTIMING timingmask, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
87  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
88  SCIP_DECL_CONSFREE ((*consfree)), /**< destructor of constraint handler */
89  SCIP_DECL_CONSINIT ((*consinit)), /**< initialize constraint handler */
90  SCIP_DECL_CONSEXIT ((*consexit)), /**< deinitialize constraint handler */
91  SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
92  SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
93  SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
94  SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
95  SCIP_DECL_CONSDELETE ((*consdelete)), /**< free specific constraint data */
96  SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
97  SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
98  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
99  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
100  SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */
101  SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */
102  SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */
103  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
104  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method */
105  SCIP_DECL_CONSRESPROP ((*consresprop)), /**< propagation conflict resolving method */
106  SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */
107  SCIP_DECL_CONSACTIVE ((*consactive)), /**< activation notification method */
108  SCIP_DECL_CONSDEACTIVE((*consdeactive)), /**< deactivation notification method */
109  SCIP_DECL_CONSENABLE ((*consenable)), /**< enabling notification method */
110  SCIP_DECL_CONSDISABLE ((*consdisable)), /**< disabling notification method */
111  SCIP_DECL_CONSDELVARS ((*consdelvars)), /**< variable deletion method */
112  SCIP_DECL_CONSPRINT ((*consprint)), /**< constraint display method */
113  SCIP_DECL_CONSCOPY ((*conscopy)), /**< constraint copying method */
114  SCIP_DECL_CONSPARSE ((*consparse)), /**< constraint parsing method */
115  SCIP_DECL_CONSGETVARS ((*consgetvars)), /**< constraint get variables method */
116  SCIP_DECL_CONSGETNVARS((*consgetnvars)), /**< constraint get number of variable method */
117  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
118  );
119 
120 /** calls destructor and frees memory of constraint handler */
121 extern
123  SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */
124  SCIP_SET* set /**< global SCIP settings */
125  );
126 
127 /** calls init method of constraint handler */
128 extern
130  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
131  BMS_BLKMEM* blkmem, /**< block memory */
132  SCIP_SET* set, /**< global SCIP settings */
133  SCIP_STAT* stat /**< dynamic problem statistics */
134  );
135 
136 /** calls exit method of constraint handler */
137 extern
139  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
140  BMS_BLKMEM* blkmem, /**< block memory */
141  SCIP_SET* set, /**< global SCIP settings */
142  SCIP_STAT* stat /**< dynamic problem statistics */
143  );
144 
145 /** informs constraint handler that the presolving process is being started */
146 extern
148  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
149  BMS_BLKMEM* blkmem, /**< block memory */
150  SCIP_SET* set, /**< global SCIP settings */
151  SCIP_STAT* stat /**< dynamic problem statistics */
152  );
153 
154 /** informs constraint handler that the presolving is finished */
155 extern
157  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
158  BMS_BLKMEM* blkmem, /**< block memory */
159  SCIP_SET* set, /**< global SCIP settings */
160  SCIP_STAT* stat /**< dynamic problem statistics */
161  );
162 
163 /** informs constraint handler that the branch and bound process is being started */
164 extern
166  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
167  BMS_BLKMEM* blkmem, /**< block memory */
168  SCIP_SET* set, /**< global SCIP settings */
169  SCIP_STAT* stat /**< dynamic problem statistics */
170  );
171 
172 /** informs constraint handler that the branch and bound process data is being freed */
173 extern
175  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
176  BMS_BLKMEM* blkmem, /**< block memory */
177  SCIP_SET* set, /**< global SCIP settings */
178  SCIP_STAT* stat, /**< dynamic problem statistics */
179  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
180  );
181 
182 /** calls LP initialization method of constraint handler to separate all initial active constraints */
183 extern
185  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
186  BMS_BLKMEM* blkmem, /**< block memory */
187  SCIP_SET* set, /**< global SCIP settings */
188  SCIP_STAT* stat, /**< dynamic problem statistics */
189  SCIP_TREE* tree, /**< branch and bound tree */
190  SCIP_Bool initkeptconss /**< Also initialize constraints which are valid at a more global node,
191  * but were not activated there? Should be FALSE for repeated calls at
192  * one node or if the current focusnode is a child of the former one */
193  );
194 
195 /** calls separator method of constraint handler to separate LP solution */
196 extern
198  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
199  BMS_BLKMEM* blkmem, /**< block memory */
200  SCIP_SET* set, /**< global SCIP settings */
201  SCIP_STAT* stat, /**< dynamic problem statistics */
202  SCIP_SEPASTORE* sepastore, /**< separation storage */
203  int depth, /**< depth of current node */
204  SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */
205  SCIP_RESULT* result /**< pointer to store the result of the callback method */
206  );
207 
208 /** calls separator method of constraint handler to separate given primal solution */
209 extern
211  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
212  BMS_BLKMEM* blkmem, /**< block memory */
213  SCIP_SET* set, /**< global SCIP settings */
214  SCIP_STAT* stat, /**< dynamic problem statistics */
215  SCIP_SEPASTORE* sepastore, /**< separation storage */
216  SCIP_SOL* sol, /**< primal solution that should be separated */
217  int depth, /**< depth of current node */
218  SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */
219  SCIP_RESULT* result /**< pointer to store the result of the callback method */
220  );
221 
222 /** calls enforcing method of constraint handler for LP solution for all constraints added after last
223  * conshdlrReset() call
224  */
225 extern
227  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
228  BMS_BLKMEM* blkmem, /**< block memory */
229  SCIP_SET* set, /**< global SCIP settings */
230  SCIP_STAT* stat, /**< dynamic problem statistics */
231  SCIP_TREE* tree, /**< branch and bound tree */
232  SCIP_SEPASTORE* sepastore, /**< separation storage */
233  SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */
234  SCIP_RESULT* result /**< pointer to store the result of the callback method */
235  );
236 
237 /** calls enforcing method of constraint handler for pseudo solution for all constraints added after last
238  * conshdlrReset() call
239  */
240 extern
242  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
243  BMS_BLKMEM* blkmem, /**< block memory */
244  SCIP_SET* set, /**< global SCIP settings */
245  SCIP_STAT* stat, /**< dynamic problem statistics */
246  SCIP_TREE* tree, /**< branch and bound tree */
247  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
248  SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */
249  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
250  SCIP_Bool forced, /**< should enforcement of pseudo solution be forced? */
251  SCIP_RESULT* result /**< pointer to store the result of the callback method */
252  );
253 
254 /** calls feasibility check method of constraint handler */
255 extern
257  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
258  BMS_BLKMEM* blkmem, /**< block memory */
259  SCIP_SET* set, /**< global SCIP settings */
260  SCIP_STAT* stat, /**< dynamic problem statistics */
261  SCIP_SOL* sol, /**< primal CIP solution */
262  SCIP_Bool checkintegrality, /**< has integrality to be checked? */
263  SCIP_Bool checklprows, /**< have current LP rows to be checked? */
264  SCIP_Bool printreason, /**< should the reason for the violation be printed? */
265  SCIP_RESULT* result /**< pointer to store the result of the callback method */
266  );
267 
268 /** calls propagation method of constraint handler */
269 extern
271  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
272  BMS_BLKMEM* blkmem, /**< block memory */
273  SCIP_SET* set, /**< global SCIP settings */
274  SCIP_STAT* stat, /**< dynamic problem statistics */
275  int depth, /**< depth of current node; -1 if preprocessing domain propagation */
276  SCIP_Bool fullpropagation, /**< should all constraints be propagated (or only new ones)? */
277  SCIP_Bool execdelayed, /**< execute propagation method even if it is marked to be delayed */
278  SCIP_Bool instrongbranching, /**< are we currently doing strong branching? */
279  SCIP_PROPTIMING proptiming, /**< current point in the node solving process */
280  SCIP_RESULT* result /**< pointer to store the result of the callback method */
281  );
282 
283 /** calls presolving method of constraint handler */
284 extern
286  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
287  BMS_BLKMEM* blkmem, /**< block memory */
288  SCIP_SET* set, /**< global SCIP settings */
289  SCIP_STAT* stat, /**< dynamic problem statistics */
290  SCIP_Bool execdelayed, /**< execute presolving method even if it is marked to be delayed */
291  int nrounds, /**< number of presolving rounds already done */
292  int* nfixedvars, /**< pointer to total number of variables fixed of all presolvers */
293  int* naggrvars, /**< pointer to total number of variables aggregated of all presolvers */
294  int* nchgvartypes, /**< pointer to total number of variable type changes of all presolvers */
295  int* nchgbds, /**< pointer to total number of variable bounds tightened of all presolvers */
296  int* naddholes, /**< pointer to total number of domain holes added of all presolvers */
297  int* ndelconss, /**< pointer to total number of deleted constraints of all presolvers */
298  int* naddconss, /**< pointer to total number of added constraints of all presolvers */
299  int* nupgdconss, /**< pointer to total number of upgraded constraints of all presolvers */
300  int* nchgcoefs, /**< pointer to total number of changed coefficients of all presolvers */
301  int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
302  SCIP_RESULT* result /**< pointer to store the result of the callback method */
303  );
304 
305 
306 /** calls variable deletion method of constraint handler */
307 extern
309  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
310  BMS_BLKMEM* blkmem, /**< block memory */
311  SCIP_SET* set, /**< global SCIP settings */
312  SCIP_STAT* stat /**< dynamic problem statistics */
313  );
314 
315 
316 /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
318  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
319  SCIP_SET* set /**< global SCIP settings */
320  );
321 
322 /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
323 extern
325  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
326  SCIP_SET* set /**< global SCIP settings */
327  );
328 
329 /**
330  * callback setter methods of constraint handlers
331  */
332 
333 /** sets copy method of both the constraint handler and each associated constraint */
334 extern
336  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
337  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
338  SCIP_DECL_CONSCOPY ((*conscopy)) /**< constraint copying method */
339  );
340 
341 /** sets destructor method of constraint handler */
342 extern
344  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
345  SCIP_DECL_CONSFREE ((*consfree)) /**< destructor of constraint handler */
346  );
347 
348 /** sets initialization method of constraint handler */
349 extern
351  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
352  SCIP_DECL_CONSINIT ((*consinit)) /**< initialize constraint handler */
353  );
354 
355 /** sets deinitialization method of constraint handler */
356 extern
358  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
359  SCIP_DECL_CONSEXIT ((*consexit)) /**< deinitialize constraint handler */
360  );
361 
362 /** sets solving process initialization method of constraint handler */
363 extern
365  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
366  SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
367  );
368 
369 /** sets solving process deinitialization method of constraint handler */
370 extern
372  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
373  SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */
374  );
375 
376 /** sets preprocessing initialization method of constraint handler */
377 extern
379  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
380  SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
381  );
382 
383 /** sets preprocessing deinitialization method of constraint handler */
384 extern
386  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
387  SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
388  );
389 
390 /** sets presolving method of constraint handler */
391 extern
393  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
394  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method of constraint handler */
395  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
396  SCIP_Bool delaypresol /**< should presolving method be delayed, if other presolvers found reductions? */
397  );
398 
399 /** sets method of constraint handler to free specific constraint data */
400 extern
402  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
403  SCIP_DECL_CONSDELETE ((*consdelete)) /**< free specific constraint data */
404  );
405 
406 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */
407 extern
409  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
410  SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
411  );
412 
413 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */
414 extern
416  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
417  SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
418  );
419 
420 /** sets propagation conflict resolving method of constraint handler */
421 extern
423  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
424  SCIP_DECL_CONSRESPROP ((*consresprop)) /**< propagation conflict resolving method */
425  );
426 
427 /** sets activation notification method of constraint handler */
428 extern
430  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
431  SCIP_DECL_CONSACTIVE ((*consactive)) /**< activation notification method */
432  );
433 
434 /** sets deactivation notification method of constraint handler */
435 extern
437  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
438  SCIP_DECL_CONSDEACTIVE((*consdeactive)) /**< deactivation notification method */
439  );
440 
441 /** sets enabling notification method of constraint handler */
442 extern
444  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
445  SCIP_DECL_CONSENABLE ((*consenable)) /**< enabling notification method */
446  );
447 
448 /** sets disabling notification method of constraint handler */
449 extern
451  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
452  SCIP_DECL_CONSDISABLE ((*consdisable)) /**< disabling notification method */
453  );
454 
455 /** sets variable deletion method of constraint handler */
456 extern
458  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
459  SCIP_DECL_CONSDELVARS ((*consdelvars)) /**< variable deletion method */
460  );
461 
462 /** sets constraint display method of constraint handler */
463 extern
465  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
466  SCIP_DECL_CONSPRINT ((*consprint)) /**< constraint display method */
467  );
468 
469 /** sets constraint parsing method of constraint handler */
470 extern
472  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
473  SCIP_DECL_CONSPARSE ((*consparse)) /**< constraint parsing method */
474  );
475 
476 /** sets constraint variable getter method of constraint handler */
477 extern
479  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
480  SCIP_DECL_CONSGETVARS ((*consgetvars)) /**< constraint variable getter method */
481  );
482 
483 /** sets constraint variable number getter method of constraint handler */
484 extern
486  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
487  SCIP_DECL_CONSGETNVARS((*consgetnvars)) /**< constraint variable number getter method */
488  );
489 
490 /*
491  * Constraint set change methods
492  */
493 
494 /** frees constraint set change data and releases all included constraints */
495 extern
497  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change */
498  BMS_BLKMEM* blkmem, /**< block memory */
499  SCIP_SET* set /**< global SCIP settings */
500  );
501 
502 /** adds constraint addition to constraint set changes, and captures constraint; activates constraint if the
503  * constraint set change data is currently active
504  */
505 extern
507  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */
508  BMS_BLKMEM* blkmem, /**< block memory */
509  SCIP_SET* set, /**< global SCIP settings */
510  SCIP_STAT* stat, /**< dynamic problem statistics */
511  SCIP_CONS* cons, /**< added constraint */
512  int depth, /**< depth of constraint set change's node */
513  SCIP_Bool focusnode, /**< does the constraint set change belong to the focus node? */
514  SCIP_Bool active /**< is the constraint set change currently active? */
515  );
516 
517 /** adds constraint disabling to constraint set changes, and captures constraint */
518 extern
520  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */
521  BMS_BLKMEM* blkmem, /**< block memory */
522  SCIP_SET* set, /**< global SCIP settings */
523  SCIP_CONS* cons /**< disabled constraint */
524  );
525 
526 /** applies constraint set change */
527 extern
529  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to apply */
530  BMS_BLKMEM* blkmem, /**< block memory */
531  SCIP_SET* set, /**< global SCIP settings */
532  SCIP_STAT* stat, /**< dynamic problem statistics */
533  int depth, /**< depth of constraint set change's node */
534  SCIP_Bool focusnode /**< does the constraint set change belong to the focus node? */
535  );
536 
537 /** undoes constraint set change */
538 extern
540  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to undo */
541  BMS_BLKMEM* blkmem, /**< block memory */
542  SCIP_SET* set, /**< global SCIP settings */
543  SCIP_STAT* stat /**< dynamic problem statistics */
544  );
545 
546 /** applies constraint set change to the global problem and deletes the constraint set change data */
547 extern
549  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data */
550  BMS_BLKMEM* blkmem, /**< block memory */
551  SCIP_SET* set, /**< global SCIP settings */
552  SCIP_STAT* stat, /**< dynamic problem statistics */
553  SCIP_PROB* prob /**< problem data */
554  );
555 
556 /** increase count of applied cuts */
557 extern
559  SCIP_CONSHDLR* conshdlr /**< constraint handler */
560  );
561 
562 /** increase count of found cuts */
563 extern
565  SCIP_CONSHDLR* conshdlr /**< constraint handler */
566  );
567 
568 
569 
570 /*
571  * Constraint methods
572  */
573 
574 /** creates and captures a constraint, and inserts it into the conss array of its constraint handler
575  *
576  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution
577  * may be declared feasible even if it violates this particular constraint.
578  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
579  * local constraint is redundant due to the variable's local bounds.
580  */
581 extern
583  SCIP_CONS** cons, /**< pointer to constraint */
584  BMS_BLKMEM* blkmem, /**< block memory */
585  SCIP_SET* set, /**< global SCIP settings */
586  const char* name, /**< name of constraint */
587  SCIP_CONSHDLR* conshdlr, /**< constraint handler for this constraint */
588  SCIP_CONSDATA* consdata, /**< data for this specific constraint */
589  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
590  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
591  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
592  * Usually set to TRUE. */
593  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
594  * TRUE for model constraints, FALSE for additional, redundant constraints. */
595  SCIP_Bool check, /**< should the constraint be checked for feasibility?
596  * TRUE for model constraints, FALSE for additional, redundant constraints. */
597  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
598  * Usually set to TRUE. */
599  SCIP_Bool local, /**< is constraint only valid locally?
600  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
601  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
602  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
603  * adds coefficients to this constraint. */
604  SCIP_Bool dynamic, /**< is constraint subject to aging?
605  * Usually set to FALSE. Set to TRUE for own cuts which
606  * are separated as constraints. */
607  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
608  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
609  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
610  * if it may be moved to a more global node?
611  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
612  SCIP_Bool original, /**< is constraint belonging to the original problem? */
613  SCIP_Bool deleteconsdata /**< has the constraint data to be deleted if constraint is freed? */
614  );
615 
616 /** copies source constraint of source SCIP into the target constraint for the target SCIP, using the variable map for
617  * mapping the variables of the source SCIP to the variables of the target SCIP; if the copying process was successful
618  * a constraint is creates and captures;
619  *
620  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution
621  * may be declared feasible even if it violates this particular constraint.
622  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
623  * local constraint is redundant due to the variable's local bounds.
624  */
625 extern
627  SCIP_CONS** cons, /**< pointer to store the created target constraint */
628  SCIP_SET* set, /**< global SCIP settings of the target SCIP */
629  const char* name, /**< name of constraint, or NULL if the name of the source constraint should be used */
630  SCIP* sourcescip, /**< source SCIP data structure */
631  SCIP_CONSHDLR* sourceconshdlr, /**< source constraint handler for this constraint */
632  SCIP_CONS* sourcecons, /**< source constraint of the source SCIP */
633  SCIP_HASHMAP* varmap, /**< a SCIP_HASHMAP mapping variables of the source SCIP to corresponding
634  * variables of the target SCIP */
635  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
636  * target constraints, must not be NULL! */
637  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? */
638  SCIP_Bool separate, /**< should the constraint be separated during LP processing? */
639  SCIP_Bool enforce, /**< should the constraint be enforced during node processing? */
640  SCIP_Bool check, /**< should the constraint be checked for feasibility? */
641  SCIP_Bool propagate, /**< should the constraint be propagated during node processing? */
642  SCIP_Bool local, /**< is constraint only valid locally? */
643  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? */
644  SCIP_Bool dynamic, /**< is constraint subject to aging? */
645  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */
646  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
647  * if it may be moved to a more global node? */
648  SCIP_Bool global, /**< create a global or a local copy? */
649  SCIP_Bool* success /**< pointer to store whether the copying was successful or not */
650  );
651 
652 /** parses constraint information (in cip format) out of a string; if the parsing process was successful a constraint is
653  * created, captured, and inserted into the conss array of its constraint handler.
654  *
655  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, an LP or pseudo solution
656  * may be declared feasible even if it violates this particular constraint.
657  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
658  * local constraint is redundant due to the variable's local bounds.
659  */
660 extern
662  SCIP_CONS** cons, /**< pointer to constraint */
663  SCIP_SET* set, /**< global SCIP settings */
664  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler of target SCIP */
665  const char* str, /**< name of constraint */
666  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
667  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
668  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
669  * Usually set to TRUE. */
670  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
671  * TRUE for model constraints, FALSE for additional, redundant constraints. */
672  SCIP_Bool check, /**< should the constraint be checked for feasibility?
673  * TRUE for model constraints, FALSE for additional, redundant constraints. */
674  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
675  * Usually set to TRUE. */
676  SCIP_Bool local, /**< is constraint only valid locally?
677  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
678  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
679  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
680  * adds coefficients to this constraint. */
681  SCIP_Bool dynamic, /**< is constraint subject to aging?
682  * Usually set to FALSE. Set to TRUE for own cuts which
683  * are separated as constraints. */
684  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
685  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
686  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
687  * if it may be moved to a more global node?
688  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
689  SCIP_Bool* success /**< pointer store if the paring process was successful */
690  );
691 
692 /** change name of given constraint */
693 extern
695  SCIP_CONS* cons, /**< problem constraint */
696  BMS_BLKMEM* blkmem, /**< block memory buffer */
697  const char* name /**< new name of constraint */
698  );
699 
700 /** frees a constraint and removes it from the conss array of its constraint handler */
701 extern
703  SCIP_CONS** cons, /**< constraint to free */
704  BMS_BLKMEM* blkmem, /**< block memory buffer */
705  SCIP_SET* set /**< global SCIP settings */
706  );
707 
708 /** increases usage counter of constraint */
709 extern
710 void SCIPconsCapture(
711  SCIP_CONS* cons /**< constraint */
712  );
713 
714 /** decreases usage counter of constraint, and frees memory if necessary */
715 extern
717  SCIP_CONS** cons, /**< pointer to constraint */
718  BMS_BLKMEM* blkmem, /**< block memory */
719  SCIP_SET* set /**< global SCIP settings */
720  );
721 
722 
723 /** outputs constraint information to file stream */
724 extern
726  SCIP_CONS* cons, /**< constraint to print */
727  SCIP_SET* set, /**< global SCIP settings */
728  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
729  FILE* file /**< output file (or NULL for standard output) */
730  );
731 
732 /** checks single constraint for feasibility of the given solution */
733 extern
735  SCIP_CONS* cons, /**< constraint to check */
736  SCIP_SET* set, /**< global SCIP settings */
737  SCIP_SOL* sol, /**< primal CIP solution */
738  SCIP_Bool checkintegrality, /**< has integrality to be checked? */
739  SCIP_Bool checklprows, /**< have current LP rows to be checked? */
740  SCIP_Bool printreason, /**< should the reason for the violation be printed? */
741  SCIP_RESULT* result /**< pointer to store the result of the callback method */
742  );
743 
744 /** enforces single constraint for a given pseudo solution */
745 extern
747  SCIP_CONS* cons, /**< constraint to enforce */
748  SCIP_SET* set, /**< global SCIP settings */
749  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
750  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
751  SCIP_RESULT* result /**< pointer to store the result of the callback method */
752  );
753 
754 /** enforces single constraint for a given LP solution */
755 extern
757  SCIP_CONS* cons, /**< constraint to enforce */
758  SCIP_SET* set, /**< global SCIP settings */
759  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
760  SCIP_RESULT* result /**< pointer to store the result of the callback method */
761  );
762 
763 /** calls LP initialization method for single constraint */
764 extern
766  SCIP_CONS* cons, /**< constraint to initialize */
767  SCIP_SET* set /**< global SCIP settings */
768  );
769 
770 /** calls separation method of single constraint for LP solution */
771 extern
773  SCIP_CONS* cons, /**< constraint to separate */
774  SCIP_SET* set, /**< global SCIP settings */
775  SCIP_RESULT* result /**< pointer to store the result of the separation call */
776  );
777 
778 /** calls separation method of single constraint for given primal solution */
779 extern
781  SCIP_CONS* cons, /**< constraint to separate */
782  SCIP_SET* set, /**< global SCIP settings */
783  SCIP_SOL* sol, /**< primal solution that should be separated */
784  SCIP_RESULT* result /**< pointer to store the result of the separation call */
785  );
786 
787 /** calls domain propagation method of single constraint */
788 extern
790  SCIP_CONS* cons, /**< constraint to propagate */
791  SCIP_SET* set, /**< global SCIP settings */
792  SCIP_PROPTIMING proptiming, /**< current point in the node solving loop */
793  SCIP_RESULT* result /**< pointer to store the result of the callback method */
794  );
795 
796 /** resolves propagation conflict of single constraint */
797 extern
799  SCIP_CONS* cons, /**< constraint to resolve conflict for */
800  SCIP_SET* set, /**< global SCIP settings */
801  SCIP_VAR* infervar, /**< the conflict variable whose bound change has to be resolved */
802  int inferinfo, /**< the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call */
803  SCIP_BOUNDTYPE boundtype, /**< the type of the changed bound (lower or upper bound) */
804  SCIP_BDCHGIDX* bdchgidx, /**< the index of the bound change, representing the point of time where the change took place */
805  SCIP_Real relaxedbd, /**< the relaxed bound which is sufficient to be explained */
806  SCIP_RESULT* result /**< pointer to store the result of the callback method */
807  );
808 
809 /** presolves single constraint */
810 extern
812  SCIP_CONS* cons, /**< constraint to presolve */
813  SCIP_SET* set, /**< global SCIP settings */
814  int nrounds, /**< number of presolving rounds already done */
815  int nnewfixedvars, /**< number of variables fixed since the last call to the presolving method */
816  int nnewaggrvars, /**< number of variables aggregated since the last call to the presolving method */
817  int nnewchgvartypes, /**< number of variable type changes since the last call to the presolving method */
818  int nnewchgbds, /**< number of variable bounds tightened since the last call to the presolving method */
819  int nnewholes, /**< number of domain holes added since the last call to the presolving method */
820  int nnewdelconss, /**< number of deleted constraints since the last call to the presolving method */
821  int nnewaddconss, /**< number of added constraints since the last call to the presolving method */
822  int nnewupgdconss, /**< number of upgraded constraints since the last call to the presolving method */
823  int nnewchgcoefs, /**< number of changed coefficients since the last call to the presolving method */
824  int nnewchgsides, /**< number of changed left or right hand sides since the last call to the presolving method */
825  int* nfixedvars, /**< pointer to count total number of variables fixed of all presolvers */
826  int* naggrvars, /**< pointer to count total number of variables aggregated of all presolvers */
827  int* nchgvartypes, /**< pointer to count total number of variable type changes of all presolvers */
828  int* nchgbds, /**< pointer to count total number of variable bounds tightened of all presolvers */
829  int* naddholes, /**< pointer to count total number of domain holes added of all presolvers */
830  int* ndelconss, /**< pointer to count total number of deleted constraints of all presolvers */
831  int* naddconss, /**< pointer to count total number of added constraints of all presolvers */
832  int* nupgdconss, /**< pointer to count total number of upgraded constraints of all presolvers */
833  int* nchgcoefs, /**< pointer to count total number of changed coefficients of all presolvers */
834  int* nchgsides, /**< pointer to count total number of changed left/right hand sides of all presolvers */
835  SCIP_RESULT* result /**< pointer to store the result of the callback method */
836  );
837 
838 /** calls constraint activation notification method of single constraint */
839 extern
841  SCIP_CONS* cons, /**< constraint to notify */
842  SCIP_SET* set /**< global SCIP settings */
843  );
844 
845 /** calls constraint deactivation notification method of single constraint */
846 extern
848  SCIP_CONS* cons, /**< constraint to notify */
849  SCIP_SET* set /**< global SCIP settings */
850  );
851 
852 /** method to collect the variables of a constraint
853  *
854  * If the number of variables is greater than the available slots in the variable array, nothing happens except that
855  * the success point is set to FALSE. With the method SCIPgetConsNVars() it is possible to get the number of variables
856  * a constraint has in its scope.
857  *
858  * @note The success pointer indicates if all variables were copied into the vars arrray.
859  *
860  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
861  * set to FALSE.
862  */
863 extern
865  SCIP_CONS* cons, /**< constraint to print */
866  SCIP_SET* set, /**< global SCIP settings */
867  SCIP_VAR** vars, /**< array to store the involved variable of the constraint */
868  int varssize, /**< available slots in vars array which is needed to check if the array is large enough */
869  SCIP_Bool* success /**< pointer to store whether the variables are successfully copied */
870  );
871 
872 /** methed to collect the number of variables of a constraint
873  *
874  * @note The success pointer indicates if the contraint handler was able to return the number of variables
875  *
876  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
877  * set to FALSE
878  */
879 extern
881  SCIP_CONS* cons, /**< constraint to print */
882  SCIP_SET* set, /**< global SCIP settings */
883  int* nvars, /**< pointer to store the number of variables */
884  SCIP_Bool* success /**< pointer to store whether the constraint successfully returned the number of variables */
885  );
886 
887 /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
888  * node, where it was created, or from the problem, if it was a problem constraint
889  */
890 extern
892  SCIP_CONS* cons, /**< constraint to delete */
893  BMS_BLKMEM* blkmem, /**< block memory */
894  SCIP_SET* set, /**< global SCIP settings */
895  SCIP_STAT* stat, /**< dynamic problem statistics */
896  SCIP_PROB* prob /**< problem data */
897  );
898 
899 /** gets and captures transformed constraint of a given constraint; if the constraint is not yet transformed,
900  * a new transformed constraint for this constraint is created
901  */
902 extern
904  SCIP_CONS* origcons, /**< original constraint */
905  BMS_BLKMEM* blkmem, /**< block memory buffer */
906  SCIP_SET* set, /**< global SCIP settings */
907  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
908  );
909 
910 /** sets the initial flag of the given constraint */
911 extern
913  SCIP_CONS* cons, /**< constraint */
914  SCIP_SET* set, /**< global SCIP settings */
915  SCIP_STAT* stat, /**< dynamic problem statistics */
916  SCIP_Bool initial /**< new value */
917  );
918 
919 /** sets the separate flag of the given constraint */
920 extern
922  SCIP_CONS* cons, /**< constraint */
923  SCIP_SET* set, /**< global SCIP settings */
924  SCIP_Bool separate /**< new value */
925  );
926 
927 /** sets the enforce flag of the given constraint */
928 extern
930  SCIP_CONS* cons, /**< constraint */
931  SCIP_SET* set, /**< global SCIP settings */
932  SCIP_Bool enforce /**< new value */
933  );
934 
935 /** sets the check flag of the given constraint */
936 extern
938  SCIP_CONS* cons, /**< constraint */
939  SCIP_SET* set, /**< global SCIP settings */
940  SCIP_Bool check /**< new value */
941  );
942 
943 /** sets the propagate flag of the given constraint */
944 extern
946  SCIP_CONS* cons, /**< constraint */
947  SCIP_SET* set, /**< global SCIP settings */
948  SCIP_Bool propagate /**< new value */
949  );
950 
951 /** sets the local flag of the given constraint */
952 extern
953 void SCIPconsSetLocal(
954  SCIP_CONS* cons, /**< constraint */
955  SCIP_Bool local /**< new value */
956  );
957 
958 /** sets the modifiable flag of the given constraint */
959 extern
961  SCIP_CONS* cons, /**< constraint */
962  SCIP_Bool modifiable /**< new value */
963  );
964 
965 /** sets the dynamic flag of the given constraint */
966 extern
967 void SCIPconsSetDynamic(
968  SCIP_CONS* cons, /**< constraint */
969  SCIP_Bool dynamic /**< new value */
970  );
971 
972 /** sets the removable flag of the given constraint */
973 extern
975  SCIP_CONS* cons, /**< constraint */
976  SCIP_Bool removable /**< new value */
977  );
978 
979 /** sets the stickingatnode flag of the given constraint */
980 extern
982  SCIP_CONS* cons, /**< constraint */
983  SCIP_Bool stickingatnode /**< new value */
984  );
985 
986 /** gives the constraint a new name; ATTENTION: to old pointer is over written that might
987  * result in a memory leakage */
988 extern
990  SCIP_CONS* cons, /**< constraint */
991  const char* name /**< new name of constraint */
992  );
993 
994 /** gets associated transformed constraint of an original constraint, or NULL if no associated transformed constraint
995  * exists
996  */
997 extern
999  SCIP_CONS* cons /**< constraint */
1000  );
1001 
1002 /** activates constraint or marks constraint to be activated in next update */
1003 extern
1005  SCIP_CONS* cons, /**< constraint */
1006  SCIP_SET* set, /**< global SCIP settings */
1007  SCIP_STAT* stat, /**< dynamic problem statistics */
1008  int depth, /**< depth in the tree where the constraint activation takes place, or -1 for global problem */
1009  SCIP_Bool focusnode /**< does the constraint activation take place at the focus node? */
1010  );
1011 
1012 /** deactivates constraint or marks constraint to be deactivated in next update */
1013 extern
1015  SCIP_CONS* cons, /**< constraint */
1016  SCIP_SET* set, /**< global SCIP settings */
1017  SCIP_STAT* stat /**< dynamic problem statistics */
1018  );
1019 
1020 /** enables constraint's separation, enforcing, and propagation capabilities or marks them to be enabled in next update */
1021 extern
1023  SCIP_CONS* cons, /**< constraint */
1024  SCIP_SET* set, /**< global SCIP settings */
1025  SCIP_STAT* stat /**< dynamic problem statistics */
1026  );
1027 
1028 /** disables constraint's separation, enforcing, and propagation capabilities or marks them to be disabled in next update */
1029 extern
1031  SCIP_CONS* cons, /**< constraint */
1032  SCIP_SET* set, /**< global SCIP settings */
1033  SCIP_STAT* stat /**< dynamic problem statistics */
1034  );
1035 
1036 /** enables constraint's separation capabilities or marks them to be enabled in next update */
1037 extern
1039  SCIP_CONS* cons, /**< constraint */
1040  SCIP_SET* set /**< global SCIP settings */
1041  );
1042 
1043 /** disables constraint's separation capabilities or marks them to be disabled in next update */
1044 extern
1046  SCIP_CONS* cons, /**< constraint */
1047  SCIP_SET* set /**< global SCIP settings */
1048  );
1049 
1050 /** enables constraint's propagation capabilities or marks them to be enabled in next update */
1051 extern
1053  SCIP_CONS* cons, /**< constraint */
1054  SCIP_SET* set /**< global SCIP settings */
1055  );
1056 
1057 /** disables constraint's propagation capabilities or marks them to be disabled in next update */
1058 extern
1060  SCIP_CONS* cons, /**< constraint */
1061  SCIP_SET* set /**< global SCIP settings */
1062  );
1063 
1064 /** marks the constraint to be propagated (update might be delayed) */
1065 extern
1067  SCIP_CONS* cons, /**< constraint */
1068  SCIP_SET* set /**< global SCIP settings */
1069  );
1070 
1071 /** unmarks the constraint to be propagated (update might be delayed) */
1072 extern
1074  SCIP_CONS* cons, /**< constraint */
1075  SCIP_SET* set /**< global SCIP settings */
1076  );
1077 
1078 /** adds given value to age of constraint, but age can never become negative;
1079  * should be called
1080  * - in constraint separation, if no cut was found for this constraint,
1081  * - in constraint enforcing, if constraint was feasible, and
1082  * - in constraint propagation, if no domain reduction was deduced;
1083  * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete
1084  * in next update
1085  */
1086 extern
1088  SCIP_CONS* cons, /**< constraint */
1089  BMS_BLKMEM* blkmem, /**< block memory */
1090  SCIP_SET* set, /**< global SCIP settings */
1091  SCIP_STAT* stat, /**< dynamic problem statistics */
1092  SCIP_PROB* prob, /**< problem data */
1093  SCIP_Real deltaage /**< value to add to the constraint's age */
1094  );
1095 
1096 /** increases age of constraint by 1.0;
1097  * should be called
1098  * - in constraint separation, if no cut was found for this constraint,
1099  * - in constraint enforcing, if constraint was feasible, and
1100  * - in constraint propagation, if no domain reduction was deduced;
1101  * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete
1102  * in next update
1103  */
1104 extern
1106  SCIP_CONS* cons, /**< constraint */
1107  BMS_BLKMEM* blkmem, /**< block memory */
1108  SCIP_SET* set, /**< global SCIP settings */
1109  SCIP_STAT* stat, /**< dynamic problem statistics */
1110  SCIP_PROB* prob /**< problem data */
1111  );
1112 
1113 /** resets age of constraint to zero;
1114  * should be called
1115  * - in constraint separation, if a cut was found for this constraint,
1116  * - in constraint enforcing, if the constraint was violated, and
1117  * - in constraint propagation, if a domain reduction was deduced;
1118  * if it was obsolete, makes constraint useful again or marks constraint to be made useful again in next update
1119  */
1120 extern
1122  SCIP_CONS* cons, /**< constraint */
1123  SCIP_SET* set /**< global SCIP settings */
1124  );
1125 
1126 /** adds an active constraint to the propagation queue(if not already marked for propagation) of corresponding
1127  * constraint handler and marks the constraint to be propagated in the next propagation round
1128  *
1129  * @note if constraint is added to the queue it will be captured
1130  */
1132  SCIP_CONS* cons /**< constraint */
1133  );
1134 
1135 /** returns first constraint from propagation queue(if not empty) of given constraint handler */
1137  SCIP_CONSHDLR* conshdlr /**< constraint handler */
1138  );
1139 
1140 /** removes constraint from propagation queue(if not empty) of given constraint handler and unmarks constraint to be
1141  * propagated in the next propagation round
1142  *
1143  * @note if constraint is removed from the queue it will be released
1144  */
1146  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
1147  BMS_BLKMEM* blkmem, /**< block memory */
1148  SCIP_SET* set /**< global SCIP settings */
1149  );
1150 
1151 /** resolves the given conflicting bound, that was deduced by the given constraint, by putting all "reason" bounds
1152  * leading to the deduction into the conflict queue with calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
1153  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
1154  *
1155  * @note it is sufficient to explain the relaxed bound change
1156  */
1157 extern
1159  SCIP_CONS* cons, /**< constraint that deduced the assignment */
1160  SCIP_SET* set, /**< global SCIP settings */
1161  SCIP_VAR* infervar, /**< variable whose bound was deduced by the constraint */
1162  int inferinfo, /**< user inference information attached to the bound change */
1163  SCIP_BOUNDTYPE inferboundtype, /**< bound that was deduced (lower or upper bound) */
1164  SCIP_BDCHGIDX* bdchgidx, /**< bound change index, representing the point of time where change took place */
1165  SCIP_Real relaxedbd, /**< the relaxed bound */
1166  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1167  );
1168 
1169 /** adds given values to lock status of the constraint and updates the rounding locks of the involved variables */
1170 extern
1172  SCIP_CONS* cons, /**< constraint */
1173  SCIP_SET* set, /**< global SCIP settings */
1174  int nlockspos, /**< increase in number of rounding locks for constraint */
1175  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
1176  );
1177 
1178 
1179 /*
1180  * Hash functions
1181  */
1182 
1183 /** gets the key (i.e. the name) of the given constraint */
1184 extern
1185 SCIP_DECL_HASHGETKEY(SCIPhashGetKeyCons);
1186 
1187 /*
1188  * method for arrays of contraint handlers
1189  */
1190 
1191 /** stores all constraints marked for propagation away when probing is started */
1192 extern
1194  SCIP_SET* set, /**< global SCIP settings */
1195  SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */
1196  int nconshdlrs /**< number of contraint handlers */
1197  );
1198 
1199 /** reset all constraints marked for propagation when probing was finished */
1200 extern
1202  SCIP_SET* set, /**< global SCIP settings */
1203  BMS_BLKMEM* blkmem, /**< block memory */
1204  SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */
1205  int nconshdlrs /**< number of contraint handlers */
1206  );
1207 
1208 #ifdef __cplusplus
1209 }
1210 #endif
1211 
1212 #endif
1213