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