Scippy

SCIP

Solving Constraint Integer Programs

type_cons.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2017 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 email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file type_cons.h
17  * @ingroup TYPEDEFINITIONS
18  * @brief type definitions for constraints and constraint handlers
19  * @author Tobias Achterberg
20  * @author Stefan Heinz
21  *
22  * This file defines the interface for constraint handlers implemented in C.
23  *
24  * - \ref CONS "Instructions for implementing a constraint handler"
25  * - \ref CONSHDLRS "List of available constraint handlers"
26  * - \ref scip::ObjConshdlr "C++ wrapper class"
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_TYPE_CONS_H__
32 #define __SCIP_TYPE_CONS_H__
33 
34 #include "scip/def.h"
35 #include "scip/type_retcode.h"
36 #include "scip/type_result.h"
37 #include "scip/type_var.h"
38 #include "scip/type_sol.h"
39 #include "scip/type_scip.h"
40 #include "scip/type_timing.h"
41 #include "scip/type_heur.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 typedef struct SCIP_Conshdlr SCIP_CONSHDLR; /**< constraint handler for a specific constraint type */
48 typedef struct SCIP_Cons SCIP_CONS; /**< constraint data structure */
49 typedef struct SCIP_ConshdlrData SCIP_CONSHDLRDATA; /**< constraint handler data */
50 typedef struct SCIP_ConsData SCIP_CONSDATA; /**< locally defined constraint type specific data */
51 typedef struct SCIP_ConsSetChg SCIP_CONSSETCHG; /**< tracks additions and removals of the set of active constraints */
52 
53 /** copy method for constraint handler plugins (called when SCIP copies plugins)
54  *
55  * If the copy process was one to one, the valid pointer can be set to TRUE. Otherwise, this pointer has to be set to
56  * FALSE. If all problem defining objects (constraint handlers and variable pricers) return valid = TRUE for all
57  * their copying calls, SCIP assumes that it is an overall one to one copy of the original instance. In this case any
58  * reductions made in the copied SCIP instance can be transfered to the original SCIP instance. If the valid pointer is
59  * set to TRUE and it was not a one to one copy, it might happen that optimal solutions are cut off.
60  *
61  * input:
62  * - scip : SCIP main data structure
63  * - conshdlr : the constraint handler itself
64  * - valid : was the copying process valid?
65  */
66 #define SCIP_DECL_CONSHDLRCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid)
67 
68 /** destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
69  *
70  * input:
71  * - scip : SCIP main data structure
72  * - conshdlr : the constraint handler itself
73  */
74 #define SCIP_DECL_CONSFREE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr)
75 
76 /** initialization method of constraint handler (called after problem was transformed)
77  *
78  * input:
79  * - scip : SCIP main data structure
80  * - conshdlr : the constraint handler itself
81  * - conss : array of constraints in transformed problem
82  * - nconss : number of constraints in transformed problem
83  */
84 #define SCIP_DECL_CONSINIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
85 
86 /** deinitialization method of constraint handler (called before transformed problem is freed)
87  *
88  * input:
89  * - scip : SCIP main data structure
90  * - conshdlr : the constraint handler itself
91  * - conss : array of constraints in transformed problem
92  * - nconss : number of constraints in transformed problem
93  */
94 #define SCIP_DECL_CONSEXIT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
95 
96 /** presolving initialization method of constraint handler (called when presolving is about to begin)
97  *
98  * This method is called when the presolving process is about to begin, even if presolving is turned off.
99  * The constraint handler may use this call to initialize its data structures.
100  *
101  * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
102  * presolving deinitialization call (SCIP_DECL_CONSEXITPRE()).
103  *
104  * @note Note that the constraint array might contain constraints that were created but not added to the problem.
105  * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
106  * reductions.
107  *
108  * input:
109  * - scip : SCIP main data structure
110  * - conshdlr : the constraint handler itself
111  * - conss : array of constraints in transformed problem
112  * - nconss : number of constraints in transformed problem
113  */
114 #define SCIP_DECL_CONSINITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
115 
116 /** presolving deinitialization method of constraint handler (called after presolving has been finished)
117  *
118  * This method is called after the presolving has been finished, even if presolving is turned off.
119  * The constraint handler may use this call e.g. to clean up or modify its data structures.
120  *
121  * Necessary modifications that have to be performed even if presolving is turned off should be done here or in the
122  * presolving initialization call (SCIP_DECL_CONSINITPRE()).
123  *
124  * Besides necessary modifications and clean up, no time consuming operations should be performed, especially if the
125  * problem has already been solved. Use the method SCIPgetStatus(), which in this case returns SCIP_STATUS_OPTIMAL,
126  * SCIP_STATUS_INFEASIBLE, SCIP_STATUS_UNBOUNDED, or SCIP_STATUS_INFORUNBD.
127  *
128  * @note Note that the constraint array might contain constraints that were created but not added to the problem.
129  * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
130  * reductions.
131  *
132  * input:
133  * - scip : SCIP main data structure
134  * - conshdlr : the constraint handler itself
135  * - conss : final array of constraints in transformed problem
136  * - nconss : final number of constraints in transformed problem
137  */
138 #define SCIP_DECL_CONSEXITPRE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
139 
140 /** solving process initialization method of constraint handler (called when branch and bound process is about to begin)
141  *
142  * This method is called when the presolving was finished and the branch and bound process is about to begin.
143  * The constraint handler may use this call to initialize its branch and bound specific data.
144  *
145  * Besides necessary modifications and clean up, no time consuming operations should be performed, especially if the
146  * problem has already been solved. Use the method SCIPgetStatus(), which in this case returns SCIP_STATUS_OPTIMAL,
147  * SCIP_STATUS_INFEASIBLE, SCIP_STATUS_UNBOUNDED, or SCIP_STATUS_INFORUNBD.
148  *
149  * @note Note that the constraint array might contain constraints that were created but not added to the problem.
150  * Constraints that are not added, i.e., for which SCIPconsIsAdded() returns FALSE, cannot be used for problem
151  * reductions.
152  *
153  * input:
154  * - scip : SCIP main data structure
155  * - conshdlr : the constraint handler itself
156  * - conss : array of constraints of the constraint handler
157  * - nconss : number of constraints of the constraint handler
158  */
159 #define SCIP_DECL_CONSINITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
160 
161 /** solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
162  *
163  * This method is called before the branch and bound process is freed.
164  * The constraint handler should use this call to clean up its branch and bound data, in particular to release
165  * all LP rows that he has created or captured.
166  *
167  * input:
168  * - scip : SCIP main data structure
169  * - conshdlr : the constraint handler itself
170  * - conss : array of constraints of the constraint handler
171  * - nconss : number of constraints of the constraint handler
172  * - restart : was this exit solve call triggered by a restart?
173  */
174 #define SCIP_DECL_CONSEXITSOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart)
175 
176 /** frees specific constraint data
177  *
178  * @warning There may exist unprocessed events. For example, a variable's bound may have been already changed, but the
179  * corresponding bound change event was not yet processed.
180  *
181  * input:
182  * - scip : SCIP main data structure
183  * - conshdlr : the constraint handler itself
184  * - cons : the constraint belonging to the constraint data
185  * - consdata : pointer to the constraint data to free
186  */
187 #define SCIP_DECL_CONSDELETE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata)
188 
189 /** transforms constraint data into data belonging to the transformed problem
190  *
191  * input:
192  * - scip : SCIP main data structure
193  * - conshdlr : the constraint handler itself
194  * - sourcecons : source constraint to transform
195  * - targetcons : pointer to store created target constraint
196  */
197 #define SCIP_DECL_CONSTRANS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons)
198 
199 /** LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)
200  *
201  * Puts the LP relaxations of all "initial" constraints into the LP. The method should put a canonic LP relaxation
202  * of all given constraints to the LP with calls to SCIPaddCut().
203  *
204  * @warning It is not guaranteed that the problem is going to be declared infeasible if the infeasible pointer is set
205  * to TRUE. Therefore, it is recommended that users do not end this method prematurely when an infeasiblity
206  * is detected.
207  *
208  * input:
209  * - scip : SCIP main data structure
210  * - conshdlr : the constraint handler itself
211  * - conss : array of constraints to process
212  * - nconss : number of constraints to process
213  *
214  * output:
215  * - infeasible : pointer to store whether an infeasibility was detected while building the LP
216  */
217 #define SCIP_DECL_CONSINITLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible)
218 
219 /** separation method of constraint handler for LP solution
220  *
221  * Separates all constraints of the constraint handler. The method is called in the LP solution loop,
222  * which means that a valid LP solution exists.
223  *
224  * The first nusefulconss constraints are the ones, that are identified to likely be violated. The separation
225  * method should process only the useful constraints in most runs, and only occasionally the remaining
226  * nconss - nusefulconss constraints.
227  *
228  * input:
229  * - scip : SCIP main data structure
230  * - conshdlr : the constraint handler itself
231  * - conss : array of constraints to process
232  * - nconss : number of constraints to process
233  * - nusefulconss : number of useful (non-obsolete) constraints to process
234  * - result : pointer to store the result of the separation call
235  *
236  * possible return values for *result (if more than one applies, the first in the list should be used):
237  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
238  * - SCIP_CONSADDED : an additional constraint was generated
239  * - SCIP_REDUCEDDOM : a variable's domain was reduced
240  * - SCIP_SEPARATED : a cutting plane was generated
241  * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
242  * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
243  * - SCIP_DIDNOTRUN : the separator was skipped
244  * - SCIP_DELAYED : the separator was skipped, but should be called again
245  */
246 #define SCIP_DECL_CONSSEPALP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, \
247  int nconss, int nusefulconss, SCIP_RESULT* result)
248 
249 /** separation method of constraint handler for arbitrary primal solution
250  *
251  * Separates all constraints of the constraint handler. The method is called outside the LP solution loop (e.g., by
252  * a relaxator or a primal heuristic), which means that there is no valid LP solution.
253  * Instead, the method should produce cuts that separate the given solution.
254  *
255  * The first nusefulconss constraints are the ones, that are identified to likely be violated. The separation
256  * method should process only the useful constraints in most runs, and only occasionally the remaining
257  * nconss - nusefulconss constraints.
258  *
259  * input:
260  * - scip : SCIP main data structure
261  * - conshdlr : the constraint handler itself
262  * - conss : array of constraints to process
263  * - nconss : number of constraints to process
264  * - nusefulconss : number of useful (non-obsolete) constraints to process
265  * - sol : primal solution that should be separated
266  * - result : pointer to store the result of the separation call
267  *
268  * possible return values for *result (if more than one applies, the first in the list should be used):
269  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
270  * - SCIP_CONSADDED : an additional constraint was generated
271  * - SCIP_REDUCEDDOM : a variable's domain was reduced
272  * - SCIP_SEPARATED : a cutting plane was generated
273  * - SCIP_NEWROUND : a cutting plane was generated and a new separation round should immediately start
274  * - SCIP_DIDNOTFIND : the separator searched, but did not find domain reductions, cutting planes, or cut constraints
275  * - SCIP_DIDNOTRUN : the separator was skipped
276  * - SCIP_DELAYED : the separator was skipped, but should be called again
277  */
278 #define SCIP_DECL_CONSSEPASOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, \
279  int nconss, int nusefulconss, SCIP_SOL* sol, SCIP_RESULT* result)
280 
281 /** constraint enforcing method of constraint handler for LP solutions
282  *
283  * The method is called at the end of the node processing loop for a node where the LP was solved.
284  * The LP solution has to be checked for feasibility. If possible, an infeasibility should be resolved by
285  * branching, reducing a variable's domain to exclude the solution or separating the solution with a valid
286  * cutting plane.
287  *
288  * The enforcing methods of the active constraint handlers are called in decreasing order of their enforcing
289  * priorities until the first constraint handler returned with the value SCIP_CUTOFF, SCIP_SEPARATED,
290  * SCIP_REDUCEDDOM, SCIP_CONSADDED, or SCIP_BRANCHED.
291  * The integrality constraint handler has an enforcing priority of zero. A constraint handler which can
292  * (or wants) to enforce its constraints only for integral solutions should have a negative enforcing priority
293  * (e.g. the alldiff-constraint can only operate on integral solutions).
294  * A constraint handler which wants to incorporate its own branching strategy even on non-integral
295  * solutions must have an enforcing priority greater than zero (e.g. the SOS-constraint incorporates
296  * SOS-branching on non-integral solutions).
297  *
298  * The first nusefulconss constraints are the ones, that are identified to likely be violated. The enforcing
299  * method should process the useful constraints first. The other nconss - nusefulconss constraints should only
300  * be enforced, if no violation was found in the useful constraints.
301  *
302  * input:
303  * - scip : SCIP main data structure
304  * - conshdlr : the constraint handler itself
305  * - conss : array of constraints to process
306  * - nconss : number of constraints to process
307  * - nusefulconss : number of useful (non-obsolete) constraints to process
308  * - solinfeasible : was the solution already declared infeasible by a constraint handler?
309  * - result : pointer to store the result of the enforcing call
310  *
311  * possible return values for *result (if more than one applies, the first in the list should be used):
312  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
313  * - SCIP_CONSADDED : an additional constraint was generated
314  * - SCIP_REDUCEDDOM : a variable's domain was reduced
315  * - SCIP_SEPARATED : a cutting plane was generated
316  * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
317  * - SCIP_INFEASIBLE : at least one constraint is infeasible, but it was not resolved
318  * - SCIP_FEASIBLE : all constraints of the handler are feasible
319  */
320 #define SCIP_DECL_CONSENFOLP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
321  SCIP_Bool solinfeasible, SCIP_RESULT* result)
322 
323 /** constraint enforcing method of constraint handler for relaxation solutions
324  *
325  * input:
326  * - scip : SCIP main data structure
327  * - sol : relaxation solution
328  * - conshdlr : the constraint handler itself
329  * - conss : array of constraints to process
330  * - nconss : number of constraints to process
331  * - nusefulconss : number of useful (non-obsolete) constraints to process
332  * - solinfeasible : was the solution already declared infeasible by a constraint handler?
333  * - result : pointer to store the result of the enforcing call
334  *
335  * possible return values for *result (if more than one applies, the first in the list should be used):
336  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
337  * - SCIP_CONSADDED : an additional constraint was generated
338  * - SCIP_REDUCEDDOM : a variable's domain was reduced
339  * - SCIP_SEPARATED : a cutting plane was generated
340  * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
341  * - SCIP_SOLVELP : at least one constraint is infeasible, and this can only be resolved by solving the LP
342  * - SCIP_INFEASIBLE : at least one constraint is infeasible, but it was not resolved
343  * - SCIP_FEASIBLE : all constraints of the handler are feasible
344  * - SCIP_DIDNOTRUN : the enforcement was skipped (only possible, if objinfeasible is true)
345  */
346 #define SCIP_DECL_CONSENFORELAX(x) SCIP_RETCODE x (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
347  SCIP_Bool solinfeasible, SCIP_RESULT* result)
348 
349 /** constraint enforcing method of constraint handler for pseudo solutions
350  *
351  * The method is called at the end of the node processing loop for a node where the LP was not solved.
352  * The pseudo solution has to be checked for feasibility. If possible, an infeasibility should be resolved by
353  * branching, reducing a variable's domain to exclude the solution or adding an additional constraint.
354  * Separation is not possible, since the LP is not processed at the current node. All LP informations like
355  * LP solution, slack values, or reduced costs are invalid and must not be accessed.
356  *
357  * Like in the enforcing method for LP solutions, the enforcing methods of the active constraint handlers are
358  * called in decreasing order of their enforcing priorities until the first constraint handler returned with
359  * the value SCIP_CUTOFF, SCIP_REDUCEDDOM, SCIP_CONSADDED, SCIP_BRANCHED, or SCIP_SOLVELP.
360  *
361  * The first nusefulconss constraints are the ones, that are identified to likely be violated. The enforcing
362  * method should process the useful constraints first. The other nconss - nusefulconss constraints should only
363  * be enforced, if no violation was found in the useful constraints.
364  *
365  * If the pseudo solution's objective value is lower than the lower bound of the node, it cannot be feasible
366  * and the enforcing method may skip it's check and set *result to SCIP_DIDNOTRUN. However, it can also process
367  * its constraints and return any other possible result code.
368  *
369  * input:
370  * - scip : SCIP main data structure
371  * - conshdlr : the constraint handler itself
372  * - conss : array of constraints to process
373  * - nconss : number of constraints to process
374  * - nusefulconss : number of useful (non-obsolete) constraints to process
375  * - solinfeasible : was the solution already declared infeasible by a constraint handler?
376  * - objinfeasible : is the solution infeasible anyway due to violating lower objective bound?
377  * - result : pointer to store the result of the enforcing call
378  *
379  * possible return values for *result (if more than one applies, the first in the list should be used):
380  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
381  * - SCIP_CONSADDED : an additional constraint was generated
382  * - SCIP_REDUCEDDOM : a variable's domain was reduced
383  * - SCIP_BRANCHED : no changes were made to the problem, but a branching was applied to resolve an infeasibility
384  * - SCIP_SOLVELP : at least one constraint is infeasible, and this can only be resolved by solving the LP
385  * - SCIP_INFEASIBLE : at least one constraint is infeasible, but it was not resolved
386  * - SCIP_FEASIBLE : all constraints of the handler are feasible
387  * - SCIP_DIDNOTRUN : the enforcement was skipped (only possible, if objinfeasible is true)
388  */
389 #define SCIP_DECL_CONSENFOPS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
390  SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result)
391 
392 /** feasibility check method of constraint handler for integral solutions
393  *
394  * The given solution has to be checked for feasibility.
395  *
396  * The check methods of the active constraint handlers are called in decreasing order of their check
397  * priorities until the first constraint handler returned with the result SCIP_INFEASIBLE.
398  * The integrality constraint handler has a check priority of zero. A constraint handler which can
399  * (or wants) to check its constraints only for integral solutions should have a negative check priority
400  * (e.g. the alldiff-constraint can only operate on integral solutions).
401  * A constraint handler which wants to check feasibility even on non-integral solutions must have a
402  * check priority greater than zero (e.g. if the check is much faster than testing all variables for
403  * integrality).
404  *
405  * In some cases, integrality conditions or rows of the current LP don't have to be checked, because their
406  * feasibility is already checked or implicitly given. In these cases, 'checkintegrality' or
407  * 'checklprows' is FALSE.
408  *
409  * input:
410  * - scip : SCIP main data structure
411  * - conshdlr : the constraint handler itself
412  * - conss : array of constraints to process
413  * - nconss : number of constraints to process
414  * - sol : the solution to check feasibility for
415  * - checkintegrality: Has integrality to be checked?
416  * - checklprows : Do constraints represented by rows in the current LP have to be checked?
417  * - printreason : Should the reason for the violation be printed?
418  * - completely : Should all violations be checked?
419  * - result : pointer to store the result of the feasibility checking call
420  *
421  * possible return values for *result:
422  * - SCIP_INFEASIBLE : at least one constraint of the handler is infeasible
423  * - SCIP_FEASIBLE : all constraints of the handler are feasible
424  */
425 #define SCIP_DECL_CONSCHECK(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, \
426  SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result)
427 
428 /** domain propagation method of constraint handler
429  *
430  * The first nusefulconss constraints are the ones, that are identified to likely be violated. The propagation
431  * method should process only the useful constraints in most runs, and only occasionally the remaining
432  * nconss - nusefulconss constraints.
433  *
434  * @note if the constraint handler uses dual information in propagation it is nesassary to check via calling
435  * SCIPallowDualReds and SCIPallowObjProp if dual reductions and propgation with the current cutoff bound, resp.,
436  * are allowed.
437  *
438  * input:
439  * - scip : SCIP main data structure
440  * - conshdlr : the constraint handler itself
441  * - conss : array of constraints to process
442  * - nconss : number of constraints to process
443  * - nusefulconss : number of useful (non-obsolete) constraints to process
444  * - nmarkedconss : number of constraints which are marked to be definitely propagated
445  * - proptiming : current point in the node solving loop
446  * - result : pointer to store the result of the propagation call
447  *
448  * possible return values for *result:
449  * - SCIP_CUTOFF : the node is infeasible in the variable's bounds and can be cut off
450  * - SCIP_REDUCEDDOM : at least one domain reduction was found
451  * - SCIP_DIDNOTFIND : the propagator searched but did not find any domain reductions
452  * - SCIP_DIDNOTRUN : the propagator was skipped
453  * - SCIP_DELAYED : the propagator was skipped, but should be called again
454  * - SCIP_DELAYNODE : the current node should be postponed (return value only valid for BEFORELP propagation)
455  */
456 #define SCIP_DECL_CONSPROP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, \
457  int nmarkedconss, SCIP_PROPTIMING proptiming, SCIP_RESULT* result)
458 
459 /** presolving method of constraint handler
460  *
461  * The presolver should go through the variables and constraints and tighten the domains or
462  * constraints. Each tightening should increase the given total number of changes.
463  *
464  * input:
465  * - scip : SCIP main data structure
466  * - conshdlr : the constraint handler itself
467  * - conss : array of constraints to process
468  * - nconss : number of constraints to process
469  * - nrounds : number of presolving rounds already done
470  * - presoltiming : current presolving timing
471  * - nnewfixedvars : number of variables fixed since the last call to the presolving method
472  * - nnewaggrvars : number of variables aggregated since the last call to the presolving method
473  * - nnewchgvartypes : number of variable type changes since the last call to the presolving method
474  * - nnewchgbds : number of variable bounds tightened since the last call to the presolving method
475  * - nnewholes : number of domain holes added since the last call to the presolving method
476  * - nnewdelconss : number of deleted constraints since the last call to the presolving method
477  * - nnewaddconss : number of added constraints since the last call to the presolving method
478  * - nnewupgdconss : number of upgraded constraints since the last call to the presolving method
479  * - nnewchgcoefs : number of changed coefficients since the last call to the presolving method
480  * - nnewchgsides : number of changed left or right hand sides since the last call to the presolving method
481  *
482  * @note the counters state the changes since the last call including the changes of this presolving method during its
483  * call
484  *
485  * @note if the constraint handler performs dual presolving it is nesassary to check via calling SCIPallowDualReds
486  * if dual reductions are allowed.
487  *
488  * input/output:
489  * - nfixedvars : pointer to count total number of variables fixed of all presolvers
490  * - naggrvars : pointer to count total number of variables aggregated of all presolvers
491  * - nchgvartypes : pointer to count total number of variable type changes of all presolvers
492  * - nchgbds : pointer to count total number of variable bounds tightened of all presolvers
493  * - naddholes : pointer to count total number of domain holes added of all presolvers
494  * - ndelconss : pointer to count total number of deleted constraints of all presolvers
495  * - naddconss : pointer to count total number of added constraints of all presolvers
496  * - nupgdconss : pointer to count total number of upgraded constraints of all presolvers
497  * - nchgcoefs : pointer to count total number of changed coefficients of all presolvers
498  * - nchgsides : pointer to count total number of changed left/right hand sides of all presolvers
499  *
500  * output:
501  * - result : pointer to store the result of the presolving call
502  *
503  * possible return values for *result:
504  * - SCIP_UNBOUNDED : at least one variable is not bounded by any constraint in obj. direction -> problem is unbounded
505  * - SCIP_CUTOFF : at least one constraint is infeasible in the variable's bounds -> problem is infeasible
506  * - SCIP_SUCCESS : the presolving method found a reduction
507  * - SCIP_DIDNOTFIND : the presolving method searched, but did not find a presolving change
508  * - SCIP_DIDNOTRUN : the presolving method was skipped
509  * - SCIP_DELAYED : the presolving method was skipped, but should be called again
510  */
511 #define SCIP_DECL_CONSPRESOL(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nrounds, \
512  SCIP_PRESOLTIMING presoltiming, int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, \
513  int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, \
514  int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, \
515  int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result)
516 
517 /** propagation conflict resolving method of constraint handler
518  *
519  * This method is called during conflict analysis. If the constraint handler wants to support conflict analysis,
520  * it should call SCIPinferVarLbCons() or SCIPinferVarUbCons() in domain propagation instead of SCIPchgVarLb() or
521  * SCIPchgVarUb() in order to deduce bound changes on variables.
522  * In the SCIPinferVarLbCons() and SCIPinferVarUbCons() calls, the handler provides the constraint, that deduced the
523  * variable's bound change, and an integer value "inferinfo" that can be arbitrarily chosen.
524  * The propagation conflict resolving method can then be implemented, to provide a "reason" for the bound
525  * changes, i.e., the bounds of variables at the time of the propagation, that forced the constraint to set the
526  * conflict variable's bound to its current value. It can use the "inferinfo" tag to identify its own propagation
527  * rule and thus identify the "reason" bounds. The bounds that form the reason of the assignment must then be provided
528  * by calls to SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPaddConflictBd(), SCIPaddConflictRelaxedLb(),
529  * SCIPaddConflictRelaxedUb(), SCIPaddConflictRelaxedBd(), and/or SCIPaddConflictBinvar() in the propagation conflict
530  * resolving method.
531  *
532  * For example, the logicor constraint c = "x or y or z" fixes variable z to TRUE (i.e. changes the lower bound of z
533  * to 1.0), if both, x and y, are assigned to FALSE (i.e. if the upper bounds of these variables are 0.0). It uses
534  * SCIPinferVarLbCons(scip, z, 1.0, c, 0) to apply this assignment (an inference information tag is not needed by the
535  * constraint handler and is set to 0).
536  * In the conflict analysis, the constraint handler may be asked to resolve the lower bound change on z with
537  * constraint c, that was applied at a time given by a bound change index "bdchgidx".
538  * With a call to SCIPgetVarLbAtIndex(scip, z, bdchgidx, TRUE), the handler can find out, that the lower bound of
539  * variable z was set to 1.0 at the given point of time, and should call SCIPaddConflictUb(scip, x, bdchgidx) and
540  * SCIPaddConflictUb(scip, y, bdchgidx) to tell SCIP, that the upper bounds of x and y at this point of time were
541  * the reason for the deduction of the lower bound of z.
542  *
543  * input:
544  * - scip : SCIP main data structure
545  * - conshdlr : the constraint handler itself
546  * - cons : the constraint that deduced the bound change of the conflict variable
547  * - infervar : the conflict variable whose bound change has to be resolved
548  * - inferinfo : the user information passed to the corresponding SCIPinferVarLbCons() or SCIPinferVarUbCons() call
549  * - boundtype : the type of the changed bound (lower or upper bound)
550  * - bdchgidx : the index of the bound change, representing the point of time where the change took place
551  * - relaxedbd : the relaxed bound which is sufficient to be explained
552  *
553  * output:
554  * - result : pointer to store the result of the propagation conflict resolving call
555  *
556  * possible return values for *result:
557  * - SCIP_SUCCESS : the conflicting bound change has been successfully resolved by adding all reason bounds
558  * - SCIP_DIDNOTFIND : the conflicting bound change could not be resolved and has to be put into the conflict set
559  *
560  * @note it is sufficient to explain/resolve the relaxed bound
561  */
562 #define SCIP_DECL_CONSRESPROP(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
563  SCIP_VAR* infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, \
564  SCIP_RESULT* result)
565 
566 /** variable rounding lock method of constraint handler
567  *
568  * This method is called, after a constraint is added or removed from the transformed problem.
569  * It should update the rounding locks of all associated variables with calls to SCIPaddVarLocks(),
570  * depending on the way, the variable is involved in the constraint:
571  * - If the constraint may get violated by decreasing the value of a variable, it should call
572  * SCIPaddVarLocks(scip, var, nlockspos, nlocksneg), saying that rounding down is potentially rendering the
573  * (positive) constraint infeasible and rounding up is potentially rendering the negation of the constraint
574  * infeasible.
575  * - If the constraint may get violated by increasing the value of a variable, it should call
576  * SCIPaddVarLocks(scip, var, nlocksneg, nlockspos), saying that rounding up is potentially rendering the
577  * constraint's negation infeasible and rounding up is potentially rendering the constraint itself
578  * infeasible.
579  * - If the constraint may get violated by changing the variable in any direction, it should call
580  * SCIPaddVarLocks(scip, var, nlockspos + nlocksneg, nlockspos + nlocksneg).
581  *
582  * Consider the linear constraint "3x -5y +2z <= 7" as an example. The variable rounding lock method of the
583  * linear constraint handler should call SCIPaddVarLocks(scip, x, nlocksneg, nlockspos),
584  * SCIPaddVarLocks(scip, y, nlockspos, nlocksneg) and SCIPaddVarLocks(scip, z, nlocksneg, nlockspos) to tell SCIP,
585  * that rounding up of x and z and rounding down of y can destroy the feasibility of the constraint, while rounding
586  * down of x and z and rounding up of y can destroy the feasibility of the constraint's negation "3x -5y +2z > 7".
587  * A linear constraint "2 <= 3x -5y +2z <= 7" should call
588  * SCIPaddVarLocks(scip, ..., nlockspos + nlocksneg, nlockspos + nlocksneg) on all variables, since rounding in both
589  * directions of each variable can destroy both the feasibility of the constraint and it's negation
590  * "3x -5y +2z < 2 or 3x -5y +2z > 7".
591  *
592  * If the constraint itself contains other constraints as sub constraints (e.g. the "or" constraint concatenation
593  * "c(x) or d(x)"), the rounding lock methods of these constraints should be called in a proper way.
594  * - If the constraint may get violated by the violation of the sub constraint c, it should call
595  * SCIPaddConsLocks(scip, c, nlockspos, nlocksneg), saying that infeasibility of c may lead to infeasibility of
596  * the (positive) constraint, and infeasibility of c's negation (i.e. feasibility of c) may lead to infeasibility
597  * of the constraint's negation (i.e. feasibility of the constraint).
598  * - If the constraint may get violated by the feasibility of the sub constraint c, it should call
599  * SCIPaddConsLocks(scip, c, nlocksneg, nlockspos), saying that infeasibility of c may lead to infeasibility of
600  * the constraint's negation (i.e. feasibility of the constraint), and infeasibility of c's negation (i.e. feasibility
601  * of c) may lead to infeasibility of the (positive) constraint.
602  * - If the constraint may get violated by any change in the feasibility of the sub constraint c, it should call
603  * SCIPaddConsLocks(scip, c, nlockspos + nlocksneg, nlockspos + nlocksneg).
604  *
605  * Consider the or concatenation "c(x) or d(x)". The variable rounding lock method of the or constraint handler
606  * should call SCIPaddConsLocks(scip, c, nlockspos, nlocksneg) and SCIPaddConsLocks(scip, d, nlockspos, nlocksneg)
607  * to tell SCIP, that infeasibility of c and d can lead to infeasibility of "c(x) or d(x)".
608  *
609  * As a second example, consider the equivalence constraint "y <-> c(x)" with variable y and constraint c. The
610  * constraint demands, that y == 1 if and only if c(x) is satisfied. The variable lock method of the corresponding
611  * constraint handler should call SCIPaddVarLocks(scip, y, nlockspos + nlocksneg, nlockspos + nlocksneg) and
612  * SCIPaddConsLocks(scip, c, nlockspos + nlocksneg, nlockspos + nlocksneg), because any modification to the
613  * value of y or to the feasibility of c can alter the feasibility of the equivalence constraint.
614  *
615  * input:
616  * - scip : SCIP main data structure
617  * - conshdlr : the constraint handler itself
618  * - cons : the constraint that should lock rounding of its variables, or NULL if the constraint handler
619  * does not need constraints
620  * - nlockspos : number of times, the roundings should be locked for the constraint (may be negative)
621  * - nlocksneg : number of times, the roundings should be locked for the constraint's negation (may be negative)
622  */
623 #define SCIP_DECL_CONSLOCK(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int nlockspos, int nlocksneg)
624 
625 /** constraint activation notification method of constraint handler
626  *
627  * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
628  * the corresponding bound change event was not yet processed.
629  *
630  * This method is always called after a constraint of the constraint handler was activated. The constraint
631  * handler may use this call to update his own (statistical) data.
632  *
633  * input:
634  * - scip : SCIP main data structure
635  * - conshdlr : the constraint handler itself
636  * - cons : the constraint that has been activated
637  */
638 #define SCIP_DECL_CONSACTIVE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
639 
640 /** constraint deactivation notification method of constraint handler
641  *
642  * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
643  * the corresponding bound change event was not yet processed.
644  *
645  * This method is always called before a constraint of the constraint handler is deactivated. The constraint
646  * handler may use this call to update his own (statistical) data.
647  *
648  * input:
649  * - scip : SCIP main data structure
650  * - conshdlr : the constraint handler itself
651  * - cons : the constraint that will be deactivated
652  */
653 #define SCIP_DECL_CONSDEACTIVE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
654 
655 /** constraint enabling notification method of constraint handler
656  *
657  * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
658  * the corresponding bound change event was not yet processed.
659  *
660  * This method is always called after a constraint of the constraint handler was enabled. The constraint
661  * handler may use this call to update his own (statistical) data.
662  *
663  * input:
664  * - scip : SCIP main data structure
665  * - conshdlr : the constraint handler itself
666  * - cons : the constraint that has been enabled
667  */
668 #define SCIP_DECL_CONSENABLE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
669 
670 /** constraint disabling notification method of constraint handler
671  *
672  * WARNING! There may exist unprocessed events. For example, a variable's bound may have been already changed, but
673  * the corresponding bound change event was not yet processed.
674  *
675  * This method is always called before a constraint of the constraint handler is disabled. The constraint
676  * handler may use this call to update his own (statistical) data.
677  *
678  * input:
679  * - scip : SCIP main data structure
680  * - conshdlr : the constraint handler itself
681  * - cons : the constraint that will be disabled
682  */
683 #define SCIP_DECL_CONSDISABLE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons)
684 
685 /** variable deletion method of constraint handler
686  *
687  * This method is optinal and only of interest if you are using SCIP as a branch-and-price framework. That means, you
688  * are generating new variables during the search. If you are not doing that just define the function pointer to be
689  * NULL.
690  *
691  * If this method gets implemented you should iterate over all constraints of the constraint handler and delete all
692  * variables that were marked for deletion by SCIPdelVar().
693  *
694  * input:
695  * - scip : SCIP main data structure
696  * - conshdlr : the constraint handler itself
697  * - conss : array of constraints in transformed problem
698  * - nconss : number of constraints in transformed problem
699  */
700 #define SCIP_DECL_CONSDELVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss)
701 
702 /** constraint display method of constraint handler
703  *
704  * The constraint handler can store a representation of the constraint into the given text file. Use the method
705  * SCIPinfoMessage() to push a string into the file stream.
706  *
707  * @note There are several methods which help to display variables. These are SCIPwriteVarName(), SCIPwriteVarsList(),
708  * SCIPwriteVarsLinearsum(), and SCIPwriteVarsPolynomial().
709  *
710  * input:
711  * - scip : SCIP main data structure
712  * - conshdlr : the constraint handler itself
713  * - cons : the constraint that should be displayed
714  * - file : the text file to store the information into
715  */
716 #define SCIP_DECL_CONSPRINT(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file)
717 
718 /** constraint copying method of constraint handler
719  *
720  * The constraint handler can provide a copy method which copies a constraint from one SCIP data structure into an other
721  * SCIP data structure. If a copy of a constraint is created, the constraint has to be captured. (The capture is usually
722  * already done due to the creation of the constraint).
723  *
724  * If the copy process was one to one, the valid pointer can be set to TRUE. Otherwise, you have to set this pointer to
725  * FALSE. In case all problem defining objects (constraint handlers and variable pricers) return a TRUE valid for all
726  * their copying calls, SCIP assumes that it is a overall one to one copy of the original instance. In this case any
727  * reductions made in the copied SCIP instance can be transfered to the original SCIP instance. If the valid pointer is
728  * set to TRUE and it was not a one to one copy, it might happen that optimal solutions are cut off.
729  *
730  * To get a copy of a variable in the target SCIP you should use the function SCIPgetVarCopy().
731  *
732  * input:
733  * - scip : target SCIP data structure
734  * - cons : pointer to store the created target constraint
735  * - name : name of constraint, or NULL if the name of the source constraint should be used
736  * - sourcescip : source SCIP data structure
737  * - sourceconshdlr : source constraint handler of the source SCIP
738  * - sourcecons : source constraint of the source SCIP
739  * - varmap : a SCIP_HASHMAP mapping variables of the source SCIP to corresponding variables of the target SCIP
740  * - consmap : a SCIP_HASHMAP mapping constraints of the source SCIP to corresponding constraints of the target SCIP
741  * - initial : should the LP relaxation of constraint be in the initial LP?
742  * - separate : should the constraint be separated during LP processing?
743  * - enforce : should the constraint be enforced during node processing?
744  * - check : should the constraint be checked for feasibility?
745  * - propagate : should the constraint be propagated during node processing?
746  * - local : is constraint only valid locally?
747  * - modifiable : is constraint modifiable (subject to column generation)?
748  * - dynamic : is constraint subject to aging?
749  * - removable : should the relaxation be removed from the LP due to aging or cleanup?
750  * - stickingatnode : should the constraint always be kept at the node where it was added, even
751  * if it may be moved to a more global node?
752  * - global : should a global or a local copy be created?
753  *
754  * output:
755  * - valid : pointer to store whether the copying was valid or not
756  */
757 #define SCIP_DECL_CONSCOPY(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONS** cons, const char* name, \
758  SCIP* sourcescip, SCIP_CONSHDLR* sourceconshdlr, SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, \
759  SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, \
760  SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, \
761  SCIP_Bool global, SCIP_Bool* valid)
762 
763 /** constraint parsing method of constraint handler
764  *
765  * The constraint handler can provide a callback to parse the output created by the display method
766  * (\ref SCIP_DECL_CONSPRINT) and to create a constraint out of it.
767  *
768  * @note For parsing there are several methods which are handy. Have a look at: SCIPparseVarName(),
769  * SCIPparseVarsList(), SCIPparseVarsLinearsum(), SCIPparseVarsPolynomial(), SCIPstrToRealValue(), and
770  * SCIPstrCopySection().
771  *
772  * input:
773  * - scip : SCIP main data structure
774  * - conshdlr : the constraint handler itself
775  * - cons : pointer to store the created constraint
776  * - name : name of the constraint
777  * - str : string to parse
778  * - initial : should the LP relaxation of constraint be in the initial LP?
779  * - separate : should the constraint be separated during LP processing?
780  * - enforce : should the constraint be enforced during node processing?
781  * - check : should the constraint be checked for feasibility?
782  * - propagate : should the constraint be propagated during node processing?
783  * - local : is constraint only valid locally?
784  * - modifiable : is constraint modifiable (subject to column generation)?
785  * - dynamic : is constraint subject to aging?
786  * - removable : should the relaxation be removed from the LP due to aging or cleanup?
787  * - stickingatnode : should the constraint always be kept at the node where it was added, even
788  * if it may be moved to a more global node?
789  * output:
790  * - success : pointer to store whether the parsing was successful or not
791  */
792 #define SCIP_DECL_CONSPARSE(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, \
793  const char* name, const char* str, \
794  SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, \
795  SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool* success)
796 
797 /** constraint method of constraint handler which returns the variables (if possible)
798  *
799  * The constraint handler can (this callback is optional) provide this callback to return the variables which are
800  * involved in that particular constraint. If this is possible, the variables should be copyied into the variables
801  * array and the success pointers has to be set to TRUE. Otherwise the success has to be set FALSE or the callback
802  * should not be implemented.
803  *
804  * input:
805  * - scip : SCIP main data structure
806  * - conshdlr : the constraint handler itself
807  * - cons : the constraint that should return its variable data
808  * - varssize : available slots in vars array which is needed to check if the array is large enough
809  *
810  * output:
811  * - vars : array to store/copy the involved variables of the constraint
812  * - success : pointer to store whether the variables are successfully copied
813  */
814 #define SCIP_DECL_CONSGETVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
815  SCIP_VAR** vars, int varssize, SCIP_Bool* success)
816 
817 /** constraint method of constraint handler which returns the number of variables (if possible)
818  *
819  * The constraint handler can (this callback is optional) provide this callback to return the number variable which are
820  * involved in that particular constraint. If this is not possible, the success pointers has to be set to FALSE or the
821  * callback should not be implemented.
822  *
823  * input:
824  * - scip : SCIP main data structure
825  * - conshdlr : the constraint handler itself
826  * - cons : constraint for which the number of variables is wanted
827  *
828  * output:
829  * - nvars : pointer to store the number of variables
830  * - success : pointer to store whether the constraint successfully returned the number of variables
831  */
832 #define SCIP_DECL_CONSGETNVARS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, \
833  int* nvars, SCIP_Bool* success)
834 
835 /** constraint handler method to suggest dive bound changes during the generic diving algorithm
836  *
837  * This callback is used inside the various diving heuristics of SCIP and does not affect the normal branching of the
838  * actual search. The constraint handler can provide this callback to render the current solution (even more)
839  * infeasible by suggesting one or several variable bound changes. In fact, since diving heuristics do not necessarily
840  * solve LP relaxations at every probing depth, some of the variable local bounds might already be conflicting with the
841  * solution values. The solution is rendered infeasible by determining bound changes that should be applied to the
842  * next explored search node via SCIPaddDiveBoundChange(). An alternative in case that the preferred bound change(s)
843  * were detected infeasible must be provided.
844  *
845  * The constraint handler must take care to only add bound changes that further shrink the variable domain.
846  *
847  * The success pointer must be used to indicate whether the constraint handler succeeded in selecting diving bound
848  * changes. The infeasible pointer should be set to TRUE if the constraint handler found a local infeasibility. If the
849  * constraint handler needs to select between several candidates, it may use the scoring mechanism of the diveset
850  * argument to control its choice.
851  *
852  * This callback is optional.
853  *
854  * @note: @p sol is usually the LP relaxation solution unless the caller of the method, usually a diving heuristic,
855  * does not solve LP relaxations at every depth
856  *
857  * input:
858  * - scip : SCIP main data structure
859  * - conshdlr : the constraint handler itself
860  * - diveset : diving settings for scoring
861  * - sol : current diving solution, usually the LP relaxation solution
862  *
863  * output:
864  * - success : pointer to store whether the constraint handler succeeded to determine dive bound changes
865  * - infeasible : pointer to store whether the constraint handler detected an infeasibility in the local node
866  */
867 #define SCIP_DECL_CONSGETDIVEBDCHGS(x) SCIP_RETCODE x (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, \
868  SCIP_SOL* sol, SCIP_Bool* success, SCIP_Bool* infeasible)
869 
870 #ifdef __cplusplus
871 }
872 #endif
873 
874 #endif
timing definitions for SCIP
type definitions for return codes for SCIP methods
type definitions for primal heuristics
type definitions for SCIP&#39;s main datastructure
type definitions for problem variables
struct SCIP_ConsData SCIP_CONSDATA
Definition: type_cons.h:50
type definitions for storing primal CIP solutions
result codes for SCIP callback methods
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
Definition: type_cons.h:49
common defines and data types used in all packages of SCIP