Scippy

SCIP

Solving Constraint Integer Programs

scip_cons.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file scip_cons.c
17  * @brief public methods for constraint handler plugins and constraints
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  * @author Robert Lion Gottwald
22  * @author Stefan Heinz
23  * @author Gregor Hendel
24  * @author Thorsten Koch
25  * @author Alexander Martin
26  * @author Marc Pfetsch
27  * @author Michael Winkler
28  * @author Kati Wolter
29  *
30  * @todo check all SCIP_STAGE_* switches, and include the new stages TRANSFORMED and INITSOLVE
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #include "scip/cons.h"
36 #include "scip/debug.h"
37 #include "scip/prob.h"
38 #include "scip/pub_cons.h"
39 #include "scip/pub_message.h"
40 #include "scip/pub_misc.h"
41 #include "scip/scip_cons.h"
42 #include "scip/scip_general.h"
43 #include "scip/scip_mem.h"
44 #include "scip/set.h"
45 #include "scip/struct_cons.h"
46 #include "scip/struct_mem.h"
47 #include "scip/struct_scip.h"
48 #include "scip/struct_set.h"
49 
50 /* In debug mode, the following methods are implemented as function calls to ensure
51  * type validity.
52  * In optimized mode, the methods are implemented as defines to improve performance.
53  * However, we want to have them in the library anyways, so we have to undef the defines.
54  */
55 
56 #undef SCIPmarkConsPropagate
57 
58 /** creates a constraint handler and includes it in SCIP.
59  *
60  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
61  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
62  *
63  * @pre This method can be called if SCIP is in one of the following stages:
64  * - \ref SCIP_STAGE_INIT
65  * - \ref SCIP_STAGE_PROBLEM
66  *
67  * @note method has all constraint handler callbacks as arguments and is thus changed every time a new
68  * callback is added
69  * in future releases; consider using SCIPincludeConshdlrBasic() and setter functions
70  * if you seek for a method which is less likely to change in future releases
71  */
73  SCIP* scip, /**< SCIP data structure */
74  const char* name, /**< name of constraint handler */
75  const char* desc, /**< description of constraint handler */
76  int sepapriority, /**< priority of the constraint handler for separation */
77  int enfopriority, /**< priority of the constraint handler for constraint enforcing */
78  int chckpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
79  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
80  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
81  int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
82  * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
83  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
84  SCIP_Bool delaysepa, /**< should separation method be delayed, if other separators found cuts? */
85  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
86  SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
87  SCIP_PROPTIMING proptiming, /**< positions in the node solving loop where propagation method of constraint handlers should be executed */
88  SCIP_PRESOLTIMING presoltiming, /**< timing mask of the constraint handler's presolving method */
89  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
90  SCIP_DECL_CONSFREE ((*consfree)), /**< destructor of constraint handler */
91  SCIP_DECL_CONSINIT ((*consinit)), /**< initialize constraint handler */
92  SCIP_DECL_CONSEXIT ((*consexit)), /**< deinitialize constraint handler */
93  SCIP_DECL_CONSINITPRE ((*consinitpre)), /**< presolving initialization method of constraint handler */
94  SCIP_DECL_CONSEXITPRE ((*consexitpre)), /**< presolving deinitialization method of constraint handler */
95  SCIP_DECL_CONSINITSOL ((*consinitsol)), /**< solving process initialization method of constraint handler */
96  SCIP_DECL_CONSEXITSOL ((*consexitsol)), /**< solving process deinitialization method of constraint handler */
97  SCIP_DECL_CONSDELETE ((*consdelete)), /**< free specific constraint data */
98  SCIP_DECL_CONSTRANS ((*constrans)), /**< transform constraint data into data belonging to the transformed problem */
99  SCIP_DECL_CONSINITLP ((*consinitlp)), /**< initialize LP with relaxations of "initial" constraints */
100  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
101  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
102  SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */
103  SCIP_DECL_CONSENFORELAX ((*consenforelax)), /**< enforcing constraints for relaxation solutions */
104  SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */
105  SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */
106  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
107  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method */
108  SCIP_DECL_CONSRESPROP ((*consresprop)), /**< propagation conflict resolving method */
109  SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */
110  SCIP_DECL_CONSACTIVE ((*consactive)), /**< activation notification method */
111  SCIP_DECL_CONSDEACTIVE((*consdeactive)), /**< deactivation notification method */
112  SCIP_DECL_CONSENABLE ((*consenable)), /**< enabling notification method */
113  SCIP_DECL_CONSDISABLE ((*consdisable)), /**< disabling notification method */
114  SCIP_DECL_CONSDELVARS ((*consdelvars)), /**< variable deletion method */
115  SCIP_DECL_CONSPRINT ((*consprint)), /**< constraint display method */
116  SCIP_DECL_CONSCOPY ((*conscopy)), /**< constraint copying method */
117  SCIP_DECL_CONSPARSE ((*consparse)), /**< constraint parsing method */
118  SCIP_DECL_CONSGETVARS ((*consgetvars)), /**< constraint get variables method */
119  SCIP_DECL_CONSGETNVARS((*consgetnvars)), /**< constraint get number of variable method */
120  SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), /**< constraint handler diving solution enforcement method */
121  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
122  )
123 {
124  SCIP_CONSHDLR* conshdlr;
125 
126  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConshdlr", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
127 
128  /* check whether constraint handler is already present */
129  if( SCIPfindConshdlr(scip, name) != NULL )
130  {
131  SCIPerrorMessage("constraint handler <%s> already included.\n", name);
132  return SCIP_INVALIDDATA;
133  }
134 
135  SCIP_CALL( SCIPconshdlrCreate(&conshdlr, scip->set, scip->messagehdlr, scip->mem->setmem,
136  name, desc, sepapriority, enfopriority, chckpriority, sepafreq, propfreq, eagerfreq, maxprerounds,
137  delaysepa, delayprop, needscons, proptiming, presoltiming, conshdlrcopy,
138  consfree, consinit, consexit, consinitpre, consexitpre, consinitsol, consexitsol,
139  consdelete, constrans, consinitlp, conssepalp, conssepasol, consenfolp, consenforelax, consenfops, conscheck, consprop,
140  conspresol, consresprop, conslock, consactive, consdeactive, consenable, consdisable, consdelvars, consprint,
141  conscopy, consparse, consgetvars, consgetnvars, consgetdivebdchgs, conshdlrdata) );
142  SCIP_CALL( SCIPsetIncludeConshdlr(scip->set, conshdlr) );
143 
144  return SCIP_OKAY;
145 }
146 
147 /** creates a constraint handler and includes it in SCIP. All non-fundamental (or optional) callbacks will be set to NULL.
148  * Optional callbacks can be set via specific setter functions, see SCIPsetConshdlrInit(), SCIPsetConshdlrExit(),
149  * SCIPsetConshdlrCopy(), SCIPsetConshdlrFree(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrExitsol(),
150  * SCIPsetConshdlrInitpre(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrPresol(), SCIPsetConshdlrDelete(),
151  * SCIPsetConshdlrDelvars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrActive(), SCIPsetConshdlrDeactive(),
152  * SCIPsetConshdlrEnable(), SCIPsetConshdlrDisable(), SCIPsetConshdlrResprop(), SCIPsetConshdlrTrans(),
153  * SCIPsetConshdlrPrint(), SCIPsetConshdlrParse(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrGetNVars(), and
154  * SCIPsetConshdlrGetDiveBdChgs().
155  *
156  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
157  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
158  *
159  * @pre This method can be called if SCIP is in one of the following stages:
160  * - \ref SCIP_STAGE_INIT
161  * - \ref SCIP_STAGE_PROBLEM
162  *
163  * @note if you want to set all callbacks with a single method call, consider using SCIPincludeConshdlr() instead
164  */
166  SCIP* scip, /**< SCIP data structure */
167  SCIP_CONSHDLR** conshdlrptr, /**< reference to a constraint handler pointer, or NULL */
168  const char* name, /**< name of constraint handler */
169  const char* desc, /**< description of constraint handler */
170  int enfopriority, /**< priority of the constraint handler for constraint enforcing */
171  int chckpriority, /**< priority of the constraint handler for checking feasibility (and propagation) */
172  int eagerfreq, /**< frequency for using all instead of only the useful constraints in separation,
173  * propagation and enforcement, -1 for no eager evaluations, 0 for first only */
174  SCIP_Bool needscons, /**< should the constraint handler be skipped, if no constraints are available? */
175  SCIP_DECL_CONSENFOLP ((*consenfolp)), /**< enforcing constraints for LP solutions */
176  SCIP_DECL_CONSENFOPS ((*consenfops)), /**< enforcing constraints for pseudo solutions */
177  SCIP_DECL_CONSCHECK ((*conscheck)), /**< check feasibility of primal solution */
178  SCIP_DECL_CONSLOCK ((*conslock)), /**< variable rounding lock method */
179  SCIP_CONSHDLRDATA* conshdlrdata /**< constraint handler data */
180  )
181 {
182  SCIP_CONSHDLR* conshdlr;
183 
184  SCIP_CALL( SCIPcheckStage(scip, "SCIPincludeConshdlrBasic", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
185 
186  /* check whether constraint handler is already present */
187  if( SCIPfindConshdlr(scip, name) != NULL )
188  {
189  SCIPerrorMessage("constraint handler <%s> already included.\n", name);
190  return SCIP_INVALIDDATA;
191  }
192 
193  SCIP_CALL( SCIPconshdlrCreate(&conshdlr, scip->set, scip->messagehdlr, scip->mem->setmem,
194  name, desc, 0, enfopriority, chckpriority, -1, -1, eagerfreq, 0,
195  FALSE, FALSE, needscons,
197  NULL,
198  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
199  NULL, NULL, NULL, NULL, NULL, consenfolp, NULL, consenfops, conscheck, NULL,
200  NULL, NULL, conslock, NULL, NULL, NULL, NULL, NULL, NULL,
201  NULL, NULL, NULL, NULL, NULL, conshdlrdata) );
202  SCIP_CALL( SCIPsetIncludeConshdlr(scip->set, conshdlr) );
203 
204  if( conshdlrptr != NULL )
205  *conshdlrptr = conshdlr;
206 
207  return SCIP_OKAY;
208 }
209 
210 /** sets all separation related callbacks/parameters of the constraint handler
211  *
212  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
213  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
214  *
215  * @pre This method can be called if SCIP is in one of the following stages:
216  * - \ref SCIP_STAGE_INIT
217  * - \ref SCIP_STAGE_PROBLEM
218  */
220  SCIP* scip, /**< SCIP data structure */
221  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
222  SCIP_DECL_CONSSEPALP ((*conssepalp)), /**< separate cutting planes for LP solution */
223  SCIP_DECL_CONSSEPASOL ((*conssepasol)), /**< separate cutting planes for arbitrary primal solution */
224  int sepafreq, /**< frequency for separating cuts; zero means to separate only in the root node */
225  int sepapriority, /**< priority of the constraint handler for separation */
226  SCIP_Bool delaysepa /**< should separation method be delayed, if other separators found cuts? */
227  )
228 {
229  int oldsepapriority;
230  const char* name;
231  char paramname[SCIP_MAXSTRLEN];
232 
233  assert(scip != NULL);
234  assert(conshdlr != NULL);
235 
236  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrSepa", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
237 
238  oldsepapriority = SCIPconshdlrGetSepaPriority(conshdlr);
239  SCIPconshdlrSetSepa(conshdlr, conssepalp, conssepasol, sepafreq, sepapriority, delaysepa);
240 
241  /* change the position of the constraint handler in the constraint handler array w.r.t. its new sepa priority */
242  if( oldsepapriority != sepapriority )
243  SCIPsetReinsertConshdlrSepaPrio(scip->set, conshdlr, oldsepapriority);
244 
245  name = SCIPconshdlrGetName(conshdlr);
246 
247  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/sepafreq", name);
248  SCIP_CALL( SCIPsetSetDefaultIntParam(scip->set, paramname, sepafreq) );
249 
250  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/delaysepa", name);
251  SCIP_CALL( SCIPsetSetDefaultBoolParam(scip->set, paramname, delaysepa) );
252 
253  return SCIP_OKAY;
254 }
255 
256 /** sets both the propagation callback and the propagation frequency of the constraint handler
257  *
258  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
259  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
260  *
261  * @pre This method can be called if SCIP is in one of the following stages:
262  * - \ref SCIP_STAGE_INIT
263  * - \ref SCIP_STAGE_PROBLEM
264  */
266  SCIP* scip, /**< SCIP data structure */
267  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
268  SCIP_DECL_CONSPROP ((*consprop)), /**< propagate variable domains */
269  int propfreq, /**< frequency for propagating domains; zero means only preprocessing propagation */
270  SCIP_Bool delayprop, /**< should propagation method be delayed, if other propagators found reductions? */
271  SCIP_PROPTIMING proptiming /**< positions in the node solving loop where propagation should be executed */
272  )
273 {
274  const char* name;
275  char paramname[SCIP_MAXSTRLEN];
276 
277  assert(scip != NULL);
278  assert(conshdlr != NULL);
279 
280  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrProp", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
281 
282  SCIPconshdlrSetProp(conshdlr, consprop, propfreq, delayprop, proptiming);
283 
284  name = SCIPconshdlrGetName(conshdlr);
285 
286  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/propfreq", name);
287  SCIP_CALL( SCIPsetSetDefaultIntParam(scip->set, paramname, propfreq) );
288 
289  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/proptiming", name);
290  SCIP_CALL( SCIPsetSetDefaultIntParam(scip->set, paramname, (int) proptiming) );
291 
292  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/delayprop", name);
293  SCIP_CALL( SCIPsetSetDefaultBoolParam(scip->set, paramname, delayprop) );
294 
295  return SCIP_OKAY;
296 }
297 
298 /** sets relaxation enforcement method of the constraint handler
299  *
300  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
301  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
302  *
303  * @pre This method can be called if SCIP is in one of the following stages:
304  * - \ref SCIP_STAGE_INIT
305  * - \ref SCIP_STAGE_PROBLEM
306  */
308  SCIP* scip, /**< SCIP data structure */
309  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
310  SCIP_DECL_CONSENFORELAX ((*consenforelax)) /**< enforcement method for relaxation solution of constraint handler (might be NULL) */
311  )
312 {
313  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrEnforelax", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
314 
315  assert(conshdlr != NULL);
316 
317  SCIPconshdlrSetEnforelax(conshdlr, consenforelax);
318 
319  return SCIP_OKAY;
320 }
321 
322 /** sets copy method of both the constraint handler and each associated constraint
323  *
324  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
325  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
326  *
327  * @pre This method can be called if SCIP is in one of the following stages:
328  * - \ref SCIP_STAGE_INIT
329  * - \ref SCIP_STAGE_PROBLEM
330  */
332  SCIP* scip, /**< SCIP data structure */
333  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
334  SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), /**< copy method of constraint handler or NULL if you don't want to copy your plugin into sub-SCIPs */
335  SCIP_DECL_CONSCOPY ((*conscopy)) /**< constraint copying method */
336  )
337 {
338  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrCopy", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
339 
340  assert(conshdlr != NULL);
341 
342  SCIPconshdlrSetCopy(conshdlr, conshdlrcopy, conscopy);
343 
344  return SCIP_OKAY;
345 }
346 
347 /** sets destructor method of constraint handler
348  *
349  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
350  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
351  *
352  * @pre This method can be called if SCIP is in one of the following stages:
353  * - \ref SCIP_STAGE_INIT
354  * - \ref SCIP_STAGE_PROBLEM
355  */
357  SCIP* scip, /**< SCIP data structure */
358  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
359  SCIP_DECL_CONSFREE ((*consfree)) /**< destructor of constraint handler */
360  )
361 {
362  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrFree", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
363 
364  assert(conshdlr != NULL);
365 
366  SCIPconshdlrSetFree(conshdlr, consfree);
367 
368  return SCIP_OKAY;
369 }
370 
371 /** sets initialization method of constraint handler
372  *
373  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
374  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
375  *
376  * @pre This method can be called if SCIP is in one of the following stages:
377  * - \ref SCIP_STAGE_INIT
378  * - \ref SCIP_STAGE_PROBLEM
379  */
381  SCIP* scip, /**< SCIP data structure */
382  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
383  SCIP_DECL_CONSINIT ((*consinit)) /**< initialize constraint handler */
384  )
385 {
386  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrInit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
387 
388  assert(conshdlr != NULL);
389 
390  SCIPconshdlrSetInit(conshdlr, consinit);
391 
392  return SCIP_OKAY;
393 }
394 
395 /** sets deinitialization method of constraint handler
396  *
397  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
398  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
399  *
400  * @pre This method can be called if SCIP is in one of the following stages:
401  * - \ref SCIP_STAGE_INIT
402  * - \ref SCIP_STAGE_PROBLEM
403  */
405  SCIP* scip, /**< SCIP data structure */
406  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
407  SCIP_DECL_CONSEXIT ((*consexit)) /**< deinitialize constraint handler */
408  )
409 {
410  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrExit", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
411 
412  assert(conshdlr != NULL);
413 
414  SCIPconshdlrSetExit(conshdlr, consexit);
415 
416  return SCIP_OKAY;
417 }
418 
419 /** sets solving process initialization method of constraint handler
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  */
429  SCIP* scip, /**< SCIP data structure */
430  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
431  SCIP_DECL_CONSINITSOL((*consinitsol)) /**< solving process initialization method of constraint handler */
432  )
433 {
434  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrInitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
435 
436  assert(conshdlr != NULL);
437 
438  SCIPconshdlrSetInitsol(conshdlr, consinitsol);
439 
440  return SCIP_OKAY;
441 }
442 
443 /** sets solving process deinitialization method of constraint handler
444  *
445  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
446  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
447  *
448  * @pre This method can be called if SCIP is in one of the following stages:
449  * - \ref SCIP_STAGE_INIT
450  * - \ref SCIP_STAGE_PROBLEM
451  */
453  SCIP* scip, /**< SCIP data structure */
454  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
455  SCIP_DECL_CONSEXITSOL ((*consexitsol))/**< solving process deinitialization method of constraint handler */
456  )
457 {
458  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrExitsol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
459 
460  assert(conshdlr != NULL);
461 
462  SCIPconshdlrSetExitsol(conshdlr, consexitsol);
463 
464  return SCIP_OKAY;
465 }
466 
467 /** sets preprocessing initialization 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  */
477  SCIP* scip, /**< SCIP data structure */
478  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
479  SCIP_DECL_CONSINITPRE((*consinitpre)) /**< preprocessing initialization method of constraint handler */
480  )
481 {
482  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrInitpre", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
483 
484  assert(conshdlr != NULL);
485 
486  SCIPconshdlrSetInitpre(conshdlr, consinitpre);
487 
488  return SCIP_OKAY;
489 }
490 
491 /** sets preprocessing deinitialization method of constraint handler
492  *
493  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
494  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
495  *
496  * @pre This method can be called if SCIP is in one of the following stages:
497  * - \ref SCIP_STAGE_INIT
498  * - \ref SCIP_STAGE_PROBLEM
499  */
501  SCIP* scip, /**< SCIP data structure */
502  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
503  SCIP_DECL_CONSEXITPRE((*consexitpre)) /**< preprocessing deinitialization method of constraint handler */
504  )
505 {
506  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrExitpre", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
507 
508  assert(conshdlr != NULL);
509 
510  SCIPconshdlrSetExitpre(conshdlr, consexitpre);
511 
512  return SCIP_OKAY;
513 }
514 
515 /** sets presolving 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  */
525  SCIP* scip, /**< SCIP data structure */
526  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
527  SCIP_DECL_CONSPRESOL ((*conspresol)), /**< presolving method of constraint handler */
528  int maxprerounds, /**< maximal number of presolving rounds the constraint handler participates in (-1: no limit) */
529  SCIP_PRESOLTIMING presoltiming /**< timing mask of the constraint handler's presolving method */
530  )
531 {
532  const char* name;
533  char paramname[SCIP_MAXSTRLEN];
534 
535  assert(scip != NULL);
536  assert(conshdlr != NULL);
537 
538  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrPresol", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
539 
540  SCIP_CALL( SCIPconshdlrSetPresol(conshdlr, conspresol, maxprerounds, presoltiming) );
541 
542  name = SCIPconshdlrGetName(conshdlr);
543 
544  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxprerounds", name);
545  SCIP_CALL( SCIPsetSetDefaultIntParam(scip->set, paramname, maxprerounds) );
546 
547  (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/presoltiming", name);
548  SCIP_CALL( SCIPsetSetDefaultIntParam(scip->set, paramname, (int) presoltiming) );
549 
550  return SCIP_OKAY;
551 }
552 
553 /** sets method of constraint handler to free specific constraint data
554  *
555  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
556  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
557  *
558  * @pre This method can be called if SCIP is in one of the following stages:
559  * - \ref SCIP_STAGE_INIT
560  * - \ref SCIP_STAGE_PROBLEM
561  */
563  SCIP* scip, /**< SCIP data structure */
564  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
565  SCIP_DECL_CONSDELETE ((*consdelete)) /**< free specific constraint data */
566  )
567 {
568  assert(scip != NULL);
569  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrDelete", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
570 
571  SCIPconshdlrSetDelete(conshdlr, consdelete);
572 
573  return SCIP_OKAY;
574 }
575 
576 /** sets method of constraint handler to transform constraint data into data belonging to the transformed problem
577  *
578  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
579  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
580  *
581  * @pre This method can be called if SCIP is in one of the following stages:
582  * - \ref SCIP_STAGE_INIT
583  * - \ref SCIP_STAGE_PROBLEM
584  */
586  SCIP* scip, /**< SCIP data structure */
587  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
588  SCIP_DECL_CONSTRANS ((*constrans)) /**< transform constraint data into data belonging to the transformed problem */
589  )
590 {
591  assert(scip != NULL);
592  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrTrans", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
593 
594  SCIPconshdlrSetTrans(conshdlr, constrans);
595 
596  return SCIP_OKAY;
597 }
598 
599 /** sets method of constraint handler to initialize LP with relaxations of "initial" constraints
600  *
601  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
602  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
603  *
604  * @pre This method can be called if SCIP is in one of the following stages:
605  * - \ref SCIP_STAGE_INIT
606  * - \ref SCIP_STAGE_PROBLEM
607  */
609  SCIP* scip, /**< SCIP data structure */
610  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
611  SCIP_DECL_CONSINITLP ((*consinitlp)) /**< initialize LP with relaxations of "initial" constraints */
612  )
613 {
614  assert(scip != NULL);
615  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrInitlp", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
616 
617  SCIPconshdlrSetInitlp(conshdlr, consinitlp);
618 
619  return SCIP_OKAY;
620 }
621 
622 /** sets propagation conflict resolving method of constraint handler
623  *
624  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
625  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
626  *
627  * @pre This method can be called if SCIP is in one of the following stages:
628  * - \ref SCIP_STAGE_INIT
629  * - \ref SCIP_STAGE_PROBLEM
630  */
632  SCIP* scip, /**< SCIP data structure */
633  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
634  SCIP_DECL_CONSRESPROP ((*consresprop)) /**< propagation conflict resolving method */
635  )
636 {
637  assert(scip != NULL);
638  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrResprop", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
639 
640  SCIPconshdlrSetResprop(conshdlr, consresprop);
641 
642  return SCIP_OKAY;
643 }
644 
645 /** sets activation notification method of constraint handler
646  *
647  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
648  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
649  *
650  * @pre This method can be called if SCIP is in one of the following stages:
651  * - \ref SCIP_STAGE_INIT
652  * - \ref SCIP_STAGE_PROBLEM
653  */
655  SCIP* scip, /**< SCIP data structure */
656  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
657  SCIP_DECL_CONSACTIVE ((*consactive)) /**< activation notification method */
658  )
659 {
660  assert(scip != NULL);
661  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrActive", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
662 
663  SCIPconshdlrSetActive(conshdlr, consactive);
664 
665  return SCIP_OKAY;
666 }
667 
668 /** sets deactivation notification method of constraint handler
669  *
670  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
671  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
672  *
673  * @pre This method can be called if SCIP is in one of the following stages:
674  * - \ref SCIP_STAGE_INIT
675  * - \ref SCIP_STAGE_PROBLEM
676  */
678  SCIP* scip, /**< SCIP data structure */
679  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
680  SCIP_DECL_CONSDEACTIVE((*consdeactive)) /**< deactivation notification method */
681  )
682 {
683  assert(scip != NULL);
684  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrDeactive", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
685 
686  SCIPconshdlrSetDeactive(conshdlr, consdeactive);
687 
688  return SCIP_OKAY;
689 }
690 
691 /** sets enabling notification method of constraint handler
692  *
693  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
694  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
695  *
696  * @pre This method can be called if SCIP is in one of the following stages:
697  * - \ref SCIP_STAGE_INIT
698  * - \ref SCIP_STAGE_PROBLEM
699  */
701  SCIP* scip, /**< SCIP data structure */
702  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
703  SCIP_DECL_CONSENABLE ((*consenable)) /**< enabling notification method */
704  )
705 {
706  assert(scip != NULL);
707  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrEnable", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
708 
709  SCIPconshdlrSetEnable(conshdlr, consenable);
710 
711  return SCIP_OKAY;
712 }
713 
714 /** sets disabling notification method of constraint handler
715  *
716  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
717  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
718  *
719  * @pre This method can be called if SCIP is in one of the following stages:
720  * - \ref SCIP_STAGE_INIT
721  * - \ref SCIP_STAGE_PROBLEM
722  */
724  SCIP* scip, /**< SCIP data structure */
725  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
726  SCIP_DECL_CONSDISABLE ((*consdisable)) /**< disabling notification method */
727  )
728 {
729  assert(scip != NULL);
730  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrDisable", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
731 
732  SCIPconshdlrSetDisable(conshdlr, consdisable);
733 
734  return SCIP_OKAY;
735 }
736 
737 /** sets variable deletion method of constraint handler
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 SCIP is in one of the following stages:
743  * - \ref SCIP_STAGE_INIT
744  * - \ref SCIP_STAGE_PROBLEM
745  */
747  SCIP* scip, /**< SCIP data structure */
748  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
749  SCIP_DECL_CONSDELVARS ((*consdelvars)) /**< variable deletion method */
750  )
751 {
752  assert(scip != NULL);
753  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrDelvars", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
754 
755  SCIPconshdlrSetDelvars(conshdlr, consdelvars);
756 
757  return SCIP_OKAY;
758 }
759 
760 /** sets constraint display method of constraint handler
761  *
762  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
763  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
764  *
765  * @pre This method can be called if SCIP is in one of the following stages:
766  * - \ref SCIP_STAGE_INIT
767  * - \ref SCIP_STAGE_PROBLEM
768  */
770  SCIP* scip, /**< SCIP data structure */
771  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
772  SCIP_DECL_CONSPRINT ((*consprint)) /**< constraint display method */
773  )
774 {
775  assert(scip != NULL);
776  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrPrint", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
777 
778  SCIPconshdlrSetPrint(conshdlr, consprint);
779 
780  return SCIP_OKAY;
781 }
782 
783 /** sets constraint parsing method of constraint handler
784  *
785  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
786  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
787  *
788  * @pre This method can be called if SCIP is in one of the following stages:
789  * - \ref SCIP_STAGE_INIT
790  * - \ref SCIP_STAGE_PROBLEM
791  */
793  SCIP* scip, /**< SCIP data structure */
794  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
795  SCIP_DECL_CONSPARSE ((*consparse)) /**< constraint parsing method */
796  )
797 {
798  assert(scip != NULL);
799  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrParse", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
800 
801  SCIPconshdlrSetParse(conshdlr, consparse);
802 
803  return SCIP_OKAY;
804 }
805 
806 /** sets constraint variable getter method of constraint handler
807  *
808  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
809  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
810  *
811  * @pre This method can be called if SCIP is in one of the following stages:
812  * - \ref SCIP_STAGE_INIT
813  * - \ref SCIP_STAGE_PROBLEM
814  */
816  SCIP* scip, /**< SCIP data structure */
817  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
818  SCIP_DECL_CONSGETVARS ((*consgetvars)) /**< constraint variable getter method */
819  )
820 {
821  assert(scip != NULL);
822  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrGetVars", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
823 
824  SCIPconshdlrSetGetVars(conshdlr, consgetvars);
825 
826  return SCIP_OKAY;
827 }
828 
829 /** sets constraint variable number getter method of constraint handler
830  *
831  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
832  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
833  *
834  * @pre This method can be called if SCIP is in one of the following stages:
835  * - \ref SCIP_STAGE_INIT
836  * - \ref SCIP_STAGE_PROBLEM
837  */
839  SCIP* scip, /**< SCIP data structure */
840  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
841  SCIP_DECL_CONSGETNVARS((*consgetnvars)) /**< constraint variable number getter method */
842  )
843 {
844  assert(scip != NULL);
845  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrGetNVars", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
846 
847  SCIPconshdlrSetGetNVars(conshdlr, consgetnvars);
848 
849  return SCIP_OKAY;
850 }
851 
852 /** sets diving bound change method of constraint handler
853  *
854  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
855  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
856  *
857  * @pre This method can be called if SCIP is in one of the following stages:
858  * - \ref SCIP_STAGE_INIT
859  * - \ref SCIP_STAGE_PROBLEM
860  */
862  SCIP* scip, /**< SCIP data structure */
863  SCIP_CONSHDLR* conshdlr, /**< constraint handler */
864  SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)) /**< constraint handler diving solution enforcement method */
865  )
866 {
867  assert(scip != NULL);
868  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConshdlrGetDiveBdChgs", TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
869 
870  SCIPconshdlrSetGetDiveBdChgs(conshdlr, consgetdivebdchgs);
871 
872  return SCIP_OKAY;
873 }
874 /** returns the constraint handler of the given name, or NULL if not existing */
875 /** returns the constraint handler of the given name, or NULL if not existing */
877  SCIP* scip, /**< SCIP data structure */
878  const char* name /**< name of constraint handler */
879  )
880 {
881  assert(scip != NULL);
882  assert(scip->set != NULL);
883  assert(name != NULL);
884 
885  return SCIPsetFindConshdlr(scip->set, name);
886 }
887 
888 /** returns the array of currently available constraint handlers */
890  SCIP* scip /**< SCIP data structure */
891  )
892 {
893  assert(scip != NULL);
894  assert(scip->set != NULL);
895 
896  return scip->set->conshdlrs;
897 }
898 
899 /** returns the number of currently available constraint handlers */
901  SCIP* scip /**< SCIP data structure */
902  )
903 {
904  assert(scip != NULL);
905  assert(scip->set != NULL);
906 
907  return scip->set->nconshdlrs;
908 }
909 
910 /** creates and captures a constraint of the given constraint handler
911  *
912  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may
913  * be declared feasible even if it violates this particular constraint. This constellation should only be
914  * used, if no LP or pseudo solution can violate the constraint -- e.g. if a local constraint is redundant due
915  * to the variable's local bounds.
916  *
917  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
918  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
919  *
920  * @pre This method can be called if @p scip is in one of the following stages:
921  * - \ref SCIP_STAGE_PROBLEM
922  * - \ref SCIP_STAGE_TRANSFORMING
923  * - \ref SCIP_STAGE_INITPRESOLVE
924  * - \ref SCIP_STAGE_PRESOLVING
925  * - \ref SCIP_STAGE_EXITPRESOLVE
926  * - \ref SCIP_STAGE_PRESOLVED
927  * - \ref SCIP_STAGE_INITSOLVE
928  * - \ref SCIP_STAGE_SOLVING
929  * - \ref SCIP_STAGE_EXITSOLVE
930  *
931  * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
932  */
934  SCIP* scip, /**< SCIP data structure */
935  SCIP_CONS** cons, /**< pointer to constraint */
936  const char* name, /**< name of constraint */
937  SCIP_CONSHDLR* conshdlr, /**< constraint handler for this constraint */
938  SCIP_CONSDATA* consdata, /**< data for this specific constraint */
939  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
940  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
941  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
942  * Usually set to TRUE. */
943  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
944  * TRUE for model constraints, FALSE for additional, redundant constraints. */
945  SCIP_Bool check, /**< should the constraint be checked for feasibility?
946  * TRUE for model constraints, FALSE for additional, redundant constraints. */
947  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
948  * Usually set to TRUE. */
949  SCIP_Bool local, /**< is constraint only valid locally?
950  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
951  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
952  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
953  * adds coefficients to this constraint. */
954  SCIP_Bool dynamic, /**< is constraint subject to aging?
955  * Usually set to FALSE. Set to TRUE for own cuts which
956  * are separated as constraints. */
957  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
958  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
959  SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
960  * if it may be moved to a more global node?
961  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
962  )
963 {
964  assert(cons != NULL);
965  assert(name != NULL);
966  assert(conshdlr != NULL);
967 
968  SCIP_CALL( SCIPcheckStage(scip, "SCIPcreateCons", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE) );
969 
970  switch( scip->set->stage )
971  {
972  case SCIP_STAGE_PROBLEM:
973  SCIP_CALL( SCIPconsCreate(cons, scip->mem->probmem, scip->set, name, conshdlr, consdata,
974  initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, TRUE, TRUE) );
975  return SCIP_OKAY;
976 
984  case SCIP_STAGE_SOLVING:
986  SCIP_CALL( SCIPconsCreate(cons, scip->mem->probmem, scip->set, name, conshdlr, consdata,
987  initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, FALSE, TRUE) );
988  return SCIP_OKAY;
989 
990  default:
991  SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
992  return SCIP_INVALIDCALL;
993  } /*lint !e788*/
994 }
995 
996 /** parses constraint information (in cip format) out of a string; if the parsing process was successful a constraint is
997  * creates and captures;
998  *
999  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1000  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1001  *
1002  * @pre This method can be called if @p scip is in one of the following stages:
1003  * - \ref SCIP_STAGE_PROBLEM
1004  * - \ref SCIP_STAGE_TRANSFORMING
1005  * - \ref SCIP_STAGE_INITPRESOLVE
1006  * - \ref SCIP_STAGE_PRESOLVING
1007  * - \ref SCIP_STAGE_EXITPRESOLVE
1008  * - \ref SCIP_STAGE_PRESOLVED
1009  * - \ref SCIP_STAGE_SOLVING
1010  * - \ref SCIP_STAGE_EXITSOLVE
1011  *
1012  * @warning If a constraint is marked to be checked for feasibility but not to be enforced, a LP or pseudo solution may
1013  * be declared feasible even if it violates this particular constraint. This constellation should only be
1014  * used, if no LP or pseudo solution can violate the constraint -- e.g. if a local constraint is redundant due
1015  * to the variable's local bounds.
1016  */
1018  SCIP* scip, /**< SCIP data structure */
1019  SCIP_CONS** cons, /**< pointer to store constraint */
1020  const char* str, /**< string to parse for constraint */
1021  SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
1022  * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
1023  SCIP_Bool separate, /**< should the constraint be separated during LP processing?
1024  * Usually set to TRUE. */
1025  SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
1026  * TRUE for model constraints, FALSE for additional, redundant constraints. */
1027  SCIP_Bool check, /**< should the constraint be checked for feasibility?
1028  * TRUE for model constraints, FALSE for additional, redundant constraints. */
1029  SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
1030  * Usually set to TRUE. */
1031  SCIP_Bool local, /**< is constraint only valid locally?
1032  * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
1033  SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
1034  * Usually set to FALSE. In column generation applications, set to TRUE if pricing
1035  * adds coefficients to this constraint. */
1036  SCIP_Bool dynamic, /**< is constraint subject to aging?
1037  * Usually set to FALSE. Set to TRUE for own cuts which
1038  * are separated as constraints. */
1039  SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
1040  * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
1041  SCIP_Bool stickingatnode, /**< should the constraint always be kept at the node where it was added, even
1042  * if it may be moved to a more global node?
1043  * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
1044  SCIP_Bool* success /**< pointer to store if the paring process was successful */
1045  )
1046 {
1047  assert(cons != NULL);
1048 
1049  SCIP_CALL( SCIPcheckStage(scip, "SCIPparseCons", FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE) );
1050 
1051  SCIP_CALL( SCIPconsParse(cons, scip->set, scip->messagehdlr, str,
1052  initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode, success) );
1053 
1054  return SCIP_OKAY;
1055 }
1056 
1057 /** increases usage counter of constraint
1058  *
1059  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1060  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1061  *
1062  * @pre This method can be called if @p scip is in one of the following stages:
1063  * - \ref SCIP_STAGE_PROBLEM
1064  * - \ref SCIP_STAGE_TRANSFORMING
1065  * - \ref SCIP_STAGE_TRANSFORMED
1066  * - \ref SCIP_STAGE_INITPRESOLVE
1067  * - \ref SCIP_STAGE_PRESOLVING
1068  * - \ref SCIP_STAGE_EXITPRESOLVE
1069  * - \ref SCIP_STAGE_PRESOLVED
1070  * - \ref SCIP_STAGE_INITSOLVE
1071  * - \ref SCIP_STAGE_SOLVING
1072  * - \ref SCIP_STAGE_SOLVED
1073  */
1075  SCIP* scip, /**< SCIP data structure */
1076  SCIP_CONS* cons /**< constraint to capture */
1077  )
1078 {
1079  SCIP_CALL( SCIPcheckStage(scip, "SCIPcaptureCons", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1080 
1081  assert( cons->scip == scip );
1082 
1083  SCIPconsCapture(cons);
1084 
1085  return SCIP_OKAY;
1086 }
1087 
1088 /** decreases usage counter of constraint, if the usage pointer reaches zero the constraint gets freed
1089  *
1090  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1091  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1092  *
1093  * @pre This method can be called if @p scip is in one of the following stages:
1094  * - \ref SCIP_STAGE_PROBLEM
1095  * - \ref SCIP_STAGE_TRANSFORMING
1096  * - \ref SCIP_STAGE_TRANSFORMED
1097  * - \ref SCIP_STAGE_INITPRESOLVE
1098  * - \ref SCIP_STAGE_PRESOLVING
1099  * - \ref SCIP_STAGE_EXITPRESOLVE
1100  * - \ref SCIP_STAGE_PRESOLVED
1101  * - \ref SCIP_STAGE_INITSOLVE
1102  * - \ref SCIP_STAGE_SOLVING
1103  * - \ref SCIP_STAGE_SOLVED
1104  * - \ref SCIP_STAGE_EXITSOLVE
1105  * - \ref SCIP_STAGE_FREETRANS
1106  *
1107  * @note the pointer of the constraint will be NULLed
1108  */
1110  SCIP* scip, /**< SCIP data structure */
1111  SCIP_CONS** cons /**< pointer to constraint */
1112  )
1113 {
1114  assert(cons != NULL);
1115  assert(*cons != NULL);
1116 
1117  SCIP_CALL( SCIPcheckStage(scip, "SCIPreleaseCons", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
1118 
1119  switch( scip->set->stage )
1120  {
1121  case SCIP_STAGE_PROBLEM:
1122  SCIP_CALL( SCIPconsRelease(cons, scip->mem->probmem, scip->set) );
1123  return SCIP_OKAY;
1124 
1128  case SCIP_STAGE_PRESOLVING:
1130  case SCIP_STAGE_PRESOLVED:
1131  case SCIP_STAGE_INITSOLVE:
1132  case SCIP_STAGE_SOLVING:
1133  case SCIP_STAGE_SOLVED:
1134  case SCIP_STAGE_EXITSOLVE:
1135  case SCIP_STAGE_FREETRANS:
1136  if( SCIPconsIsOriginal(*cons) && (*cons)->nuses == 1 )
1137  {
1138  SCIPerrorMessage("cannot release last use of original constraint while the transformed problem exists\n");
1139  return SCIP_INVALIDCALL;
1140  }
1141  SCIP_CALL( SCIPconsRelease(cons, scip->mem->probmem, scip->set) );
1142  return SCIP_OKAY;
1143 
1144  default:
1145  SCIPerrorMessage("invalid SCIP stage <%d>\n", scip->set->stage);
1146  return SCIP_INVALIDCALL;
1147  } /*lint !e788*/
1148 }
1149 
1150 /** change constraint name
1151  *
1152  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1153  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1154  *
1155  * @pre This method can be called if @p scip is in one of the following stages:
1156  * - \ref SCIP_STAGE_PROBLEM
1157  *
1158  * @note to get the current name of a constraint, use SCIPconsGetName() from pub_cons.h
1159  */
1161  SCIP* scip, /**< SCIP data structure */
1162  SCIP_CONS* cons, /**< constraint */
1163  const char* name /**< new name of constraint */
1164  )
1165 {
1166  SCIP_CALL( SCIPcheckStage(scip, "SCIPchgConsName", FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE , FALSE, FALSE, FALSE) );
1167 
1168  assert( cons->scip == scip );
1169 
1170  if( SCIPgetStage(scip) != SCIP_STAGE_PROBLEM )
1171  {
1172  SCIPerrorMessage("constraint names can only be changed in problem creation stage\n");
1173  SCIPABORT();
1174  return SCIP_INVALIDCALL; /*lint !e527*/
1175  }
1176 
1177  /* remove constraint's name from the namespace if the constraint was already added */
1178  if( SCIPconsIsAdded(cons) )
1179  {
1180  SCIP_CALL( SCIPprobRemoveConsName(scip->origprob, cons) );
1181  }
1182 
1183  /* change constraint name */
1184  SCIP_CALL( SCIPconsChgName(cons, SCIPblkmem(scip), name) );
1185 
1186  /* add constraint's name to the namespace if the constraint was already added */
1187  if( SCIPconsIsAdded(cons) )
1188  {
1189  SCIP_CALL( SCIPprobAddConsName(scip->origprob, cons) );
1190  }
1191 
1192  return SCIP_OKAY;
1193 }
1194 
1195 /** sets the initial flag of the given constraint
1196  *
1197  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1198  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1199  *
1200  * @pre This method can be called if @p scip is in one of the following stages:
1201  * - \ref SCIP_STAGE_PROBLEM
1202  * - \ref SCIP_STAGE_TRANSFORMING
1203  * - \ref SCIP_STAGE_PRESOLVING
1204  * - \ref SCIP_STAGE_PRESOLVED
1205  * - \ref SCIP_STAGE_SOLVING
1206  */
1208  SCIP* scip, /**< SCIP data structure */
1209  SCIP_CONS* cons, /**< constraint */
1210  SCIP_Bool initial /**< new value */
1211  )
1212 {
1213  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsInitial", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1214 
1215  SCIP_CALL( SCIPconsSetInitial(cons, scip->set, scip->stat, initial) );
1216 
1217  return SCIP_OKAY;
1218 }
1219 
1220 /** sets the separate flag of the given constraint
1221  *
1222  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1223  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1224  *
1225  * @pre This method can be called if @p scip is in one of the following stages:
1226  * - \ref SCIP_STAGE_PROBLEM
1227  * - \ref SCIP_STAGE_TRANSFORMING
1228  * - \ref SCIP_STAGE_PRESOLVING
1229  * - \ref SCIP_STAGE_PRESOLVED
1230  * - \ref SCIP_STAGE_SOLVING
1231  */
1233  SCIP* scip, /**< SCIP data structure */
1234  SCIP_CONS* cons, /**< constraint */
1235  SCIP_Bool separate /**< new value */
1236  )
1237 {
1238  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsSeparated", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1239 
1240  SCIP_CALL( SCIPconsSetSeparated(cons, scip->set, separate) );
1241 
1242  return SCIP_OKAY;
1243 }
1244 
1245 /** sets the enforce flag of the given constraint
1246  *
1247  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1248  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1249  *
1250  * @pre This method can be called if @p scip is in one of the following stages:
1251  * - \ref SCIP_STAGE_PROBLEM
1252  * - \ref SCIP_STAGE_TRANSFORMING
1253  * - \ref SCIP_STAGE_PRESOLVING
1254  * - \ref SCIP_STAGE_PRESOLVED
1255  * - \ref SCIP_STAGE_SOLVING
1256  */
1258  SCIP* scip, /**< SCIP data structure */
1259  SCIP_CONS* cons, /**< constraint */
1260  SCIP_Bool enforce /**< new value */
1261  )
1262 {
1263  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsEnforced", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1264 
1265  SCIP_CALL( SCIPconsSetEnforced(cons, scip->set, enforce) );
1266 
1267  return SCIP_OKAY;
1268 }
1269 
1270 /** sets the check flag of the given constraint
1271  *
1272  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1273  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1274  *
1275  * @pre This method can be called if @p scip is in one of the following stages:
1276  * - \ref SCIP_STAGE_PROBLEM
1277  * - \ref SCIP_STAGE_TRANSFORMING
1278  * - \ref SCIP_STAGE_PRESOLVING
1279  * - \ref SCIP_STAGE_PRESOLVED
1280  * - \ref SCIP_STAGE_SOLVING
1281  */
1283  SCIP* scip, /**< SCIP data structure */
1284  SCIP_CONS* cons, /**< constraint */
1285  SCIP_Bool check /**< new value */
1286  )
1287 {
1288  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsChecked", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1289 
1290  SCIP_CALL( SCIPconsSetChecked(cons, scip->set, check) );
1291 
1292  return SCIP_OKAY;
1293 }
1294 
1295 /** sets the propagate flag of the given constraint
1296  *
1297  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1298  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1299  *
1300  * @pre This method can be called if @p scip is in one of the following stages:
1301  * - \ref SCIP_STAGE_PROBLEM
1302  * - \ref SCIP_STAGE_TRANSFORMING
1303  * - \ref SCIP_STAGE_PRESOLVING
1304  * - \ref SCIP_STAGE_PRESOLVED
1305  * - \ref SCIP_STAGE_SOLVING
1306  */
1308  SCIP* scip, /**< SCIP data structure */
1309  SCIP_CONS* cons, /**< constraint */
1310  SCIP_Bool propagate /**< new value */
1311  )
1312 {
1313  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsPropagated", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1314 
1315  SCIP_CALL( SCIPconsSetPropagated(cons, scip->set, propagate) );
1316 
1317  return SCIP_OKAY;
1318 }
1319 
1320 /** sets the local flag of the given constraint
1321  *
1322  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1323  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1324  *
1325  * @pre This method can be called if @p scip is in one of the following stages:
1326  * - \ref SCIP_STAGE_PROBLEM
1327  * - \ref SCIP_STAGE_TRANSFORMING
1328  * - \ref SCIP_STAGE_INITPRESOLVE
1329  * - \ref SCIP_STAGE_PRESOLVING
1330  * - \ref SCIP_STAGE_PRESOLVED
1331  * - \ref SCIP_STAGE_INITSOLVE
1332  * - \ref SCIP_STAGE_SOLVING
1333  */
1335  SCIP* scip, /**< SCIP data structure */
1336  SCIP_CONS* cons, /**< constraint */
1337  SCIP_Bool local /**< new value */
1338  )
1339 {
1340  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsLocal", FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1341 
1342  SCIPconsSetLocal(cons, local);
1343 
1344  return SCIP_OKAY;
1345 }
1346 
1347 /** sets the modifiable flag of the given constraint
1348  *
1349  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1350  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1351  *
1352  * @pre This method can be called if @p scip is in one of the following stages:
1353  * - \ref SCIP_STAGE_PROBLEM
1354  * - \ref SCIP_STAGE_TRANSFORMING
1355  * - \ref SCIP_STAGE_PRESOLVING
1356  * - \ref SCIP_STAGE_PRESOLVED
1357  * - \ref SCIP_STAGE_SOLVING
1358  * - \ref SCIP_STAGE_EXITSOLVE
1359  */
1361  SCIP* scip, /**< SCIP data structure */
1362  SCIP_CONS* cons, /**< constraint */
1363  SCIP_Bool modifiable /**< new value */
1364  )
1365 {
1366  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsModifiable", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE) );
1367 
1368  SCIPconsSetModifiable(cons, modifiable);
1369 
1370  return SCIP_OKAY;
1371 }
1372 
1373 /** sets the dynamic flag of the given constraint
1374  *
1375  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1376  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1377  *
1378  * @pre This method can be called if @p scip is in one of the following stages:
1379  * - \ref SCIP_STAGE_PROBLEM
1380  * - \ref SCIP_STAGE_TRANSFORMING
1381  * - \ref SCIP_STAGE_PRESOLVING
1382  * - \ref SCIP_STAGE_PRESOLVED
1383  * - \ref SCIP_STAGE_SOLVING
1384  */
1386  SCIP* scip, /**< SCIP data structure */
1387  SCIP_CONS* cons, /**< constraint */
1388  SCIP_Bool dynamic /**< new value */
1389  )
1390 {
1391  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsDynamic", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1392 
1393  SCIPconsSetDynamic(cons, dynamic);
1394 
1395  return SCIP_OKAY;
1396 }
1397 
1398 /** sets the removable flag of the given constraint
1399  *
1400  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1401  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1402  *
1403  * @pre This method can be called if @p scip is in one of the following stages:
1404  * - \ref SCIP_STAGE_PROBLEM
1405  * - \ref SCIP_STAGE_TRANSFORMING
1406  * - \ref SCIP_STAGE_PRESOLVING
1407  * - \ref SCIP_STAGE_PRESOLVED
1408  * - \ref SCIP_STAGE_SOLVING
1409  */
1411  SCIP* scip, /**< SCIP data structure */
1412  SCIP_CONS* cons, /**< constraint */
1413  SCIP_Bool removable /**< new value */
1414  )
1415 {
1416  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsRemovable", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1417 
1418  SCIPconsSetRemovable(cons, removable);
1419 
1420  return SCIP_OKAY;
1421 }
1422 
1423 /** sets the stickingatnode flag of the given constraint
1424  *
1425  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1426  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1427  *
1428  * @pre This method can be called if @p scip is in one of the following stages:
1429  * - \ref SCIP_STAGE_PROBLEM
1430  * - \ref SCIP_STAGE_TRANSFORMING
1431  * - \ref SCIP_STAGE_PRESOLVING
1432  * - \ref SCIP_STAGE_PRESOLVED
1433  * - \ref SCIP_STAGE_SOLVING
1434  */
1436  SCIP* scip, /**< SCIP data structure */
1437  SCIP_CONS* cons, /**< constraint */
1438  SCIP_Bool stickingatnode /**< new value */
1439  )
1440 {
1441  SCIP_CALL( SCIPcheckStage(scip, "SCIPsetConsStickingAtNode", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1442 
1443  SCIPconsSetStickingAtNode(cons, stickingatnode);
1444 
1445  return SCIP_OKAY;
1446 }
1447 
1448 /** updates the flags of the first constraint according to the ones of the second constraint
1449  *
1450  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1451  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1452  *
1453  * @pre This method can be called if @p scip is in one of the following stages:
1454  * - \ref SCIP_STAGE_PROBLEM
1455  * - \ref SCIP_STAGE_TRANSFORMING
1456  * - \ref SCIP_STAGE_PRESOLVING
1457  * - \ref SCIP_STAGE_PRESOLVED
1458  * - \ref SCIP_STAGE_SOLVING
1459  */
1461  SCIP* scip, /**< SCIP data structure */
1462  SCIP_CONS* cons0, /**< constraint that should stay */
1463  SCIP_CONS* cons1 /**< constraint that should be deleted */
1464  )
1465 {
1466  SCIP_CALL( SCIPcheckStage(scip, "SCIPupdateConsFlags", FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1467 
1468  if( SCIPconsIsInitial(cons1) )
1469  {
1470  SCIP_CALL( SCIPsetConsInitial(scip, cons0, TRUE) );
1471  }
1472  if( SCIPconsIsSeparated(cons1) )
1473  {
1474  SCIP_CALL( SCIPsetConsSeparated(scip, cons0, TRUE) );
1475  }
1476  if( SCIPconsIsEnforced(cons1) )
1477  {
1478  SCIP_CALL( SCIPsetConsEnforced(scip, cons0, TRUE) );
1479  }
1480  if( SCIPconsIsChecked(cons1) )
1481  {
1482  SCIP_CALL( SCIPsetConsChecked(scip, cons0, TRUE) );
1483  }
1484  if( SCIPconsIsPropagated(cons1) )
1485  {
1486  SCIP_CALL( SCIPsetConsPropagated(scip, cons0, TRUE) );
1487  }
1488  if( !SCIPconsIsDynamic(cons1) )
1489  {
1490  SCIP_CALL( SCIPsetConsDynamic(scip, cons0, FALSE) );
1491  }
1492  if( !SCIPconsIsRemovable(cons1) )
1493  {
1494  SCIP_CALL( SCIPsetConsRemovable(scip, cons0, FALSE) );
1495  }
1496  if( SCIPconsIsStickingAtNode(cons1) )
1497  {
1498  SCIP_CALL( SCIPsetConsStickingAtNode(scip, cons0, TRUE) );
1499  }
1500 
1501  return SCIP_OKAY;
1502 }
1503 
1504 /** gets and captures transformed constraint of a given constraint; if the constraint is not yet transformed,
1505  * a new transformed constraint for this constraint is created
1506  *
1507  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1508  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1509  *
1510  * @pre This method can be called if @p scip is in one of the following stages:
1511  * - \ref SCIP_STAGE_TRANSFORMING
1512  * - \ref SCIP_STAGE_TRANSFORMED
1513  * - \ref SCIP_STAGE_INITPRESOLVE
1514  * - \ref SCIP_STAGE_PRESOLVING
1515  * - \ref SCIP_STAGE_EXITPRESOLVE
1516  * - \ref SCIP_STAGE_PRESOLVED
1517  * - \ref SCIP_STAGE_INITSOLVE
1518  * - \ref SCIP_STAGE_SOLVING
1519  */
1521  SCIP* scip, /**< SCIP data structure */
1522  SCIP_CONS* cons, /**< constraint to get/create transformed constraint for */
1523  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
1524  )
1525 {
1526  assert(transcons != NULL);
1527  assert(cons->scip == scip);
1528 
1529  SCIP_CALL( SCIPcheckStage(scip, "SCIPtransformCons", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1530 
1531  if( SCIPconsIsTransformed(cons) )
1532  {
1533  *transcons = cons;
1534  SCIPconsCapture(*transcons);
1535  }
1536  else
1537  {
1538  SCIP_CALL( SCIPconsTransform(cons, scip->mem->probmem, scip->set, transcons) );
1539  }
1540 
1541  return SCIP_OKAY;
1542 }
1543 
1544 /** gets and captures transformed constraints for an array of constraints;
1545  * if a constraint in the array is not yet transformed, a new transformed constraint for this constraint is created;
1546  * it is possible to call this method with conss == transconss
1547  *
1548  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1549  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1550  *
1551  * @pre This method can be called if @p scip is in one of the following stages:
1552  * - \ref SCIP_STAGE_TRANSFORMING
1553  * - \ref SCIP_STAGE_TRANSFORMED
1554  * - \ref SCIP_STAGE_INITPRESOLVE
1555  * - \ref SCIP_STAGE_PRESOLVING
1556  * - \ref SCIP_STAGE_EXITPRESOLVE
1557  * - \ref SCIP_STAGE_PRESOLVED
1558  * - \ref SCIP_STAGE_INITSOLVE
1559  * - \ref SCIP_STAGE_SOLVING
1560  */
1562  SCIP* scip, /**< SCIP data structure */
1563  int nconss, /**< number of constraints to get/create transformed constraints for */
1564  SCIP_CONS** conss, /**< array with constraints to get/create transformed constraints for */
1565  SCIP_CONS** transconss /**< array to store the transformed constraints */
1566  )
1567 {
1568  int c;
1569 
1570  assert(nconss == 0 || conss != NULL);
1571  assert(nconss == 0 || transconss != NULL);
1572 
1573  SCIP_CALL( SCIPcheckStage(scip, "SCIPtransformConss", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE) );
1574 
1575  for( c = 0; c < nconss; ++c )
1576  {
1577  if( SCIPconsIsTransformed(conss[c]) )
1578  {
1579  transconss[c] = conss[c];
1580  SCIPconsCapture(transconss[c]);
1581  }
1582  else
1583  {
1584  SCIP_CALL( SCIPconsTransform(conss[c], scip->mem->probmem, scip->set, &transconss[c]) );
1585  }
1586  }
1587 
1588  return SCIP_OKAY;
1589 }
1590 
1591 /** gets corresponding transformed constraint of a given constraint;
1592  * returns NULL as transcons, if transformed constraint is not yet existing
1593  *
1594  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1595  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1596  *
1597  * @pre This method can be called if @p scip is in one of the following stages:
1598  * - \ref SCIP_STAGE_TRANSFORMING
1599  * - \ref SCIP_STAGE_TRANSFORMED
1600  * - \ref SCIP_STAGE_INITPRESOLVE
1601  * - \ref SCIP_STAGE_PRESOLVING
1602  * - \ref SCIP_STAGE_EXITPRESOLVE
1603  * - \ref SCIP_STAGE_PRESOLVED
1604  * - \ref SCIP_STAGE_INITSOLVE
1605  * - \ref SCIP_STAGE_SOLVING
1606  * - \ref SCIP_STAGE_SOLVED
1607  * - \ref SCIP_STAGE_EXITSOLVE
1608  * - \ref SCIP_STAGE_FREETRANS
1609  */
1611  SCIP* scip, /**< SCIP data structure */
1612  SCIP_CONS* cons, /**< constraint to get the transformed constraint for */
1613  SCIP_CONS** transcons /**< pointer to store the transformed constraint */
1614  )
1615 {
1616  assert(transcons != NULL);
1617  assert(cons->scip == scip);
1618 
1619  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetTransformedCons", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
1620 
1621  if( SCIPconsIsTransformed(cons) )
1622  *transcons = cons;
1623  else
1624  *transcons = SCIPconsGetTransformed(cons);
1625 
1626  return SCIP_OKAY;
1627 }
1628 
1629 /** gets corresponding transformed constraints for an array of constraints;
1630  * stores NULL in a transconss slot, if the transformed constraint is not yet existing;
1631  * it is possible to call this method with conss == transconss, but remember that constraints that are not
1632  * yet transformed will be replaced with NULL
1633  *
1634  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1635  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1636  *
1637  * @pre This method can be called if @p scip is in one of the following stages:
1638  * - \ref SCIP_STAGE_TRANSFORMING
1639  * - \ref SCIP_STAGE_TRANSFORMED
1640  * - \ref SCIP_STAGE_INITPRESOLVE
1641  * - \ref SCIP_STAGE_PRESOLVING
1642  * - \ref SCIP_STAGE_EXITPRESOLVE
1643  * - \ref SCIP_STAGE_PRESOLVED
1644  * - \ref SCIP_STAGE_INITSOLVE
1645  * - \ref SCIP_STAGE_SOLVING
1646  * - \ref SCIP_STAGE_SOLVED
1647  * - \ref SCIP_STAGE_EXITSOLVE
1648  * - \ref SCIP_STAGE_FREETRANS
1649  */
1651  SCIP* scip, /**< SCIP data structure */
1652  int nconss, /**< number of constraints to get the transformed constraints for */
1653  SCIP_CONS** conss, /**< constraints to get the transformed constraints for */
1654  SCIP_CONS** transconss /**< array to store the transformed constraints */
1655  )
1656 {
1657  int c;
1658 
1659  assert(nconss == 0 || conss != NULL);
1660  assert(nconss == 0 || transconss != NULL);
1661 
1662  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetTransformedConss", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
1663 
1664  for( c = 0; c < nconss; ++c )
1665  {
1666  if( SCIPconsIsTransformed(conss[c]) )
1667  transconss[c] = conss[c];
1668  else
1669  transconss[c] = SCIPconsGetTransformed(conss[c]);
1670  }
1671 
1672  return SCIP_OKAY;
1673 }
1674 
1675 /** adds given value to age of constraint, but age can never become negative;
1676  * should be called
1677  * - in constraint separation, if no cut was found for this constraint,
1678  * - in constraint enforcing, if constraint was feasible, and
1679  * - in constraint propagation, if no domain reduction was deduced;
1680  *
1681  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1682  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1683  *
1684  * @pre This method can be called if @p scip is in one of the following stages:
1685  * - \ref SCIP_STAGE_TRANSFORMED
1686  * - \ref SCIP_STAGE_PRESOLVING
1687  * - \ref SCIP_STAGE_PRESOLVED
1688  * - \ref SCIP_STAGE_SOLVING
1689  * - \ref SCIP_STAGE_SOLVED
1690  */
1692  SCIP* scip, /**< SCIP data structure */
1693  SCIP_CONS* cons, /**< constraint */
1694  SCIP_Real deltaage /**< value to add to the constraint's age */
1695  )
1696 {
1697  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConsAge", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1698 
1699  SCIP_CALL( SCIPconsAddAge(cons, scip->mem->probmem, scip->set, scip->stat, scip->transprob, deltaage, scip->reopt) );
1700 
1701  return SCIP_OKAY;
1702 }
1703 
1704 /** increases age of constraint by 1.0;
1705  * should be called
1706  * - in constraint separation, if no cut was found for this constraint,
1707  * - in constraint enforcing, if constraint was feasible, and
1708  * - in constraint propagation, if no domain reduction was deduced;
1709  *
1710  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1711  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1712  *
1713  * @pre This method can be called if @p scip is in one of the following stages:
1714  * - \ref SCIP_STAGE_TRANSFORMED
1715  * - \ref SCIP_STAGE_PRESOLVING
1716  * - \ref SCIP_STAGE_PRESOLVED
1717  * - \ref SCIP_STAGE_SOLVING
1718  * - \ref SCIP_STAGE_SOLVED
1719  */
1721  SCIP* scip, /**< SCIP data structure */
1722  SCIP_CONS* cons /**< constraint */
1723  )
1724 {
1725  SCIP_CALL( SCIPcheckStage(scip, "SCIPincConsAge", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1726 
1727  SCIP_CALL( SCIPconsIncAge(cons, scip->mem->probmem, scip->set, scip->stat, scip->transprob, scip->reopt) );
1728 
1729  return SCIP_OKAY;
1730 }
1731 
1732 /** resets age of constraint to zero;
1733  * should be called
1734  * - in constraint separation, if a cut was found for this constraint,
1735  * - in constraint enforcing, if the constraint was violated, and
1736  * - in constraint propagation, if a domain reduction was deduced;
1737  *
1738  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1739  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1740  *
1741  * @pre This method can be called if @p scip is in one of the following stages:
1742  * - \ref SCIP_STAGE_TRANSFORMED
1743  * - \ref SCIP_STAGE_PRESOLVING
1744  * - \ref SCIP_STAGE_PRESOLVED
1745  * - \ref SCIP_STAGE_SOLVING
1746  * - \ref SCIP_STAGE_SOLVED
1747  */
1749  SCIP* scip, /**< SCIP data structure */
1750  SCIP_CONS* cons /**< constraint */
1751  )
1752 {
1753  SCIP_CALL( SCIPcheckStage(scip, "SCIPresetConsAge", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1754 
1755  SCIP_CALL( SCIPconsResetAge(cons, scip->set) );
1756 
1757  return SCIP_OKAY;
1758 }
1759 
1760 /** enables constraint's separation, propagation, and enforcing capabilities
1761  *
1762  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1763  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1764  *
1765  * @pre This method can be called if @p scip is in one of the following stages:
1766  * - \ref SCIP_STAGE_TRANSFORMED
1767  * - \ref SCIP_STAGE_PRESOLVING
1768  * - \ref SCIP_STAGE_PRESOLVED
1769  * - \ref SCIP_STAGE_INITSOLVE
1770  * - \ref SCIP_STAGE_SOLVING
1771  * - \ref SCIP_STAGE_SOLVED
1772  */
1774  SCIP* scip, /**< SCIP data structure */
1775  SCIP_CONS* cons /**< constraint */
1776  )
1777 {
1778  SCIP_CALL( SCIPcheckStage(scip, "SCIPenableCons", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1779 
1780  SCIP_CALL( SCIPconsEnable(cons, scip->set, scip->stat) );
1781 
1782  return SCIP_OKAY;
1783 }
1784 
1785 /** disables constraint's separation, propagation, and enforcing capabilities, s.t. the constraint is not propagated,
1786  * separated, and enforced anymore until it is enabled again with a call to SCIPenableCons();
1787  * in contrast to SCIPdelConsLocal() and SCIPdelConsNode(), the disabling is not associated to a node in the tree and
1788  * does not consume memory; therefore, the constraint is neither automatically enabled on leaving the node nor
1789  * automatically disabled again on entering the node again;
1790  * note that the constraints enforcing capabilities are necessary for the solution's feasibility, if the constraint
1791  * is a model constraint; that means, you must be sure that the constraint cannot be violated in the current subtree,
1792  * and you have to enable it again manually by calling SCIPenableCons(), if this subtree is left (e.g. by using
1793  * an appropriate event handler that watches the corresponding variables' domain changes)
1794  *
1795  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1796  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1797  *
1798  * @pre This method can be called if @p scip is in one of the following stages:
1799  * - \ref SCIP_STAGE_TRANSFORMED
1800  * - \ref SCIP_STAGE_INITPRESOLVE
1801  * - \ref SCIP_STAGE_PRESOLVING
1802  * - \ref SCIP_STAGE_PRESOLVED
1803  * - \ref SCIP_STAGE_INITSOLVE
1804  * - \ref SCIP_STAGE_SOLVING
1805  * - \ref SCIP_STAGE_SOLVED
1806  */
1808  SCIP* scip, /**< SCIP data structure */
1809  SCIP_CONS* cons /**< constraint */
1810  )
1811 {
1812  SCIP_CALL( SCIPcheckStage(scip, "SCIPdisableCons", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1813 
1814  SCIP_CALL( SCIPconsDisable(cons, scip->set, scip->stat) );
1815 
1816  return SCIP_OKAY;
1817 }
1818 
1819 /** enables constraint's separation capabilities
1820  *
1821  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1822  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1823  *
1824  * @pre This method can be called if @p scip is in one of the following stages:
1825  * - \ref SCIP_STAGE_TRANSFORMED
1826  * - \ref SCIP_STAGE_PRESOLVING
1827  * - \ref SCIP_STAGE_PRESOLVED
1828  * - \ref SCIP_STAGE_INITSOLVE
1829  * - \ref SCIP_STAGE_SOLVING
1830  * - \ref SCIP_STAGE_SOLVED
1831  */
1833  SCIP* scip, /**< SCIP data structure */
1834  SCIP_CONS* cons /**< constraint */
1835  )
1836 {
1837  SCIP_CALL( SCIPcheckStage(scip, "SCIPenableConsSeparation", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1838 
1839  SCIP_CALL( SCIPconsEnableSeparation(cons, scip->set) );
1840 
1841  return SCIP_OKAY;
1842 }
1843 
1844 /** disables constraint's separation capabilities s.t. the constraint is not separated anymore until the separation
1845  * is enabled again with a call to SCIPenableConsSeparation(); in contrast to SCIPdelConsLocal() and SCIPdelConsNode(),
1846  * the disabling is not associated to a node in the tree and does not consume memory; therefore, the constraint
1847  * is neither automatically enabled on leaving the node nor automatically disabled again on entering the node again
1848  *
1849  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1850  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1851  *
1852  * @pre This method can be called if @p scip is in one of the following stages:
1853  * - \ref SCIP_STAGE_TRANSFORMED
1854  * - \ref SCIP_STAGE_PRESOLVING
1855  * - \ref SCIP_STAGE_PRESOLVED
1856  * - \ref SCIP_STAGE_INITSOLVE
1857  * - \ref SCIP_STAGE_SOLVING
1858  * - \ref SCIP_STAGE_SOLVED
1859  */
1861  SCIP* scip, /**< SCIP data structure */
1862  SCIP_CONS* cons /**< constraint */
1863  )
1864 {
1865  SCIP_CALL( SCIPcheckStage(scip, "SCIPdisableConsSeparation", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1866 
1867  SCIP_CALL( SCIPconsDisableSeparation(cons, scip->set) );
1868 
1869  return SCIP_OKAY;
1870 }
1871 
1872 /** enables constraint's propagation capabilities
1873  *
1874  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1875  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1876  *
1877  * @pre This method can be called if @p scip is in one of the following stages:
1878  * - \ref SCIP_STAGE_TRANSFORMED
1879  * - \ref SCIP_STAGE_INITPRESOLVE
1880  * - \ref SCIP_STAGE_PRESOLVING
1881  * - \ref SCIP_STAGE_EXITPRESOLVE
1882  * - \ref SCIP_STAGE_PRESOLVED
1883  * - \ref SCIP_STAGE_INITSOLVE
1884  * - \ref SCIP_STAGE_SOLVING
1885  * - \ref SCIP_STAGE_SOLVED
1886  */
1888  SCIP* scip, /**< SCIP data structure */
1889  SCIP_CONS* cons /**< constraint */
1890  )
1891 {
1892  SCIP_CALL( SCIPcheckStage(scip, "SCIPenableConsPropagation", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1893 
1894  SCIP_CALL( SCIPconsEnablePropagation(cons, scip->set) );
1895 
1896  return SCIP_OKAY;
1897 }
1898 
1899 /** disables constraint's propagation capabilities s.t. the constraint is not propagated anymore until the propagation
1900  * is enabled again with a call to SCIPenableConsPropagation(); in contrast to SCIPdelConsLocal() and SCIPdelConsNode(),
1901  * the disabling is not associated to a node in the tree and does not consume memory; therefore, the constraint
1902  * is neither automatically enabled on leaving the node nor automatically disabled again on entering the node again
1903  *
1904  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1905  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1906  *
1907  * @pre This method can be called if @p scip is in one of the following stages:
1908  * - \ref SCIP_STAGE_TRANSFORMED
1909  * - \ref SCIP_STAGE_INITPRESOLVE
1910  * - \ref SCIP_STAGE_PRESOLVING
1911  * - \ref SCIP_STAGE_EXITPRESOLVE
1912  * - \ref SCIP_STAGE_PRESOLVED
1913  * - \ref SCIP_STAGE_INITSOLVE
1914  * - \ref SCIP_STAGE_SOLVING
1915  * - \ref SCIP_STAGE_SOLVED
1916  */
1918  SCIP* scip, /**< SCIP data structure */
1919  SCIP_CONS* cons /**< constraint */
1920  )
1921 {
1922  SCIP_CALL( SCIPcheckStage(scip, "SCIPdisableConsPropagation", FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1923 
1924  SCIP_CALL( SCIPconsDisablePropagation(cons, scip->set) );
1925 
1926  return SCIP_OKAY;
1927 }
1928 
1929 #undef SCIPmarkConsPropagate
1930 
1931 /** marks constraint to be propagated
1932  *
1933  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1934  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1935  *
1936  * @pre This method can be called if @p scip is in one of the following stages:
1937  * - \ref SCIP_STAGE_TRANSFORMING
1938  * - \ref SCIP_STAGE_TRANSFORMED
1939  * - \ref SCIP_STAGE_INITPRESOLVE
1940  * - \ref SCIP_STAGE_PRESOLVING
1941  * - \ref SCIP_STAGE_EXITPRESOLVE
1942  * - \ref SCIP_STAGE_PRESOLVED
1943  * - \ref SCIP_STAGE_INITSOLVE
1944  * - \ref SCIP_STAGE_SOLVING
1945  * - \ref SCIP_STAGE_SOLVED
1946  * - \ref SCIP_STAGE_EXITSOLVE
1947  *
1948  * @note if a constraint is marked to be propagated, the age of the constraint will be ignored for propagation
1949  */
1951  SCIP* scip, /**< SCIP data structure */
1952  SCIP_CONS* cons /**< constraint */
1953  )
1954 {
1955  SCIP_CALL( SCIPcheckStage(scip, "SCIPmarkConsPropagate", FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE) );
1956 
1957  SCIP_CALL( SCIPconsMarkPropagate(cons, scip->set) );
1958 
1959  assert(!SCIPconsIsEnabled(cons) || SCIPconsIsMarkedPropagate(cons));
1960 
1961  return SCIP_OKAY;
1962 }
1963 
1964 /** unmarks the constraint to be propagated
1965  *
1966  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1967  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1968  *
1969  * @pre This method can be called if @p scip is in one of the following stages:
1970  * - \ref SCIP_STAGE_TRANSFORMED
1971  * - \ref SCIP_STAGE_PRESOLVING
1972  * - \ref SCIP_STAGE_EXITPRESOLVE
1973  * - \ref SCIP_STAGE_PRESOLVED
1974  * - \ref SCIP_STAGE_INITSOLVE
1975  * - \ref SCIP_STAGE_SOLVING
1976  * - \ref SCIP_STAGE_SOLVED
1977  */
1979  SCIP* scip, /**< SCIP data structure */
1980  SCIP_CONS* cons /**< constraint */
1981  )
1982 {
1983  SCIP_CALL( SCIPcheckStage(scip, "SCIPunmarkConsPropagate", FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
1984 
1985  SCIP_CALL( SCIPconsUnmarkPropagate(cons, scip->set) );
1986 
1987  assert(!SCIPconsIsEnabled(cons) || !SCIPconsIsMarkedPropagate(cons));
1988 
1989  return SCIP_OKAY;
1990 }
1991 
1992 /** adds given values to lock status of type @p locktype of the constraint and updates the rounding locks of the involved variables
1993  *
1994  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1995  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1996  *
1997  * @pre This method can be called if @p scip is in one of the following stages:
1998  * - \ref SCIP_STAGE_PROBLEM
1999  * - \ref SCIP_STAGE_TRANSFORMING
2000  * - \ref SCIP_STAGE_INITPRESOLVE
2001  * - \ref SCIP_STAGE_PRESOLVING
2002  * - \ref SCIP_STAGE_EXITPRESOLVE
2003  * - \ref SCIP_STAGE_INITSOLVE
2004  * - \ref SCIP_STAGE_SOLVING
2005  * - \ref SCIP_STAGE_EXITSOLVE
2006  * - \ref SCIP_STAGE_FREETRANS
2007  */
2009  SCIP* scip, /**< SCIP data structure */
2010  SCIP_CONS* cons, /**< constraint */
2011  SCIP_LOCKTYPE locktype, /**< type of the variable locks */
2012  int nlockspos, /**< increase in number of rounding locks for constraint */
2013  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
2014  )
2015 {
2016  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConsLocksType", FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE) );
2017 
2018  SCIP_CALL( SCIPconsAddLocks(cons, scip->set, locktype, nlockspos, nlocksneg) );
2019 
2020  return SCIP_OKAY;
2021 }
2022 
2023 /** adds given values to lock status of the constraint and updates the rounding locks of the involved variables
2024  *
2025  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2026  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2027  *
2028  * @pre This method can be called if @p scip is in one of the following stages:
2029  * - \ref SCIP_STAGE_PROBLEM
2030  * - \ref SCIP_STAGE_TRANSFORMING
2031  * - \ref SCIP_STAGE_INITPRESOLVE
2032  * - \ref SCIP_STAGE_PRESOLVING
2033  * - \ref SCIP_STAGE_EXITPRESOLVE
2034  * - \ref SCIP_STAGE_INITSOLVE
2035  * - \ref SCIP_STAGE_SOLVING
2036  * - \ref SCIP_STAGE_EXITSOLVE
2037  * - \ref SCIP_STAGE_FREETRANS
2038  *
2039  * @note This methods always adds locks of type model
2040  */
2042  SCIP* scip, /**< SCIP data structure */
2043  SCIP_CONS* cons, /**< constraint */
2044  int nlockspos, /**< increase in number of rounding locks for constraint */
2045  int nlocksneg /**< increase in number of rounding locks for constraint's negation */
2046  )
2047 {
2048  SCIP_CALL( SCIPcheckStage(scip, "SCIPaddConsLocks", FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE) );
2049 
2050  SCIP_CALL( SCIPaddConsLocksType(scip, cons, SCIP_LOCKTYPE_MODEL, nlockspos, nlocksneg) );
2051 
2052  return SCIP_OKAY;
2053 }
2054 
2055 /** checks single constraint for feasibility of the given solution
2056  *
2057  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2058  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2059  *
2060  * @pre This method can be called if @p scip is in one of the following stages:
2061  * - \ref SCIP_STAGE_PROBLEM
2062  * - \ref SCIP_STAGE_TRANSFORMED
2063  * - \ref SCIP_STAGE_INITPRESOLVE
2064  * - \ref SCIP_STAGE_PRESOLVING
2065  * - \ref SCIP_STAGE_EXITPRESOLVE
2066  * - \ref SCIP_STAGE_PRESOLVED
2067  * - \ref SCIP_STAGE_INITSOLVE
2068  * - \ref SCIP_STAGE_SOLVING
2069  * - \ref SCIP_STAGE_SOLVED
2070  */
2072  SCIP* scip, /**< SCIP data structure */
2073  SCIP_CONS* cons, /**< constraint to check */
2074  SCIP_SOL* sol, /**< primal CIP solution */
2075  SCIP_Bool checkintegrality, /**< Has integrality to be checked? */
2076  SCIP_Bool checklprows, /**< Do constraints represented by rows in the current LP have to be checked? */
2077  SCIP_Bool printreason, /**< Should the reason for the violation be printed? */
2078  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2079  )
2080 {
2081  SCIP_CALL( SCIPcheckStage(scip, "SCIPcheckCons", FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE) );
2082 
2083  SCIP_CALL( SCIPconsCheck(cons, scip->set, sol, checkintegrality, checklprows, printreason, result) );
2084 
2085  return SCIP_OKAY;
2086 }
2087 
2088 /** enforces single constraint for a given pseudo solution
2089  *
2090  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2091  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2092  *
2093  * @pre This method can be called if @p scip is in one of the following stages:
2094  * - \ref SCIP_STAGE_SOLVING
2095  *
2096  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2097  * added to SCIP beforehand.
2098  */
2100  SCIP* scip, /**< SCIP data structure */
2101  SCIP_CONS* cons, /**< constraint to enforce */
2102  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
2103  SCIP_Bool objinfeasible, /**< is the solution infeasible anyway due to violating lower objective bound? */
2104  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2105  )
2106 {
2107  assert(scip != NULL);
2108  assert(cons != NULL);
2109  assert(!SCIPconsIsAdded(cons));
2110  assert(result != NULL);
2111 
2112  SCIP_CALL( SCIPcheckStage(scip, "SCIPenfopsCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2113 
2114  SCIP_CALL( SCIPconsEnfops(cons, scip->set, solinfeasible, objinfeasible, result) );
2115 
2116  return SCIP_OKAY;
2117 }
2118 
2119 /** enforces single constraint for a given LP solution
2120  *
2121  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2122  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2123  *
2124  * @pre This method can be called if @p scip is in one of the following stages:
2125  * - \ref SCIP_STAGE_SOLVING
2126  *
2127  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2128  * added to SCIP beforehand.
2129  */
2131  SCIP* scip, /**< SCIP data structure */
2132  SCIP_CONS* cons, /**< constraint to enforce */
2133  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
2134  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2135  )
2136 {
2137  assert(scip != NULL);
2138  assert(cons != NULL);
2139  assert(!SCIPconsIsAdded(cons));
2140  assert(result != NULL);
2141 
2142  SCIP_CALL( SCIPcheckStage(scip, "SCIPenfolpCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2143 
2144  SCIP_CALL( SCIPconsEnfolp(cons, scip->set, solinfeasible, result) );
2145 
2146  return SCIP_OKAY;
2147 }
2148 
2149 /** enforces single constraint for a given relaxation solution
2150  *
2151  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2152  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2153  *
2154  * @pre This method can be called if @p scip is in one of the following stages:
2155  * - \ref SCIP_STAGE_SOLVING
2156  *
2157  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2158  * added to SCIP beforehand.
2159  */
2161  SCIP* scip, /**< SCIP data structure */
2162  SCIP_CONS* cons, /**< constraint to enforce */
2163  SCIP_SOL* sol, /**< solution to enforce */
2164  SCIP_Bool solinfeasible, /**< was the solution already declared infeasible by a constraint handler? */
2165  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2166  )
2167 {
2168  assert(scip != NULL);
2169  assert(cons != NULL);
2170  assert(!SCIPconsIsAdded(cons));
2171  assert(sol != NULL);
2172  assert(result != NULL);
2173 
2174  SCIP_CALL( SCIPcheckStage(scip, "SCIPenforelaxCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2175 
2176  SCIP_CALL( SCIPconsEnforelax(cons, scip->set, sol, solinfeasible, result) );
2177 
2178  return SCIP_OKAY;
2179 }
2180 
2181 /** calls LP initialization method for single constraint
2182  *
2183  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2184  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2185  *
2186  * @pre This method can be called if @p scip is in one of the following stages:
2187  * - \ref SCIP_STAGE_SOLVING
2188  *
2189  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2190  * added to SCIP beforehand.
2191  */
2193  SCIP* scip, /**< SCIP data structure */
2194  SCIP_CONS* cons, /**< constraint to initialize */
2195  SCIP_Bool* infeasible /**< pointer to store whether infeasibility was detected while building the LP */
2196  )
2197 {
2198  assert(scip != NULL);
2199  assert(cons != NULL);
2200  assert(!SCIPconsIsAdded(cons));
2201 
2202  SCIP_CALL( SCIPcheckStage(scip, "SCIPinitlpCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2203 
2204  SCIP_CALL( SCIPconsInitlp(cons, scip->set, infeasible) );
2205 
2206  return SCIP_OKAY;
2207 }
2208 
2209 /** calls separation method of single constraint for LP solution
2210  *
2211  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2212  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2213  *
2214  * @pre This method can be called if @p scip is in one of the following stages:
2215  * - \ref SCIP_STAGE_SOLVING
2216  *
2217  * @note This is an advanced method and should be used with caution.
2218  */
2220  SCIP* scip, /**< SCIP data structure */
2221  SCIP_CONS* cons, /**< constraint to separate */
2222  SCIP_RESULT* result /**< pointer to store the result of the separation call */
2223  )
2224 {
2225  assert(scip != NULL);
2226  assert(cons != NULL);
2227  assert(result != NULL);
2228 
2229  SCIP_CALL( SCIPcheckStage(scip, "SCIPsepalpCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2230 
2231  SCIP_CALL( SCIPconsSepalp(cons, scip->set, result) );
2232 
2233  return SCIP_OKAY;
2234 }
2235 
2236 /** calls separation method of single constraint for given primal solution
2237  *
2238  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2239  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2240  *
2241  * @pre This method can be called if @p scip is in one of the following stages:
2242  * - \ref SCIP_STAGE_SOLVING
2243  *
2244  * @note This is an advanced method and should be used with caution.
2245  */
2247  SCIP* scip, /**< SCIP data structure */
2248  SCIP_CONS* cons, /**< constraint to separate */
2249  SCIP_SOL* sol, /**< primal solution that should be separated*/
2250  SCIP_RESULT* result /**< pointer to store the result of the separation call */
2251  )
2252 {
2253  assert(scip != NULL);
2254  assert(cons != NULL);
2255  assert(sol != NULL);
2256  assert(result != NULL);
2257 
2258  SCIP_CALL( SCIPcheckStage(scip, "SCIPsepasolCons", FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2259 
2260  SCIP_CALL( SCIPconsSepasol(cons, scip->set, sol, result) );
2261 
2262  return SCIP_OKAY;
2263 }
2264 
2265 /** calls domain propagation method of single constraint
2266  *
2267  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2268  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2269  *
2270  * @pre This method can be called if @p scip is in one of the following stages:
2271  * - \ref SCIP_STAGE_PRESOLVING
2272  * - \ref SCIP_STAGE_SOLVING
2273  *
2274  * @note This is an advanced method and should be used with caution.
2275  */
2277  SCIP* scip, /**< SCIP data structure */
2278  SCIP_CONS* cons, /**< constraint to propagate */
2279  SCIP_PROPTIMING proptiming, /**< current point in the node solving loop */
2280  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2281  )
2282 {
2283  assert(scip != NULL);
2284  assert(cons != NULL);
2285  assert(result != NULL);
2286 
2287  SCIP_CALL( SCIPcheckStage(scip, "SCIPpropCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2288 
2289  SCIP_CALL( SCIPconsProp(cons, scip->set, proptiming, result) );
2290 
2291  return SCIP_OKAY;
2292 }
2293 
2294 /** resolves propagation conflict of single constraint
2295  *
2296  *
2297  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2298  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2299  *
2300  * @pre This method can be called if @p scip is in one of the following stages:
2301  * - \ref SCIP_STAGE_PRESOLVING
2302  * - \ref SCIP_STAGE_SOLVING
2303  *
2304  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2305  * added to SCIP beforehand.
2306  */
2308  SCIP* scip, /**< SCIP data structure */
2309  SCIP_CONS* cons, /**< constraint to resolve conflict for */
2310  SCIP_VAR* infervar, /**< the conflict variable whose bound change has to be resolved */
2311  int inferinfo, /**< the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call */
2312  SCIP_BOUNDTYPE boundtype, /**< the type of the changed bound (lower or upper bound) */
2313  SCIP_BDCHGIDX* bdchgidx, /**< the index of the bound change, representing the point of time where the change took place */
2314  SCIP_Real relaxedbd, /**< the relaxed bound which is sufficient to be explained */
2315  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2316  )
2317 {
2318  assert(scip != NULL);
2319  assert(cons != NULL);
2320  assert(!SCIPconsIsAdded(cons));
2321  assert(infervar != NULL);
2322  assert(bdchgidx != NULL);
2323  assert(result != NULL);
2324 
2325  SCIP_CALL( SCIPcheckStage(scip, "SCIPrespropCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2326 
2327  SCIP_CALL( SCIPconsResprop(cons, scip->set, infervar, inferinfo, boundtype, bdchgidx, relaxedbd, result) );
2328 
2329  return SCIP_OKAY;
2330 }
2331 
2332 /** presolves of single constraint
2333  *
2334  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2335  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2336  *
2337  * @pre This method can be called if @p scip is in one of the following stages:
2338  * - \ref SCIP_STAGE_PRESOLVING
2339  *
2340  * @note This is an advanced method and should be used with caution.
2341  */
2343  SCIP* scip, /**< SCIP data structure */
2344  SCIP_CONS* cons, /**< constraint to presolve */
2345  int nrounds, /**< number of presolving rounds already done */
2346  SCIP_PRESOLTIMING presoltiming, /**< presolving timing(s) to be performed */
2347  int nnewfixedvars, /**< number of variables fixed since the last call to the presolving method */
2348  int nnewaggrvars, /**< number of variables aggregated since the last call to the presolving method */
2349  int nnewchgvartypes, /**< number of variable type changes since the last call to the presolving method */
2350  int nnewchgbds, /**< number of variable bounds tightened since the last call to the presolving method */
2351  int nnewholes, /**< number of domain holes added since the last call to the presolving method */
2352  int nnewdelconss, /**< number of deleted constraints since the last call to the presolving method */
2353  int nnewaddconss, /**< number of added constraints since the last call to the presolving method */
2354  int nnewupgdconss, /**< number of upgraded constraints since the last call to the presolving method */
2355  int nnewchgcoefs, /**< number of changed coefficients since the last call to the presolving method */
2356  int nnewchgsides, /**< number of changed left or right hand sides since the last call to the presolving method */
2357  int* nfixedvars, /**< pointer to count total number of variables fixed of all presolvers */
2358  int* naggrvars, /**< pointer to count total number of variables aggregated of all presolvers */
2359  int* nchgvartypes, /**< pointer to count total number of variable type changes of all presolvers */
2360  int* nchgbds, /**< pointer to count total number of variable bounds tightened of all presolvers */
2361  int* naddholes, /**< pointer to count total number of domain holes added of all presolvers */
2362  int* ndelconss, /**< pointer to count total number of deleted constraints of all presolvers */
2363  int* naddconss, /**< pointer to count total number of added constraints of all presolvers */
2364  int* nupgdconss, /**< pointer to count total number of upgraded constraints of all presolvers */
2365  int* nchgcoefs, /**< pointer to count total number of changed coefficients of all presolvers */
2366  int* nchgsides, /**< pointer to count total number of changed left/right hand sides of all presolvers */
2367  SCIP_RESULT* result /**< pointer to store the result of the callback method */
2368  )
2369 {
2370  assert(scip != NULL);
2371  assert(cons != NULL);
2372  assert(nfixedvars != NULL);
2373  assert(naggrvars != NULL);
2374  assert(nchgvartypes != NULL);
2375  assert(nchgbds != NULL);
2376  assert(naddholes != NULL);
2377  assert(ndelconss != NULL);
2378  assert(naddconss != NULL);
2379  assert(nupgdconss != NULL);
2380  assert(nchgcoefs != NULL);
2381  assert(nchgsides != NULL);
2382  assert(result != NULL);
2383 
2384  SCIP_CALL( SCIPcheckStage(scip, "SCIPpresolCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
2385 
2386  SCIP_CALL( SCIPconsPresol(cons, scip->set, nrounds, presoltiming, nnewfixedvars, nnewaggrvars, nnewchgvartypes, nnewchgbds, nnewholes,
2387  nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars, nchgvartypes,
2388  nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides , result) );
2389 
2390  return SCIP_OKAY;
2391 }
2392 
2393 /** calls constraint activation notification method of single constraint
2394  *
2395  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2396  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2397  *
2398  * @pre This method can be called if @p scip is in one of the following stages:
2399  * - \ref SCIP_STAGE_TRANSFORMING
2400  *
2401  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2402  * added to SCIP beforehand.
2403  */
2405  SCIP* scip, /**< SCIP data structure */
2406  SCIP_CONS* cons /**< constraint to notify */
2407  )
2408 {
2409  assert(scip != NULL);
2410  assert(cons != NULL);
2411  assert(!SCIPconsIsAdded(cons));
2412  assert(!SCIPconsIsDeleted(cons));
2413 
2414  SCIP_CALL( SCIPcheckStage(scip, "SCIPactiveCons", FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE) );
2415 
2416  SCIP_CALL( SCIPconsActive(cons, scip->set) );
2417 
2418  return SCIP_OKAY;
2419 }
2420 
2421 /** calls constraint deactivation notification method of single constraint
2422  *
2423  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2424  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2425  *
2426  * @pre This method can be called if @p scip is in one of the following stages:
2427  * - \ref SCIP_STAGE_PRESOLVING
2428  * - \ref SCIP_STAGE_SOLVING
2429  *
2430  * @note This is an advanced method and should be used with caution. It may only be called for constraints that were not
2431  * added to SCIP beforehand.
2432  */
2434  SCIP* scip, /**< SCIP data structure */
2435  SCIP_CONS* cons /**< constraint to notify */
2436  )
2437 {
2438  assert(scip != NULL);
2439  assert(cons != NULL);
2440  assert(!SCIPconsIsAdded(cons));
2441 
2442  SCIP_CALL( SCIPcheckStage(scip, "SCIPdeactiveCons", FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE) );
2443 
2444  SCIP_CALL( SCIPconsDeactive(cons, scip->set) );
2445 
2446  return SCIP_OKAY;
2447 }
2448 
2449 /** outputs constraint information to file stream via the message handler system
2450  *
2451  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2452  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2453  *
2454  * @pre This method can be called if @p scip is in one of the following stages:
2455  * - \ref SCIP_STAGE_PROBLEM
2456  * - \ref SCIP_STAGE_TRANSFORMING
2457  * - \ref SCIP_STAGE_TRANSFORMED
2458  * - \ref SCIP_STAGE_INITPRESOLVE
2459  * - \ref SCIP_STAGE_PRESOLVING
2460  * - \ref SCIP_STAGE_EXITPRESOLVE
2461  * - \ref SCIP_STAGE_PRESOLVED
2462  * - \ref SCIP_STAGE_INITSOLVE
2463  * - \ref SCIP_STAGE_SOLVING
2464  * - \ref SCIP_STAGE_SOLVED
2465  * - \ref SCIP_STAGE_EXITSOLVE
2466  * - \ref SCIP_STAGE_FREETRANS
2467  *
2468  * @note If the message handler is set to a NULL pointer nothing will be printed.
2469  * @note The file stream will not be flushed directly, this can be achieved by calling SCIPinfoMessage() printing a
2470  * newline character.
2471  */
2473  SCIP* scip, /**< SCIP data structure */
2474  SCIP_CONS* cons, /**< constraint */
2475  FILE* file /**< output file (or NULL for standard output) */
2476  )
2477 {
2478  SCIP_CALL( SCIPcheckStage(scip, "SCIPprintCons", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2479 
2480  SCIP_CALL( SCIPconsPrint(cons, scip->set, scip->messagehdlr, file) );
2481 
2482  return SCIP_OKAY;
2483 }
2484 
2485 /** method to collect the variables of a constraint
2486  *
2487  * If the number of variables is greater than the available slots in the variable array, nothing happens except that
2488  * the success point is set to FALSE. With the method SCIPgetConsNVars() it is possible to get the number of variables
2489  * a constraint has in its scope.
2490  *
2491  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2492  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2493  *
2494  * @pre This method can be called if @p scip is in one of the following stages:
2495  * - \ref SCIP_STAGE_PROBLEM
2496  * - \ref SCIP_STAGE_TRANSFORMING
2497  * - \ref SCIP_STAGE_TRANSFORMED
2498  * - \ref SCIP_STAGE_INITPRESOLVE
2499  * - \ref SCIP_STAGE_PRESOLVING
2500  * - \ref SCIP_STAGE_EXITPRESOLVE
2501  * - \ref SCIP_STAGE_PRESOLVED
2502  * - \ref SCIP_STAGE_INITSOLVE
2503  * - \ref SCIP_STAGE_SOLVING
2504  * - \ref SCIP_STAGE_SOLVED
2505  * - \ref SCIP_STAGE_EXITSOLVE
2506  * - \ref SCIP_STAGE_FREETRANS
2507  *
2508  * @note The success pointer indicates if all variables were copied into the vars arrray.
2509  *
2510  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
2511  * set to FALSE.
2512  */
2514  SCIP* scip, /**< SCIP data structure */
2515  SCIP_CONS* cons, /**< constraint for which the variables are wanted */
2516  SCIP_VAR** vars, /**< array to store the involved variable of the constraint */
2517  int varssize, /**< available slots in vars array which is needed to check if the array is large enough */
2518  SCIP_Bool* success /**< pointer to store whether the variables are successfully copied */
2519  )
2520 {
2521  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetConsVars", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2522 
2523  assert(scip != NULL);
2524  assert(cons != NULL);
2525  assert(vars != NULL);
2526  assert(success != NULL);
2527 
2528  SCIP_CALL( SCIPconsGetVars(cons, scip->set, vars, varssize, success) );
2529 
2530  return SCIP_OKAY;
2531 }
2532 
2533 /** method to collect the number of variables of a constraint
2534  *
2535  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2536  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2537  *
2538  * @pre This method can be called if @p scip is in one of the following stages:
2539  * - \ref SCIP_STAGE_PROBLEM
2540  * - \ref SCIP_STAGE_TRANSFORMING
2541  * - \ref SCIP_STAGE_TRANSFORMED
2542  * - \ref SCIP_STAGE_INITPRESOLVE
2543  * - \ref SCIP_STAGE_PRESOLVING
2544  * - \ref SCIP_STAGE_EXITPRESOLVE
2545  * - \ref SCIP_STAGE_PRESOLVED
2546  * - \ref SCIP_STAGE_INITSOLVE
2547  * - \ref SCIP_STAGE_SOLVING
2548  * - \ref SCIP_STAGE_SOLVED
2549  * - \ref SCIP_STAGE_EXITSOLVE
2550  * - \ref SCIP_STAGE_FREETRANS
2551  *
2552  * @note The success pointer indicates if the contraint handler was able to return the number of variables
2553  *
2554  * @note It might be that a constraint handler does not support this functionality, in that case the success pointer is
2555  * set to FALSE
2556  */
2558  SCIP* scip, /**< SCIP data structure */
2559  SCIP_CONS* cons, /**< constraint for which the number of variables is wanted */
2560  int* nvars, /**< pointer to store the number of variables */
2561  SCIP_Bool* success /**< pointer to store whether the constraint successfully returned the number of variables */
2562  )
2563 {
2564  SCIP_CALL( SCIPcheckStage(scip, "SCIPgetConsNVars", FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE) );
2565 
2566  assert(scip != NULL);
2567  assert(cons != NULL);
2568  assert(nvars != NULL);
2569  assert(success != NULL);
2570 
2571  SCIP_CALL( SCIPconsGetNVars(cons, scip->set, nvars, success) );
2572 
2573  return SCIP_OKAY;
2574 }
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:52
SCIP_RETCODE SCIPconsSetChecked(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool check)
Definition: cons.c:6557
SCIP_STAT * stat
Definition: struct_scip.h:69
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:50
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1807
SCIP_RETCODE SCIPconsUnmarkPropagate(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7024
SCIP_RETCODE SCIPconsIncAge(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_REOPT *reopt)
Definition: cons.c:7120
#define NULL
Definition: def.h:253
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
Definition: cons.c:8173
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
Definition: scip_cons.c:585
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:1017
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
Definition: scip_cons.c:876
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
Definition: scip_cons.c:452
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:933
void SCIPconshdlrSetPrint(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
Definition: cons.c:4503
SCIP_RETCODE SCIPaddConsLocks(SCIP *scip, SCIP_CONS *cons, int nlockspos, int nlocksneg)
Definition: scip_cons.c:2041
public methods for memory management
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: scip_cons.c:307
SCIP_RETCODE SCIPgetTransformedConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
Definition: scip_cons.c:1650
void SCIPconsSetDynamic(SCIP_CONS *cons, SCIP_Bool dynamic)
Definition: cons.c:6664
void SCIPconsSetStickingAtNode(SCIP_CONS *cons, SCIP_Bool stickingatnode)
Definition: cons.c:6686
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
Definition: cons.c:8275
SCIP_RETCODE SCIPmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1950
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:165
SCIP_DECL_CONSSEPALP(ConshdlrSubtour::scip_sepalp)
SCIP_RETCODE SCIPconsSepasol(SCIP_CONS *cons, SCIP_SET *set, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: cons.c:7523
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
Definition: scip_cons.c:654
#define SCIP_MAXSTRLEN
Definition: def.h:274
#define SCIP_DECL_CONSINITPRE(x)
Definition: type_cons.h:141
SCIP_RETCODE SCIPsepasolCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result)
Definition: scip_cons.c:2246
#define SCIP_DECL_CONSGETDIVEBDCHGS(x)
Definition: type_cons.h:904
#define SCIP_DECL_CONSPRESOL(x)
Definition: type_cons.h:545
void SCIPconshdlrSetDeactive(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
Definition: cons.c:4459
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
Definition: scip_cons.c:815
void SCIPconshdlrSetInitpre(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
Definition: cons.c:4353
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5047
SCIP_RETCODE SCIPconsParse(SCIP_CONS **cons, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, const char *str, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool *success)
Definition: cons.c:6002
void SCIPconshdlrSetInitsol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
Definition: cons.c:4331
SCIP_RETCODE SCIPsetIncludeConshdlr(SCIP_SET *set, SCIP_CONSHDLR *conshdlr)
Definition: set.c:3741
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
Definition: scip_cons.c:769
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
Definition: cons.c:8505
SCIP_DECL_CONSENFOPS(ConshdlrSubtour::scip_enfops)
SCIP_RETCODE SCIPsetConshdlrDelvars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELVARS((*consdelvars)))
Definition: scip_cons.c:746
#define SCIP_DECL_CONSRESPROP(x)
Definition: type_cons.h:596
SCIP_RETCODE SCIPconsGetVars(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
Definition: cons.c:6275
datastructures for constraints and constraint handlers
SCIP_RETCODE SCIPconsSetSeparated(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool separate)
Definition: cons.c:6487
#define FALSE
Definition: def.h:73
int SCIPgetNConshdlrs(SCIP *scip)
Definition: scip_cons.c:900
SCIP_RETCODE SCIPaddConsLocksType(SCIP *scip, SCIP_CONS *cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
Definition: scip_cons.c:2008
SCIP_STAGE stage
Definition: struct_set.h:63
#define TRUE
Definition: def.h:72
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_DECL_CONSGETNVARS(x)
Definition: type_cons.h:869
void SCIPconshdlrSetFree(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
Definition: cons.c:4298
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
Definition: cons.c:8245
SCIP_RETCODE SCIPgetTransformedCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition: scip_cons.c:1610
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
Definition: scip_cons.c:562
void SCIPconshdlrSetEnforelax(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
Definition: cons.c:4272
SCIP_RETCODE SCIPconsEnableSeparation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6866
#define SCIP_DECL_CONSEXITSOL(x)
Definition: type_cons.h:201
void SCIPconshdlrSetCopy(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
Definition: cons.c:4283
SCIP_RETCODE SCIPconsSetPropagated(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool propagate)
Definition: cons.c:6605
SCIP_DECL_CONSSEPASOL(ConshdlrSubtour::scip_sepasol)
SCIP_RETCODE SCIPsetConsSeparated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool separate)
Definition: scip_cons.c:1232
void SCIPconshdlrSetSepa(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
Definition: cons.c:4232
SCIP_PROB * transprob
Definition: struct_scip.h:87
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
Definition: scip_cons.c:524
SCIP_DECL_CONSDELETE(ConshdlrSubtour::scip_delete)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
Definition: scip_cons.c:380
SCIP_RETCODE SCIPsetConsEnforced(SCIP *scip, SCIP_CONS *cons, SCIP_Bool enforce)
Definition: scip_cons.c:1257
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
Definition: scip_cons.c:838
SCIP_CONS * SCIPconsGetTransformed(SCIP_CONS *cons)
Definition: cons.c:6712
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
Definition: scip_cons.c:500
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
Definition: scip_cons.c:2557
#define SCIP_DECL_CONSINITLP(x)
Definition: type_cons.h:244
SCIP_RETCODE SCIPconsAddLocks(SCIP_CONS *cons, SCIP_SET *set, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg)
Definition: cons.c:7242
SCIP_PROB * origprob
Definition: struct_scip.h:70
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
Definition: scip_cons.c:356
SCIP_DECL_CONSENFOLP(ConshdlrSubtour::scip_enfolp)
SCIP_RETCODE SCIPchgConsName(SCIP *scip, SCIP_CONS *cons, const char *name)
Definition: scip_cons.c:1160
SCIP_RETCODE SCIPconsResetAge(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7141
SCIP_RETCODE SCIPupdateConsFlags(SCIP *scip, SCIP_CONS *cons0, SCIP_CONS *cons1)
Definition: scip_cons.c:1460
SCIP_RETCODE SCIPconsActive(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7722
SCIP_DECL_CONSCHECK(ConshdlrSubtour::scip_check)
SCIP_RETCODE SCIPsetConsRemovable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool removable)
Definition: scip_cons.c:1410
#define SCIP_DECL_CONSINITSOL(x)
Definition: type_cons.h:186
SCIP_RETCODE SCIPconsDisableSeparation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6896
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1234
SCIP_MEM * mem
Definition: struct_scip.h:61
public methods for managing constraints
SCIP_CONSHDLR * SCIPsetFindConshdlr(SCIP_SET *set, const char *name)
Definition: set.c:3880
SCIP_RETCODE SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
Definition: scip_cons.c:861
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:2071
void SCIPconshdlrSetExitsol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
Definition: cons.c:4342
SCIP_RETCODE SCIPconsEnablePropagation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6924
SCIP_RETCODE SCIPincludeConshdlr(SCIP *scip, const char *name, const char *desc, int sepapriority, int enfopriority, int chckpriority, int sepafreq, int propfreq, int eagerfreq, int maxprerounds, SCIP_Bool delaysepa, SCIP_Bool delayprop, SCIP_Bool needscons, SCIP_PROPTIMING proptiming, SCIP_PRESOLTIMING presoltiming, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSFREE((*consfree)), SCIP_DECL_CONSINIT((*consinit)), SCIP_DECL_CONSEXIT((*consexit)), SCIP_DECL_CONSINITPRE((*consinitpre)), SCIP_DECL_CONSEXITPRE((*consexitpre)), SCIP_DECL_CONSINITSOL((*consinitsol)), SCIP_DECL_CONSEXITSOL((*consexitsol)), SCIP_DECL_CONSDELETE((*consdelete)), SCIP_DECL_CONSTRANS((*constrans)), SCIP_DECL_CONSINITLP((*consinitlp)), SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFORELAX((*consenforelax)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSPROP((*consprop)), SCIP_DECL_CONSPRESOL((*conspresol)), SCIP_DECL_CONSRESPROP((*consresprop)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_DECL_CONSACTIVE((*consactive)), SCIP_DECL_CONSDEACTIVE((*consdeactive)), SCIP_DECL_CONSENABLE((*consenable)), SCIP_DECL_CONSDISABLE((*consdisable)), SCIP_DECL_CONSDELVARS((*consdelvars)), SCIP_DECL_CONSPRINT((*consprint)), SCIP_DECL_CONSCOPY((*conscopy)), SCIP_DECL_CONSPARSE((*consparse)), SCIP_DECL_CONSGETVARS((*consgetvars)), SCIP_DECL_CONSGETNVARS((*consgetnvars)), SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), SCIP_CONSHDLRDATA *conshdlrdata)
Definition: scip_cons.c:72
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
Definition: scip_cons.c:404
void SCIPsetReinsertConshdlrSepaPrio(SCIP_SET *set, SCIP_CONSHDLR *conshdlr, int oldpriority)
Definition: set.c:3797
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:87
internal methods for storing and manipulating the main problem
SCIP_RETCODE SCIPconsResprop(SCIP_CONS *cons, SCIP_SET *set, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT *result)
Definition: cons.c:7606
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_RETCODE SCIPconsTransform(SCIP_CONS *origcons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_CONS **transcons)
Definition: cons.c:6403
SCIP_RETCODE SCIPconshdlrCreate(SCIP_CONSHDLR **conshdlr, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int sepapriority, int enfopriority, int checkpriority, int sepafreq, int propfreq, int eagerfreq, int maxprerounds, SCIP_Bool delaysepa, SCIP_Bool delayprop, SCIP_Bool needscons, SCIP_PROPTIMING proptiming, SCIP_PRESOLTIMING presoltiming, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSFREE((*consfree)), SCIP_DECL_CONSINIT((*consinit)), SCIP_DECL_CONSEXIT((*consexit)), SCIP_DECL_CONSINITPRE((*consinitpre)), SCIP_DECL_CONSEXITPRE((*consexitpre)), SCIP_DECL_CONSINITSOL((*consinitsol)), SCIP_DECL_CONSEXITSOL((*consexitsol)), SCIP_DECL_CONSDELETE((*consdelete)), SCIP_DECL_CONSTRANS((*constrans)), SCIP_DECL_CONSINITLP((*consinitlp)), SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFORELAX((*consenforelax)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSPROP((*consprop)), SCIP_DECL_CONSPRESOL((*conspresol)), SCIP_DECL_CONSRESPROP((*consresprop)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_DECL_CONSACTIVE((*consactive)), SCIP_DECL_CONSDEACTIVE((*consdeactive)), SCIP_DECL_CONSENABLE((*consenable)), SCIP_DECL_CONSDISABLE((*consdisable)), SCIP_DECL_CONSDELVARS((*consdelvars)), SCIP_DECL_CONSPRINT((*consprint)), SCIP_DECL_CONSCOPY((*conscopy)), SCIP_DECL_CONSPARSE((*consparse)), SCIP_DECL_CONSGETVARS((*consgetvars)), SCIP_DECL_CONSGETNVARS((*consgetnvars)), SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)), SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:2268
#define SCIP_DECL_CONSPARSE(x)
Definition: type_cons.h:829
#define SCIP_DECL_CONSDEACTIVE(x)
Definition: type_cons.h:690
SCIP_RETCODE SCIPconsProp(SCIP_CONS *cons, SCIP_SET *set, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
Definition: cons.c:7566
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
Definition: scip_cons.c:428
SCIP_RETCODE SCIPsetConshdlrDisable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
Definition: scip_cons.c:723
void SCIPconshdlrSetProp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING timingmask)
Definition: cons.c:4253
SCIP_RETCODE SCIPdeactiveCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2433
SCIP_RETCODE SCIPconsDeactive(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:7746
SCIP_RETCODE SCIPcheckStage(SCIP *scip, const char *method, SCIP_Bool init, SCIP_Bool problem, SCIP_Bool transforming, SCIP_Bool transformed, SCIP_Bool initpresolve, SCIP_Bool presolving, SCIP_Bool exitpresolve, SCIP_Bool presolved, SCIP_Bool initsolve, SCIP_Bool solving, SCIP_Bool solved, SCIP_Bool exitsolve, SCIP_Bool freetrans, SCIP_Bool freescip)
Definition: debug.c:2010
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
Definition: scip_mem.c:47
SCIP_CONSHDLR ** conshdlrs
Definition: struct_set.h:70
SCIP_REOPT * reopt
Definition: struct_scip.h:74
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:2160
void SCIPconshdlrSetEnable(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
Definition: cons.c:4470
SCIP_RETCODE SCIPconsChgName(SCIP_CONS *cons, BMS_BLKMEM *blkmem, const char *name)
Definition: cons.c:6109
#define SCIP_DECL_CONSDISABLE(x)
Definition: type_cons.h:720
void SCIPconshdlrSetExit(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXIT((*consexit)))
Definition: cons.c:4320
SCIP_RETCODE SCIPdisableConsPropagation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1917
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITPRE((*consinitpre)))
Definition: scip_cons.c:476
internal methods for global SCIP settings
SCIP_DECL_CONSDELVARS(ConshdlrSubtour::scip_delvars)
SCIP * scip
Definition: struct_cons.h:40
#define SCIP_CALL(x)
Definition: def.h:365
unsigned int SCIP_PRESOLTIMING
Definition: type_timing.h:52
SCIP main data structure.
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
Definition: scip_cons.c:631
BMS_BLKMEM * setmem
Definition: struct_mem.h:39
#define SCIP_DECL_CONSENABLE(x)
Definition: type_cons.h:705
SCIP_RETCODE SCIPconsDisable(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:6832
void SCIPconshdlrSetActive(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSACTIVE((*consactive)))
Definition: cons.c:4448
SCIP_RETCODE SCIPpropCons(SCIP *scip, SCIP_CONS *cons, SCIP_PROPTIMING proptiming, SCIP_RESULT *result)
Definition: scip_cons.c:2276
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:51
SCIP_RETCODE SCIPcaptureCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1074
public methods for constraint handler plugins and constraints
SCIP_RETCODE SCIPsetConsModifiable(SCIP *scip, SCIP_CONS *cons, SCIP_Bool modifiable)
Definition: scip_cons.c:1360
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1748
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
Definition: cons.c:8345
#define SCIP_DECL_CONSGETVARS(x)
Definition: type_cons.h:851
#define SCIP_DECL_CONSEXIT(x)
Definition: type_cons.h:121
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:219
public data structures and miscellaneous methods
SCIP_RETCODE SCIPconsGetNVars(SCIP_CONS *cons, SCIP_SET *set, int *nvars, SCIP_Bool *success)
Definition: cons.c:6311
#define SCIP_Bool
Definition: def.h:70
SCIP_DECL_CONSPROP(ConshdlrSubtour::scip_prop)
SCIP_RETCODE SCIPsetConsInitial(SCIP *scip, SCIP_CONS *cons, SCIP_Bool initial)
Definition: scip_cons.c:1207
SCIP_RETCODE SCIPconsAddAge(SCIP_CONS *cons, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PROB *prob, SCIP_Real deltaage, SCIP_REOPT *reopt)
Definition: cons.c:7061
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
Definition: scip_cons.c:331
SCIP_RETCODE SCIPconsEnfops(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
Definition: cons.c:7326
void SCIPconsSetModifiable(SCIP_CONS *cons, SCIP_Bool modifiable)
Definition: cons.c:6653
SCIP_RETCODE SCIPconsRelease(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set)
Definition: cons.c:6196
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
Definition: scip_cons.c:2472
void SCIPconshdlrSetDelete(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
Definition: cons.c:4404
void SCIPconshdlrSetInit(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINIT((*consinit)))
Definition: cons.c:4309
#define SCIP_DECL_CONSEXITPRE(x)
Definition: type_cons.h:165
methods for debugging
SCIP_RETCODE SCIPsetConsPropagated(SCIP *scip, SCIP_CONS *cons, SCIP_Bool propagate)
Definition: scip_cons.c:1307
SCIP_RETCODE SCIPsetConsStickingAtNode(SCIP *scip, SCIP_CONS *cons, SCIP_Bool stickingatnode)
Definition: scip_cons.c:1435
datastructures for block memory pools and memory buffers
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
Definition: cons.c:8385
void SCIPconsSetRemovable(SCIP_CONS *cons, SCIP_Bool removable)
Definition: cons.c:6675
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1249
SCIP_RETCODE SCIPenableConsSeparation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1832
SCIP_RETCODE SCIPconshdlrSetPresol(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
Definition: cons.c:4375
#define SCIP_PRESOLTIMING_ALWAYS
Definition: type_timing.h:49
SCIP_RETCODE SCIPsetSetDefaultBoolParam(SCIP_SET *set, const char *name, SCIP_Bool defaultvalue)
Definition: set.c:3168
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
Definition: cons.c:8255
#define SCIP_PROPTIMING_BEFORELP
Definition: type_timing.h:56
SCIP_RETCODE SCIPenableCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1773
SCIP_RETCODE SCIPsepalpCons(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
Definition: scip_cons.c:2219
SCIP_RETCODE SCIPenfolpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: scip_cons.c:2130
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
Definition: cons.c:8335
SCIP_RETCODE SCIPaddConsAge(SCIP *scip, SCIP_CONS *cons, SCIP_Real deltaage)
Definition: scip_cons.c:1691
void SCIPconshdlrSetGetNVars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
Definition: cons.c:4536
SCIP_RETCODE SCIPunmarkConsPropagate(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1978
void SCIPconshdlrSetParse(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
Definition: cons.c:4514
SCIP_RETCODE SCIPenableConsPropagation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1887
general public methods
BMS_BLKMEM * probmem
Definition: struct_mem.h:40
void SCIPconsCapture(SCIP_CONS *cons)
Definition: cons.c:6184
unsigned int SCIP_PROPTIMING
Definition: type_timing.h:66
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
Definition: cons.c:8265
SCIP_RETCODE SCIPenfopsCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT *result)
Definition: scip_cons.c:2099
SCIP_RETCODE SCIPtransformConss(SCIP *scip, int nconss, SCIP_CONS **conss, SCIP_CONS **transconss)
Definition: scip_cons.c:1561
#define SCIP_DECL_CONSFREE(x)
Definition: type_cons.h:101
SCIP_RETCODE SCIPactiveCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:2404
void SCIPconshdlrSetDisable(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDISABLE((*consdisable)))
Definition: cons.c:4481
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDEACTIVE((*consdeactive)))
Definition: scip_cons.c:677
SCIP_SET * set
Definition: struct_scip.h:62
public methods for message output
#define SCIP_DECL_CONSINIT(x)
Definition: type_cons.h:111
SCIP_DECL_CONSLOCK(ConshdlrSubtour::scip_lock)
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:10263
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
Definition: cons.c:8205
SCIP_MESSAGEHDLR * messagehdlr
Definition: struct_scip.h:65
#define SCIP_DECL_CONSENFORELAX(x)
Definition: type_cons.h:373
SCIP_RETCODE SCIPconsSetInitial(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat, SCIP_Bool initial)
Definition: cons.c:6453
void SCIPconshdlrSetResprop(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
Definition: cons.c:4437
#define SCIP_Real
Definition: def.h:164
SCIP_DECL_CONSPRINT(ConshdlrSubtour::scip_print)
SCIP_RETCODE SCIPconsPresol(SCIP_CONS *cons, SCIP_SET *set, int nrounds, SCIP_PRESOLTIMING timing, int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, int *nfixedvars, int *naggrvars, int *nchgvartypes, int *nchgbds, int *naddholes, int *ndelconss, int *naddconss, int *nupgdconss, int *nchgcoefs, int *nchgsides, SCIP_RESULT *result)
Definition: cons.c:7648
SCIP_RETCODE SCIPsetConsLocal(SCIP *scip, SCIP_CONS *cons, SCIP_Bool local)
Definition: scip_cons.c:1334
void SCIPconshdlrSetDelvars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELVARS((*consdelvars)))
Definition: cons.c:4492
SCIP_RETCODE SCIPconsPrint(SCIP_CONS *cons, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: cons.c:6236
internal methods for constraints and constraint handlers
#define SCIP_DECL_CONSACTIVE(x)
Definition: type_cons.h:675
void SCIPconshdlrSetGetVars(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
Definition: cons.c:4525
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
Definition: cons.c:8355
SCIP_RETCODE SCIPsetSetDefaultIntParam(SCIP_SET *set, const char *name, int defaultvalue)
Definition: set.c:3221
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4191
void SCIPconshdlrSetTrans(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
Definition: cons.c:4415
SCIP_RETCODE SCIPconsMarkPropagate(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6994
SCIP_RETCODE SCIPconsEnforelax(SCIP_CONS *cons, SCIP_SET *set, SCIP_SOL *sol, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: cons.c:7412
SCIP_Bool SCIPconsIsOriginal(SCIP_CONS *cons)
Definition: cons.c:8375
SCIP_RETCODE SCIPconsEnable(SCIP_CONS *cons, SCIP_SET *set, SCIP_STAT *stat)
Definition: cons.c:6799
#define SCIP_DECL_CONSHDLRCOPY(x)
Definition: type_cons.h:93
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:50
SCIP_DECL_CONSCOPY(ConshdlrSubtour::scip_copy)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1720
void SCIPconshdlrSetExitpre(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITPRE((*consexitpre)))
Definition: cons.c:4364
SCIP_RETCODE SCIPconsEnfolp(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool solinfeasible, SCIP_RESULT *result)
Definition: cons.c:7370
int nconshdlrs
Definition: struct_set.h:102
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:2307
SCIP_RETCODE SCIPconsDisablePropagation(SCIP_CONS *cons, SCIP_SET *set)
Definition: cons.c:6954
void SCIPconsSetLocal(SCIP_CONS *cons, SCIP_Bool local)
Definition: cons.c:6640
SCIP_Bool SCIPconsIsMarkedPropagate(SCIP_CONS *cons)
Definition: cons.c:8285
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip_cons.c:1109
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
Definition: scip_cons.c:889
SCIP_RETCODE SCIPsetConsDynamic(SCIP *scip, SCIP_CONS *cons, SCIP_Bool dynamic)
Definition: scip_cons.c:1385
SCIP_STAGE SCIPgetStage(SCIP *scip)
Definition: scip_general.c:355
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
Definition: scip_cons.c:792
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
Definition: scip_cons.c:265
SCIP_RETCODE SCIPinitlpCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible)
Definition: scip_cons.c:2192
#define SCIPABORT()
Definition: def.h:337
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
Definition: scip_cons.c:2513
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENABLE((*consenable)))
Definition: scip_cons.c:700
datastructures for global SCIP settings
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
Definition: cons.c:8295
void SCIPconshdlrSetInitlp(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
Definition: cons.c:4426
SCIP_RETCODE SCIPconsInitlp(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool *infeasible)
Definition: cons.c:7456
SCIP_RETCODE SCIPconsCreate(SCIP_CONS **cons, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool original, SCIP_Bool deleteconsdata)
Definition: cons.c:5804
SCIP_RETCODE SCIPconsCheck(SCIP_CONS *cons, SCIP_SET *set, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result)
Definition: cons.c:7288
SCIP_RETCODE SCIPconsSepalp(SCIP_CONS *cons, SCIP_SET *set, SCIP_RESULT *result)
Definition: cons.c:7482
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:2342
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
Definition: scip_cons.c:608
void SCIPconshdlrSetGetDiveBdChgs(SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
Definition: cons.c:4547
SCIP_RETCODE SCIPdisableConsSeparation(SCIP *scip, SCIP_CONS *cons)
Definition: scip_cons.c:1860
SCIP_RETCODE SCIPsetConsChecked(SCIP *scip, SCIP_CONS *cons, SCIP_Bool check)
Definition: scip_cons.c:1282
SCIP_RETCODE SCIPconsSetEnforced(SCIP_CONS *cons, SCIP_SET *set, SCIP_Bool enforce)
Definition: cons.c:6522
SCIP_RETCODE SCIPtransformCons(SCIP *scip, SCIP_CONS *cons, SCIP_CONS **transcons)
Definition: scip_cons.c:1520