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