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-2016 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 needscons, /**< should the constraint handler be skipped, if no constraints are available? */
85  SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
86  SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
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_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
118  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
119  );
120 
121 /** calls destructor and frees memory of constraint handler */
122 extern
124  SCIP_CONSHDLR** conshdlr, /**< pointer to constraint handler data structure */
125  SCIP_SET* set /**< global SCIP settings */
126  );
127 
128 /** calls init method of constraint handler */
129 extern
131  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
132  BMS_BLKMEM* blkmem, /**< block memory */
133  SCIP_SET* set, /**< global SCIP settings */
134  SCIP_STAT* stat /**< dynamic problem statistics */
135  );
136 
137 /** calls exit method of constraint handler */
138 extern
140  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
141  BMS_BLKMEM* blkmem, /**< block memory */
142  SCIP_SET* set, /**< global SCIP settings */
143  SCIP_STAT* stat /**< dynamic problem statistics */
144  );
145 
146 /** informs constraint handler that the presolving process is being started */
147 extern
149  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
150  BMS_BLKMEM* blkmem, /**< block memory */
151  SCIP_SET* set, /**< global SCIP settings */
152  SCIP_STAT* stat /**< dynamic problem statistics */
153  );
154 
155 /** informs constraint handler that the presolving is finished */
156 extern
158  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
159  BMS_BLKMEM* blkmem, /**< block memory */
160  SCIP_SET* set, /**< global SCIP settings */
161  SCIP_STAT* stat /**< dynamic problem statistics */
162  );
163 
164 /** informs constraint handler that the branch and bound process is being started */
165 extern
167  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
168  BMS_BLKMEM* blkmem, /**< block memory */
169  SCIP_SET* set, /**< global SCIP settings */
170  SCIP_STAT* stat /**< dynamic problem statistics */
171  );
172 
173 /** informs constraint handler that the branch and bound process data is being freed */
174 extern
176  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
177  BMS_BLKMEM* blkmem, /**< block memory */
178  SCIP_SET* set, /**< global SCIP settings */
179  SCIP_STAT* stat, /**< dynamic problem statistics */
180  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
181  );
182 
183 /** calls LP initialization method of constraint handler to separate all initial active constraints */
184 extern
186  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
187  BMS_BLKMEM* blkmem, /**< block memory */
188  SCIP_SET* set, /**< global SCIP settings */
189  SCIP_STAT* stat, /**< dynamic problem statistics */
190  SCIP_TREE* tree, /**< branch and bound tree */
191  SCIP_Bool initkeptconss /**< Also initialize constraints which are valid at a more global node,
192  * but were not activated there? Should be FALSE for repeated calls at
193  * one node or if the current focusnode is a child of the former one */
194  );
195 
196 /** calls separator method of constraint handler to separate LP solution */
197 extern
199  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
200  BMS_BLKMEM* blkmem, /**< block memory */
201  SCIP_SET* set, /**< global SCIP settings */
202  SCIP_STAT* stat, /**< dynamic problem statistics */
203  SCIP_SEPASTORE* sepastore, /**< separation storage */
204  int depth, /**< depth of current node */
205  SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */
206  SCIP_RESULT* result /**< pointer to store the result of the callback method */
207  );
208 
209 /** calls separator method of constraint handler to separate given primal solution */
210 extern
212  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
213  BMS_BLKMEM* blkmem, /**< block memory */
214  SCIP_SET* set, /**< global SCIP settings */
215  SCIP_STAT* stat, /**< dynamic problem statistics */
216  SCIP_SEPASTORE* sepastore, /**< separation storage */
217  SCIP_SOL* sol, /**< primal solution that should be separated */
218  int depth, /**< depth of current node */
219  SCIP_Bool execdelayed, /**< execute separation method even if it is marked to be delayed */
220  SCIP_RESULT* result /**< pointer to store the result of the callback method */
221  );
222 
223 /** calls enforcing method of constraint handler for LP solution for all constraints added after last
224  * conshdlrReset() call
225  */
226 extern
228  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
229  BMS_BLKMEM* blkmem, /**< block memory */
230  SCIP_SET* set, /**< global SCIP settings */
231  SCIP_STAT* stat, /**< dynamic problem statistics */
232  SCIP_TREE* tree, /**< branch and bound tree */
233  SCIP_SEPASTORE* sepastore, /**< separation storage */
234  SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */
235  SCIP_RESULT* result /**< pointer to store the result of the callback method */
236  );
237 
238 /** calls diving solution enforcement callback of constraint handler, if it exists */
239 extern
241  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
242  SCIP_SET* set, /**< global SCIP settings */
243  SCIP_DIVESET* diveset, /**< diving settings to control scoring */
244  SCIP_SOL* sol, /**< current solution of diving mode */
245  SCIP_Bool* success, /**< pointer to store whether constraint handler successfully found a variable */
246  SCIP_Bool* infeasible /**< pointer to store whether the current node was detected to be infeasible */
247  );
248 
249 /** calls enforcing method of constraint handler for pseudo solution for all constraints added after last
250  * conshdlrReset() call
251  */
252 extern
254  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
255  BMS_BLKMEM* blkmem, /**< block memory */
256  SCIP_SET* set, /**< global SCIP settings */
257  SCIP_STAT* stat, /**< dynamic problem statistics */
258  SCIP_TREE* tree, /**< branch and bound tree */
259  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
260  SCIP_Bool solinfeasible, /**< was the solution already found out to be infeasible? */
261  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
262  SCIP_Bool forced, /**< should enforcement of pseudo solution be forced? */
263  SCIP_RESULT* result /**< pointer to store the result of the callback method */
264  );
265 
266 /** calls feasibility check method of constraint handler */
267 extern
269  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
270  BMS_BLKMEM* blkmem, /**< block memory */
271  SCIP_SET* set, /**< global SCIP settings */
272  SCIP_STAT* stat, /**< dynamic problem statistics */
273  SCIP_SOL* sol, /**< primal CIP solution */
274  SCIP_Bool checkintegrality, /**< Has integrality to be checked? */
275  SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
276  SCIP_Bool printreason, /**< Should the reason for the violation be printed? */
277  SCIP_RESULT* result /**< pointer to store the result of the callback method */
278  );
279 
280 /** calls propagation method of constraint handler */
281 extern
283  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
284  BMS_BLKMEM* blkmem, /**< block memory */
285  SCIP_SET* set, /**< global SCIP settings */
286  SCIP_STAT* stat, /**< dynamic problem statistics */
287  int depth, /**< depth of current node; -1 if preprocessing domain propagation */
288  SCIP_Bool fullpropagation, /**< should all constraints be propagated (or only new ones)? */
289  SCIP_Bool execdelayed, /**< execute propagation method even if it is marked to be delayed */
290  SCIP_Bool instrongbranching, /**< are we currently doing strong branching? */
291  SCIP_PROPTIMING proptiming, /**< current point in the node solving process */
292  SCIP_RESULT* result /**< pointer to store the result of the callback method */
293  );
294 
295 /** calls presolving method of constraint handler */
296 extern
298  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
299  BMS_BLKMEM* blkmem, /**< block memory */
300  SCIP_SET* set, /**< global SCIP settings */
301  SCIP_STAT* stat, /**< dynamic problem statistics */
302  SCIP_PRESOLTIMING timing, /**< current presolving timing */
303  int nrounds, /**< number of presolving rounds already done */
304  int* nfixedvars, /**< pointer to total number of variables fixed of all presolvers */
305  int* naggrvars, /**< pointer to total number of variables aggregated of all presolvers */
306  int* nchgvartypes, /**< pointer to total number of variable type changes of all presolvers */
307  int* nchgbds, /**< pointer to total number of variable bounds tightened of all presolvers */
308  int* naddholes, /**< pointer to total number of domain holes added of all presolvers */
309  int* ndelconss, /**< pointer to total number of deleted constraints of all presolvers */
310  int* naddconss, /**< pointer to total number of added constraints of all presolvers */
311  int* nupgdconss, /**< pointer to total number of upgraded constraints of all presolvers */
312  int* nchgcoefs, /**< pointer to total number of changed coefficients of all presolvers */
313  int* nchgsides, /**< pointer to total number of changed left/right hand sides of all presolvers */
314  SCIP_RESULT* result /**< pointer to store the result of the callback method */
315  );
316 
317 /** enables or disables all clocks of \p conshdlr, depending on the value of the flag */
318 extern
320  SCIP_CONSHDLR* conshdlr, /**< the constraint handler for which all clocks should be enabled or disabled */
321  SCIP_Bool enable /**< should the clocks of the constraint handler be enabled? */
322  );
323 
324 /** calls variable deletion method of constraint handler */
325 extern
327  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
328  BMS_BLKMEM* blkmem, /**< block memory */
329  SCIP_SET* set, /**< global SCIP settings */
330  SCIP_STAT* stat /**< dynamic problem statistics */
331  );
332 
333 
334 /** locks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
336  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
337  SCIP_SET* set /**< global SCIP settings */
338  );
339 
340 /** unlocks rounding of variables involved in the given constraint constraint handler that doesn't need constraints */
341 extern
343  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
344  SCIP_SET* set /**< global SCIP settings */
345  );
346 
347 /**
348  * callback setter methods of constraint handlers
349  */
350 
351 /** sets copy method of both the constraint handler and each associated constraint */
352 extern
354  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
355  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
356  SCIP_DECL_CONSCOPY ((*conscopy)) /**< constraint copying method */
357  );
358 
359 /** sets destructor method of constraint handler */
360 extern
362  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
363  SCIP_DECL_CONSFREE ((*consfree)) /**< destructor of constraint handler */
364  );
365 
366 /** sets initialization method of constraint handler */
367 extern
369  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
370  SCIP_DECL_CONSINIT ((*consinit)) /**< initialize constraint handler */
371  );
372 
373 /** sets deinitialization method of constraint handler */
374 extern
376  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
377  SCIP_DECL_CONSEXIT ((*consexit)) /**< deinitialize constraint handler */
378  );
379 
380 /** sets solving process initialization method of constraint handler */
381 extern
383  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
384  SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
385  );
386 
387 /** sets solving process deinitialization method of constraint handler */
388 extern
390  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
391  SCIP_DECL_CONSEXITSOL ((*consexitsol)) /**< solving process deinitialization method of constraint handler */
392  );
393 
394 /** sets preprocessing initialization method of constraint handler */
395 extern
397  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
398  SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
399  );
400 
401 /** sets preprocessing deinitialization method of constraint handler */
402 extern
404  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
405  SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
406  );
407 
408 /** sets presolving method of constraint handler */
409 extern
411  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
412  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method of constraint handler */
413  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
414  SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
415  );
416 
417 /** sets method of constraint handler to free specific constraint data */
418 extern
420  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
421  SCIP_DECL_CONSDELETE ((*consdelete)) /**< free specific constraint data */
422  );
423 
424 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem */
425 extern
427  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
428  SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
429  );
430 
431 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints */
432 extern
434  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
435  SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
436  );
437 
438 /** sets propagation conflict resolving method of constraint handler */
439 extern
441  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
442  SCIP_DECL_CONSRESPROP ((*consresprop)) /**< propagation conflict resolving method */
443  );
444 
445 /** sets activation notification method of constraint handler */
446 extern
448  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
449  SCIP_DECL_CONSACTIVE ((*consactive)) /**< activation notification method */
450  );
451 
452 /** sets deactivation notification method of constraint handler */
453 extern
455  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
456  SCIP_DECL_CONSDEACTIVE((*consdeactive)) /**< deactivation notification method */
457  );
458 
459 /** sets enabling notification method of constraint handler */
460 extern
462  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
463  SCIP_DECL_CONSENABLE ((*consenable)) /**< enabling notification method */
464  );
465 
466 /** sets disabling notification method of constraint handler */
467 extern
469  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
470  SCIP_DECL_CONSDISABLE ((*consdisable)) /**< disabling notification method */
471  );
472 
473 /** sets variable deletion method of constraint handler */
474 extern
476  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
477  SCIP_DECL_CONSDELVARS ((*consdelvars)) /**< variable deletion method */
478  );
479 
480 /** sets constraint display method of constraint handler */
481 extern
483  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
484  SCIP_DECL_CONSPRINT ((*consprint)) /**< constraint display method */
485  );
486 
487 /** sets constraint parsing method of constraint handler */
488 extern
490  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
491  SCIP_DECL_CONSPARSE ((*consparse)) /**< constraint parsing method */
492  );
493 
494 /** sets constraint variable getter method of constraint handler */
495 extern
497  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
498  SCIP_DECL_CONSGETVARS ((*consgetvars)) /**< constraint variable getter method */
499  );
500 
501 /** sets constraint variable number getter method of constraint handler */
502 extern
504  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
505  SCIP_DECL_CONSGETNVARS((*consgetnvars)) /**< constraint variable number getter method */
506  );
507 
508 /** sets diving enforcement method of constraint handler */
509 extern
511  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
512  SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
513  );
514 
515 /*
516  * Constraint set change methods
517  */
518 
519 /** frees constraint set change data and releases all included constraints */
520 extern
522  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change */
523  BMS_BLKMEM* blkmem, /**< block memory */
524  SCIP_SET* set /**< global SCIP settings */
525  );
526 
527 /** adds constraint addition to constraint set changes, and captures constraint; activates constraint if the
528  * constraint set change data is currently active
529  */
530 extern
532  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */
533  BMS_BLKMEM* blkmem, /**< block memory */
534  SCIP_SET* set, /**< global SCIP settings */
535  SCIP_STAT* stat, /**< dynamic problem statistics */
536  SCIP_CONS* cons, /**< added constraint */
537  int depth, /**< depth of constraint set change's node */
538  SCIP_Bool focusnode, /**< does the constraint set change belong to the focus node? */
539  SCIP_Bool active /**< is the constraint set change currently active? */
540  );
541 
542 /** adds constraint disabling to constraint set changes, and captures constraint */
543 extern
545  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data structure */
546  BMS_BLKMEM* blkmem, /**< block memory */
547  SCIP_SET* set, /**< global SCIP settings */
548  SCIP_CONS* cons /**< disabled constraint */
549  );
550 
551 /** applies constraint set change */
552 extern
554  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to apply */
555  BMS_BLKMEM* blkmem, /**< block memory */
556  SCIP_SET* set, /**< global SCIP settings */
557  SCIP_STAT* stat, /**< dynamic problem statistics */
558  int depth, /**< depth of constraint set change's node */
559  SCIP_Bool focusnode /**< does the constraint set change belong to the focus node? */
560  );
561 
562 /** undoes constraint set change */
563 extern
565  SCIP_CONSSETCHG* conssetchg, /**< constraint set change to undo */
566  BMS_BLKMEM* blkmem, /**< block memory */
567  SCIP_SET* set, /**< global SCIP settings */
568  SCIP_STAT* stat /**< dynamic problem statistics */
569  );
570 
571 /** applies constraint set change to the global problem and deletes the constraint set change data */
572 extern
574  SCIP_CONSSETCHG** conssetchg, /**< pointer to constraint set change data */
575  BMS_BLKMEM* blkmem, /**< block memory */
576  SCIP_SET* set, /**< global SCIP settings */
577  SCIP_STAT* stat, /**< dynamic problem statistics */
578  SCIP_PROB* prob /**< problem data */
579  );
580 
581 /** increase count of applied cuts */
582 extern
584  SCIP_CONSHDLR* conshdlr /**< constraint handler */
585  );
586 
587 /** increase count of found cuts */
588 extern
590  SCIP_CONSHDLR* conshdlr /**< constraint handler */
591  );
592 
593 
594 
595 /*
596  * Constraint methods
597  */
598 
599 /** creates and captures a constraint, and inserts it into the conss array of its constraint handler
600  *
601  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution
602  * may be declared feasible even if it violates this particular constraint.
603  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
604  * local constraint is redundant due to the variable's local bounds.
605  */
606 extern
608  SCIP_CONS** cons, /**< pointer to constraint */
609  BMS_BLKMEM* blkmem, /**< block memory */
610  SCIP_SET* set, /**< global SCIP settings */
611  const char* name, /**< name of constraint */
612  SCIP_CONSHDLR* conshdlr, /**< constraint handler for this constraint */
613  SCIP_CONSDATA* consdata, /**< data for this specific constraint */
614  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
615  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
616  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
617  * Usually set to TRUE. */
618  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
619  * TRUE for model constraints, FALSE for additional, redundant constraints. */
620  SCIP_Bool check, /**< should the constraint be checked for feasibility?
621  * TRUE for model constraints, FALSE for additional, redundant constraints. */
622  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
623  * Usually set to TRUE. */
624  SCIP_Bool local, /**< is constraint only valid locally?
625  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
626  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
627  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
628  * adds coefficients to this constraint. */
629  SCIP_Bool dynamic, /**< is constraint subject to aging?
630  * Usually set to FALSE. Set to TRUE for own cuts which
631  * are separated as constraints. */
632  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
633  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
634  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
635  * if it may be moved to a more global node?
636  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
637  SCIP_Bool original, /**< is constraint belonging to the original problem? */
638  SCIP_Bool deleteconsdata /**< has the constraint data to be deleted if constraint is freed? */
639  );
640 
641 /** copies source constraint of source SCIP into the target constraint for the target SCIP, using the variable map for
642  * mapping the variables of the source SCIP to the variables of the target SCIP; if the copying process was successful
643  * a constraint is creates and captures;
644  *
645  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution
646  * may be declared feasible even if it violates this particular constraint.
647  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
648  * local constraint is redundant due to the variable's local bounds.
649  */
650 extern
652  SCIP_CONS** cons, /**< pointer to store the created target constraint */
653  SCIP_SET* set, /**< global SCIP settings of the target SCIP */
654  const char* name, /**< name of constraint, or NULL if the name of the source constraint should be used */
655  SCIP* sourcescip, /**< source SCIP data structure */
656  SCIP_CONSHDLR* sourceconshdlr, /**< source constraint handler for this constraint */
657  SCIP_CONS* sourcecons, /**< source constraint of the source SCIP */
658  SCIP_HASHMAP* varmap, /**< a SCIP_HASHMAP mapping variables of the source SCIP to corresponding
659  * variables of the target SCIP */
660  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
661  * target constraints, must not be NULL! */
662  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP? */
663  SCIP_Bool separate, /**< should the constraint be separated during LP processing? */
664  SCIP_Bool enforce, /**< should the constraint be enforced during node processing? */
665  SCIP_Bool check, /**< should the constraint be checked for feasibility? */
666  SCIP_Bool propagate, /**< should the constraint be propagated during node processing? */
667  SCIP_Bool local, /**< is constraint only valid locally? */
668  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)? */
669  SCIP_Bool dynamic, /**< is constraint subject to aging? */
670  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup? */
671  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
672  * if it may be moved to a more global node? */
673  SCIP_Bool global, /**< create a global or a local copy? */
674  SCIP_Bool* success /**< pointer to store whether the copying was successful or not */
675  );
676 
677 /** parses constraint information (in cip format) out of a string; if the parsing process was successful a constraint is
678  * created, captured, and inserted into the conss array of its constraint handler.
679  *
680  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, an LP or pseudo solution
681  * may be declared feasible even if it violates this particular constraint.
682  * This constellation should only be used, if no LP or pseudo solution can violate the constraint -- e.g. if a
683  * local constraint is redundant due to the variable's local bounds.
684  */
685 extern
687  SCIP_CONS** cons, /**< pointer to constraint */
688  SCIP_SET* set, /**< global SCIP settings */
689  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler of target SCIP */
690  const char* str, /**< name of constraint */
691  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
692  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
693  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
694  * Usually set to TRUE. */
695  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
696  * TRUE for model constraints, FALSE for additional, redundant constraints. */
697  SCIP_Bool check, /**< should the constraint be checked for feasibility?
698  * TRUE for model constraints, FALSE for additional, redundant constraints. */
699  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
700  * Usually set to TRUE. */
701  SCIP_Bool local, /**< is constraint only valid locally?
702  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
703  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
704  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
705  * adds coefficients to this constraint. */
706  SCIP_Bool dynamic, /**< is constraint subject to aging?
707  * Usually set to FALSE. Set to TRUE for own cuts which
708  * are separated as constraints. */
709  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
710  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
711  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
712  * if it may be moved to a more global node?
713  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
714  SCIP_Bool* success /**< pointer store if the paring process was successful */
715  );
716 
717 /** change name of given constraint */
718 extern
720  SCIP_CONS* cons, /**< problem constraint */
721  BMS_BLKMEM* blkmem, /**< block memory buffer */
722  const char* name /**< new name of constraint */
723  );
724 
725 /** frees a constraint and removes it from the conss array of its constraint handler */
726 extern
728  SCIP_CONS** cons, /**< constraint to free */
729  BMS_BLKMEM* blkmem, /**< block memory buffer */
730  SCIP_SET* set /**< global SCIP settings */
731  );
732 
733 /** increases usage counter of constraint */
734 extern
735 void SCIPconsCapture(
736  SCIP_CONS* cons /**< constraint */
737  );
738 
739 /** decreases usage counter of constraint, and frees memory if necessary */
740 extern
742  SCIP_CONS** cons, /**< pointer to constraint */
743  BMS_BLKMEM* blkmem, /**< block memory */
744  SCIP_SET* set /**< global SCIP settings */
745  );
746 
747 
748 /** outputs constraint information to file stream */
749 extern
751  SCIP_CONS* cons, /**< constraint to print */
752  SCIP_SET* set, /**< global SCIP settings */
753  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
754  FILE* file /**< output file (or NULL for standard output) */
755  );
756 
757 /** checks single constraint for feasibility of the given solution */
758 extern
760  SCIP_CONS* cons, /**< constraint to check */
761  SCIP_SET* set, /**< global SCIP settings */
762  SCIP_SOL* sol, /**< primal CIP solution */
763  SCIP_Bool checkintegrality, /**< Has integrality to be checked? */
764  SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
765  SCIP_Bool printreason, /**< Should the reason for the violation be printed? */
766  SCIP_RESULT* result /**< pointer to store the result of the callback method */
767  );
768 
769 /** enforces single constraint for a given pseudo solution */
770 extern
772  SCIP_CONS* cons, /**< constraint to enforce */
773  SCIP_SET* set, /**< global SCIP settings */
774  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
775  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
776  SCIP_RESULT* result /**< pointer to store the result of the callback method */
777  );
778 
779 /** enforces single constraint for a given LP solution */
780 extern
782  SCIP_CONS* cons, /**< constraint to enforce */
783  SCIP_SET* set, /**< global SCIP settings */
784  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
785  SCIP_RESULT* result /**< pointer to store the result of the callback method */
786  );
787 
788 /** calls LP initialization method for single constraint */
789 extern
791  SCIP_CONS* cons, /**< constraint to initialize */
792  SCIP_SET* set /**< global SCIP settings */
793  );
794 
795 /** calls separation method of single constraint for LP solution */
796 extern
798  SCIP_CONS* cons, /**< constraint to separate */
799  SCIP_SET* set, /**< global SCIP settings */
800  SCIP_RESULT* result /**< pointer to store the result of the separation call */
801  );
802 
803 /** calls separation method of single constraint for given primal solution */
804 extern
806  SCIP_CONS* cons, /**< constraint to separate */
807  SCIP_SET* set, /**< global SCIP settings */
808  SCIP_SOL* sol, /**< primal solution that should be separated */
809  SCIP_RESULT* result /**< pointer to store the result of the separation call */
810  );
811 
812 /** calls domain propagation method of single constraint */
813 extern
815  SCIP_CONS* cons, /**< constraint to propagate */
816  SCIP_SET* set, /**< global SCIP settings */
817  SCIP_PROPTIMING proptiming, /**< current point in the node solving loop */
818  SCIP_RESULT* result /**< pointer to store the result of the callback method */
819  );
820 
821 /** resolves propagation conflict of single constraint */
822 extern
824  SCIP_CONS* cons, /**< constraint to resolve conflict for */
825  SCIP_SET* set, /**< global SCIP settings */
826  SCIP_VAR* infervar, /**< the conflict variable whose bound change has to be resolved */
827  int inferinfo, /**< the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call */
828  SCIP_BOUNDTYPE boundtype, /**< the type of the changed bound (lower or upper bound) */
829  SCIP_BDCHGIDX* bdchgidx, /**< the index of the bound change, representing the point of time where the change took place */
830  SCIP_Real relaxedbd, /**< the relaxed bound which is sufficient to be explained */
831  SCIP_RESULT* result /**< pointer to store the result of the callback method */
832  );
833 
834 /** presolves single constraint */
835 extern
837  SCIP_CONS* cons, /**< constraint to presolve */
838  SCIP_SET* set, /**< global SCIP settings */
839  int nrounds, /**< number of presolving rounds already done */
840  SCIP_PRESOLTIMING timing, /**< current presolving timing */
841  int nnewfixedvars, /**< number of variables fixed since the last call to the presolving method */
842  int nnewaggrvars, /**< number of variables aggregated since the last call to the presolving method */
843  int nnewchgvartypes, /**< number of variable type changes since the last call to the presolving method */
844  int nnewchgbds, /**< number of variable bounds tightened since the last call to the presolving method */
845  int nnewholes, /**< number of domain holes added since the last call to the presolving method */
846  int nnewdelconss, /**< number of deleted constraints since the last call to the presolving method */
847  int nnewaddconss, /**< number of added constraints since the last call to the presolving method */
848  int nnewupgdconss, /**< number of upgraded constraints since the last call to the presolving method */
849  int nnewchgcoefs, /**< number of changed coefficients since the last call to the presolving method */
850  int nnewchgsides, /**< number of changed left or right hand sides since the last call to the presolving method */
851  int* nfixedvars, /**< pointer to count total number of variables fixed of all presolvers */
852  int* naggrvars, /**< pointer to count total number of variables aggregated of all presolvers */
853  int* nchgvartypes, /**< pointer to count total number of variable type changes of all presolvers */
854  int* nchgbds, /**< pointer to count total number of variable bounds tightened of all presolvers */
855  int* naddholes, /**< pointer to count total number of domain holes added of all presolvers */
856  int* ndelconss, /**< pointer to count total number of deleted constraints of all presolvers */
857  int* naddconss, /**< pointer to count total number of added constraints of all presolvers */
858  int* nupgdconss, /**< pointer to count total number of upgraded constraints of all presolvers */
859  int* nchgcoefs, /**< pointer to count total number of changed coefficients of all presolvers */
860  int* nchgsides, /**< pointer to count total number of changed left/right hand sides of all presolvers */
861  SCIP_RESULT* result /**< pointer to store the result of the callback method */
862  );
863 
864 /** calls constraint activation notification method of single constraint */
865 extern
867  SCIP_CONS* cons, /**< constraint to notify */
868  SCIP_SET* set /**< global SCIP settings */
869  );
870 
871 /** calls constraint deactivation notification method of single constraint */
872 extern
874  SCIP_CONS* cons, /**< constraint to notify */
875  SCIP_SET* set /**< global SCIP settings */
876  );
877 
878 /** method to collect the variables of a constraint
879  *
880  * If the number of variables is greater than the available slots in the variable array, nothing happens except that
881  * the success point is set to FALSE. With the method SCIPgetConsNVars() it is possible to get the number of variables
882  * a constraint has in its scope.
883  *
884  * @note The success pointer indicates if all variables were copied into the vars arrray.
885  *
886  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
887  * set to FALSE.
888  */
889 extern
891  SCIP_CONS* cons, /**< constraint to print */
892  SCIP_SET* set, /**< global SCIP settings */
893  SCIP_VAR** vars, /**< array to store the involved variable of the constraint */
894  int varssize, /**< available slots in vars array which is needed to check if the array is large enough */
895  SCIP_Bool* success /**< pointer to store whether the variables are successfully copied */
896  );
897 
898 /** methed to collect the number of variables of a constraint
899  *
900  * @note The success pointer indicates if the contraint handler was able to return the number of variables
901  *
902  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
903  * set to FALSE
904  */
905 extern
907  SCIP_CONS* cons, /**< constraint to print */
908  SCIP_SET* set, /**< global SCIP settings */
909  int* nvars, /**< pointer to store the number of variables */
910  SCIP_Bool* success /**< pointer to store whether the constraint successfully returned the number of variables */
911  );
912 
913 /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
914  * node, where it was created, or from the problem, if it was a problem constraint
915  */
916 extern
918  SCIP_CONS* cons, /**< constraint to delete */
919  BMS_BLKMEM* blkmem, /**< block memory */
920  SCIP_SET* set, /**< global SCIP settings */
921  SCIP_STAT* stat, /**< dynamic problem statistics */
922  SCIP_PROB* prob /**< problem data */
923  );
924 
925 /** gets and captures transformed constraint of a given constraint; if the constraint is not yet transformed,
926  * a new transformed constraint for this constraint is created
927  */
928 extern
930  SCIP_CONS* origcons, /**< original constraint */
931  BMS_BLKMEM* blkmem, /**< block memory buffer */
932  SCIP_SET* set, /**< global SCIP settings */
933  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
934  );
935 
936 /** sets the initial flag of the given constraint */
937 extern
939  SCIP_CONS* cons, /**< constraint */
940  SCIP_SET* set, /**< global SCIP settings */
941  SCIP_STAT* stat, /**< dynamic problem statistics */
942  SCIP_Bool initial /**< new value */
943  );
944 
945 /** sets the separate flag of the given constraint */
946 extern
948  SCIP_CONS* cons, /**< constraint */
949  SCIP_SET* set, /**< global SCIP settings */
950  SCIP_Bool separate /**< new value */
951  );
952 
953 /** sets the enforce flag of the given constraint */
954 extern
956  SCIP_CONS* cons, /**< constraint */
957  SCIP_SET* set, /**< global SCIP settings */
958  SCIP_Bool enforce /**< new value */
959  );
960 
961 /** sets the check flag of the given constraint */
962 extern
964  SCIP_CONS* cons, /**< constraint */
965  SCIP_SET* set, /**< global SCIP settings */
966  SCIP_Bool check /**< new value */
967  );
968 
969 /** sets the propagate flag of the given constraint */
970 extern
972  SCIP_CONS* cons, /**< constraint */
973  SCIP_SET* set, /**< global SCIP settings */
974  SCIP_Bool propagate /**< new value */
975  );
976 
977 /** sets the local flag of the given constraint */
978 extern
979 void SCIPconsSetLocal(
980  SCIP_CONS* cons, /**< constraint */
981  SCIP_Bool local /**< new value */
982  );
983 
984 /** sets the modifiable flag of the given constraint */
985 extern
987  SCIP_CONS* cons, /**< constraint */
988  SCIP_Bool modifiable /**< new value */
989  );
990 
991 /** sets the dynamic flag of the given constraint */
992 extern
993 void SCIPconsSetDynamic(
994  SCIP_CONS* cons, /**< constraint */
995  SCIP_Bool dynamic /**< new value */
996  );
997 
998 /** sets the removable flag of the given constraint */
999 extern
1001  SCIP_CONS* cons, /**< constraint */
1002  SCIP_Bool removable /**< new value */
1003  );
1004 
1005 /** sets the stickingatnode flag of the given constraint */
1006 extern
1008  SCIP_CONS* cons, /**< constraint */
1009  SCIP_Bool stickingatnode /**< new value */
1010  );
1011 
1012 /** gives the constraint a new name; ATTENTION: to old pointer is over written that might
1013  * result in a memory leakage */
1014 extern
1016  SCIP_CONS* cons, /**< constraint */
1017  const char* name /**< new name of constraint */
1018  );
1019 
1020 /** gets associated transformed constraint of an original constraint, or NULL if no associated transformed constraint
1021  * exists
1022  */
1023 extern
1025  SCIP_CONS* cons /**< constraint */
1026  );
1027 
1028 /** activates constraint or marks constraint to be activated 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  int depth, /**< depth in the tree where the constraint activation takes place, or -1 for global problem */
1035  SCIP_Bool focusnode /**< does the constraint activation take place at the focus node? */
1036  );
1037 
1038 /** deactivates constraint or marks constraint to be deactivated in next update */
1039 extern
1041  SCIP_CONS* cons, /**< constraint */
1042  SCIP_SET* set, /**< global SCIP settings */
1043  SCIP_STAT* stat /**< dynamic problem statistics */
1044  );
1045 
1046 /** enables constraint's separation, enforcing, and propagation capabilities or marks them to be enabled in next update */
1047 extern
1049  SCIP_CONS* cons, /**< constraint */
1050  SCIP_SET* set, /**< global SCIP settings */
1051  SCIP_STAT* stat /**< dynamic problem statistics */
1052  );
1053 
1054 /** disables constraint's separation, enforcing, and propagation capabilities or marks them to be disabled in next update */
1055 extern
1057  SCIP_CONS* cons, /**< constraint */
1058  SCIP_SET* set, /**< global SCIP settings */
1059  SCIP_STAT* stat /**< dynamic problem statistics */
1060  );
1061 
1062 /** enables constraint's separation capabilities or marks them to be enabled in next update */
1063 extern
1065  SCIP_CONS* cons, /**< constraint */
1066  SCIP_SET* set /**< global SCIP settings */
1067  );
1068 
1069 /** disables constraint's separation capabilities or marks them to be disabled in next update */
1070 extern
1072  SCIP_CONS* cons, /**< constraint */
1073  SCIP_SET* set /**< global SCIP settings */
1074  );
1075 
1076 /** enables constraint's propagation capabilities or marks them to be enabled in next update */
1077 extern
1079  SCIP_CONS* cons, /**< constraint */
1080  SCIP_SET* set /**< global SCIP settings */
1081  );
1082 
1083 /** disables constraint's propagation capabilities or marks them to be disabled in next update */
1084 extern
1086  SCIP_CONS* cons, /**< constraint */
1087  SCIP_SET* set /**< global SCIP settings */
1088  );
1089 
1090 /** marks the constraint to be propagated (update might be delayed) */
1091 extern
1093  SCIP_CONS* cons, /**< constraint */
1094  SCIP_SET* set /**< global SCIP settings */
1095  );
1096 
1097 /** unmarks the constraint to be propagated (update might be delayed) */
1098 extern
1100  SCIP_CONS* cons, /**< constraint */
1101  SCIP_SET* set /**< global SCIP settings */
1102  );
1103 
1104 /** adds given value to age of constraint, but age can never become negative;
1105  * should be called
1106  * - in constraint separation, if no cut was found for this constraint,
1107  * - in constraint enforcing, if constraint was feasible, and
1108  * - in constraint propagation, if no domain reduction was deduced;
1109  * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete
1110  * in next update
1111  */
1112 extern
1114  SCIP_CONS* cons, /**< constraint */
1115  BMS_BLKMEM* blkmem, /**< block memory */
1116  SCIP_SET* set, /**< global SCIP settings */
1117  SCIP_STAT* stat, /**< dynamic problem statistics */
1118  SCIP_PROB* prob, /**< problem data */
1119  SCIP_Real deltaage /**< value to add to the constraint's age */
1120  );
1121 
1122 /** increases age of constraint by 1.0;
1123  * should be called
1124  * - in constraint separation, if no cut was found for this constraint,
1125  * - in constraint enforcing, if constraint was feasible, and
1126  * - in constraint propagation, if no domain reduction was deduced;
1127  * if it's age exceeds the constraint age limit, makes constraint obsolete or marks constraint to be made obsolete
1128  * in next update
1129  */
1130 extern
1132  SCIP_CONS* cons, /**< constraint */
1133  BMS_BLKMEM* blkmem, /**< block memory */
1134  SCIP_SET* set, /**< global SCIP settings */
1135  SCIP_STAT* stat, /**< dynamic problem statistics */
1136  SCIP_PROB* prob /**< problem data */
1137  );
1138 
1139 /** resets age of constraint to zero;
1140  * should be called
1141  * - in constraint separation, if a cut was found for this constraint,
1142  * - in constraint enforcing, if the constraint was violated, and
1143  * - in constraint propagation, if a domain reduction was deduced;
1144  * if it was obsolete, makes constraint useful again or marks constraint to be made useful again in next update
1145  */
1146 extern
1148  SCIP_CONS* cons, /**< constraint */
1149  SCIP_SET* set /**< global SCIP settings */
1150  );
1151 
1152 /** adds an active constraint to the propagation queue(if not already marked for propagation) of corresponding
1153  * constraint handler and marks the constraint to be propagated in the next propagation round
1154  *
1155  * @note if constraint is added to the queue it will be captured
1156  */
1158  SCIP_CONS* cons /**< constraint */
1159  );
1160 
1161 /** returns first constraint from propagation queue(if not empty) of given constraint handler */
1163  SCIP_CONSHDLR* conshdlr /**< constraint handler */
1164  );
1165 
1166 /** removes constraint from propagation queue(if not empty) of given constraint handler and unmarks constraint to be
1167  * propagated in the next propagation round
1168  *
1169  * @note if constraint is removed from the queue it will be released
1170  */
1172  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
1173  BMS_BLKMEM* blkmem, /**< block memory */
1174  SCIP_SET* set /**< global SCIP settings */
1175  );
1176 
1177 /** resolves the given conflicting bound, that was deduced by the given constraint, by putting all "reason" bounds
1178  * leading to the deduction into the conflict queue with calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(),
1179  * SCIPaddConflictRelaxedLb(), SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), or SCIPaddConflictBinvar();
1180  *
1181  * @note it is sufficient to explain the relaxed bound change
1182  */
1183 extern
1185  SCIP_CONS* cons, /**< constraint that deduced the assignment */
1186  SCIP_SET* set, /**< global SCIP settings */
1187  SCIP_VAR* infervar, /**< variable whose bound was deduced by the constraint */
1188  int inferinfo, /**< user inference information attached to the bound change */
1189  SCIP_BOUNDTYPE inferboundtype, /**< bound that was deduced (lower or upper bound) */
1190  SCIP_BDCHGIDX* bdchgidx, /**< bound change index, representing the point of time where change took place */
1191  SCIP_Real relaxedbd, /**< the relaxed bound */
1192  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1193  );
1194 
1195 /** adds given values to lock status of the constraint and updates the rounding locks of the involved variables */
1196 extern
1198  SCIP_CONS* cons, /**< constraint */
1199  SCIP_SET* set, /**< global SCIP settings */
1200  int nlockspos, /**< increase in number of rounding locks for constraint */
1201  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
1202  );
1203 
1204 
1205 /*
1206  * Hash functions
1207  */
1208 
1209 /** gets the key (i.e. the name) of the given constraint */
1210 extern
1211 SCIP_DECL_HASHGETKEY(SCIPhashGetKeyCons);
1212 
1213 /*
1214  * method for arrays of contraint handlers
1215  */
1216 
1217 /** stores all constraints marked for propagation away when probing is started */
1218 extern
1220  SCIP_SET* set, /**< global SCIP settings */
1221  SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */
1222  int nconshdlrs /**< number of contraint handlers */
1223  );
1224 
1225 /** reset all constraints marked for propagation when probing was finished */
1226 extern
1228  SCIP_SET* set, /**< global SCIP settings */
1229  BMS_BLKMEM* blkmem, /**< block memory */
1230  SCIP_CONSHDLR** conshdlrs, /**< all constraint handlers */
1231  int nconshdlrs /**< number of contraint handlers */
1232  );
1233 
1234 #ifdef __cplusplus
1235 }
1236 #endif
1237 
1238 #endif
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:51
void SCIPconshdlrSetInitpre(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
Definition: cons.c:4048
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
void SCIPconshdlrSetInitsol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
Definition: cons.c:4026
SCIP_RETCODE SCIPconsEnable(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:6456
SCIP_RETCODE SCIPconshdlrInitsol(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:2598
SCIP_RETCODE SCIPconsFree(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: cons.c:5790
void SCIPconshdlrSetResprop(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
Definition: cons.c:4132
type definitions for miscellaneous datastructures
timing definitions for SCIP
SCIP_RETCODE SCIPconshdlrSeparateSol(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, SCIP_SOL *sol, int depth, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: cons.c:2935
SCIP_RETCODE SCIPconshdlrLockVars(SCIP_CONSHDLR *conshdlr, SCIP_SET *set)
Definition: cons.c:3867
#define SCIP_DECL_CONSLOCK(x)
Definition: type_cons.h:591
void SCIPconsSetLocal(SCIP_CONS *cons, SCIP_Bool local)
Definition: cons.c:6297
void SCIPconsSetNamePointer(SCIP_CONS *cons, const char *name)
Definition: cons.c:6355
SCIP_RETCODE SCIPconsAddAge(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real deltaage)
Definition: cons.c:6709
#define SCIP_DECL_CONSDELETE(x)
Definition: type_cons.h:187
SCIP_RETCODE SCIPconssetchgAddDisabledCons(SCIP_CONSSETCHG **conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONS *cons)
Definition: cons.c:5091
#define SCIP_DECL_CONSINITPRE(x)
Definition: type_cons.h:114
SCIP_RETCODE SCIPconsEnableSeparation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6523
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
Definition: type_cons.h:837
#define SCIP_DECL_CONSPRESOL(x)
Definition: type_cons.h:479
SCIP_RETCODE SCIPconshdlrPopProp(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: cons.c:6864
#define SCIP_DECL_CONSCHECK(x)
Definition: type_cons.h:391
#define SCIP_DECL_CONSTRANS(x)
Definition: type_cons.h:197
SCIP_RETCODE SCIPconshdlrFree(SCIP_CONSHDLR **conshdlr, SCIP_SET *set)
Definition: cons.c:2252
SCIP_RETCODE SCIPconshdlrsStorePropagationStatus(SCIP_SET *set, SCIP_CONSHDLR **conshdlrs, int nconshdlrs)
Definition: cons.c:7475
SCIP_CONS * SCIPconsGetTransformed(SCIP_CONS *cons)
Definition: cons.c:6369
SCIP_RETCODE SCIPconsSetEnforced(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool enforce)
Definition: cons.c:6179
SCIP_RETCODE SCIPconsDeactive(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7406
SCIP_RETCODE SCIPconsEnfolp(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: cons.c:7075
#define SCIP_DECL_CONSRESPROP(x)
Definition: type_cons.h:530
SCIP_RETCODE SCIPconssetchgFree(SCIP_CONSSETCHG **conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: cons.c:4971
datastructures for constraints and constraint handlers
SCIP_RETCODE SCIPconsActivate(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat, int depth, SCIP_Bool focusnode)
Definition: cons.c:6379
SCIP_RETCODE SCIPconshdlrEnforcePseudoSol(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_BRANCHCAND *branchcand, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_Bool forced, SCIP_RESULT *result)
Definition: cons.c:3269
SCIP_RETCODE SCIPconshdlrCopyInclude(SCIP_CONSHDLR *conshdlr, SCIP_SET *set, SCIP_Bool *valid)
Definition: cons.c:1959
void SCIPconshdlrSetGetDiveBdChgs(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
Definition: cons.c:4242
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPconsCopy(SCIP_CONS **cons, SCIP_SET *set, const char *name, SCIP *sourcescip, SCIP_CONSHDLR *sourceconshdlr, SCIP_CONS *sourcecons, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool global, SCIP_Bool *success)
Definition: cons.c:5607
#define SCIP_DECL_CONSGETNVARS(x)
Definition: type_cons.h:798
SCIP_RETCODE SCIPconssetchgApply(SCIP_CONSSETCHG *conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int depth, SCIP_Bool focusnode)
Definition: cons.c:5195
SCIP_RETCODE SCIPconsResolvePropagation(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE inferboundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
Definition: cons.c:6890
type definitions for global SCIP settings
SCIP_RETCODE SCIPconsSepasol(SCIP_CONS *cons, SCIP_SET *set, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: cons.c:7183
SCIP_RETCODE SCIPconsResprop(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
Definition: cons.c:7266
#define SCIP_DECL_CONSEXITSOL(x)
Definition: type_cons.h:174
SCIP_RETCODE SCIPconsAddLocks(SCIP_CONS *cons, SCIP_SET *set, int nlockspos, int nlocksneg)
Definition: cons.c:6950
SCIP_RETCODE SCIPconsUnmarkPropagate(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6671
void SCIPconshdlrSetDeactive(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
Definition: cons.c:4154
void SCIPconshdlrSetExitsol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
Definition: cons.c:4037
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPconsEnablePropagation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6581
SCIP_RETCODE SCIPconsPushProp(SCIP_CONS *cons)
Definition: cons.c:6827
SCIP_RETCODE SCIPconsIncAge(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
Definition: cons.c:6767
SCIP_RETCODE SCIPconsTransform(SCIP_CONS *origcons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONS **transcons)
Definition: cons.c:6060
SCIP_RETCODE SCIPconshdlrExit(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:2406
SCIP_RETCODE SCIPconsParse(SCIP_CONS **cons, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *str, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool *success)
Definition: cons.c:5663
#define SCIP_DECL_CONSINITLP(x)
Definition: type_cons.h:210
type definitions for problem statistics
SCIP_RETCODE SCIPconsInitlp(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7118
void SCIPconshdlrSetExit(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
Definition: cons.c:4015
type definitions for LP management
SCIP_RETCODE SCIPconsDisable(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:6489
#define SCIP_DECL_CONSINITSOL(x)
Definition: type_cons.h:159
SCIP_RETCODE SCIPconshdlrPresolve(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRESOLTIMING timing, int nrounds, int *nfixedvars, int *naggrvars, int *nchgvartypes, int *nchgbds, int *naddholes, int *ndelconss, int *naddconss, int *nupgdconss, int *nchgcoefs, int *nchgsides, SCIP_RESULT *result)
Definition: cons.c:3693
void SCIPconshdlrSetActive(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
Definition: cons.c:4143
public methods for managing constraints
SCIP_RETCODE SCIPconshdlrInitLP(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_Bool initkeptconss)
Definition: cons.c:2675
#define SCIP_DECL_CONSPRINT(x)
Definition: type_cons.h:682
#define SCIP_DECL_CONSDELVARS(x)
Definition: type_cons.h:668
SCIP_RETCODE SCIPconshdlrsResetPropagationStatus(SCIP_SET *set, BMS_BLKMEM *blkmem, SCIP_CONSHDLR **conshdlrs, int nconshdlrs)
Definition: cons.c:7516
SCIP_RETCODE SCIPconshdlrPropagate(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, int depth, SCIP_Bool fullpropagation, SCIP_Bool execdelayed, SCIP_Bool instrongbranching, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
Definition: cons.c:3526
#define SCIP_DECL_CONSPARSE(x)
Definition: type_cons.h:758
SCIP_RETCODE SCIPconsSetPropagated(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool propagate)
Definition: cons.c:6262
SCIP_RETCODE SCIPconsRelease(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: cons.c:5857
void SCIPconshdlrSetDelete(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
Definition: cons.c:4099
#define SCIP_DECL_CONSDEACTIVE(x)
Definition: type_cons.h:621
void SCIPconshdlrSetCopy(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
Definition: cons.c:3978
void SCIPconshdlrSetParse(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
Definition: cons.c:4209
SCIP_RETCODE SCIPconshdlrInit(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:2297
SCIP_DECL_HASHGETKEY(SCIPhashGetKeyCons)
Definition: cons.c:7436
SCIP_RETCODE SCIPconshdlrSeparateLP(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_SEPASTORE *sepastore, int depth, SCIP_Bool execdelayed, SCIP_RESULT *result)
Definition: cons.c:2778
#define SCIP_DECL_CONSDISABLE(x)
Definition: type_cons.h:651
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:50
type definitions for problem variables
#define SCIP_DECL_CONSENABLE(x)
Definition: type_cons.h:636
SCIP_RETCODE SCIPconshdlrSetPresol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
Definition: cons.c:4070
type definitions for storing separated cuts
#define SCIP_DECL_CONSENFOLP(x)
Definition: type_cons.h:313
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:50
SCIP_RETCODE SCIPconsPresol(SCIP_CONS *cons, SCIP_SET *set, int nrounds, SCIP_PRESOLTIMING timing, int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, int *nfixedvars, int *naggrvars, int *nchgvartypes, int *nchgbds, int *naddholes, int *ndelconss, int *naddconss, int *nupgdconss, int *nchgcoefs, int *nchgsides, SCIP_RESULT *result)
Definition: cons.c:7308
SCIP_RETCODE SCIPconsResetAge(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6787
#define SCIP_DECL_CONSSEPALP(x)
Definition: type_cons.h:239
#define SCIP_DECL_CONSGETVARS(x)
Definition: type_cons.h:780
#define SCIP_DECL_CONSEXIT(x)
Definition: type_cons.h:94
void SCIPconshdlrSetTrans(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
Definition: cons.c:4110
SCIP_RETCODE SCIPconsSetInitial(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool initial)
Definition: cons.c:6110
#define SCIP_Bool
Definition: def.h:53
SCIP_RETCODE SCIPconshdlrExitpre(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:2552
SCIP_RETCODE SCIPconsDisableSeparation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6553
SCIP_RETCODE SCIPconsActive(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7382
SCIP_RETCODE SCIPconssetchgMakeGlobal(SCIP_CONSSETCHG **conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
Definition: cons.c:5368
SCIP_RETCODE SCIPconsDeactivate(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:6421
void SCIPconsCapture(SCIP_CONS *cons)
Definition: cons.c:5845
void SCIPconshdlrEnableOrDisableClocks(SCIP_CONSHDLR *conshdlr, SCIP_Bool enable)
Definition: cons.c:4342
#define SCIP_DECL_CONSEXITPRE(x)
Definition: type_cons.h:138
SCIP_RETCODE SCIPconssetchgUndo(SCIP_CONSSETCHG *conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:5282
SCIP_RETCODE SCIPconshdlrInitpre(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:2454
SCIP_RETCODE SCIPconssetchgAddAddedCons(SCIP_CONSSETCHG **conssetchg, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons, int depth, SCIP_Bool focusnode, SCIP_Bool active)
Definition: cons.c:5045
void SCIPconshdlrSetDelvars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELVARS((*consdelvars)))
Definition: cons.c:4187
SCIP_RETCODE SCIPconsPrint(SCIP_CONS *cons, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: cons.c:5897
void SCIPconshdlrSetExitpre(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
Definition: cons.c:4059
type definitions for branch and bound tree
SCIP_RETCODE SCIPconsDisablePropagation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6611
SCIP_RETCODE SCIPconshdlrGetDiveBoundChanges(SCIP_CONSHDLR *conshdlr, SCIP_SET *set, SCIP_DIVESET *diveset, SCIP_SOL *sol, SCIP_Bool *success, SCIP_Bool *infeasible)
Definition: cons.c:3242
SCIP_RETCODE SCIPconshdlrUnlockVars(SCIP_CONSHDLR *conshdlr, SCIP_SET *set)
Definition: cons.c:3882
#define SCIP_DECL_CONSENFOPS(x)
Definition: type_cons.h:356
type definitions for storing primal CIP solutions
type definitions for storing and manipulating the main problem
void SCIPconshdlrSetEnable(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
Definition: cons.c:4165
void SCIPconshdlrSetGetVars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
Definition: cons.c:4220
SCIP_RETCODE SCIPconsProp(SCIP_CONS *cons, SCIP_SET *set, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
Definition: cons.c:7226
SCIP_RETCODE SCIPconshdlrDelVars(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:3836
SCIP_RETCODE SCIPconsSepalp(SCIP_CONS *cons, SCIP_SET *set, SCIP_RESULT *result)
Definition: cons.c:7142
void SCIPconsSetModifiable(SCIP_CONS *cons, SCIP_Bool modifiable)
Definition: cons.c:6310
type definitions for block memory pools and memory buffers
SCIP_RETCODE SCIPconsMarkPropagate(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6641
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:64
SCIP_RETCODE SCIPconshdlrEnforceLPSol(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_TREE *tree, SCIP_SEPASTORE *sepastore, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: cons.c:3064
SCIP_RETCODE SCIPconsGetNVars(SCIP_CONS *cons, SCIP_SET *set, int *nvars, SCIP_Bool *success)
Definition: cons.c:5972
SCIP_RETCODE SCIPconsChgName(SCIP_CONS *cons, BMS_BLKMEM *blkmem, const char *name)
Definition: cons.c:5770
SCIP_RETCODE SCIPconsSetChecked(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool check)
Definition: cons.c:6214
#define SCIP_DECL_CONSFREE(x)
Definition: type_cons.h:74
SCIP_RETCODE SCIPconsEnfops(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
Definition: cons.c:7031
SCIP_RETCODE SCIPconsCheck(SCIP_CONS *cons, SCIP_SET *set, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
Definition: cons.c:6994
void SCIPconshdlrSetPrint(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
Definition: cons.c:4198
void SCIPconshdlrIncNCutsFound(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4551
#define SCIP_DECL_CONSINIT(x)
Definition: type_cons.h:84
#define SCIP_Real
Definition: def.h:127
SCIP_CONS * SCIPconshdlrFrontProp(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:6849
result codes for SCIP callback methods
void SCIPconshdlrSetInitlp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
Definition: cons.c:4121
void SCIPconsSetRemovable(SCIP_CONS *cons, SCIP_Bool removable)
Definition: cons.c:6332
SCIP_RETCODE SCIPconshdlrCreate(SCIP_CONSHDLR **conshdlr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int sepapriority, int enfopriority, int checkpriority, int sepafreq, int propfreq, int eagerfreq, int maxprerounds, SCIP_Bool delaysepa, SCIP_Bool delayprop, SCIP_Bool needscons, SCIP_PROPTIMING proptiming, SCIP_PRESOLTIMING presoltiming, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSFREE((*consfree)), SCIP_DECL_CONSINIT((*consinit)), SCIP_DECL_CONSEXIT((*consexit)), SCIP_DECL_CONSINITPRE((*consinitpre)), SCIP_DECL_CONSEXITPRE((*consexitpre)), SCIP_DECL_CONSINITSOL((*consinitsol)), SCIP_DECL_CONSEXITSOL((*consexitsol)), SCIP_DECL_CONSDELETE((*consdelete)), SCIP_DECL_CONSTRANS((*constrans)), SCIP_DECL_CONSINITLP((*consinitlp)), SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSPROP((*consprop)), SCIP_DECL_CONSPRESOL((*conspresol)), SCIP_DECL_CONSRESPROP((*consresprop)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_DECL_CONSACTIVE((*consactive)), SCIP_DECL_CONSDEACTIVE((*consdeactive)), SCIP_DECL_CONSENABLE((*consenable)), SCIP_DECL_CONSDISABLE((*consdisable)), SCIP_DECL_CONSDELVARS((*consdelvars)), SCIP_DECL_CONSPRINT((*consprint)), SCIP_DECL_CONSCOPY((*conscopy)), SCIP_DECL_CONSPARSE((*consparse)), SCIP_DECL_CONSGETVARS((*consgetvars)), SCIP_DECL_CONSGETNVARS((*consgetnvars)), SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:1980
#define SCIP_DECL_CONSSEPASOL(x)
Definition: type_cons.h:271
SCIP_RETCODE SCIPconsCreate(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool original, SCIP_Bool deleteconsdata)
Definition: cons.c:5463
SCIP_RETCODE SCIPconsDelete(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob)
Definition: cons.c:6004
#define SCIP_DECL_CONSPROP(x)
Definition: type_cons.h:421
#define SCIP_DECL_CONSACTIVE(x)
Definition: type_cons.h:606
void SCIPconshdlrSetInit(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
Definition: cons.c:4004
void SCIPconsSetDynamic(SCIP_CONS *cons, SCIP_Bool dynamic)
Definition: cons.c:6321
void SCIPconsSetStickingAtNode(SCIP_CONS *cons, SCIP_Bool stickingatnode)
Definition: cons.c:6343
void SCIPconshdlrIncNAppliedCuts(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4541
#define SCIP_DECL_CONSHDLRCOPY(x)
Definition: type_cons.h:66
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:49
SCIP_RETCODE SCIPconsGetVars(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
Definition: cons.c:5936
SCIP_RETCODE SCIPconsSetSeparated(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool separate)
Definition: cons.c:6144
#define SCIP_DECL_CONSCOPY(x)
Definition: type_cons.h:723
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:392
SCIP_RETCODE SCIPconshdlrExitsol(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool restart)
Definition: cons.c:2638
void SCIPconshdlrSetDisable(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
Definition: cons.c:4176
SCIP_RETCODE SCIPconshdlrCheck(SCIP_CONSHDLR *conshdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
Definition: cons.c:3465
type definitions for constraints and constraint handlers
void SCIPconshdlrSetGetNVars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
Definition: cons.c:4231
void SCIPconshdlrSetFree(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
Definition: cons.c:3993
memory allocation routines