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