Scippy

SCIP

Solving Constraint Integer Programs

scip_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-2019 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 visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_cons.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for constraint handler plugins and constraints
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Robert Lion Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_CONS_H__
32 #define __SCIP_SCIP_CONS_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_cons.h"
37 #include "scip/type_heur.h"
38 #include "scip/type_lp.h"
39 #include "scip/type_misc.h"
40 #include "scip/type_result.h"
41 #include "scip/type_retcode.h"
42 #include "scip/type_scip.h"
43 #include "scip/type_sol.h"
44 #include "scip/type_timing.h"
45 #include "scip/type_var.h"
46 
47 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
48  * this structure except the interface methods in scip.c.
49  * In optimized mode, the structure is included in scip.h, because some of the methods
50  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
51  * Additionally, the internal "set.h" is included, such that the defines in set.h are
52  * available in optimized mode.
53  */
54 #ifdef NDEBUG
55 #include "scip/struct_scip.h"
56 #include "scip/struct_stat.h"
57 #include "scip/set.h"
58 #include "scip/tree.h"
59 #include "scip/misc.h"
60 #include "scip/var.h"
61 #include "scip/cons.h"
62 #include "scip/solve.h"
63 #include "scip/debug.h"
64 #endif
65 
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
69 
70 /**@addtogroup PublicConshdlrMethods
71  *
72  * @{
73  */
74 
75 /** creates a constraint handler and includes it in SCIP.
76  *
77  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
78  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
79  *
80  * @pre This method can be called if SCIP is in one of the following stages:
81  * - \ref SCIP_STAGE_INIT
82  * - \ref SCIP_STAGE_PROBLEM
83  *
84  * @note method has all constraint handler callbacks as arguments and is thus changed every time a new
85  * callback is added
86  * in future releases; consider using SCIPincludeConshdlrBasic() and setter functions
87  * if you seek for a method which is less likely to change in future releases
88  */
89 extern
91  SCIP* scip, /**< SCIP data structure */
92  const char* name, /**< name of constraint handler */
93  const char* desc, /**< description of constraint handler */
94  int sepapriority, /**< priority of the constraint handler for separation */
95  int enfopriority, /**< priority of the constraint handler for constraint enforcing */
96  int chckpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
97  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
98  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
99  int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
100  * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
101  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
102  SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
103  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
104  SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
105  SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
106  SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
107  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
108  SCIP_DECL_CONSFREE ((*consfree)), /**< destructor of constraint handler */
109  SCIP_DECL_CONSINIT ((*consinit)), /**< initialize constraint handler */
110  SCIP_DECL_CONSEXIT ((*consexit)), /**< deinitialize constraint handler */
111  SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
112  SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
113  SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
114  SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
115  SCIP_DECL_CONSDELETE ((*consdelete)), /**< free specific constraint data */
116  SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
117  SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
118  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
119  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
120  SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */
121  SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
122  SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */
123  SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */
124  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
125  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method */
126  SCIP_DECL_CONSRESPROP ((*consresprop)), /**< propagation conflict resolving method */
127  SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */
128  SCIP_DECL_CONSACTIVE ((*consactive)), /**< activation notification method */
129  SCIP_DECL_CONSDEACTIVE((*consdeactive)), /**< deactivation notification method */
130  SCIP_DECL_CONSENABLE ((*consenable)), /**< enabling notification method */
131  SCIP_DECL_CONSDISABLE ((*consdisable)), /**< disabling notification method */
132  SCIP_DECL_CONSDELVARS ((*consdelvars)), /**< variable deletion method */
133  SCIP_DECL_CONSPRINT ((*consprint)), /**< constraint display method */
134  SCIP_DECL_CONSCOPY ((*conscopy)), /**< constraint copying method */
135  SCIP_DECL_CONSPARSE ((*consparse)), /**< constraint parsing method */
136  SCIP_DECL_CONSGETVARS ((*consgetvars)), /**< constraint get variables method */
137  SCIP_DECL_CONSGETNVARS((*consgetnvars)), /**< constraint get number of variable method */
138  SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
139  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
140  );
141 
142 /** creates a constraint handler and includes it in SCIP. All non-fundamental (or optional) callbacks will be set to NULL.
143  * Optional callbacks can be set via specific setter functions, see SCIPsetConshdlrInit(), SCIPsetConshdlrExit(),
144  * SCIPsetConshdlrCopy(), SCIPsetConshdlrFree(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrExitsol(),
145  * SCIPsetConshdlrInitpre(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrPresol(), SCIPsetConshdlrDelete(),
146  * SCIPsetConshdlrDelvars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrActive(), SCIPsetConshdlrDeactive(),
147  * SCIPsetConshdlrEnable(), SCIPsetConshdlrDisable(), SCIPsetConshdlrResprop(), SCIPsetConshdlrTrans(),
148  * SCIPsetConshdlrPrint(), SCIPsetConshdlrParse(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrGetNVars(), and
149  * SCIPsetConshdlrGetDiveBdChgs().
150  *
151  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
152  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
153  *
154  * @pre This method can be called if SCIP is in one of the following stages:
155  * - \ref SCIP_STAGE_INIT
156  * - \ref SCIP_STAGE_PROBLEM
157  *
158  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConshdlr() instead
159  */
160 extern
162  SCIP* scip, /**< SCIP data structure */
163  SCIP_CONSHDLR** conshdlrptr, /**< reference to a constraint handler pointer, or NULL */
164  const char* name, /**< name of constraint handler */
165  const char* desc, /**< description of constraint handler */
166  int enfopriority, /**< priority of the constraint handler for constraint enforcing */
167  int chckpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
168  int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
169  * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
170  SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
171  SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */
172  SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */
173  SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */
174  SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */
175  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
176  );
177 
178 /** sets all separation related callbacks/parameters of the constraint handler
179  *
180  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
181  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
182  *
183  * @pre This method can be called if SCIP is in one of the following stages:
184  * - \ref SCIP_STAGE_INIT
185  * - \ref SCIP_STAGE_PROBLEM
186  */
187 extern
189  SCIP* scip, /**< SCIP data structure */
190  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
191  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
192  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
193  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
194  int sepapriority, /**< priority of the constraint handler for separation */
195  SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
196  );
197 
198 /** sets both the propagation callback and the propagation frequency of the constraint handler
199  *
200  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
201  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
202  *
203  * @pre This method can be called if SCIP is in one of the following stages:
204  * - \ref SCIP_STAGE_INIT
205  * - \ref SCIP_STAGE_PROBLEM
206  */
207 extern
209  SCIP* scip, /**< SCIP data structure */
210  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
211  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
212  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
213  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
214  SCIP_PROPTIMING proptiming /**< positions in the node solving loop where propagation should be executed */
215  );
216 
217 /** sets relaxation enforcement method of the constraint handler
218  *
219  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
220  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
221  *
222  * @pre This method can be called if SCIP is in one of the following stages:
223  * - \ref SCIP_STAGE_INIT
224  * - \ref SCIP_STAGE_PROBLEM
225  */
226 extern
228  SCIP* scip, /**< SCIP data structure */
229  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
230  SCIP_DECL_CONSENFORELAX ((*consenforelax)) /**< enforcement method for relaxation solution of constraint handler (might be NULL) */
231  );
232 
233 /** sets copy method of both the constraint handler and each associated constraint
234  *
235  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
236  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
237  *
238  * @pre This method can be called if SCIP is in one of the following stages:
239  * - \ref SCIP_STAGE_INIT
240  * - \ref SCIP_STAGE_PROBLEM
241  */
242 extern
244  SCIP* scip, /**< SCIP data structure */
245  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
246  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
247  SCIP_DECL_CONSCOPY ((*conscopy)) /**< constraint copying method */
248  );
249 
250 /** sets destructor method of constraint handler
251  *
252  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
253  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
254  *
255  * @pre This method can be called if SCIP is in one of the following stages:
256  * - \ref SCIP_STAGE_INIT
257  * - \ref SCIP_STAGE_PROBLEM
258  */
259 extern
261  SCIP* scip, /**< SCIP data structure */
262  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
263  SCIP_DECL_CONSFREE ((*consfree)) /**< destructor of constraint handler */
264  );
265 
266 /** sets initialization method of constraint handler
267  *
268  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
269  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
270  *
271  * @pre This method can be called if SCIP is in one of the following stages:
272  * - \ref SCIP_STAGE_INIT
273  * - \ref SCIP_STAGE_PROBLEM
274  */
275 extern
277  SCIP* scip, /**< SCIP data structure */
278  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
279  SCIP_DECL_CONSINIT ((*consinit)) /**< initialize constraint handler */
280  );
281 
282 /** sets deinitialization method of constraint handler
283  *
284  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
285  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
286  *
287  * @pre This method can be called if SCIP is in one of the following stages:
288  * - \ref SCIP_STAGE_INIT
289  * - \ref SCIP_STAGE_PROBLEM
290  */
291 extern
293  SCIP* scip, /**< SCIP data structure */
294  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
295  SCIP_DECL_CONSEXIT ((*consexit)) /**< deinitialize constraint handler */
296  );
297 
298 /** sets solving process initialization method of constraint handler
299  *
300  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
301  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
302  *
303  * @pre This method can be called if SCIP is in one of the following stages:
304  * - \ref SCIP_STAGE_INIT
305  * - \ref SCIP_STAGE_PROBLEM
306  */
307 extern
309  SCIP* scip, /**< SCIP data structure */
310  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
311  SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
312  );
313 
314 /** sets solving process deinitialization method of constraint handler
315  *
316  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
317  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
318  *
319  * @pre This method can be called if SCIP is in one of the following stages:
320  * - \ref SCIP_STAGE_INIT
321  * - \ref SCIP_STAGE_PROBLEM
322  */
323 extern
325  SCIP* scip, /**< SCIP data structure */
326  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
327  SCIP_DECL_CONSEXITSOL ((*consexitsol))/**< solving process deinitialization method of constraint handler */
328  );
329 
330 /** sets preprocessing initialization method of constraint handler
331  *
332  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
333  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
334  *
335  * @pre This method can be called if SCIP is in one of the following stages:
336  * - \ref SCIP_STAGE_INIT
337  * - \ref SCIP_STAGE_PROBLEM
338  */
339 extern
341  SCIP* scip, /**< SCIP data structure */
342  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
343  SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
344  );
345 
346 /** sets preprocessing deinitialization method of constraint handler
347  *
348  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
349  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
350  *
351  * @pre This method can be called if SCIP is in one of the following stages:
352  * - \ref SCIP_STAGE_INIT
353  * - \ref SCIP_STAGE_PROBLEM
354  */
355 extern
357  SCIP* scip, /**< SCIP data structure */
358  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
359  SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
360  );
361 
362 /** sets presolving method of constraint handler
363  *
364  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
365  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
366  *
367  * @pre This method can be called if SCIP is in one of the following stages:
368  * - \ref SCIP_STAGE_INIT
369  * - \ref SCIP_STAGE_PROBLEM
370  */
371 extern
373  SCIP* scip, /**< SCIP data structure */
374  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
375  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method of constraint handler */
376  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
377  SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
378  );
379 
380 /** sets method of constraint handler to free specific constraint data
381  *
382  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
383  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
384  *
385  * @pre This method can be called if SCIP is in one of the following stages:
386  * - \ref SCIP_STAGE_INIT
387  * - \ref SCIP_STAGE_PROBLEM
388  */
389 extern
391  SCIP* scip, /**< SCIP data structure */
392  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
393  SCIP_DECL_CONSDELETE ((*consdelete)) /**< free specific constraint data */
394  );
395 
396 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem
397  *
398  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
399  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
400  *
401  * @pre This method can be called if SCIP is in one of the following stages:
402  * - \ref SCIP_STAGE_INIT
403  * - \ref SCIP_STAGE_PROBLEM
404  */
405 extern
407  SCIP* scip, /**< SCIP data structure */
408  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
409  SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
410  );
411 
412 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints
413  *
414  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
415  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
416  *
417  * @pre This method can be called if SCIP is in one of the following stages:
418  * - \ref SCIP_STAGE_INIT
419  * - \ref SCIP_STAGE_PROBLEM
420  */
421 extern
423  SCIP* scip, /**< SCIP data structure */
424  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
425  SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
426  );
427 
428 /** sets propagation conflict resolving method of constraint handler
429  *
430  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
431  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
432  *
433  * @pre This method can be called if SCIP is in one of the following stages:
434  * - \ref SCIP_STAGE_INIT
435  * - \ref SCIP_STAGE_PROBLEM
436  */
437 extern
439  SCIP* scip, /**< SCIP data structure */
440  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
441  SCIP_DECL_CONSRESPROP ((*consresprop)) /**< propagation conflict resolving method */
442  );
443 
444 /** sets activation notification method of constraint handler
445  *
446  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
447  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
448  *
449  * @pre This method can be called if SCIP is in one of the following stages:
450  * - \ref SCIP_STAGE_INIT
451  * - \ref SCIP_STAGE_PROBLEM
452  */
453 extern
455  SCIP* scip, /**< SCIP data structure */
456  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
457  SCIP_DECL_CONSACTIVE ((*consactive)) /**< activation notification method */
458  );
459 
460 /** sets deactivation notification method of constraint handler
461  *
462  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
463  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
464  *
465  * @pre This method can be called if SCIP is in one of the following stages:
466  * - \ref SCIP_STAGE_INIT
467  * - \ref SCIP_STAGE_PROBLEM
468  */
469 extern
471  SCIP* scip, /**< SCIP data structure */
472  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
473  SCIP_DECL_CONSDEACTIVE((*consdeactive)) /**< deactivation notification method */
474  );
475 
476 /** sets enabling notification method of constraint handler
477  *
478  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
479  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
480  *
481  * @pre This method can be called if SCIP is in one of the following stages:
482  * - \ref SCIP_STAGE_INIT
483  * - \ref SCIP_STAGE_PROBLEM
484  */
485 extern
487  SCIP* scip, /**< SCIP data structure */
488  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
489  SCIP_DECL_CONSENABLE ((*consenable)) /**< enabling notification method */
490  );
491 
492 /** sets disabling notification method of constraint handler
493  *
494  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
495  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
496  *
497  * @pre This method can be called if SCIP is in one of the following stages:
498  * - \ref SCIP_STAGE_INIT
499  * - \ref SCIP_STAGE_PROBLEM
500  */
501 extern
503  SCIP* scip, /**< SCIP data structure */
504  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
505  SCIP_DECL_CONSDISABLE ((*consdisable)) /**< disabling notification method */
506  );
507 
508 /** sets variable deletion method of constraint handler
509  *
510  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
511  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
512  *
513  * @pre This method can be called if SCIP is in one of the following stages:
514  * - \ref SCIP_STAGE_INIT
515  * - \ref SCIP_STAGE_PROBLEM
516  */
517 extern
519  SCIP* scip, /**< SCIP data structure */
520  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
521  SCIP_DECL_CONSDELVARS ((*consdelvars)) /**< variable deletion method */
522  );
523 
524 /** sets constraint display method of constraint handler
525  *
526  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
527  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
528  *
529  * @pre This method can be called if SCIP is in one of the following stages:
530  * - \ref SCIP_STAGE_INIT
531  * - \ref SCIP_STAGE_PROBLEM
532  */
533 extern
535  SCIP* scip, /**< SCIP data structure */
536  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
537  SCIP_DECL_CONSPRINT ((*consprint)) /**< constraint display method */
538  );
539 
540 /** sets constraint parsing method of constraint handler
541  *
542  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
543  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
544  *
545  * @pre This method can be called if SCIP is in one of the following stages:
546  * - \ref SCIP_STAGE_INIT
547  * - \ref SCIP_STAGE_PROBLEM
548  */
549 extern
551  SCIP* scip, /**< SCIP data structure */
552  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
553  SCIP_DECL_CONSPARSE ((*consparse)) /**< constraint parsing method */
554  );
555 
556 /** sets constraint variable getter method of constraint handler
557  *
558  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
559  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
560  *
561  * @pre This method can be called if SCIP is in one of the following stages:
562  * - \ref SCIP_STAGE_INIT
563  * - \ref SCIP_STAGE_PROBLEM
564  */
565 extern
567  SCIP* scip, /**< SCIP data structure */
568  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
569  SCIP_DECL_CONSGETVARS ((*consgetvars)) /**< constraint variable getter method */
570  );
571 
572 /** sets constraint variable number getter method of constraint handler
573  *
574  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
575  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
576  *
577  * @pre This method can be called if SCIP is in one of the following stages:
578  * - \ref SCIP_STAGE_INIT
579  * - \ref SCIP_STAGE_PROBLEM
580  */
581 extern
583  SCIP* scip, /**< SCIP data structure */
584  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
585  SCIP_DECL_CONSGETNVARS((*consgetnvars)) /**< constraint variable number getter method */
586  );
587 
588 /** sets diving enforcement method of constraint handler
589  *
590  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
591  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
592  *
593  * @pre This method can be called if SCIP is in one of the following stages:
594  * - \ref SCIP_STAGE_INIT
595  * - \ref SCIP_STAGE_PROBLEM
596  */
597 extern
599  SCIP* scip, /**< SCIP data structure */
600  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
601  SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
602  );
603 
604 /** returns the constraint handler of the given name, or NULL if not existing */
605 extern
607  SCIP* scip, /**< SCIP data structure */
608  const char* name /**< name of constraint handler */
609  );
610 
611 /** returns the array of currently available constraint handlers */
612 extern
614  SCIP* scip /**< SCIP data structure */
615  );
616 
617 /** returns the number of currently available constraint handlers */
618 extern
620  SCIP* scip /**< SCIP data structure */
621  );
622 
623 /* @} */
624 
625 /**@addtogroup PublicConstraintMethods
626  *
627  * @{
628  */
629 
630 /** creates and captures a constraint of the given constraint handler
631  *
632  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may
633  * be declared feasible even if it violates this particular constraint. This constellation should only be
634  * used, if no LP or pseudo solution can violate the constraint -- e.g. if a local constraint is redundant due
635  * to the variable's local bounds.
636  *
637  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
638  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
639  *
640  * @pre This method can be called if @p scip is in one of the following stages:
641  * - \ref SCIP_STAGE_PROBLEM
642  * - \ref SCIP_STAGE_TRANSFORMING
643  * - \ref SCIP_STAGE_INITPRESOLVE
644  * - \ref SCIP_STAGE_PRESOLVING
645  * - \ref SCIP_STAGE_EXITPRESOLVE
646  * - \ref SCIP_STAGE_PRESOLVED
647  * - \ref SCIP_STAGE_INITSOLVE
648  * - \ref SCIP_STAGE_SOLVING
649  * - \ref SCIP_STAGE_EXITSOLVE
650  *
651  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
652  */
653 extern
655  SCIP* scip, /**< SCIP data structure */
656  SCIP_CONS** cons, /**< pointer to constraint */
657  const char* name, /**< name of constraint */
658  SCIP_CONSHDLR* conshdlr, /**< constraint handler for this constraint */
659  SCIP_CONSDATA* consdata, /**< data for this specific constraint */
660  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
661  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
662  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
663  * Usually set to TRUE. */
664  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
665  * TRUE for model constraints, FALSE for additional, redundant constraints. */
666  SCIP_Bool check, /**< should the constraint be checked for feasibility?
667  * TRUE for model constraints, FALSE for additional, redundant constraints. */
668  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
669  * Usually set to TRUE. */
670  SCIP_Bool local, /**< is constraint only valid locally?
671  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
672  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
673  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
674  * adds coefficients to this constraint. */
675  SCIP_Bool dynamic, /**< is constraint subject to aging?
676  * Usually set to FALSE. Set to TRUE for own cuts which
677  * are separated as constraints. */
678  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
679  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
680  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
681  * if it may be moved to a more global node?
682  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
683  );
684 
685 /** parses constraint information (in cip format) out of a string; if the parsing process was successful a constraint is
686  * creates and captures;
687  *
688  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
689  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
690  *
691  * @pre This method can be called if @p scip is in one of the following stages:
692  * - \ref SCIP_STAGE_PROBLEM
693  * - \ref SCIP_STAGE_TRANSFORMING
694  * - \ref SCIP_STAGE_INITPRESOLVE
695  * - \ref SCIP_STAGE_PRESOLVING
696  * - \ref SCIP_STAGE_EXITPRESOLVE
697  * - \ref SCIP_STAGE_PRESOLVED
698  * - \ref SCIP_STAGE_SOLVING
699  * - \ref SCIP_STAGE_EXITSOLVE
700  *
701  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may
702  * be declared feasible even if it violates this particular constraint. This constellation should only be
703  * used, if no LP or pseudo solution can violate the constraint -- e.g. if a local constraint is redundant due
704  * to the variable's local bounds.
705  */
706 extern
708  SCIP* scip, /**< SCIP data structure */
709  SCIP_CONS** cons, /**< pointer to store constraint */
710  const char* str, /**< string to parse for constraint */
711  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
712  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
713  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
714  * Usually set to TRUE. */
715  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
716  * TRUE for model constraints, FALSE for additional, redundant constraints. */
717  SCIP_Bool check, /**< should the constraint be checked for feasibility?
718  * TRUE for model constraints, FALSE for additional, redundant constraints. */
719  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
720  * Usually set to TRUE. */
721  SCIP_Bool local, /**< is constraint only valid locally?
722  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
723  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
724  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
725  * adds coefficients to this constraint. */
726  SCIP_Bool dynamic, /**< is constraint subject to aging?
727  * Usually set to FALSE. Set to TRUE for own cuts which
728  * are separated as constraints. */
729  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
730  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
731  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
732  * if it may be moved to a more global node?
733  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
734  SCIP_Bool* success /**< pointer to store if the paring process was successful */
735  );
736 
737 /** increases usage counter of constraint
738  *
739  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
740  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
741  *
742  * @pre This method can be called if @p scip is in one of the following stages:
743  * - \ref SCIP_STAGE_PROBLEM
744  * - \ref SCIP_STAGE_TRANSFORMING
745  * - \ref SCIP_STAGE_TRANSFORMED
746  * - \ref SCIP_STAGE_INITPRESOLVE
747  * - \ref SCIP_STAGE_PRESOLVING
748  * - \ref SCIP_STAGE_EXITPRESOLVE
749  * - \ref SCIP_STAGE_PRESOLVED
750  * - \ref SCIP_STAGE_INITSOLVE
751  * - \ref SCIP_STAGE_SOLVING
752  * - \ref SCIP_STAGE_SOLVED
753  */
754 extern
756  SCIP* scip, /**< SCIP data structure */
757  SCIP_CONS* cons /**< constraint to capture */
758  );
759 
760 /** decreases usage counter of constraint, if the usage pointer reaches zero the constraint gets freed
761  *
762  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
763  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
764  *
765  * @pre This method can be called if @p scip is in one of the following stages:
766  * - \ref SCIP_STAGE_PROBLEM
767  * - \ref SCIP_STAGE_TRANSFORMING
768  * - \ref SCIP_STAGE_TRANSFORMED
769  * - \ref SCIP_STAGE_INITPRESOLVE
770  * - \ref SCIP_STAGE_PRESOLVING
771  * - \ref SCIP_STAGE_EXITPRESOLVE
772  * - \ref SCIP_STAGE_PRESOLVED
773  * - \ref SCIP_STAGE_INITSOLVE
774  * - \ref SCIP_STAGE_SOLVING
775  * - \ref SCIP_STAGE_SOLVED
776  * - \ref SCIP_STAGE_EXITSOLVE
777  * - \ref SCIP_STAGE_FREETRANS
778  *
779  * @note the pointer of the constraint will be NULLed
780  */
781 extern
783  SCIP* scip, /**< SCIP data structure */
784  SCIP_CONS** cons /**< pointer to constraint */
785  );
786 
787 /** change constraint name
788  *
789  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
790  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
791  *
792  * @pre This method can be called if @p scip is in one of the following stages:
793  * - \ref SCIP_STAGE_PROBLEM
794  *
795  * @note to get the current name of a constraint, use SCIPconsGetName() from pub_cons.h
796  */
797 extern
799  SCIP* scip, /**< SCIP data structure */
800  SCIP_CONS* cons, /**< constraint */
801  const char* name /**< new name of constraint */
802  );
803 
804 /** sets the initial flag of the given constraint
805  *
806  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
807  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
808  *
809  * @pre This method can be called if @p scip is in one of the following stages:
810  * - \ref SCIP_STAGE_PROBLEM
811  * - \ref SCIP_STAGE_TRANSFORMING
812  * - \ref SCIP_STAGE_PRESOLVING
813  * - \ref SCIP_STAGE_PRESOLVED
814  * - \ref SCIP_STAGE_SOLVING
815  */
816 extern
818  SCIP* scip, /**< SCIP data structure */
819  SCIP_CONS* cons, /**< constraint */
820  SCIP_Bool initial /**< new value */
821  );
822 
823 /** sets the separate flag of the given constraint
824  *
825  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
826  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
827  *
828  * @pre This method can be called if @p scip is in one of the following stages:
829  * - \ref SCIP_STAGE_PROBLEM
830  * - \ref SCIP_STAGE_TRANSFORMING
831  * - \ref SCIP_STAGE_PRESOLVING
832  * - \ref SCIP_STAGE_PRESOLVED
833  * - \ref SCIP_STAGE_SOLVING
834  */
835 extern
837  SCIP* scip, /**< SCIP data structure */
838  SCIP_CONS* cons, /**< constraint */
839  SCIP_Bool separate /**< new value */
840  );
841 
842 /** sets the enforce flag of the given constraint
843  *
844  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
845  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
846  *
847  * @pre This method can be called if @p scip is in one of the following stages:
848  * - \ref SCIP_STAGE_PROBLEM
849  * - \ref SCIP_STAGE_TRANSFORMING
850  * - \ref SCIP_STAGE_PRESOLVING
851  * - \ref SCIP_STAGE_PRESOLVED
852  * - \ref SCIP_STAGE_SOLVING
853  */
854 extern
856  SCIP* scip, /**< SCIP data structure */
857  SCIP_CONS* cons, /**< constraint */
858  SCIP_Bool enforce /**< new value */
859  );
860 
861 /** sets the check flag of the given constraint
862  *
863  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
864  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
865  *
866  * @pre This method can be called if @p scip is in one of the following stages:
867  * - \ref SCIP_STAGE_PROBLEM
868  * - \ref SCIP_STAGE_TRANSFORMING
869  * - \ref SCIP_STAGE_PRESOLVING
870  * - \ref SCIP_STAGE_PRESOLVED
871  * - \ref SCIP_STAGE_SOLVING
872  */
873 extern
875  SCIP* scip, /**< SCIP data structure */
876  SCIP_CONS* cons, /**< constraint */
877  SCIP_Bool check /**< new value */
878  );
879 
880 /** sets the propagate flag of the given constraint
881  *
882  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
883  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
884  *
885  * @pre This method can be called if @p scip is in one of the following stages:
886  * - \ref SCIP_STAGE_PROBLEM
887  * - \ref SCIP_STAGE_TRANSFORMING
888  * - \ref SCIP_STAGE_PRESOLVING
889  * - \ref SCIP_STAGE_PRESOLVED
890  * - \ref SCIP_STAGE_SOLVING
891  */
892 extern
894  SCIP* scip, /**< SCIP data structure */
895  SCIP_CONS* cons, /**< constraint */
896  SCIP_Bool propagate /**< new value */
897  );
898 
899 /** sets the local flag of the given constraint
900  *
901  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
902  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
903  *
904  * @pre This method can be called if @p scip is in one of the following stages:
905  * - \ref SCIP_STAGE_PROBLEM
906  * - \ref SCIP_STAGE_TRANSFORMING
907  * - \ref SCIP_STAGE_INITPRESOLVE
908  * - \ref SCIP_STAGE_PRESOLVING
909  * - \ref SCIP_STAGE_PRESOLVED
910  * - \ref SCIP_STAGE_INITSOLVE
911  * - \ref SCIP_STAGE_SOLVING
912  */
913 extern
915  SCIP* scip, /**< SCIP data structure */
916  SCIP_CONS* cons, /**< constraint */
917  SCIP_Bool local /**< new value */
918  );
919 
920 /** sets the modifiable flag of the given constraint
921  *
922  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
923  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
924  *
925  * @pre This method can be called if @p scip is in one of the following stages:
926  * - \ref SCIP_STAGE_PROBLEM
927  * - \ref SCIP_STAGE_TRANSFORMING
928  * - \ref SCIP_STAGE_PRESOLVING
929  * - \ref SCIP_STAGE_PRESOLVED
930  * - \ref SCIP_STAGE_SOLVING
931  * - \ref SCIP_STAGE_EXITSOLVE
932  */
933 extern
935  SCIP* scip, /**< SCIP data structure */
936  SCIP_CONS* cons, /**< constraint */
937  SCIP_Bool modifiable /**< new value */
938  );
939 
940 /** sets the dynamic flag of the given constraint
941  *
942  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
943  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
944  *
945  * @pre This method can be called if @p scip is in one of the following stages:
946  * - \ref SCIP_STAGE_PROBLEM
947  * - \ref SCIP_STAGE_TRANSFORMING
948  * - \ref SCIP_STAGE_PRESOLVING
949  * - \ref SCIP_STAGE_PRESOLVED
950  * - \ref SCIP_STAGE_SOLVING
951  */
952 extern
954  SCIP* scip, /**< SCIP data structure */
955  SCIP_CONS* cons, /**< constraint */
956  SCIP_Bool dynamic /**< new value */
957  );
958 
959 /** sets the removable flag of the given constraint
960  *
961  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
962  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
963  *
964  * @pre This method can be called if @p scip is in one of the following stages:
965  * - \ref SCIP_STAGE_PROBLEM
966  * - \ref SCIP_STAGE_TRANSFORMING
967  * - \ref SCIP_STAGE_PRESOLVING
968  * - \ref SCIP_STAGE_PRESOLVED
969  * - \ref SCIP_STAGE_SOLVING
970  */
971 extern
973  SCIP* scip, /**< SCIP data structure */
974  SCIP_CONS* cons, /**< constraint */
975  SCIP_Bool removable /**< new value */
976  );
977 
978 /** sets the stickingatnode flag of the given constraint
979  *
980  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
981  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
982  *
983  * @pre This method can be called if @p scip is in one of the following stages:
984  * - \ref SCIP_STAGE_PROBLEM
985  * - \ref SCIP_STAGE_TRANSFORMING
986  * - \ref SCIP_STAGE_PRESOLVING
987  * - \ref SCIP_STAGE_PRESOLVED
988  * - \ref SCIP_STAGE_SOLVING
989  */
990 extern
992  SCIP* scip, /**< SCIP data structure */
993  SCIP_CONS* cons, /**< constraint */
994  SCIP_Bool stickingatnode /**< new value */
995  );
996 
997 /** updates the flags of the first constraint according to the ones of the second constraint
998  *
999  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1000  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1001  *
1002  * @pre This method can be called if @p scip is in one of the following stages:
1003  * - \ref SCIP_STAGE_PROBLEM
1004  * - \ref SCIP_STAGE_TRANSFORMING
1005  * - \ref SCIP_STAGE_PRESOLVING
1006  * - \ref SCIP_STAGE_PRESOLVED
1007  * - \ref SCIP_STAGE_SOLVING
1008  */
1009 extern
1011  SCIP* scip, /**< SCIP data structure */
1012  SCIP_CONS* cons0, /**< constraint that should stay */
1013  SCIP_CONS* cons1 /**< constraint that should be deleted */
1014  );
1015 
1016 /** gets and captures transformed constraint of a given constraint; if the constraint is not yet transformed,
1017  * a new transformed constraint for this constraint is created
1018  *
1019  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1020  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1021  *
1022  * @pre This method can be called if @p scip is in one of the following stages:
1023  * - \ref SCIP_STAGE_TRANSFORMING
1024  * - \ref SCIP_STAGE_TRANSFORMED
1025  * - \ref SCIP_STAGE_INITPRESOLVE
1026  * - \ref SCIP_STAGE_PRESOLVING
1027  * - \ref SCIP_STAGE_EXITPRESOLVE
1028  * - \ref SCIP_STAGE_PRESOLVED
1029  * - \ref SCIP_STAGE_INITSOLVE
1030  * - \ref SCIP_STAGE_SOLVING
1031  */
1032 extern
1034  SCIP* scip, /**< SCIP data structure */
1035  SCIP_CONS* cons, /**< constraint to get/create transformed constraint for */
1036  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
1037  );
1038 
1039 /** gets and captures transformed constraints for an array of constraints;
1040  * if a constraint in the array is not yet transformed, a new transformed constraint for this constraint is created;
1041  * it is possible to call this method with conss == transconss
1042  *
1043  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1044  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1045  *
1046  * @pre This method can be called if @p scip is in one of the following stages:
1047  * - \ref SCIP_STAGE_TRANSFORMING
1048  * - \ref SCIP_STAGE_TRANSFORMED
1049  * - \ref SCIP_STAGE_INITPRESOLVE
1050  * - \ref SCIP_STAGE_PRESOLVING
1051  * - \ref SCIP_STAGE_EXITPRESOLVE
1052  * - \ref SCIP_STAGE_PRESOLVED
1053  * - \ref SCIP_STAGE_INITSOLVE
1054  * - \ref SCIP_STAGE_SOLVING
1055  */
1056 extern
1058  SCIP* scip, /**< SCIP data structure */
1059  int nconss, /**< number of constraints to get/create transformed constraints for */
1060  SCIP_CONS** conss, /**< array with constraints to get/create transformed constraints for */
1061  SCIP_CONS** transconss /**< array to store the transformed constraints */
1062  );
1063 
1064 /** gets corresponding transformed constraint of a given constraint;
1065  * returns NULL as transcons, if transformed constraint is not yet existing
1066  *
1067  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1068  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1069  *
1070  * @pre This method can be called if @p scip is in one of the following stages:
1071  * - \ref SCIP_STAGE_TRANSFORMING
1072  * - \ref SCIP_STAGE_TRANSFORMED
1073  * - \ref SCIP_STAGE_INITPRESOLVE
1074  * - \ref SCIP_STAGE_PRESOLVING
1075  * - \ref SCIP_STAGE_EXITPRESOLVE
1076  * - \ref SCIP_STAGE_PRESOLVED
1077  * - \ref SCIP_STAGE_INITSOLVE
1078  * - \ref SCIP_STAGE_SOLVING
1079  * - \ref SCIP_STAGE_SOLVED
1080  * - \ref SCIP_STAGE_EXITSOLVE
1081  * - \ref SCIP_STAGE_FREETRANS
1082  */
1083 extern
1085  SCIP* scip, /**< SCIP data structure */
1086  SCIP_CONS* cons, /**< constraint to get the transformed constraint for */
1087  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
1088  );
1089 
1090 /** gets corresponding transformed constraints for an array of constraints;
1091  * stores NULL in a transconss slot, if the transformed constraint is not yet existing;
1092  * it is possible to call this method with conss == transconss, but remember that constraints that are not
1093  * yet transformed will be replaced with NULL
1094  *
1095  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1096  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1097  *
1098  * @pre This method can be called if @p scip is in one of the following stages:
1099  * - \ref SCIP_STAGE_TRANSFORMING
1100  * - \ref SCIP_STAGE_TRANSFORMED
1101  * - \ref SCIP_STAGE_INITPRESOLVE
1102  * - \ref SCIP_STAGE_PRESOLVING
1103  * - \ref SCIP_STAGE_EXITPRESOLVE
1104  * - \ref SCIP_STAGE_PRESOLVED
1105  * - \ref SCIP_STAGE_INITSOLVE
1106  * - \ref SCIP_STAGE_SOLVING
1107  * - \ref SCIP_STAGE_SOLVED
1108  * - \ref SCIP_STAGE_EXITSOLVE
1109  * - \ref SCIP_STAGE_FREETRANS
1110  */
1111 extern
1113  SCIP* scip, /**< SCIP data structure */
1114  int nconss, /**< number of constraints to get the transformed constraints for */
1115  SCIP_CONS** conss, /**< constraints to get the transformed constraints for */
1116  SCIP_CONS** transconss /**< array to store the transformed constraints */
1117  );
1118 
1119 /** adds given value to age of constraint, but age can never become negative;
1120  * should be called
1121  * - in constraint separation, if no cut was found for this constraint,
1122  * - in constraint enforcing, if constraint was feasible, and
1123  * - in constraint propagation, if no domain reduction was deduced;
1124  *
1125  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1126  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1127  *
1128  * @pre This method can be called if @p scip is in one of the following stages:
1129  * - \ref SCIP_STAGE_TRANSFORMED
1130  * - \ref SCIP_STAGE_PRESOLVING
1131  * - \ref SCIP_STAGE_PRESOLVED
1132  * - \ref SCIP_STAGE_SOLVING
1133  * - \ref SCIP_STAGE_SOLVED
1134  */
1135 extern
1137  SCIP* scip, /**< SCIP data structure */
1138  SCIP_CONS* cons, /**< constraint */
1139  SCIP_Real deltaage /**< value to add to the constraint's age */
1140  );
1141 
1142 /** increases age of constraint by 1.0;
1143  * should be called
1144  * - in constraint separation, if no cut was found for this constraint,
1145  * - in constraint enforcing, if constraint was feasible, and
1146  * - in constraint propagation, if no domain reduction was deduced;
1147  *
1148  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1149  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1150  *
1151  * @pre This method can be called if @p scip is in one of the following stages:
1152  * - \ref SCIP_STAGE_TRANSFORMED
1153  * - \ref SCIP_STAGE_PRESOLVING
1154  * - \ref SCIP_STAGE_PRESOLVED
1155  * - \ref SCIP_STAGE_SOLVING
1156  * - \ref SCIP_STAGE_SOLVED
1157  */
1158 extern
1160  SCIP* scip, /**< SCIP data structure */
1161  SCIP_CONS* cons /**< constraint */
1162  );
1163 
1164 /** resets age of constraint to zero;
1165  * should be called
1166  * - in constraint separation, if a cut was found for this constraint,
1167  * - in constraint enforcing, if the constraint was violated, and
1168  * - in constraint propagation, if a domain reduction was deduced;
1169  *
1170  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1171  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1172  *
1173  * @pre This method can be called if @p scip is in one of the following stages:
1174  * - \ref SCIP_STAGE_TRANSFORMED
1175  * - \ref SCIP_STAGE_PRESOLVING
1176  * - \ref SCIP_STAGE_PRESOLVED
1177  * - \ref SCIP_STAGE_SOLVING
1178  * - \ref SCIP_STAGE_SOLVED
1179  */
1180 extern
1182  SCIP* scip, /**< SCIP data structure */
1183  SCIP_CONS* cons /**< constraint */
1184  );
1185 
1186 /** enables constraint's separation, propagation, and enforcing capabilities
1187  *
1188  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1189  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1190  *
1191  * @pre This method can be called if @p scip is in one of the following stages:
1192  * - \ref SCIP_STAGE_TRANSFORMED
1193  * - \ref SCIP_STAGE_PRESOLVING
1194  * - \ref SCIP_STAGE_PRESOLVED
1195  * - \ref SCIP_STAGE_INITSOLVE
1196  * - \ref SCIP_STAGE_SOLVING
1197  * - \ref SCIP_STAGE_SOLVED
1198  */
1199 extern
1201  SCIP* scip, /**< SCIP data structure */
1202  SCIP_CONS* cons /**< constraint */
1203  );
1204 
1205 /** disables constraint's separation, propagation, and enforcing capabilities, s.t. the constraint is not propagated,
1206  * separated, and enforced anymore until it is enabled again with a call to SCIPenableCons();
1207  * in contrast to SCIPdelConsLocal() and SCIPdelConsNode(), the disabling is not associated to a node in the tree and
1208  * does not consume memory; therefore, the constraint is neither automatically enabled on leaving the node nor
1209  * automatically disabled again on entering the node again;
1210  * note that the constraints enforcing capabilities are necessary for the solution's feasibility, if the constraint
1211  * is a model constraint; that means, you must be sure that the constraint cannot be violated in the current subtree,
1212  * and you have to enable it again manually by calling SCIPenableCons(), if this subtree is left (e.g. by using
1213  * an appropriate event handler that watches the corresponding variables' domain changes)
1214  *
1215  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1216  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1217  *
1218  * @pre This method can be called if @p scip is in one of the following stages:
1219  * - \ref SCIP_STAGE_TRANSFORMED
1220  * - \ref SCIP_STAGE_INITPRESOLVE
1221  * - \ref SCIP_STAGE_PRESOLVING
1222  * - \ref SCIP_STAGE_PRESOLVED
1223  * - \ref SCIP_STAGE_INITSOLVE
1224  * - \ref SCIP_STAGE_SOLVING
1225  * - \ref SCIP_STAGE_SOLVED
1226  */
1227 extern
1229  SCIP* scip, /**< SCIP data structure */
1230  SCIP_CONS* cons /**< constraint */
1231  );
1232 
1233 /** enables constraint's separation capabilities
1234  *
1235  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1236  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1237  *
1238  * @pre This method can be called if @p scip is in one of the following stages:
1239  * - \ref SCIP_STAGE_TRANSFORMED
1240  * - \ref SCIP_STAGE_PRESOLVING
1241  * - \ref SCIP_STAGE_PRESOLVED
1242  * - \ref SCIP_STAGE_INITSOLVE
1243  * - \ref SCIP_STAGE_SOLVING
1244  * - \ref SCIP_STAGE_SOLVED
1245  */
1246 extern
1248  SCIP* scip, /**< SCIP data structure */
1249  SCIP_CONS* cons /**< constraint */
1250  );
1251 
1252 /** disables constraint's separation capabilities s.t. the constraint is not propagated anymore until the separation
1253  * is enabled again with a call to SCIPenableConsSeparation(); in contrast to SCIPdelConsLocal() and SCIPdelConsNode(),
1254  * the disabling is not associated to a node in the tree and does not consume memory; therefore, the constraint
1255  * is neither automatically enabled on leaving the node nor automatically disabled again on entering the node again
1256  *
1257  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1258  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1259  *
1260  * @pre This method can be called if @p scip is in one of the following stages:
1261  * - \ref SCIP_STAGE_TRANSFORMED
1262  * - \ref SCIP_STAGE_PRESOLVING
1263  * - \ref SCIP_STAGE_PRESOLVED
1264  * - \ref SCIP_STAGE_INITSOLVE
1265  * - \ref SCIP_STAGE_SOLVING
1266  * - \ref SCIP_STAGE_SOLVED
1267  */
1268 extern
1270  SCIP* scip, /**< SCIP data structure */
1271  SCIP_CONS* cons /**< constraint */
1272  );
1273 
1274 /** enables constraint's propagation capabilities
1275  *
1276  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1277  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1278  *
1279  * @pre This method can be called if @p scip is in one of the following stages:
1280  * - \ref SCIP_STAGE_TRANSFORMED
1281  * - \ref SCIP_STAGE_INITPRESOLVE
1282  * - \ref SCIP_STAGE_PRESOLVING
1283  * - \ref SCIP_STAGE_EXITPRESOLVE
1284  * - \ref SCIP_STAGE_PRESOLVED
1285  * - \ref SCIP_STAGE_INITSOLVE
1286  * - \ref SCIP_STAGE_SOLVING
1287  * - \ref SCIP_STAGE_SOLVED
1288  */
1289 extern
1291  SCIP* scip, /**< SCIP data structure */
1292  SCIP_CONS* cons /**< constraint */
1293  );
1294 
1295 /** disables constraint's propagation capabilities s.t. the constraint is not propagated anymore until the propagation
1296  * is enabled again with a call to SCIPenableConsPropagation(); in contrast to SCIPdelConsLocal() and SCIPdelConsNode(),
1297  * the disabling is not associated to a node in the tree and does not consume memory; therefore, the constraint
1298  * is neither automatically enabled on leaving the node nor automatically disabled again on entering the node again
1299  *
1300  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1301  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1302  *
1303  * @pre This method can be called if @p scip is in one of the following stages:
1304  * - \ref SCIP_STAGE_TRANSFORMED
1305  * - \ref SCIP_STAGE_INITPRESOLVE
1306  * - \ref SCIP_STAGE_PRESOLVING
1307  * - \ref SCIP_STAGE_EXITPRESOLVE
1308  * - \ref SCIP_STAGE_PRESOLVED
1309  * - \ref SCIP_STAGE_INITSOLVE
1310  * - \ref SCIP_STAGE_SOLVING
1311  * - \ref SCIP_STAGE_SOLVED
1312  */
1313 extern
1315  SCIP* scip, /**< SCIP data structure */
1316  SCIP_CONS* cons /**< constraint */
1317  );
1318 
1319 
1320 /** marks constraint to be propagated
1321  *
1322  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1323  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1324  *
1325  * @pre This method can be called if @p scip is in one of the following stages:
1326  * - \ref SCIP_STAGE_TRANSFORMING
1327  * - \ref SCIP_STAGE_TRANSFORMED
1328  * - \ref SCIP_STAGE_PRESOLVING
1329  * - \ref SCIP_STAGE_EXITPRESOLVE
1330  * - \ref SCIP_STAGE_PRESOLVED
1331  * - \ref SCIP_STAGE_INITSOLVE
1332  * - \ref SCIP_STAGE_SOLVING
1333  * - \ref SCIP_STAGE_SOLVED
1334  *
1335  * @note if a constraint is marked to be propagated, the age of the constraint will be ignored for propagation
1336  */
1337 extern
1339  SCIP* scip, /**< SCIP data structure */
1340  SCIP_CONS* cons /**< constraint */
1341  );
1342 
1343 /** unmarks the constraint to be propagated
1344  *
1345  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1346  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1347  *
1348  * @pre This method can be called if @p scip is in one of the following stages:
1349  * - \ref SCIP_STAGE_TRANSFORMED
1350  * - \ref SCIP_STAGE_PRESOLVING
1351  * - \ref SCIP_STAGE_EXITPRESOLVE
1352  * - \ref SCIP_STAGE_PRESOLVED
1353  * - \ref SCIP_STAGE_INITSOLVE
1354  * - \ref SCIP_STAGE_SOLVING
1355  * - \ref SCIP_STAGE_SOLVED
1356  */
1357 extern
1359  SCIP* scip, /**< SCIP data structure */
1360  SCIP_CONS* cons /**< constraint */
1361  );
1362 
1363 /** adds given values to lock status of type @p locktype of the constraint and updates the rounding locks of the involved variables
1364  *
1365  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1366  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1367  *
1368  * @pre This method can be called if @p scip is in one of the following stages:
1369  * - \ref SCIP_STAGE_PROBLEM
1370  * - \ref SCIP_STAGE_TRANSFORMING
1371  * - \ref SCIP_STAGE_INITPRESOLVE
1372  * - \ref SCIP_STAGE_PRESOLVING
1373  * - \ref SCIP_STAGE_EXITPRESOLVE
1374  * - \ref SCIP_STAGE_INITSOLVE
1375  * - \ref SCIP_STAGE_SOLVING
1376  * - \ref SCIP_STAGE_EXITSOLVE
1377  * - \ref SCIP_STAGE_FREETRANS
1378  */
1379 extern
1381  SCIP* scip, /**< SCIP data structure */
1382  SCIP_CONS* cons, /**< constraint */
1383  SCIP_LOCKTYPE locktype, /**< type of the variable locks */
1384  int nlockspos, /**< increase in number of rounding locks for constraint */
1385  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
1386  );
1387 
1388 /** adds given values to lock status of the constraint and updates the rounding locks of the involved variables
1389  *
1390  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1391  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1392  *
1393  * @pre This method can be called if @p scip is in one of the following stages:
1394  * - \ref SCIP_STAGE_PROBLEM
1395  * - \ref SCIP_STAGE_TRANSFORMING
1396  * - \ref SCIP_STAGE_INITPRESOLVE
1397  * - \ref SCIP_STAGE_PRESOLVING
1398  * - \ref SCIP_STAGE_EXITPRESOLVE
1399  * - \ref SCIP_STAGE_INITSOLVE
1400  * - \ref SCIP_STAGE_SOLVING
1401  * - \ref SCIP_STAGE_EXITSOLVE
1402  * - \ref SCIP_STAGE_FREETRANS
1403  *
1404  * @note This methods always adds locks of type model
1405  */
1406 extern
1408  SCIP* scip, /**< SCIP data structure */
1409  SCIP_CONS* cons, /**< constraint */
1410  int nlockspos, /**< increase in number of rounding locks for constraint */
1411  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
1412  );
1413 
1414 /** checks single constraint for feasibility of the given solution
1415  *
1416  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1417  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1418  *
1419  * @pre This method can be called if @p scip is in one of the following stages:
1420  * - \ref SCIP_STAGE_TRANSFORMED
1421  * - \ref SCIP_STAGE_INITPRESOLVE
1422  * - \ref SCIP_STAGE_PRESOLVING
1423  * - \ref SCIP_STAGE_EXITPRESOLVE
1424  * - \ref SCIP_STAGE_PRESOLVED
1425  * - \ref SCIP_STAGE_INITSOLVE
1426  * - \ref SCIP_STAGE_SOLVING
1427  * - \ref SCIP_STAGE_SOLVED
1428  */
1429 extern
1431  SCIP* scip, /**< SCIP data structure */
1432  SCIP_CONS* cons, /**< constraint to check */
1433  SCIP_SOL* sol, /**< primal CIP solution */
1434  SCIP_Bool checkintegrality, /**< Has integrality to be checked? */
1435  SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
1436  SCIP_Bool printreason, /**< Should the reason for the violation be printed? */
1437  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1438  );
1439 
1440 /** enforces single constraint for a given pseudo solution
1441  *
1442  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1443  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1444  *
1445  * @pre This method can be called if @p scip is in one of the following stages:
1446  * - \ref SCIP_STAGE_SOLVING
1447  *
1448  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1449  * added to SCIP beforehand.
1450  */
1451 extern
1453  SCIP* scip, /**< SCIP data structure */
1454  SCIP_CONS* cons, /**< constraint to enforce */
1455  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
1456  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
1457  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1458  );
1459 
1460 /** enforces single constraint for a given LP solution
1461  *
1462  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1463  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1464  *
1465  * @pre This method can be called if @p scip is in one of the following stages:
1466  * - \ref SCIP_STAGE_SOLVING
1467  *
1468  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1469  * added to SCIP beforehand.
1470  */
1471 extern
1473  SCIP* scip, /**< SCIP data structure */
1474  SCIP_CONS* cons, /**< constraint to enforce */
1475  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
1476  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1477  );
1478 
1479 /** enforces single constraint for a given relaxation solution
1480  *
1481  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1482  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1483  *
1484  * @pre This method can be called if @p scip is in one of the following stages:
1485  * - \ref SCIP_STAGE_SOLVING
1486  *
1487  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1488  * added to SCIP beforehand.
1489  */
1491  SCIP* scip, /**< SCIP data structure */
1492  SCIP_CONS* cons, /**< constraint to enforce */
1493  SCIP_SOL* sol, /**< solution to enforce */
1494  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
1495  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1496  );
1497 
1498 /** calls LP initialization method for single constraint
1499  *
1500  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1501  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1502  *
1503  * @pre This method can be called if @p scip is in one of the following stages:
1504  * - \ref SCIP_STAGE_SOLVING
1505  *
1506  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1507  * added to SCIP beforehand.
1508  */
1509 extern
1511  SCIP* scip, /**< SCIP data structure */
1512  SCIP_CONS* cons, /**< constraint to initialize */
1513  SCIP_Bool* infeasible /**< pointer to store whether infeasibility was detected while building the LP */
1514 
1515  );
1516 
1517 /** calls separation method of single constraint for LP solution
1518  *
1519  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1520  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1521  *
1522  * @pre This method can be called if @p scip is in one of the following stages:
1523  * - \ref SCIP_STAGE_SOLVING
1524  *
1525  * @note This is an advanced method and should be used with caution.
1526  */
1527 extern
1529  SCIP* scip, /**< SCIP data structure */
1530  SCIP_CONS* cons, /**< constraint to separate */
1531  SCIP_RESULT* result /**< pointer to store the result of the separation call */
1532  );
1533 
1534 /** calls separation method of single constraint for given primal solution
1535  *
1536  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1537  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1538  *
1539  * @pre This method can be called if @p scip is in one of the following stages:
1540  * - \ref SCIP_STAGE_SOLVING
1541  *
1542  * @note This is an advanced method and should be used with caution.
1543  */
1544 extern
1546  SCIP* scip, /**< SCIP data structure */
1547  SCIP_CONS* cons, /**< constraint to separate */
1548  SCIP_SOL* sol, /**< primal solution that should be separated*/
1549  SCIP_RESULT* result /**< pointer to store the result of the separation call */
1550  );
1551 
1552 /** calls domain propagation method of single constraint
1553  *
1554  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1555  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1556  *
1557  * @pre This method can be called if @p scip is in one of the following stages:
1558  * - \ref SCIP_STAGE_PRESOLVING
1559  * - \ref SCIP_STAGE_SOLVING
1560  *
1561  * @note This is an advanced method and should be used with caution.
1562  */
1563 extern
1565  SCIP* scip, /**< SCIP data structure */
1566  SCIP_CONS* cons, /**< constraint to propagate */
1567  SCIP_PROPTIMING proptiming, /**< current point in the node solving loop */
1568  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1569  );
1570 
1571 /** resolves propagation conflict of single constraint
1572  *
1573  *
1574  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1575  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1576  *
1577  * @pre This method can be called if @p scip is in one of the following stages:
1578  * - \ref SCIP_STAGE_PRESOLVING
1579  * - \ref SCIP_STAGE_SOLVING
1580  *
1581  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1582  * added to SCIP beforehand.
1583  */
1584 extern
1586  SCIP* scip, /**< SCIP data structure */
1587  SCIP_CONS* cons, /**< constraint to resolve conflict for */
1588  SCIP_VAR* infervar, /**< the conflict variable whose bound change has to be resolved */
1589  int inferinfo, /**< the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call */
1590  SCIP_BOUNDTYPE boundtype, /**< the type of the changed bound (lower or upper bound) */
1591  SCIP_BDCHGIDX* bdchgidx, /**< the index of the bound change, representing the point of time where the change took place */
1592  SCIP_Real relaxedbd, /**< the relaxed bound which is sufficient to be explained */
1593  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1594  );
1595 
1596 /** presolves of single constraint
1597  *
1598  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1599  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1600  *
1601  * @pre This method can be called if @p scip is in one of the following stages:
1602  * - \ref SCIP_STAGE_PRESOLVING
1603  *
1604  * @note This is an advanced method and should be used with caution.
1605  */
1606 extern
1608  SCIP* scip, /**< SCIP data structure */
1609  SCIP_CONS* cons, /**< constraint to presolve */
1610  int nrounds, /**< number of presolving rounds already done */
1611  SCIP_PRESOLTIMING presoltiming, /**< presolving timing(s) to be performed */
1612  int nnewfixedvars, /**< number of variables fixed since the last call to the presolving method */
1613  int nnewaggrvars, /**< number of variables aggregated since the last call to the presolving method */
1614  int nnewchgvartypes, /**< number of variable type changes since the last call to the presolving method */
1615  int nnewchgbds, /**< number of variable bounds tightened since the last call to the presolving method */
1616  int nnewholes, /**< number of domain holes added since the last call to the presolving method */
1617  int nnewdelconss, /**< number of deleted constraints since the last call to the presolving method */
1618  int nnewaddconss, /**< number of added constraints since the last call to the presolving method */
1619  int nnewupgdconss, /**< number of upgraded constraints since the last call to the presolving method */
1620  int nnewchgcoefs, /**< number of changed coefficients since the last call to the presolving method */
1621  int nnewchgsides, /**< number of changed left or right hand sides since the last call to the presolving method */
1622  int* nfixedvars, /**< pointer to count total number of variables fixed of all presolvers */
1623  int* naggrvars, /**< pointer to count total number of variables aggregated of all presolvers */
1624  int* nchgvartypes, /**< pointer to count total number of variable type changes of all presolvers */
1625  int* nchgbds, /**< pointer to count total number of variable bounds tightened of all presolvers */
1626  int* naddholes, /**< pointer to count total number of domain holes added of all presolvers */
1627  int* ndelconss, /**< pointer to count total number of deleted constraints of all presolvers */
1628  int* naddconss, /**< pointer to count total number of added constraints of all presolvers */
1629  int* nupgdconss, /**< pointer to count total number of upgraded constraints of all presolvers */
1630  int* nchgcoefs, /**< pointer to count total number of changed coefficients of all presolvers */
1631  int* nchgsides, /**< pointer to count total number of changed left/right hand sides of all presolvers */
1632  SCIP_RESULT* result /**< pointer to store the result of the callback method */
1633  );
1634 
1635 /** calls constraint activation notification method of single constraint
1636  *
1637  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1638  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1639  *
1640  * @pre This method can be called if @p scip is in one of the following stages:
1641  * - \ref SCIP_STAGE_TRANSFORMING
1642  *
1643  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1644  * added to SCIP beforehand.
1645  */
1646 extern
1648  SCIP* scip, /**< SCIP data structure */
1649  SCIP_CONS* cons /**< constraint to notify */
1650  );
1651 
1652 /** calls constraint deactivation notification method of single constraint
1653  *
1654  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1655  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1656  *
1657  * @pre This method can be called if @p scip is in one of the following stages:
1658  * - \ref SCIP_STAGE_PRESOLVING
1659  * - \ref SCIP_STAGE_SOLVING
1660  *
1661  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
1662  * added to SCIP beforehand.
1663  */
1664 extern
1666  SCIP* scip, /**< SCIP data structure */
1667  SCIP_CONS* cons /**< constraint to notify */
1668  );
1669 
1670 /** outputs constraint information to file stream via the message handler system
1671  *
1672  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1673  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1674  *
1675  * @pre This method can be called if @p scip is in one of the following stages:
1676  * - \ref SCIP_STAGE_PROBLEM
1677  * - \ref SCIP_STAGE_TRANSFORMING
1678  * - \ref SCIP_STAGE_TRANSFORMED
1679  * - \ref SCIP_STAGE_INITPRESOLVE
1680  * - \ref SCIP_STAGE_PRESOLVING
1681  * - \ref SCIP_STAGE_EXITPRESOLVE
1682  * - \ref SCIP_STAGE_PRESOLVED
1683  * - \ref SCIP_STAGE_INITSOLVE
1684  * - \ref SCIP_STAGE_SOLVING
1685  * - \ref SCIP_STAGE_SOLVED
1686  * - \ref SCIP_STAGE_EXITSOLVE
1687  * - \ref SCIP_STAGE_FREETRANS
1688  *
1689  * @note If the message handler is set to a NULL pointer nothing will be printed.
1690  * @note The file stream will not be flushed directly, this can be achieved by calling SCIPinfoMessage() printing a
1691  * newline character.
1692  */
1693 extern
1695  SCIP* scip, /**< SCIP data structure */
1696  SCIP_CONS* cons, /**< constraint */
1697  FILE* file /**< output file (or NULL for standard output) */
1698  );
1699 
1700 /** method to collect the variables of a constraint
1701  *
1702  * If the number of variables is greater than the available slots in the variable array, nothing happens except that
1703  * the success point is set to FALSE. With the method SCIPgetConsNVars() it is possible to get the number of variables
1704  * a constraint has in its scope.
1705  *
1706  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1707  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1708  *
1709  * @pre This method can be called if @p scip is in one of the following stages:
1710  * - \ref SCIP_STAGE_PROBLEM
1711  * - \ref SCIP_STAGE_TRANSFORMING
1712  * - \ref SCIP_STAGE_TRANSFORMED
1713  * - \ref SCIP_STAGE_INITPRESOLVE
1714  * - \ref SCIP_STAGE_PRESOLVING
1715  * - \ref SCIP_STAGE_EXITPRESOLVE
1716  * - \ref SCIP_STAGE_PRESOLVED
1717  * - \ref SCIP_STAGE_INITSOLVE
1718  * - \ref SCIP_STAGE_SOLVING
1719  * - \ref SCIP_STAGE_SOLVED
1720  * - \ref SCIP_STAGE_EXITSOLVE
1721  * - \ref SCIP_STAGE_FREETRANS
1722  *
1723  * @note The success pointer indicates if all variables were copied into the vars arrray.
1724  *
1725  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
1726  * set to FALSE.
1727  */
1728 extern
1730  SCIP* scip, /**< SCIP data structure */
1731  SCIP_CONS* cons, /**< constraint for which the variables are wanted */
1732  SCIP_VAR** vars, /**< array to store the involved variable of the constraint */
1733  int varssize, /**< available slots in vars array which is needed to check if the array is large enough */
1734  SCIP_Bool* success /**< pointer to store whether the variables are successfully copied */
1735  );
1736 
1737 /** method to collect the number of variables of a constraint
1738  *
1739  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1740  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1741  *
1742  * @pre This method can be called if @p scip is in one of the following stages:
1743  * - \ref SCIP_STAGE_PROBLEM
1744  * - \ref SCIP_STAGE_TRANSFORMING
1745  * - \ref SCIP_STAGE_TRANSFORMED
1746  * - \ref SCIP_STAGE_INITPRESOLVE
1747  * - \ref SCIP_STAGE_PRESOLVING
1748  * - \ref SCIP_STAGE_EXITPRESOLVE
1749  * - \ref SCIP_STAGE_PRESOLVED
1750  * - \ref SCIP_STAGE_INITSOLVE
1751  * - \ref SCIP_STAGE_SOLVING
1752  * - \ref SCIP_STAGE_SOLVED
1753  * - \ref SCIP_STAGE_EXITSOLVE
1754  * - \ref SCIP_STAGE_FREETRANS
1755  *
1756  * @note The success pointer indicates if the contraint handler was able to return the number of variables
1757  *
1758  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
1759  * set to FALSE
1760  */
1761 extern
1763  SCIP* scip, /**< SCIP data structure */
1764  SCIP_CONS* cons, /**< constraint for which the number of variables is wanted */
1765  int* nvars, /**< pointer to store the number of variables */
1766  SCIP_Bool* success /**< pointer to store whether the constraint successfully returned the number of variables */
1767  );
1768 
1769 #ifdef NDEBUG
1770 
1771 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1772  * speed up the algorithms.
1773  */
1774 
1775 #define SCIPmarkConsPropagate(scip, cons) SCIPconsMarkPropagate(cons, (scip)->set)
1776 #endif
1777 
1778 /**@} */
1779 
1780 #ifdef __cplusplus
1781 }
1782 #endif
1783 
1784 #endif
SCIP_RETCODE SCIPrespropCons(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
Definition: scip_cons.c:2385
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1798
SCIP_RETCODE SCIPaddConsAge(SCIP *scip, SCIP_CONS *cons, SCIP_Real deltaage)
Definition: scip_cons.c:1769
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
Definition: scip_cons.c:640
SCIP_RETCODE SCIPdisableConsSeparation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1938
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
Definition: scip_cons.c:663
internal methods for branch and bound tree
type definitions for miscellaneous datastructures
timing definitions for SCIP
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
Definition: scip_cons.c:954
SCIP_DECL_CONSSEPALP(ConshdlrSubtour::scip_sepalp)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
Definition: scip_cons.c:893
#define SCIP_DECL_CONSINITPRE(x)
Definition: type_cons.h:141
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: scip_cons.c:385
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1826
SCIP_RETCODE SCIPchgConsName(SCIP *scip, SCIP_CONS *cons, const char *name)
Definition: scip_cons.c:1238
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
Definition: type_cons.h:904
#define SCIP_DECL_CONSPRESOL(x)
Definition: type_cons.h:545
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
Definition: scip_cons.c:1385
SCIP_RETCODE SCIPdisableConsPropagation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1995
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
Definition: scip_cons.c:755
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
Definition: scip_cons.c:1538
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
Definition: scip_cons.c:554
SCIP_DECL_CONSENFOPS(ConshdlrSubtour::scip_enfops)
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
Definition: scip_cons.c:1639
#define SCIP_DECL_CONSRESPROP(x)
Definition: type_cons.h:596
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
Definition: scip_cons.c:243
SCIP_RETCODE SCIPparseCons(SCIP *scip, SCIP_CONS **cons, 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: scip_cons.c:1095
SCIP_RETCODE SCIPenableConsSeparation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1910
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2056
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_DECL_CONSGETNVARS(x)
Definition: type_cons.h:869
#define SCIP_DECL_CONSEXITSOL(x)
Definition: type_cons.h:201
SCIP_RETCODE SCIPenableConsPropagation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1965
type definitions for return codes for SCIP methods
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
Definition: scip_cons.c:297
SCIP_DECL_CONSSEPASOL(ConshdlrSubtour::scip_sepasol)
SCIP_DECL_CONSDELETE(ConshdlrSubtour::scip_delete)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELVARS((*consdelvars)))
Definition: scip_cons.c:824
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
Definition: scip_cons.c:686
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
Definition: scip_cons.c:870
#define SCIP_DECL_CONSINITLP(x)
Definition: type_cons.h:244
SCIP_RETCODE SCIPactiveCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2482
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, 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)
Definition: scip_cons.c:1011
SCIP_DECL_CONSENFOLP(ConshdlrSubtour::scip_enfolp)
int SCIPgetNConshdlrs(SCIP *scip)
Definition: scip_cons.c:978
type definitions for LP management
SCIP_DECL_CONSCHECK(ConshdlrSubtour::scip_check)
#define SCIP_DECL_CONSINITSOL(x)
Definition: type_cons.h:186
SCIP_RETCODE SCIPenableCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1851
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
Definition: scip_cons.c:1310
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
Definition: scip_cons.c:506
SCIP_RETCODE SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
Definition: scip_cons.c:939
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
Definition: scip_cons.c:1488
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
Definition: scip_cons.c:409
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:87
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
Definition: scip_cons.c:2635
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
Definition: scip_cons.c:967
type definitions for primal heuristics
#define SCIP_DECL_CONSPARSE(x)
Definition: type_cons.h:829
#define SCIP_DECL_CONSDEACTIVE(x)
Definition: type_cons.h:690
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPpresolCons(SCIP *scip, SCIP_CONS *cons, int nrounds, SCIP_PRESOLTIMING presoltiming, 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: scip_cons.c:2420
SCIP_RETCODE SCIPcheckCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
Definition: scip_cons.c:2149
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
Definition: scip_cons.c:1360
SCIP_RETCODE SCIPsetConsDynamic(SCIP *scip, SCIP_CONS *cons, SCIP_Bool dynamic)
Definition: scip_cons.c:1463
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
Definition: scip_cons.c:434
SCIP_DECL_CONSTRANS(ConshdlrSubtour::scip_trans)
SCIP_RETCODE SCIPenforelaxCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: scip_cons.c:2238
internal miscellaneous methods
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2028
#define SCIP_DECL_CONSDISABLE(x)
Definition: type_cons.h:720
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition: scip_cons.c:1598
internal methods for global SCIP settings
SCIP_DECL_CONSDELVARS(ConshdlrSubtour::scip_delvars)
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
SCIP main data structure.
type definitions for problem variables
#define SCIP_DECL_CONSENABLE(x)
Definition: type_cons.h:705
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition: scip_cons.c:1688
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1152
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
Definition: scip_cons.c:709
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:51
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1885
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
Definition: scip_cons.c:2591
internal methods for problem variables
#define SCIP_DECL_CONSGETVARS(x)
Definition: type_cons.h:851
SCIP_RETCODE SCIPpropCons(SCIP *scip, SCIP_CONS *cons, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
Definition: scip_cons.c:2354
#define SCIP_DECL_CONSEXIT(x)
Definition: type_cons.h:121
#define SCIP_Bool
Definition: def.h:69
SCIP_RETCODE SCIPsetConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_Bool local)
Definition: scip_cons.c:1412
SCIP_DECL_CONSPROP(ConshdlrSubtour::scip_prop)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
Definition: scip_cons.c:2550
#define SCIP_DECL_CONSEXITPRE(x)
Definition: type_cons.h:165
methods for debugging
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
Definition: scip_cons.c:801
SCIP_RETCODE SCIPsepasolCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: scip_cons.c:2324
SCIP_RETCODE SCIPenfolpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: scip_cons.c:2208
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
Definition: scip_cons.c:847
datastructures for problem statistics
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
Definition: scip_cons.c:778
type definitions for storing primal CIP solutions
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
Definition: scip_cons.c:578
SCIP_RETCODE SCIPsetConsStickingAtNode(SCIP *scip, SCIP_CONS *cons, SCIP_Bool stickingatnode)
Definition: scip_cons.c:1513
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_RETCODE SCIPenfopsCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
Definition: scip_cons.c:2177
SCIP_RETCODE SCIPsepalpCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
Definition: scip_cons.c:2297
internal methods for main solving loop and node processing
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
Definition: scip_cons.c:458
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
Definition: scip_cons.c:1335
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
Definition: scip_cons.c:482
#define SCIP_DECL_CONSFREE(x)
Definition: type_cons.h:101
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip_cons.c:1187
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
Definition: scip_cons.c:602
#define SCIP_DECL_CONSINIT(x)
Definition: type_cons.h:111
SCIP_DECL_CONSLOCK(ConshdlrSubtour::scip_lock)
#define SCIP_DECL_CONSENFORELAX(x)
Definition: type_cons.h:373
#define SCIP_Real
Definition: def.h:157
SCIP_RETCODE SCIPaddConsLocksType(SCIP *scip, SCIP_CONS *cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
Definition: scip_cons.c:2086
SCIP_DECL_CONSPRINT(ConshdlrSubtour::scip_print)
result codes for SCIP callback methods
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
Definition: scip_cons.c:916
internal methods for constraints and constraint handlers
#define SCIP_DECL_CONSACTIVE(x)
Definition: type_cons.h:675
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
Definition: scip_cons.c:1438
SCIP_RETCODE SCIPaddConsLocks(SCIP *scip, SCIP_CONS *cons, int nlockspos, int nlocksneg)
Definition: scip_cons.c:2119
#define SCIP_DECL_CONSHDLRCOPY(x)
Definition: type_cons.h:93
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:50
SCIP_DECL_CONSCOPY(ConshdlrSubtour::scip_copy)
SCIP_RETCODE SCIPincludeConshdlr(SCIP *scip, const char *name, const char *desc, int sepapriority, int enfopriority, int chckpriority, 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_CONSENFORELAX((*consenforelax)), 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: scip_cons.c:150
SCIP_RETCODE SCIPgetTransformedConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
Definition: scip_cons.c:1728
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
Definition: scip_cons.c:732
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
Definition: scip_cons.c:530
SCIP_RETCODE SCIPdeactiveCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2511
SCIP_RETCODE SCIPinitlpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
Definition: scip_cons.c:2270
type definitions for constraints and constraint handlers
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
Definition: scip_cons.c:343
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
Definition: scip_cons.c:1285