Scippy

SCIP

Solving Constraint Integer Programs

scip_var.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB) */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file scip_var.h
26  * @ingroup PUBLICCOREAPI
27  * @brief public methods for SCIP variables
28  * @author Tobias Achterberg
29  * @author Timo Berthold
30  * @author Thorsten Koch
31  * @author Alexander Martin
32  * @author Marc Pfetsch
33  * @author Kati Wolter
34  * @author Gregor Hendel
35  * @author Leona Gottwald
36  */
37 
38 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
39 
40 #ifndef __SCIP_SCIP_VAR_H__
41 #define __SCIP_SCIP_VAR_H__
42 
43 
44 #include "scip/def.h"
45 #include "scip/type_cons.h"
46 #include "scip/type_history.h"
47 #include "scip/type_implics.h"
48 #include "scip/type_lp.h"
49 #include "scip/type_misc.h"
50 #include "scip/type_prop.h"
51 #include "scip/type_relax.h"
52 #include "scip/type_result.h"
53 #include "scip/type_retcode.h"
54 #include "scip/type_scip.h"
55 #include "scip/type_sol.h"
56 #include "scip/type_tree.h"
57 #include "scip/type_var.h"
58 
59 /* In debug mode, we include the SCIP's structure in scip.c, such that no one can access
60  * this structure except the interface methods in scip.c.
61  * In optimized mode, the structure is included in scip.h, because some of the methods
62  * are implemented as defines for performance reasons (e.g. the numerical comparisons).
63  * Additionally, the internal "set.h" is included, such that the defines in set.h are
64  * available in optimized mode.
65  */
66 #ifdef NDEBUG
67 #include "scip/pub_var.h"
68 #endif
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
74 /**@addtogroup PublicVariableMethods
75  *
76  *@{
77  */
78 
79 /** creates and captures problem variable; if variable is of integral type, fractional bounds are automatically rounded;
80  * an integer variable with bounds zero and one is automatically converted into a binary variable;
81  *
82  * @warning When doing column generation and the original problem is a maximization problem, notice that SCIP will
83  * transform the problem into a minimization problem by multiplying the objective function by -1. Thus, the
84  * original objective function value of variables created during the solving process has to be multiplied by
85  * -1, too.
86  *
87  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
88  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
89  *
90  * @pre This method can be called if @p scip is in one of the following stages:
91  * - \ref SCIP_STAGE_PROBLEM
92  * - \ref SCIP_STAGE_TRANSFORMING
93  * - \ref SCIP_STAGE_INITPRESOLVE
94  * - \ref SCIP_STAGE_PRESOLVING
95  * - \ref SCIP_STAGE_EXITPRESOLVE
96  * - \ref SCIP_STAGE_PRESOLVED
97  * - \ref SCIP_STAGE_SOLVING
98  *
99  * @note the variable gets captured, hence at one point you have to release it using the method SCIPreleaseVar()
100  */
101 SCIP_EXPORT
103  SCIP* scip, /**< SCIP data structure */
104  SCIP_VAR** var, /**< pointer to variable object */
105  const char* name, /**< name of variable, or NULL for automatic name creation */
106  SCIP_Real lb, /**< lower bound of variable */
107  SCIP_Real ub, /**< upper bound of variable */
108  SCIP_Real obj, /**< objective function value */
109  SCIP_VARTYPE vartype, /**< type of variable */
110  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
111  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
112  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable, or NULL */
113  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data, or NULL */
114  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable, or NULL */
115  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
116  SCIP_VARDATA* vardata /**< user data for this specific variable, or NULL */
117  );
118 
119 /** creates and captures problem variable with optional callbacks and variable data set to NULL, which can be set
120  * afterwards using SCIPvarSetDelorigData(), SCIPvarSetTransData(),
121  * SCIPvarSetDeltransData(), SCIPvarSetCopy(), and SCIPvarSetData(); sets variable flags initial=TRUE
122  * and removable = FALSE, which can be adjusted by using SCIPvarSetInitial() and SCIPvarSetRemovable(), resp.;
123  * if variable is of integral type, fractional bounds are automatically rounded;
124  * an integer variable with bounds zero and one is automatically converted into a binary variable;
125  *
126  * @warning When doing column generation and the original problem is a maximization problem, notice that SCIP will
127  * transform the problem into a minimization problem by multiplying the objective function by -1. Thus, the
128  * original objective function value of variables created during the solving process has to be multiplied by
129  * -1, too.
130  *
131  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
132  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
133  *
134  * @pre This method can be called if @p scip is in one of the following stages:
135  * - \ref SCIP_STAGE_PROBLEM
136  * - \ref SCIP_STAGE_TRANSFORMING
137  * - \ref SCIP_STAGE_INITPRESOLVE
138  * - \ref SCIP_STAGE_PRESOLVING
139  * - \ref SCIP_STAGE_EXITPRESOLVE
140  * - \ref SCIP_STAGE_PRESOLVED
141  * - \ref SCIP_STAGE_SOLVING
142  *
143  * @note the variable gets captured, hence at one point you have to release it using the method SCIPreleaseVar()
144  */
145 SCIP_EXPORT
147  SCIP* scip, /**< SCIP data structure */
148  SCIP_VAR** var, /**< pointer to variable object */
149  const char* name, /**< name of variable, or NULL for automatic name creation */
150  SCIP_Real lb, /**< lower bound of variable */
151  SCIP_Real ub, /**< upper bound of variable */
152  SCIP_Real obj, /**< objective function value */
153  SCIP_VARTYPE vartype /**< type of variable */
154  );
155 
156 /** outputs the variable name to the file stream
157  *
158  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
159  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
160  *
161  * @pre This method can be called if @p scip is in one of the following stages:
162  * - \ref SCIP_STAGE_PROBLEM
163  * - \ref SCIP_STAGE_TRANSFORMING
164  * - \ref SCIP_STAGE_TRANSFORMED
165  * - \ref SCIP_STAGE_INITPRESOLVE
166  * - \ref SCIP_STAGE_PRESOLVING
167  * - \ref SCIP_STAGE_EXITPRESOLVE
168  * - \ref SCIP_STAGE_PRESOLVED
169  * - \ref SCIP_STAGE_INITSOLVE
170  * - \ref SCIP_STAGE_SOLVING
171  * - \ref SCIP_STAGE_SOLVED
172  * - \ref SCIP_STAGE_EXITSOLVE
173  * - \ref SCIP_STAGE_FREETRANS
174  */
175 SCIP_EXPORT
177  SCIP* scip, /**< SCIP data structure */
178  FILE* file, /**< output file, or NULL for stdout */
179  SCIP_VAR* var, /**< variable to output */
180  SCIP_Bool type /**< should the variable type be also posted */
181  );
182 
183 /** print the given list of variables to output stream separated by the given delimiter character;
184  *
185  * i. e. the variables x1, x2, ..., xn with given delimiter ',' are written as: <x1>, <x2>, ..., <xn>;
186  *
187  * the method SCIPparseVarsList() can parse such a string
188  *
189  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
190  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
191  *
192  * @pre This method can be called if @p scip is in one of the following stages:
193  * - \ref SCIP_STAGE_PROBLEM
194  * - \ref SCIP_STAGE_TRANSFORMING
195  * - \ref SCIP_STAGE_TRANSFORMED
196  * - \ref SCIP_STAGE_INITPRESOLVE
197  * - \ref SCIP_STAGE_PRESOLVING
198  * - \ref SCIP_STAGE_EXITPRESOLVE
199  * - \ref SCIP_STAGE_PRESOLVED
200  * - \ref SCIP_STAGE_INITSOLVE
201  * - \ref SCIP_STAGE_SOLVING
202  * - \ref SCIP_STAGE_SOLVED
203  * - \ref SCIP_STAGE_EXITSOLVE
204  * - \ref SCIP_STAGE_FREETRANS
205  *
206  * @note The printing process is done via the message handler system.
207  */
208 SCIP_EXPORT
210  SCIP* scip, /**< SCIP data structure */
211  FILE* file, /**< output file, or NULL for stdout */
212  SCIP_VAR** vars, /**< variable array to output */
213  int nvars, /**< number of variables */
214  SCIP_Bool type, /**< should the variable type be also posted */
215  char delimiter /**< character which is used for delimitation */
216  );
217 
218 /** print the given variables and coefficients as linear sum in the following form
219  * c1 <x1> + c2 <x2> ... + cn <xn>
220  *
221  * This string can be parsed by the method SCIPparseVarsLinearsum().
222  *
223  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
224  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
225  *
226  * @pre This method can be called if @p scip is in one of the following stages:
227  * - \ref SCIP_STAGE_PROBLEM
228  * - \ref SCIP_STAGE_TRANSFORMING
229  * - \ref SCIP_STAGE_TRANSFORMED
230  * - \ref SCIP_STAGE_INITPRESOLVE
231  * - \ref SCIP_STAGE_PRESOLVING
232  * - \ref SCIP_STAGE_EXITPRESOLVE
233  * - \ref SCIP_STAGE_PRESOLVED
234  * - \ref SCIP_STAGE_INITSOLVE
235  * - \ref SCIP_STAGE_SOLVING
236  * - \ref SCIP_STAGE_SOLVED
237  * - \ref SCIP_STAGE_EXITSOLVE
238  * - \ref SCIP_STAGE_FREETRANS
239  *
240  * @note The printing process is done via the message handler system.
241  */
242 SCIP_EXPORT
244  SCIP* scip, /**< SCIP data structure */
245  FILE* file, /**< output file, or NULL for stdout */
246  SCIP_VAR** vars, /**< variable array to output */
247  SCIP_Real* vals, /**< array of coefficients or NULL if all coefficients are 1.0 */
248  int nvars, /**< number of variables */
249  SCIP_Bool type /**< should the variable type be also posted */
250  );
251 
252 /** print the given terms as signomial in the following form
253  * c1 <x11>^e11 <x12>^e12 ... <x1n>^e1n + c2 <x21>^e21 <x22>^e22 ... + ... + cn <xn1>^en1 ...
254  *
255  * This string can be parsed by the method SCIPparseVarsPolynomial().
256  *
257  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
258  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
259  *
260  * @pre This method can be called if @p scip is in one of the following stages:
261  * - \ref SCIP_STAGE_PROBLEM
262  * - \ref SCIP_STAGE_TRANSFORMING
263  * - \ref SCIP_STAGE_TRANSFORMED
264  * - \ref SCIP_STAGE_INITPRESOLVE
265  * - \ref SCIP_STAGE_PRESOLVING
266  * - \ref SCIP_STAGE_EXITPRESOLVE
267  * - \ref SCIP_STAGE_PRESOLVED
268  * - \ref SCIP_STAGE_INITSOLVE
269  * - \ref SCIP_STAGE_SOLVING
270  * - \ref SCIP_STAGE_SOLVED
271  * - \ref SCIP_STAGE_EXITSOLVE
272  * - \ref SCIP_STAGE_FREETRANS
273  *
274  * @note The printing process is done via the message handler system.
275  */
276 SCIP_EXPORT
278  SCIP* scip, /**< SCIP data structure */
279  FILE* file, /**< output file, or NULL for stdout */
280  SCIP_VAR*** monomialvars, /**< arrays with variables for each monomial */
281  SCIP_Real** monomialexps, /**< arrays with variable exponents, or NULL if always 1.0 */
282  SCIP_Real* monomialcoefs, /**< array with monomial coefficients */
283  int* monomialnvars, /**< array with number of variables for each monomial */
284  int nmonomials, /**< number of monomials */
285  SCIP_Bool type /**< should the variable type be also posted */
286  );
287 
288 /** parses variable information (in cip format) out of a string; if the parsing process was successful a variable is
289  * created and captured; if variable is of integral type, fractional bounds are automatically rounded; an integer
290  * variable with bounds zero and one is automatically converted into a binary variable
291  *
292  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
293  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
294  *
295  * @pre This method can be called if @p scip is in one of the following stages:
296  * - \ref SCIP_STAGE_PROBLEM
297  * - \ref SCIP_STAGE_TRANSFORMING
298  * - \ref SCIP_STAGE_INITPRESOLVE
299  * - \ref SCIP_STAGE_PRESOLVING
300  * - \ref SCIP_STAGE_EXITPRESOLVE
301  * - \ref SCIP_STAGE_PRESOLVED
302  * - \ref SCIP_STAGE_SOLVING
303  */
304 SCIP_EXPORT
306  SCIP* scip, /**< SCIP data structure */
307  SCIP_VAR** var, /**< pointer to store the problem variable */
308  const char* str, /**< string to parse */
309  SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
310  SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
311  SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
312  SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable */
313  SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data */
314  SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable */
315  SCIP_VARDATA* vardata, /**< user data for this specific variable */
316  char** endptr, /**< pointer to store the final string position if successful */
317  SCIP_Bool* success /**< pointer store if the paring process was successful */
318  );
319 
320 /** parses the given string for a variable name and stores the variable in the corresponding pointer if such a variable
321  * exits and returns the position where the parsing stopped
322  *
323  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
324  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
325  *
326  * @pre This method can be called if @p scip is in one of the following stages:
327  * - \ref SCIP_STAGE_PROBLEM
328  * - \ref SCIP_STAGE_TRANSFORMING
329  * - \ref SCIP_STAGE_INITPRESOLVE
330  * - \ref SCIP_STAGE_PRESOLVING
331  * - \ref SCIP_STAGE_EXITPRESOLVE
332  * - \ref SCIP_STAGE_PRESOLVED
333  * - \ref SCIP_STAGE_SOLVING
334  */
335 SCIP_EXPORT
337  SCIP* scip, /**< SCIP data structure */
338  const char* str, /**< string to parse */
339  SCIP_VAR** var, /**< pointer to store the problem variable, or NULL if it does not exit */
340  char** endptr /**< pointer to store the final string position if successful */
341  );
342 
343 /** parse the given string as variable list (here ',' is the delimiter)) (<x1>, <x2>, ..., <xn>) (see
344  * SCIPwriteVarsList() ); if it was successful, the pointer success is set to TRUE
345  *
346  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
347  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
348  *
349  * @pre This method can be called if @p scip is in one of the following stages:
350  * - \ref SCIP_STAGE_PROBLEM
351  * - \ref SCIP_STAGE_TRANSFORMING
352  * - \ref SCIP_STAGE_INITPRESOLVE
353  * - \ref SCIP_STAGE_PRESOLVING
354  * - \ref SCIP_STAGE_EXITPRESOLVE
355  * - \ref SCIP_STAGE_PRESOLVED
356  * - \ref SCIP_STAGE_SOLVING
357  *
358  * @note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.
359  *
360  * @note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens
361  * except that the required size is stored in the corresponding integer; the reason for this approach is that we
362  * cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP
363  * memory functions).
364  */
365 SCIP_EXPORT
367  SCIP* scip, /**< SCIP data structure */
368  const char* str, /**< string to parse */
369  SCIP_VAR** vars, /**< array to store the parsed variable */
370  int* nvars, /**< pointer to store number of parsed variables */
371  int varssize, /**< size of the variable array */
372  int* requiredsize, /**< pointer to store the required array size for the active variables */
373  char** endptr, /**< pointer to store the final string position if successful */
374  char delimiter, /**< character which is used for delimitation */
375  SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
376  );
377 
378 /** parse the given string as linear sum of variables and coefficients (c1 <x1> + c2 <x2> + ... + cn <xn>)
379  * (see SCIPwriteVarsLinearsum() ); if it was successful, the pointer success is set to TRUE
380  *
381  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
382  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
383  *
384  * @pre This method can be called if @p scip is in one of the following stages:
385  * - \ref SCIP_STAGE_PROBLEM
386  * - \ref SCIP_STAGE_TRANSFORMING
387  * - \ref SCIP_STAGE_INITPRESOLVE
388  * - \ref SCIP_STAGE_PRESOLVING
389  * - \ref SCIP_STAGE_EXITPRESOLVE
390  * - \ref SCIP_STAGE_PRESOLVED
391  * - \ref SCIP_STAGE_SOLVING
392  *
393  * @note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.
394  *
395  * @note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens
396  * except that the required size is stored in the corresponding integer; the reason for this approach is that we
397  * cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP
398  * memory functions).
399  */
400 SCIP_EXPORT
402  SCIP* scip, /**< SCIP data structure */
403  const char* str, /**< string to parse */
404  SCIP_VAR** vars, /**< array to store the parsed variables */
405  SCIP_Real* vals, /**< array to store the parsed coefficients */
406  int* nvars, /**< pointer to store number of parsed variables */
407  int varssize, /**< size of the variable array */
408  int* requiredsize, /**< pointer to store the required array size for the active variables */
409  char** endptr, /**< pointer to store the final string position if successful */
410  SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
411  );
412 
413 /** parse the given string as signomial of variables and coefficients
414  * (c1 <x11>^e11 <x12>^e12 ... <x1n>^e1n + c2 <x21>^e21 <x22>^e22 ... + ... + cn <xn1>^en1 ...)
415  * (see SCIPwriteVarsPolynomial()); if it was successful, the pointer success is set to TRUE
416  *
417  * The user has to call SCIPfreeParseVarsPolynomialData(scip, monomialvars, monomialexps,
418  * monomialcoefs, monomialnvars, *nmonomials) short after SCIPparseVarsPolynomial to free all the
419  * allocated memory again. Do not keep the arrays created by SCIPparseVarsPolynomial around, since
420  * they use buffer memory that is intended for short term use only.
421  *
422  * Parsing is stopped at the end of string (indicated by the \\0-character) or when no more monomials
423  * are recognized.
424  *
425  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
426  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
427  *
428  * @pre This method can be called if @p scip is in one of the following stages:
429  * - \ref SCIP_STAGE_PROBLEM
430  * - \ref SCIP_STAGE_TRANSFORMING
431  * - \ref SCIP_STAGE_INITPRESOLVE
432  * - \ref SCIP_STAGE_PRESOLVING
433  * - \ref SCIP_STAGE_EXITPRESOLVE
434  * - \ref SCIP_STAGE_PRESOLVED
435  * - \ref SCIP_STAGE_SOLVING
436  */
437 SCIP_EXPORT
439  SCIP* scip, /**< SCIP data structure */
440  const char* str, /**< string to parse */
441  SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
442  SCIP_Real*** monomialexps, /**< pointer to store arrays with variable exponents */
443  SCIP_Real** monomialcoefs, /**< pointer to store array with monomial coefficients */
444  int** monomialnvars, /**< pointer to store array with number of variables for each monomial */
445  int* nmonomials, /**< pointer to store number of parsed monomials */
446  char** endptr, /**< pointer to store the final string position if successful */
447  SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
448  );
449 
450 /** frees memory allocated when parsing a signomial from a string
451  *
452  * @pre This method can be called if @p scip is in one of the following stages:
453  * - \ref SCIP_STAGE_PROBLEM
454  * - \ref SCIP_STAGE_TRANSFORMING
455  * - \ref SCIP_STAGE_INITPRESOLVE
456  * - \ref SCIP_STAGE_PRESOLVING
457  * - \ref SCIP_STAGE_EXITPRESOLVE
458  * - \ref SCIP_STAGE_PRESOLVED
459  * - \ref SCIP_STAGE_SOLVING
460  */
461 SCIP_EXPORT
463  SCIP* scip, /**< SCIP data structure */
464  SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
465  SCIP_Real*** monomialexps, /**< pointer to store arrays with variable exponents */
466  SCIP_Real** monomialcoefs, /**< pointer to store array with monomial coefficients */
467  int** monomialnvars, /**< pointer to store array with number of variables for each monomial */
468  int nmonomials /**< pointer to store number of parsed monomials */
469  );
470 
471 /** increases usage counter of variable
472  *
473  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
474  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
475  *
476  * @pre This method can be called if @p scip is in one of the following stages:
477  * - \ref SCIP_STAGE_PROBLEM
478  * - \ref SCIP_STAGE_TRANSFORMING
479  * - \ref SCIP_STAGE_TRANSFORMED
480  * - \ref SCIP_STAGE_INITPRESOLVE
481  * - \ref SCIP_STAGE_PRESOLVING
482  * - \ref SCIP_STAGE_EXITPRESOLVE
483  * - \ref SCIP_STAGE_PRESOLVED
484  * - \ref SCIP_STAGE_INITSOLVE
485  * - \ref SCIP_STAGE_SOLVING
486  * - \ref SCIP_STAGE_SOLVED
487  * - \ref SCIP_STAGE_EXITSOLVE
488  */
489 SCIP_EXPORT
491  SCIP* scip, /**< SCIP data structure */
492  SCIP_VAR* var /**< variable to capture */
493  );
494 
495 /** decreases usage counter of variable, if the usage pointer reaches zero the variable gets freed
496  *
497  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
498  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
499  *
500  * @pre This method can be called if @p scip is in one of the following stages:
501  * - \ref SCIP_STAGE_PROBLEM
502  * - \ref SCIP_STAGE_TRANSFORMING
503  * - \ref SCIP_STAGE_TRANSFORMED
504  * - \ref SCIP_STAGE_INITPRESOLVE
505  * - \ref SCIP_STAGE_PRESOLVING
506  * - \ref SCIP_STAGE_EXITPRESOLVE
507  * - \ref SCIP_STAGE_PRESOLVED
508  * - \ref SCIP_STAGE_INITSOLVE
509  * - \ref SCIP_STAGE_SOLVING
510  * - \ref SCIP_STAGE_SOLVED
511  * - \ref SCIP_STAGE_EXITSOLVE
512  * - \ref SCIP_STAGE_FREETRANS
513  *
514  * @note the pointer of the variable will be NULLed
515  */
516 SCIP_EXPORT
518  SCIP* scip, /**< SCIP data structure */
519  SCIP_VAR** var /**< pointer to variable */
520  );
521 
522 /** changes the name of a variable
523  *
524  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
525  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
526  *
527  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PROBLEM
528  *
529  * @note to get the current name of a variable, use SCIPvarGetName() from pub_var.h
530  */
531 SCIP_EXPORT
533  SCIP* scip, /**< SCIP data structure */
534  SCIP_VAR* var, /**< variable */
535  const char* name /**< new name of constraint */
536  );
537 
538 /** gets and captures transformed variable of a given variable; if the variable is not yet transformed,
539  * a new transformed variable for this variable is created
540  *
541  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
542  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
543  *
544  * @pre This method can be called if @p scip is in one of the following stages:
545  * - \ref SCIP_STAGE_TRANSFORMING
546  * - \ref SCIP_STAGE_TRANSFORMED
547  * - \ref SCIP_STAGE_INITPRESOLVE
548  * - \ref SCIP_STAGE_PRESOLVING
549  * - \ref SCIP_STAGE_EXITPRESOLVE
550  * - \ref SCIP_STAGE_PRESOLVED
551  * - \ref SCIP_STAGE_INITSOLVE
552  * - \ref SCIP_STAGE_SOLVING
553  */
554 SCIP_EXPORT
556  SCIP* scip, /**< SCIP data structure */
557  SCIP_VAR* var, /**< variable to get/create transformed variable for */
558  SCIP_VAR** transvar /**< pointer to store the transformed variable */
559  );
560 
561 /** gets and captures transformed variables for an array of variables;
562  * if a variable of the array is not yet transformed, a new transformed variable for this variable is created;
563  * it is possible to call this method with vars == transvars
564  *
565  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
566  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
567  *
568  * @pre This method can be called if @p scip is in one of the following stages:
569  * - \ref SCIP_STAGE_TRANSFORMING
570  * - \ref SCIP_STAGE_TRANSFORMED
571  * - \ref SCIP_STAGE_INITPRESOLVE
572  * - \ref SCIP_STAGE_PRESOLVING
573  * - \ref SCIP_STAGE_EXITPRESOLVE
574  * - \ref SCIP_STAGE_PRESOLVED
575  * - \ref SCIP_STAGE_INITSOLVE
576  * - \ref SCIP_STAGE_SOLVING
577  */
578 SCIP_EXPORT
580  SCIP* scip, /**< SCIP data structure */
581  int nvars, /**< number of variables to get/create transformed variables for */
582  SCIP_VAR** vars, /**< array with variables to get/create transformed variables for */
583  SCIP_VAR** transvars /**< array to store the transformed variables */
584  );
585 
586 /** gets corresponding transformed variable of a given variable;
587  * returns NULL as transvar, if transformed variable is not yet existing
588  *
589  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
590  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
591  *
592  * @pre This method can be called if @p scip is in one of the following stages:
593  * - \ref SCIP_STAGE_TRANSFORMING
594  * - \ref SCIP_STAGE_TRANSFORMED
595  * - \ref SCIP_STAGE_INITPRESOLVE
596  * - \ref SCIP_STAGE_PRESOLVING
597  * - \ref SCIP_STAGE_EXITPRESOLVE
598  * - \ref SCIP_STAGE_PRESOLVED
599  * - \ref SCIP_STAGE_INITSOLVE
600  * - \ref SCIP_STAGE_SOLVING
601  * - \ref SCIP_STAGE_SOLVED
602  * - \ref SCIP_STAGE_EXITSOLVE
603  * - \ref SCIP_STAGE_FREETRANS
604  */
605 SCIP_EXPORT
607  SCIP* scip, /**< SCIP data structure */
608  SCIP_VAR* var, /**< variable to get transformed variable for */
609  SCIP_VAR** transvar /**< pointer to store the transformed variable */
610  );
611 
612 /** gets corresponding transformed variables for an array of variables;
613  * stores NULL in a transvars slot, if the transformed variable is not yet existing;
614  * it is possible to call this method with vars == transvars, but remember that variables that are not
615  * yet transformed will be replaced with NULL
616  *
617  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
618  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
619  *
620  * @pre This method can be called if @p scip is in one of the following stages:
621  * - \ref SCIP_STAGE_TRANSFORMING
622  * - \ref SCIP_STAGE_TRANSFORMED
623  * - \ref SCIP_STAGE_INITPRESOLVE
624  * - \ref SCIP_STAGE_PRESOLVING
625  * - \ref SCIP_STAGE_EXITPRESOLVE
626  * - \ref SCIP_STAGE_PRESOLVED
627  * - \ref SCIP_STAGE_INITSOLVE
628  * - \ref SCIP_STAGE_SOLVING
629  * - \ref SCIP_STAGE_SOLVED
630  * - \ref SCIP_STAGE_EXITSOLVE
631  * - \ref SCIP_STAGE_FREETRANS
632  */
633 SCIP_EXPORT
635  SCIP* scip, /**< SCIP data structure */
636  int nvars, /**< number of variables to get transformed variables for */
637  SCIP_VAR** vars, /**< array with variables to get transformed variables for */
638  SCIP_VAR** transvars /**< array to store the transformed variables */
639  );
640 
641 /** gets negated variable x' = lb + ub - x of variable x; negated variable is created, if not yet existing
642  *
643  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
644  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
645  *
646  * @pre This method can be called if @p scip is in one of the following stages:
647  * - \ref SCIP_STAGE_PROBLEM
648  * - \ref SCIP_STAGE_TRANSFORMING
649  * - \ref SCIP_STAGE_TRANSFORMED
650  * - \ref SCIP_STAGE_INITPRESOLVE
651  * - \ref SCIP_STAGE_PRESOLVING
652  * - \ref SCIP_STAGE_EXITPRESOLVE
653  * - \ref SCIP_STAGE_PRESOLVED
654  * - \ref SCIP_STAGE_INITSOLVE
655  * - \ref SCIP_STAGE_SOLVING
656  * - \ref SCIP_STAGE_SOLVED
657  * - \ref SCIP_STAGE_EXITSOLVE
658  * - \ref SCIP_STAGE_FREETRANS
659  */
660 SCIP_EXPORT
662  SCIP* scip, /**< SCIP data structure */
663  SCIP_VAR* var, /**< variable to get negated variable for */
664  SCIP_VAR** negvar /**< pointer to store the negated variable */
665  );
666 
667 /** gets negated variables x' = lb + ub - x of variables x; negated variables are created, if not yet existing;
668  * in difference to \ref SCIPcreateVar, the negated variable must not be released (unless captured explicitly)
669  *
670  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
671  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
672  *
673  * @pre This method can be called if @p scip is in one of the following stages:
674  * - \ref SCIP_STAGE_PROBLEM
675  * - \ref SCIP_STAGE_TRANSFORMING
676  * - \ref SCIP_STAGE_TRANSFORMED
677  * - \ref SCIP_STAGE_INITPRESOLVE
678  * - \ref SCIP_STAGE_PRESOLVING
679  * - \ref SCIP_STAGE_EXITPRESOLVE
680  * - \ref SCIP_STAGE_PRESOLVED
681  * - \ref SCIP_STAGE_INITSOLVE
682  * - \ref SCIP_STAGE_SOLVING
683  * - \ref SCIP_STAGE_SOLVED
684  * - \ref SCIP_STAGE_EXITSOLVE
685  * - \ref SCIP_STAGE_FREETRANS
686  */
687 SCIP_EXPORT
689  SCIP* scip, /**< SCIP data structure */
690  int nvars, /**< number of variables to get negated variables for */
691  SCIP_VAR** vars, /**< array of variables to get negated variables for */
692  SCIP_VAR** negvars /**< array to store the negated variables */
693  );
694 
695 /** gets a binary variable that is equal to the given binary variable, and that is either active, fixed, or
696  * multi-aggregated, or the negated variable of an active, fixed, or multi-aggregated variable
697  *
698  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
699  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
700  *
701  * @pre This method can be called if @p scip is in one of the following stages:
702  * - \ref SCIP_STAGE_PROBLEM
703  * - \ref SCIP_STAGE_TRANSFORMED
704  * - \ref SCIP_STAGE_INITPRESOLVE
705  * - \ref SCIP_STAGE_PRESOLVING
706  * - \ref SCIP_STAGE_EXITPRESOLVE
707  * - \ref SCIP_STAGE_PRESOLVED
708  * - \ref SCIP_STAGE_INITSOLVE
709  * - \ref SCIP_STAGE_SOLVING
710  * - \ref SCIP_STAGE_SOLVED
711  * - \ref SCIP_STAGE_EXITSOLVE
712  */
713 SCIP_EXPORT
715  SCIP* scip, /**< SCIP data structure */
716  SCIP_VAR* var, /**< binary variable to get binary representative for */
717  SCIP_VAR** repvar, /**< pointer to store the binary representative */
718  SCIP_Bool* negated /**< pointer to store whether the negation of an active variable was returned */
719  );
720 
721 /** gets binary variables that are equal to the given binary variables, and which are either active, fixed, or
722  * multi-aggregated, or the negated variables of active, fixed, or multi-aggregated variables
723  *
724  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
725  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
726  *
727  * @pre This method can be called if @p scip is in one of the following stages:
728  * - \ref SCIP_STAGE_PROBLEM
729  * - \ref SCIP_STAGE_TRANSFORMED
730  * - \ref SCIP_STAGE_INITPRESOLVE
731  * - \ref SCIP_STAGE_PRESOLVING
732  * - \ref SCIP_STAGE_EXITPRESOLVE
733  * - \ref SCIP_STAGE_PRESOLVED
734  * - \ref SCIP_STAGE_INITSOLVE
735  * - \ref SCIP_STAGE_SOLVING
736  * - \ref SCIP_STAGE_SOLVED
737  * - \ref SCIP_STAGE_EXITSOLVE
738  */
739 SCIP_EXPORT
741  SCIP* scip, /**< SCIP data structure */
742  int nvars, /**< number of binary variables to get representatives for */
743  SCIP_VAR** vars, /**< binary variables to get binary representatives for */
744  SCIP_VAR** repvars, /**< array to store the binary representatives */
745  SCIP_Bool* negated /**< array to store whether the negation of an active variable was returned */
746  );
747 
748 /** flattens aggregation graph of multi-aggregated variable in order to avoid exponential recursion later on
749  *
750  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
751  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
752  *
753  * @pre This method can be called if @p scip is in one of the following stages:
754  * - \ref SCIP_STAGE_INITPRESOLVE
755  * - \ref SCIP_STAGE_PRESOLVING
756  * - \ref SCIP_STAGE_EXITPRESOLVE
757  * - \ref SCIP_STAGE_PRESOLVED
758  * - \ref SCIP_STAGE_INITSOLVE
759  * - \ref SCIP_STAGE_SOLVING
760  * - \ref SCIP_STAGE_SOLVED
761  */
762 SCIP_EXPORT
764  SCIP* scip, /**< SCIP data structure */
765  SCIP_VAR* var /**< problem variable */
766  );
767 
768 /** Transforms a given linear sum of variables, that is a_1*x_1 + ... + a_n*x_n + c into a corresponding linear sum of
769  * active variables, that is b_1*y_1 + ... + b_m*y_m + d.
770  *
771  * If the number of needed active variables is greater than the available slots in the variable array, nothing happens
772  * except that the required size is stored in the corresponding variable (requiredsize). Otherwise, the active variable
773  * representation is stored in the variable array, scalar array and constant.
774  *
775  * The reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been
776  * allocated (e.g., by a C++ 'new' or SCIP functions).
777  *
778  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
779  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
780  *
781  * @pre This method can be called if @p scip is in one of the following stages:
782  * - \ref SCIP_STAGE_TRANSFORMED
783  * - \ref SCIP_STAGE_INITPRESOLVE
784  * - \ref SCIP_STAGE_PRESOLVING
785  * - \ref SCIP_STAGE_EXITPRESOLVE
786  * - \ref SCIP_STAGE_PRESOLVED
787  * - \ref SCIP_STAGE_INITSOLVE
788  * - \ref SCIP_STAGE_SOLVING
789  * - \ref SCIP_STAGE_SOLVED
790  * - \ref SCIP_STAGE_EXITSOLVE
791  * - \ref SCIP_STAGE_FREETRANS
792  *
793  * @note The resulting linear sum is stored into the given variable array, scalar array, and constant. That means the
794  * given entries are overwritten.
795  *
796  * @note That method can be used to convert a single variables into variable space of active variables. Therefore call
797  * the method with the linear sum 1.0*x + 0.0.
798  */
799 SCIP_EXPORT
801  SCIP* scip, /**< SCIP data structure */
802  SCIP_VAR** vars, /**< variable array x_1, ..., x_n in the linear sum which will be
803  * overwritten by the variable array y_1, ..., y_m in the linear sum
804  * w.r.t. active variables */
805  SCIP_Real* scalars, /**< scalars a_1, ..., a_n in linear sum which will be overwritten to the
806  * scalars b_1, ..., b_m in the linear sum of the active variables */
807  int* nvars, /**< pointer to number of variables in the linear sum which will be
808  * overwritten by the number of variables in the linear sum corresponding
809  * to the active variables */
810  int varssize, /**< available slots in vars and scalars array which is needed to check if
811  * the array are large enough for the linear sum w.r.t. active
812  * variables */
813  SCIP_Real* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c which
814  * will chnage to constant d in the linear sum b_1*y_1 + ... + b_m*y_m +
815  * d w.r.t. the active variables */
816  int* requiredsize, /**< pointer to store the required array size for the linear sum w.r.t. the
817  * active variables */
818  SCIP_Bool mergemultiples /**< should multiple occurrences of a var be replaced by a single coeff? */
819  );
820 
821 /** transforms given variable, scalar and constant to the corresponding active, fixed, or
822  * multi-aggregated variable, scalar and constant; if the variable resolves to a fixed variable,
823  * "scalar" will be 0.0 and the value of the sum will be stored in "constant"; a multi-aggregation
824  * with only one active variable (this can happen due to fixings after the multi-aggregation),
825  * is treated like an aggregation; if the multi-aggregation constant is infinite, "scalar" will be 0.0
826  *
827  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
828  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
829  *
830  * @pre This method can be called if @p scip is in one of the following stages:
831  * - \ref SCIP_STAGE_TRANSFORMED
832  * - \ref SCIP_STAGE_INITPRESOLVE
833  * - \ref SCIP_STAGE_PRESOLVING
834  * - \ref SCIP_STAGE_EXITPRESOLVE
835  * - \ref SCIP_STAGE_PRESOLVED
836  * - \ref SCIP_STAGE_INITSOLVE
837  * - \ref SCIP_STAGE_SOLVING
838  * - \ref SCIP_STAGE_SOLVED
839  * - \ref SCIP_STAGE_EXITSOLVE
840  * - \ref SCIP_STAGE_FREETRANS
841  */
842 SCIP_EXPORT
844  SCIP* scip, /**< SCIP data structure */
845  SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
846  SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
847  SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
848  );
849 
850 /** return for given variables all their active counterparts; all active variables will be pairwise different
851  * @note It does not hold that the first output variable is the active variable for the first input variable.
852  *
853  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
854  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
855  *
856  * @pre This method can be called if @p scip is in one of the following stages:
857  * - \ref SCIP_STAGE_TRANSFORMED
858  * - \ref SCIP_STAGE_INITPRESOLVE
859  * - \ref SCIP_STAGE_PRESOLVING
860  * - \ref SCIP_STAGE_EXITPRESOLVE
861  * - \ref SCIP_STAGE_PRESOLVED
862  * - \ref SCIP_STAGE_INITSOLVE
863  * - \ref SCIP_STAGE_SOLVING
864  * - \ref SCIP_STAGE_SOLVED
865  * - \ref SCIP_STAGE_EXITSOLVE
866  * - \ref SCIP_STAGE_FREETRANS
867  */
868 SCIP_EXPORT
870  SCIP* scip, /**< SCIP data structure */
871  SCIP_VAR** vars, /**< variable array with given variables and as output all active
872  * variables, if enough slots exist */
873  int* nvars, /**< number of given variables, and as output number of active variables,
874  * if enough slots exist */
875  int varssize, /**< available slots in vars array */
876  int* requiredsize /**< pointer to store the required array size for the active variables */
877  );
878 
879 /** returns the reduced costs of the variable in the current node's LP relaxation;
880  * the current node has to have a feasible LP.
881  *
882  * returns SCIP_INVALID if the variable is active but not in the current LP;
883  * returns 0 if the variable has been aggregated out or fixed in presolving.
884  *
885  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
886  *
887  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
888  */
889 SCIP_EXPORT
891  SCIP* scip, /**< SCIP data structure */
892  SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
893  );
894 
895 /** returns the implied reduced costs of the variable in the current node's LP relaxation;
896  * the current node has to have a feasible LP.
897  *
898  * returns SCIP_INVALID if the variable is active but not in the current LP;
899  * returns 0 if the variable has been aggregated out or fixed in presolving.
900  *
901  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
902  *
903  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
904  */
905 SCIP_EXPORT
907  SCIP* scip, /**< SCIP data structure */
908  SCIP_VAR* var, /**< variable to get reduced costs, should be a column in current node LP */
909  SCIP_Bool varfixing /**< FALSE if for x == 0, TRUE for x == 1 */
910  );
911 
912 /** returns the Farkas coefficient of the variable in the current node's LP relaxation;
913  * the current node has to have an infeasible LP.
914  *
915  * returns SCIP_INVALID if the variable is active but not in the current LP;
916  * returns 0 if the variable has been aggregated out or fixed in presolving.
917  *
918  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
919  */
920 SCIP_EXPORT
922  SCIP* scip, /**< SCIP data structure */
923  SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
924  );
925 
926 /** returns lower bound of variable directly before or after the bound change given by the bound change index
927  * was applied
928  */
929 SCIP_EXPORT
931  SCIP* scip, /**< SCIP data structure */
932  SCIP_VAR* var, /**< problem variable */
933  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
934  SCIP_Bool after /**< should the bound change with given index be included? */
935  );
936 
937 /** returns upper bound of variable directly before or after the bound change given by the bound change index
938  * was applied
939  */
940 SCIP_EXPORT
942  SCIP* scip, /**< SCIP data structure */
943  SCIP_VAR* var, /**< problem variable */
944  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
945  SCIP_Bool after /**< should the bound change with given index be included? */
946  );
947 
948 /** returns lower or upper bound of variable directly before or after the bound change given by the bound change index
949  * was applied
950  */
951 SCIP_EXPORT
953  SCIP* scip, /**< SCIP data structure */
954  SCIP_VAR* var, /**< problem variable */
955  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
956  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
957  SCIP_Bool after /**< should the bound change with given index be included? */
958  );
959 
960 /** returns whether the binary variable was fixed at the time given by the bound change index */
961 SCIP_EXPORT
963  SCIP* scip, /**< SCIP data structure */
964  SCIP_VAR* var, /**< problem variable */
965  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
966  SCIP_Bool after /**< should the bound change with given index be included? */
967  );
968 
969 /** gets solution value for variable in current node
970  *
971  * @return solution value for variable in current node
972  *
973  * @pre This method can be called if @p scip is in one of the following stages:
974  * - \ref SCIP_STAGE_PRESOLVED
975  * - \ref SCIP_STAGE_SOLVING
976  */
977 SCIP_EXPORT
979  SCIP* scip, /**< SCIP data structure */
980  SCIP_VAR* var /**< variable to get solution value for */
981  );
982 
983 /** gets solution values of multiple variables in current node
984  *
985  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
986  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
987  *
988  * @pre This method can be called if @p scip is in one of the following stages:
989  * - \ref SCIP_STAGE_PRESOLVED
990  * - \ref SCIP_STAGE_SOLVING
991  */
992 SCIP_EXPORT
994  SCIP* scip, /**< SCIP data structure */
995  int nvars, /**< number of variables to get solution value for */
996  SCIP_VAR** vars, /**< array with variables to get value for */
997  SCIP_Real* vals /**< array to store solution values of variables */
998  );
999 
1000 /** sets the solution value of all variables in the global relaxation solution to zero
1001  *
1002  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1003  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1004  *
1005  * @pre This method can be called if @p scip is in one of the following stages:
1006  * - \ref SCIP_STAGE_PRESOLVED
1007  * - \ref SCIP_STAGE_SOLVING
1008  */
1009 SCIP_EXPORT
1011  SCIP* scip, /**< SCIP data structure */
1012  SCIP_RELAX* relax /**< relaxator data structure */
1013  );
1014 
1015 /** sets the value of the given variable in the global relaxation solution;
1016  * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1017  * You can use SCIPclearRelaxSolVals() to set all values to zero, initially;
1018  * after setting all solution values, you have to call SCIPmarkRelaxSolValid()
1019  * to inform SCIP that the stored solution is valid
1020  *
1021  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1022  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1023  *
1024  * @pre This method can be called if @p scip is in one of the following stages:
1025  * - \ref SCIP_STAGE_PRESOLVED
1026  * - \ref SCIP_STAGE_SOLVING
1027  *
1028  * @note This method incrementally updates the objective value of the relaxation solution. If the whole solution
1029  * should be updated, using SCIPsetRelaxSolVals() instead or calling SCIPclearRelaxSolVals() before setting
1030  * the first value to reset the solution and the objective value to 0 may help the numerics.
1031  */
1032 SCIP_EXPORT
1034  SCIP* scip, /**< SCIP data structure */
1035  SCIP_RELAX* relax, /**< relaxator data structure */
1036  SCIP_VAR* var, /**< variable to set value for */
1037  SCIP_Real val /**< solution value of variable */
1038  );
1039 
1040 /** sets the values of the given variables in the global relaxation solution and informs SCIP about the validity
1041  * and whether the solution can be enforced via linear cuts;
1042  * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1043  * the solution is automatically cleared, s.t. all other variables get value 0.0
1044  *
1045  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1046  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1047  *
1048  * @pre This method can be called if @p scip is in one of the following stages:
1049  * - \ref SCIP_STAGE_PRESOLVED
1050  * - \ref SCIP_STAGE_SOLVING
1051  */
1052 SCIP_EXPORT
1054  SCIP* scip, /**< SCIP data structure */
1055  SCIP_RELAX* relax, /**< relaxator data structure */
1056  int nvars, /**< number of variables to set relaxation solution value for */
1057  SCIP_VAR** vars, /**< array with variables to set value for */
1058  SCIP_Real* vals, /**< array with solution values of variables */
1059  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1060  );
1061 
1062 /** sets the values of the variables in the global relaxation solution to the values in the given primal solution
1063  * and informs SCIP about the validity and whether the solution can be enforced via linear cuts;
1064  * the relaxation solution can be filled by the relaxation handlers and might be used by heuristics and for separation
1065  *
1066  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1067  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1068  *
1069  * @pre This method can be called if @p scip is in one of the following stages:
1070  * - \ref SCIP_STAGE_PRESOLVED
1071  * - \ref SCIP_STAGE_SOLVING
1072  */
1073 SCIP_EXPORT
1075  SCIP* scip, /**< SCIP data structure */
1076  SCIP_RELAX* relax, /**< relaxator data structure */
1077  SCIP_SOL* sol, /**< primal relaxation solution */
1078  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1079  );
1080 
1081 /** returns whether the relaxation solution is valid
1082  *
1083  * @return TRUE, if the relaxation solution is valid; FALSE, otherwise
1084  *
1085  * @pre This method can be called if @p scip is in one of the following stages:
1086  * - \ref SCIP_STAGE_PRESOLVED
1087  * - \ref SCIP_STAGE_SOLVING
1088  */
1089 SCIP_EXPORT
1091  SCIP* scip /**< SCIP data structure */
1092  );
1093 
1094 /** informs SCIP that the relaxation solution is valid and whether the relaxation can be enforced through linear cuts
1095  *
1096  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1097  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1098  *
1099  * @pre This method can be called if @p scip is in one of the following stages:
1100  * - \ref SCIP_STAGE_PRESOLVED
1101  * - \ref SCIP_STAGE_SOLVING
1102  */
1103 SCIP_EXPORT
1105  SCIP* scip, /**< SCIP data structure */
1106  SCIP_RELAX* relax, /**< relaxator data structure that set the current relaxation solution */
1107  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1108  );
1109 
1110 /** informs SCIP, that the relaxation solution is invalid
1111  *
1112  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1113  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1114  *
1115  * @pre This method can be called if @p scip is in one of the following stages:
1116  * - \ref SCIP_STAGE_PRESOLVED
1117  * - \ref SCIP_STAGE_SOLVING
1118  */
1119 SCIP_EXPORT
1121  SCIP* scip /**< SCIP data structure */
1122  );
1123 
1124 /** gets the relaxation solution value of the given variable
1125  *
1126  * @return the relaxation solution value of the given variable
1127  *
1128  * @pre This method can be called if @p scip is in one of the following stages:
1129  * - \ref SCIP_STAGE_PRESOLVED
1130  * - \ref SCIP_STAGE_SOLVING
1131  */
1132 SCIP_EXPORT
1134  SCIP* scip, /**< SCIP data structure */
1135  SCIP_VAR* var /**< variable to get value for */
1136  );
1137 
1138 /** gets the relaxation solution objective value
1139  *
1140  * @return the objective value of the relaxation solution
1141  *
1142  * @pre This method can be called if @p scip is in one of the following stages:
1143  * - \ref SCIP_STAGE_PRESOLVED
1144  * - \ref SCIP_STAGE_SOLVING
1145  */
1146 SCIP_EXPORT
1148  SCIP* scip /**< SCIP data structure */
1149  );
1150 
1151 /** determine which branching direction should be evaluated first by strong branching
1152  *
1153  * @return TRUE iff strong branching should first evaluate the down child
1154  *
1155  */
1156 SCIP_EXPORT
1158  SCIP* scip, /**< SCIP data structure */
1159  SCIP_VAR* var /**< variable to determine the branching direction on */
1160  );
1161 
1162 /** start strong branching - call before any strong branching
1163  *
1164  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1165  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1166  *
1167  * @pre This method can be called if @p scip is in one of the following stages:
1168  * - \ref SCIP_STAGE_PRESOLVED
1169  * - \ref SCIP_STAGE_SOLVING
1170  *
1171  * @note if propagation is enabled, strong branching is not done directly on the LP, but probing nodes are created
1172  * which allow to perform propagation but also creates some overhead
1173  */
1174 SCIP_EXPORT
1176  SCIP* scip, /**< SCIP data structure */
1177  SCIP_Bool enablepropagation /**< should propagation be done before solving the strong branching LP? */
1178  );
1179 
1180 /** end strong branching - call after any strong branching
1181  *
1182  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1183  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1184  *
1185  * @pre This method can be called if @p scip is in one of the following stages:
1186  * - \ref SCIP_STAGE_PRESOLVED
1187  * - \ref SCIP_STAGE_SOLVING
1188  */
1189 SCIP_EXPORT
1191  SCIP* scip /**< SCIP data structure */
1192  );
1193 
1194 /** gets strong branching information on column variable with fractional value
1195  *
1196  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1197  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1198  *
1199  * @pre This method can be called if @p scip is in one of the following stages:
1200  * - \ref SCIP_STAGE_PRESOLVED
1201  * - \ref SCIP_STAGE_SOLVING
1202  */
1203 SCIP_EXPORT
1205  SCIP* scip, /**< SCIP data structure */
1206  SCIP_VAR* var, /**< variable to get strong branching values for */
1207  int itlim, /**< iteration limit for strong branchings */
1208  SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1209  SCIP_Real* down, /**< stores dual bound after branching column down */
1210  SCIP_Real* up, /**< stores dual bound after branching column up */
1211  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1212  * otherwise, it can only be used as an estimate value */
1213  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1214  * otherwise, it can only be used as an estimate value */
1215  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1216  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1217  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1218  * infeasible downwards branch, or NULL */
1219  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1220  * infeasible upwards branch, or NULL */
1221  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1222  * solving process should be stopped (e.g., due to a time limit) */
1223  );
1224 
1225 /** gets strong branching information with previous domain propagation on column variable
1226  *
1227  * Before calling this method, the strong branching mode must have been activated by calling SCIPstartStrongbranch();
1228  * after strong branching was done for all candidate variables, the strong branching mode must be ended by
1229  * SCIPendStrongbranch(). Since this method applies domain propagation before strongbranching, propagation has to be be
1230  * enabled in the SCIPstartStrongbranch() call.
1231  *
1232  * Before solving the strong branching LP, domain propagation can be performed. The number of propagation rounds
1233  * can be specified by the parameter @p maxproprounds.
1234  *
1235  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1236  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1237  *
1238  * @pre This method can be called if @p scip is in one of the following stages:
1239  * - \ref SCIP_STAGE_PRESOLVED
1240  * - \ref SCIP_STAGE_SOLVING
1241  *
1242  * @warning When using this method, LP banching candidates and solution values must be copied beforehand, because
1243  * they are updated w.r.t. the strong branching LP solution.
1244  */
1245 SCIP_EXPORT
1247  SCIP* scip, /**< SCIP data structure */
1248  SCIP_VAR* var, /**< variable to get strong branching values for */
1249  SCIP_Real solval, /**< value of the variable in the current LP solution */
1250  SCIP_Real lpobjval, /**< LP objective value of the current LP solution */
1251  int itlim, /**< iteration limit for strong branchings */
1252  int maxproprounds, /**< maximum number of propagation rounds (-1: no limit, -2: parameter
1253  * settings) */
1254  SCIP_Real* down, /**< stores dual bound after branching column down */
1255  SCIP_Real* up, /**< stores dual bound after branching column up */
1256  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1257  * otherwise, it can only be used as an estimate value */
1258  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1259  * otherwise, it can only be used as an estimate value */
1260  SCIP_Longint* ndomredsdown, /**< pointer to store the number of domain reductions down, or NULL */
1261  SCIP_Longint* ndomredsup, /**< pointer to store the number of domain reductions up, or NULL */
1262  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1263  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1264  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1265  * infeasible downwards branch, or NULL */
1266  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1267  * infeasible upwards branch, or NULL */
1268  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred or the
1269  * solving process should be stopped (e.g., due to a time limit) */
1270  SCIP_Real* newlbs, /**< array to store valid lower bounds for all active variables, or NULL */
1271  SCIP_Real* newubs /**< array to store valid upper bounds for all active variables, or NULL */
1272  );
1273 
1274 /** gets strong branching information on column variable x with integral LP solution value (val); that is, the down branch
1275  * is (val -1.0) and the up brach ins (val +1.0)
1276  *
1277  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1278  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1279  *
1280  * @pre This method can be called if @p scip is in one of the following stages:
1281  * - \ref SCIP_STAGE_PRESOLVED
1282  * - \ref SCIP_STAGE_SOLVING
1283  *
1284  * @note If the integral LP solution value is the lower or upper bound of the variable, the corresponding branch will be
1285  * marked as infeasible. That is, the valid pointer and the infeasible pointer are set to TRUE.
1286  */
1287 SCIP_EXPORT
1289  SCIP* scip, /**< SCIP data structure */
1290  SCIP_VAR* var, /**< variable to get strong branching values for */
1291  int itlim, /**< iteration limit for strong branchings */
1292  SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1293  SCIP_Real* down, /**< stores dual bound after branching column down */
1294  SCIP_Real* up, /**< stores dual bound after branching column up */
1295  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1296  * otherwise, it can only be used as an estimate value */
1297  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1298  * otherwise, it can only be used as an estimate value */
1299  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1300  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1301  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1302  * infeasible downwards branch, or NULL */
1303  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1304  * infeasible upwards branch, or NULL */
1305  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1306  * solving process should be stopped (e.g., due to a time limit) */
1307  );
1308 
1309 /** gets strong branching information on column variables with fractional values
1310  *
1311  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1312  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1313  *
1314  * @pre This method can be called if @p scip is in one of the following stages:
1315  * - \ref SCIP_STAGE_PRESOLVED
1316  * - \ref SCIP_STAGE_SOLVING
1317  */
1318 SCIP_EXPORT
1320  SCIP* scip, /**< SCIP data structure */
1321  SCIP_VAR** vars, /**< variables to get strong branching values for */
1322  int nvars, /**< number of variables */
1323  int itlim, /**< iteration limit for strong branchings */
1324  SCIP_Real* down, /**< stores dual bounds after branching variables down */
1325  SCIP_Real* up, /**< stores dual bounds after branching variables up */
1326  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1327  * otherwise, they can only be used as an estimate value */
1328  SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1329  * otherwise, they can only be used as an estimate value */
1330  SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1331  SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1332  SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1333  * infeasible downward branches, or NULL */
1334  SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1335  * infeasible upward branches, or NULL */
1336  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1337  * solving process should be stopped (e.g., due to a time limit) */
1338  );
1339 
1340 /** gets strong branching information on column variables with integral values
1341  *
1342  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1343  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1344  *
1345  * @pre This method can be called if @p scip is in one of the following stages:
1346  * - \ref SCIP_STAGE_PRESOLVED
1347  * - \ref SCIP_STAGE_SOLVING
1348  */
1349 SCIP_EXPORT
1351  SCIP* scip, /**< SCIP data structure */
1352  SCIP_VAR** vars, /**< variables to get strong branching values for */
1353  int nvars, /**< number of variables */
1354  int itlim, /**< iteration limit for strong branchings */
1355  SCIP_Real* down, /**< stores dual bounds after branching variables down */
1356  SCIP_Real* up, /**< stores dual bounds after branching variables up */
1357  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1358  * otherwise, they can only be used as an estimate value */
1359  SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1360  * otherwise, they can only be used as an estimate value */
1361  SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1362  SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1363  SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1364  * infeasible downward branches, or NULL */
1365  SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1366  * infeasible upward branches, or NULL */
1367  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1368  * solving process should be stopped (e.g., due to a time limit) */
1369  );
1370 
1371 /** get LP solution status of last strong branching call (currently only works for strong branching with propagation) */
1372 SCIP_EXPORT
1374  SCIP* scip, /**< SCIP data structure */
1375  SCIP_BRANCHDIR branchdir /**< branching direction for which LP solution status is requested */
1376  );
1377 
1378 /** gets strong branching information on COLUMN variable of the last SCIPgetVarStrongbranch() call;
1379  * returns values of SCIP_INVALID, if strong branching was not yet called on the given variable;
1380  * keep in mind, that the returned old values may have nothing to do with the current LP solution
1381  *
1382  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1383  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1384  *
1385  * @pre This method can be called if @p scip is in one of the following stages:
1386  * - \ref SCIP_STAGE_SOLVING
1387  * - \ref SCIP_STAGE_SOLVED
1388  */
1389 SCIP_EXPORT
1391  SCIP* scip, /**< SCIP data structure */
1392  SCIP_VAR* var, /**< variable to get last strong branching values for */
1393  SCIP_Real* down, /**< stores dual bound after branching column down, or NULL */
1394  SCIP_Real* up, /**< stores dual bound after branching column up, or NULL */
1395  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1396  * otherwise, it can only be used as an estimate value */
1397  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1398  * otherwise, it can only be used as an estimate value */
1399  SCIP_Real* solval, /**< stores LP solution value of variable at last strong branching call, or NULL */
1400  SCIP_Real* lpobjval /**< stores LP objective value at last strong branching call, or NULL */
1401  );
1402 
1403 /** sets strong branching information for a column variable
1404  *
1405  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1406  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1407  *
1408  * @pre This method can be called if @p scip is in one of the following stages:
1409  * - \ref SCIP_STAGE_SOLVING
1410  */
1411 SCIP_EXPORT
1413  SCIP* scip, /**< SCIP data structure */
1414  SCIP_VAR* var, /**< variable to set last strong branching values for */
1415  SCIP_Real lpobjval, /**< objective value of the current LP */
1416  SCIP_Real primsol, /**< primal solution value of the column in the current LP */
1417  SCIP_Real down, /**< dual bound after branching column down */
1418  SCIP_Real up, /**< dual bound after branching column up */
1419  SCIP_Bool downvalid, /**< is the returned down value a valid dual bound? */
1420  SCIP_Bool upvalid, /**< is the returned up value a valid dual bound? */
1421  SCIP_Longint iter, /**< total number of strong branching iterations */
1422  int itlim /**< iteration limit applied to the strong branching call */
1423  );
1424 
1425 /** rounds the current solution and tries it afterwards; if feasible, adds it to storage
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_SOLVING
1432  */
1433 SCIP_EXPORT
1435  SCIP* scip, /**< SCIP data structure */
1436  SCIP_Bool* foundsol, /**< stores whether solution was feasible and good enough to keep */
1437  SCIP_Bool* cutoff /**< stores whether solution was cutoff due to exceeding the cutoffbound */
1438  );
1439 
1440 /** gets node number of the last node in current branch and bound run, where strong branching was used on the
1441  * given variable, or -1 if strong branching was never applied to the variable in current run
1442  *
1443  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1444  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1445  *
1446  * @pre This method can be called if @p scip is in one of the following stages:
1447  * - \ref SCIP_STAGE_TRANSFORMING
1448  * - \ref SCIP_STAGE_TRANSFORMED
1449  * - \ref SCIP_STAGE_INITPRESOLVE
1450  * - \ref SCIP_STAGE_PRESOLVING
1451  * - \ref SCIP_STAGE_EXITPRESOLVE
1452  * - \ref SCIP_STAGE_PRESOLVED
1453  * - \ref SCIP_STAGE_INITSOLVE
1454  * - \ref SCIP_STAGE_SOLVING
1455  * - \ref SCIP_STAGE_SOLVED
1456  * - \ref SCIP_STAGE_EXITSOLVE
1457  */
1458 SCIP_EXPORT
1460  SCIP* scip, /**< SCIP data structure */
1461  SCIP_VAR* var /**< variable to get last strong branching node for */
1462  );
1463 
1464 /** if strong branching was already applied on the variable at the current node, returns the number of LPs solved after
1465  * the LP where the strong branching on this variable was applied;
1466  * if strong branching was not yet applied on the variable at the current node, returns INT_MAX
1467  *
1468  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1469  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1470  *
1471  * @pre This method can be called if @p scip is in one of the following stages:
1472  * - \ref SCIP_STAGE_TRANSFORMING
1473  * - \ref SCIP_STAGE_TRANSFORMED
1474  * - \ref SCIP_STAGE_INITPRESOLVE
1475  * - \ref SCIP_STAGE_PRESOLVING
1476  * - \ref SCIP_STAGE_EXITPRESOLVE
1477  * - \ref SCIP_STAGE_PRESOLVED
1478  * - \ref SCIP_STAGE_INITSOLVE
1479  * - \ref SCIP_STAGE_SOLVING
1480  * - \ref SCIP_STAGE_SOLVED
1481  * - \ref SCIP_STAGE_EXITSOLVE
1482  */
1483 SCIP_EXPORT
1485  SCIP* scip, /**< SCIP data structure */
1486  SCIP_VAR* var /**< variable to get strong branching LP age for */
1487  );
1488 
1489 /** gets number of times, strong branching was applied in current run on the given variable
1490  *
1491  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1492  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1493  *
1494  * @pre This method can be called if @p scip is in one of the following stages:
1495  * - \ref SCIP_STAGE_TRANSFORMING
1496  * - \ref SCIP_STAGE_TRANSFORMED
1497  * - \ref SCIP_STAGE_INITPRESOLVE
1498  * - \ref SCIP_STAGE_PRESOLVING
1499  * - \ref SCIP_STAGE_EXITPRESOLVE
1500  * - \ref SCIP_STAGE_PRESOLVED
1501  * - \ref SCIP_STAGE_INITSOLVE
1502  * - \ref SCIP_STAGE_SOLVING
1503  * - \ref SCIP_STAGE_SOLVED
1504  * - \ref SCIP_STAGE_EXITSOLVE
1505  */
1506 SCIP_EXPORT
1508  SCIP* scip, /**< SCIP data structure */
1509  SCIP_VAR* var /**< variable to get last strong branching node for */
1510  );
1511 
1512 /** adds given values to lock numbers of type @p locktype of variable for rounding
1513  *
1514  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1515  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1516  *
1517  * @pre This method can be called if @p scip is in one of the following stages:
1518  * - \ref SCIP_STAGE_PROBLEM
1519  * - \ref SCIP_STAGE_TRANSFORMING
1520  * - \ref SCIP_STAGE_TRANSFORMED
1521  * - \ref SCIP_STAGE_INITPRESOLVE
1522  * - \ref SCIP_STAGE_PRESOLVING
1523  * - \ref SCIP_STAGE_EXITPRESOLVE
1524  * - \ref SCIP_STAGE_PRESOLVED
1525  * - \ref SCIP_STAGE_INITSOLVE
1526  * - \ref SCIP_STAGE_SOLVING
1527  * - \ref SCIP_STAGE_EXITSOLVE
1528  * - \ref SCIP_STAGE_FREETRANS
1529  */
1530 SCIP_EXPORT
1532  SCIP* scip, /**< SCIP data structure */
1533  SCIP_VAR* var, /**< problem variable */
1534  SCIP_LOCKTYPE locktype, /**< type of the variable locks */
1535  int nlocksdown, /**< modification in number of rounding down locks */
1536  int nlocksup /**< modification in number of rounding up locks */
1537  );
1538 
1539 
1540 /** adds given values to lock numbers of variable for rounding
1541  *
1542  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1543  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1544  *
1545  * @pre This method can be called if @p scip is in one of the following stages:
1546  * - \ref SCIP_STAGE_PROBLEM
1547  * - \ref SCIP_STAGE_TRANSFORMING
1548  * - \ref SCIP_STAGE_TRANSFORMED
1549  * - \ref SCIP_STAGE_INITPRESOLVE
1550  * - \ref SCIP_STAGE_PRESOLVING
1551  * - \ref SCIP_STAGE_EXITPRESOLVE
1552  * - \ref SCIP_STAGE_PRESOLVED
1553  * - \ref SCIP_STAGE_INITSOLVE
1554  * - \ref SCIP_STAGE_SOLVING
1555  * - \ref SCIP_STAGE_EXITSOLVE
1556  * - \ref SCIP_STAGE_FREETRANS
1557  *
1558  * @note This method will always add variable locks of type model
1559  */
1560 SCIP_EXPORT
1562  SCIP* scip, /**< SCIP data structure */
1563  SCIP_VAR* var, /**< problem variable */
1564  int nlocksdown, /**< modification in number of rounding down locks */
1565  int nlocksup /**< modification in number of rounding up locks */
1566  );
1567 
1568 
1569 /** add locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1570  * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1571  * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1572  * added or removed
1573  *
1574  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1575  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1576  *
1577  * @pre This method can be called if @p scip is in one of the following stages:
1578  * - \ref SCIP_STAGE_PROBLEM
1579  * - \ref SCIP_STAGE_TRANSFORMING
1580  * - \ref SCIP_STAGE_INITPRESOLVE
1581  * - \ref SCIP_STAGE_PRESOLVING
1582  * - \ref SCIP_STAGE_EXITPRESOLVE
1583  * - \ref SCIP_STAGE_INITSOLVE
1584  * - \ref SCIP_STAGE_SOLVING
1585  * - \ref SCIP_STAGE_EXITSOLVE
1586  * - \ref SCIP_STAGE_FREETRANS
1587  */
1588 SCIP_EXPORT
1590  SCIP* scip, /**< SCIP data structure */
1591  SCIP_VAR* var, /**< problem variable */
1592  SCIP_CONS* cons, /**< constraint */
1593  SCIP_Bool lockdown, /**< should the rounding be locked in downwards direction? */
1594  SCIP_Bool lockup /**< should the rounding be locked in upwards direction? */
1595  );
1596 
1597 /** remove locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1598  * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1599  * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1600  * added or removed
1601  *
1602  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1603  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1604  *
1605  * @pre This method can be called if @p scip is in one of the following stages:
1606  * - \ref SCIP_STAGE_PROBLEM
1607  * - \ref SCIP_STAGE_TRANSFORMING
1608  * - \ref SCIP_STAGE_INITPRESOLVE
1609  * - \ref SCIP_STAGE_PRESOLVING
1610  * - \ref SCIP_STAGE_EXITPRESOLVE
1611  * - \ref SCIP_STAGE_INITSOLVE
1612  * - \ref SCIP_STAGE_SOLVING
1613  * - \ref SCIP_STAGE_EXITSOLVE
1614  * - \ref SCIP_STAGE_FREETRANS
1615  */
1616 SCIP_EXPORT
1618  SCIP* scip, /**< SCIP data structure */
1619  SCIP_VAR* var, /**< problem variable */
1620  SCIP_CONS* cons, /**< constraint */
1621  SCIP_Bool lockdown, /**< should the rounding be unlocked in downwards direction? */
1622  SCIP_Bool lockup /**< should the rounding be unlocked in upwards direction? */
1623  );
1624 
1625 /** changes variable's objective value
1626  *
1627  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1628  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1629  *
1630  * @pre This method can be called if @p scip is in one of the following stages:
1631  * - \ref SCIP_STAGE_PROBLEM
1632  * - \ref SCIP_STAGE_TRANSFORMING
1633  * - \ref SCIP_STAGE_PRESOLVING
1634  */
1635 SCIP_EXPORT
1637  SCIP* scip, /**< SCIP data structure */
1638  SCIP_VAR* var, /**< variable to change the objective value for */
1639  SCIP_Real newobj /**< new objective value */
1640  );
1641 
1642 /** adds value to variable's objective value
1643  *
1644  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1645  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1646  *
1647  * @pre This method can be called if @p scip is in one of the following stages:
1648  * - \ref SCIP_STAGE_PROBLEM
1649  * - \ref SCIP_STAGE_TRANSFORMING
1650  * - \ref SCIP_STAGE_PRESOLVING
1651  * - \ref SCIP_STAGE_EXITPRESOLVE
1652  * - \ref SCIP_STAGE_PRESOLVED
1653  */
1654 SCIP_EXPORT
1656  SCIP* scip, /**< SCIP data structure */
1657  SCIP_VAR* var, /**< variable to change the objective value for */
1658  SCIP_Real addobj /**< additional objective value */
1659  );
1660 
1661 /** returns the adjusted (i.e. rounded, if the given variable is of integral type) lower bound value;
1662  * does not change the bounds of the variable
1663  *
1664  * @return adjusted lower bound for the given variable; the bound of the variable is not changed
1665  *
1666  * @pre This method can be called if @p scip is in one of the following stages:
1667  * - \ref SCIP_STAGE_PROBLEM
1668  * - \ref SCIP_STAGE_TRANSFORMING
1669  * - \ref SCIP_STAGE_TRANSFORMED
1670  * - \ref SCIP_STAGE_INITPRESOLVE
1671  * - \ref SCIP_STAGE_PRESOLVING
1672  * - \ref SCIP_STAGE_EXITPRESOLVE
1673  * - \ref SCIP_STAGE_PRESOLVED
1674  * - \ref SCIP_STAGE_INITSOLVE
1675  * - \ref SCIP_STAGE_SOLVING
1676  * - \ref SCIP_STAGE_SOLVED
1677  * - \ref SCIP_STAGE_EXITSOLVE
1678  * - \ref SCIP_STAGE_FREETRANS
1679  */
1680 SCIP_EXPORT
1682  SCIP* scip, /**< SCIP data structure */
1683  SCIP_VAR* var, /**< variable to adjust the bound for */
1684  SCIP_Real lb /**< lower bound value to adjust */
1685  );
1686 
1687 /** returns the adjusted (i.e. rounded, if the given variable is of integral type) upper bound value;
1688  * does not change the bounds of the variable
1689  *
1690  * @return adjusted upper bound for the given variable; the bound of the variable is not changed
1691  *
1692  * @pre This method can be called if @p scip is in one of the following stages:
1693  * - \ref SCIP_STAGE_PROBLEM
1694  * - \ref SCIP_STAGE_TRANSFORMING
1695  * - \ref SCIP_STAGE_TRANSFORMED
1696  * - \ref SCIP_STAGE_INITPRESOLVE
1697  * - \ref SCIP_STAGE_PRESOLVING
1698  * - \ref SCIP_STAGE_EXITPRESOLVE
1699  * - \ref SCIP_STAGE_PRESOLVED
1700  * - \ref SCIP_STAGE_INITSOLVE
1701  * - \ref SCIP_STAGE_SOLVING
1702  * - \ref SCIP_STAGE_SOLVED
1703  * - \ref SCIP_STAGE_EXITSOLVE
1704  * - \ref SCIP_STAGE_FREETRANS
1705  */
1706 SCIP_EXPORT
1708  SCIP* scip, /**< SCIP data structure */
1709  SCIP_VAR* var, /**< variable to adjust the bound for */
1710  SCIP_Real ub /**< upper bound value to adjust */
1711  );
1712 
1713 /** depending on SCIP's stage, changes lower bound of variable in the problem, in preprocessing, or in current node;
1714  * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1715  * that in conflict analysis, this change is treated like a branching decision
1716  *
1717  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1718  * SCIPgetVars()) gets resorted.
1719  *
1720  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1721  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1722  *
1723  * @pre This method can be called if @p scip is in one of the following stages:
1724  * - \ref SCIP_STAGE_PROBLEM
1725  * - \ref SCIP_STAGE_TRANSFORMING
1726  * - \ref SCIP_STAGE_PRESOLVING
1727  * - \ref SCIP_STAGE_SOLVING
1728  *
1729  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1730  */
1731 SCIP_EXPORT
1733  SCIP* scip, /**< SCIP data structure */
1734  SCIP_VAR* var, /**< variable to change the bound for */
1735  SCIP_Real newbound /**< new value for bound */
1736  );
1737 
1738 /** depending on SCIP's stage, changes upper bound of variable in the problem, in preprocessing, or in current node;
1739  * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1740  * that in conflict analysis, this change is treated like a branching decision
1741  *
1742  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1743  * SCIPgetVars()) gets resorted.
1744  *
1745  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1746  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1747  *
1748  * @pre This method can be called if @p scip is in one of the following stages:
1749  * - \ref SCIP_STAGE_PROBLEM
1750  * - \ref SCIP_STAGE_TRANSFORMING
1751  * - \ref SCIP_STAGE_PRESOLVING
1752  * - \ref SCIP_STAGE_SOLVING
1753  *
1754  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1755  */
1756 SCIP_EXPORT
1758  SCIP* scip, /**< SCIP data structure */
1759  SCIP_VAR* var, /**< variable to change the bound for */
1760  SCIP_Real newbound /**< new value for bound */
1761  );
1762 
1763 /** changes lower bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
1764  * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
1765  * decision
1766  *
1767  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1768  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1769  *
1770  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1771  */
1772 SCIP_EXPORT
1774  SCIP* scip, /**< SCIP data structure */
1775  SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
1776  SCIP_VAR* var, /**< variable to change the bound for */
1777  SCIP_Real newbound /**< new value for bound */
1778  );
1779 
1780 /** changes upper bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
1781  * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
1782  * decision
1783  *
1784  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1785  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1786  *
1787  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1788  */
1789 SCIP_EXPORT
1791  SCIP* scip, /**< SCIP data structure */
1792  SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
1793  SCIP_VAR* var, /**< variable to change the bound for */
1794  SCIP_Real newbound /**< new value for bound */
1795  );
1796 
1797 /** changes global lower bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
1798  * if the global bound is better than the local bound
1799  *
1800  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1801  * SCIPgetVars()) gets resorted.
1802  *
1803  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1804  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1805  *
1806  * @pre This method can be called if @p scip is in one of the following stages:
1807  * - \ref SCIP_STAGE_PROBLEM
1808  * - \ref SCIP_STAGE_TRANSFORMING
1809  * - \ref SCIP_STAGE_TRANSFORMED
1810  * - \ref SCIP_STAGE_PRESOLVING
1811  * - \ref SCIP_STAGE_SOLVING
1812  *
1813  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1814  */
1815 SCIP_EXPORT
1817  SCIP* scip, /**< SCIP data structure */
1818  SCIP_VAR* var, /**< variable to change the bound for */
1819  SCIP_Real newbound /**< new value for bound */
1820  );
1821 
1822 /** changes global upper bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
1823  * if the global bound is better than the local bound
1824  *
1825  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1826  * SCIPgetVars()) gets resorted.
1827  *
1828  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1829  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1830  *
1831  * @pre This method can be called if @p scip is in one of the following stages:
1832  * - \ref SCIP_STAGE_PROBLEM
1833  * - \ref SCIP_STAGE_TRANSFORMING
1834  * - \ref SCIP_STAGE_TRANSFORMED
1835  * - \ref SCIP_STAGE_PRESOLVING
1836  * - \ref SCIP_STAGE_SOLVING
1837  *
1838  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1839  */
1840 SCIP_EXPORT
1842  SCIP* scip, /**< SCIP data structure */
1843  SCIP_VAR* var, /**< variable to change the bound for */
1844  SCIP_Real newbound /**< new value for bound */
1845  );
1846 
1847 /** changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet
1848  *
1849  * Lazy bounds are bounds that are already enforced by constraints and the objective function.
1850  * Setting a lazy lower bound has the consequence that for variables which lower bound equals the lazy lower bound,
1851  * the lower bound does not need to be passed on to the LP solver.
1852  * This is especially useful in a column generation (branch-and-price) setting.
1853  *
1854  * @attention If the variable has a global lower bound below lazylb, then the global lower bound is tightened to
1855  * lazylb by a call to SCIPchgVarLbGlobal().
1856  *
1857  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1858  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1859  *
1860  * @pre This method can be called if @p scip is in one of the following stages:
1861  * - \ref SCIP_STAGE_PROBLEM
1862  * - \ref SCIP_STAGE_TRANSFORMING
1863  * - \ref SCIP_STAGE_TRANSFORMED
1864  * - \ref SCIP_STAGE_PRESOLVING
1865  * - \ref SCIP_STAGE_SOLVING
1866  */
1867 SCIP_EXPORT
1869  SCIP* scip, /**< SCIP data structure */
1870  SCIP_VAR* var, /**< problem variable */
1871  SCIP_Real lazylb /**< the lazy lower bound to be set */
1872  );
1873 
1874 /** changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet
1875  *
1876  * Lazy bounds are bounds that are already enforced by constraints and the objective function.
1877  * Setting a lazy upper bound has the consequence that for variables which upper bound equals the lazy upper bound,
1878  * the upper bound does not need to be passed on to the LP solver.
1879  * This is especially useful in a column generation (branch-and-price) setting.
1880  *
1881  * @attention If the variable has a global upper bound above lazyub, then the global upper bound is tightened to
1882  * lazyub by a call to SCIPchgVarUbGlobal().
1883  *
1884  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1885  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1886  *
1887  * @pre This method can be called if @p scip is in one of the following stages:
1888  * - \ref SCIP_STAGE_PROBLEM
1889  * - \ref SCIP_STAGE_TRANSFORMING
1890  * - \ref SCIP_STAGE_TRANSFORMED
1891  * - \ref SCIP_STAGE_PRESOLVING
1892  * - \ref SCIP_STAGE_SOLVING
1893  */
1894 SCIP_EXPORT
1896  SCIP* scip, /**< SCIP data structure */
1897  SCIP_VAR* var, /**< problem variable */
1898  SCIP_Real lazyub /**< the lazy lower bound to be set */
1899  );
1900 
1901 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
1902  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1903  * doesn't store any inference information in the bound change, such that in conflict analysis, this change
1904  * is treated like a branching decision
1905  *
1906  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1907  * SCIPgetVars()) gets resorted.
1908  *
1909  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1910  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1911  *
1912  * @pre This method can be called if @p scip is in one of the following stages:
1913  * - \ref SCIP_STAGE_PROBLEM
1914  * - \ref SCIP_STAGE_PRESOLVING
1915  * - \ref SCIP_STAGE_SOLVING
1916  *
1917  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1918  */
1919 SCIP_EXPORT
1921  SCIP* scip, /**< SCIP data structure */
1922  SCIP_VAR* var, /**< variable to change the bound for */
1923  SCIP_Real newbound, /**< new value for bound */
1924  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1925  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
1926  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1927  );
1928 
1929 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
1930  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1931  * doesn't store any inference information in the bound change, such that in conflict analysis, this change
1932  * is treated like a branching decision
1933  *
1934  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1935  * SCIPgetVars()) gets resorted.
1936  *
1937  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1938  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1939  *
1940  * @pre This method can be called if @p scip is in one of the following stages:
1941  * - \ref SCIP_STAGE_PROBLEM
1942  * - \ref SCIP_STAGE_PRESOLVING
1943  * - \ref SCIP_STAGE_SOLVING
1944  *
1945  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1946  */
1947 SCIP_EXPORT
1949  SCIP* scip, /**< SCIP data structure */
1950  SCIP_VAR* var, /**< variable to change the bound for */
1951  SCIP_Real newbound, /**< new value for bound */
1952  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1953  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
1954  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1955  );
1956 
1957 /** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
1958  * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
1959  * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
1960  *
1961  * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
1962  * changes first the lowerbound by calling SCIPinferVarLbCons and second the upperbound by calling
1963  * SCIPinferVarUbCons
1964  *
1965  * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
1966  * SCIPgetVars()) gets resorted.
1967  *
1968  * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
1969  */
1970 SCIP_EXPORT
1972  SCIP* scip, /**< SCIP data structure */
1973  SCIP_VAR* var, /**< variable to change the bound for */
1974  SCIP_Real fixedval, /**< new value for fixation */
1975  SCIP_CONS* infercons, /**< constraint that deduced the bound change */
1976  int inferinfo, /**< user information for inference to help resolving the conflict */
1977  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1978  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
1979  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1980  );
1981 
1982 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
1983  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1984  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
1985  * for the deduction of the bound change
1986  *
1987  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1988  * SCIPgetVars()) gets resorted.
1989  *
1990  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1991  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1992  *
1993  * @pre This method can be called if @p scip is in one of the following stages:
1994  * - \ref SCIP_STAGE_PROBLEM
1995  * - \ref SCIP_STAGE_PRESOLVING
1996  * - \ref SCIP_STAGE_SOLVING
1997  *
1998  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1999  */
2000 SCIP_EXPORT
2002  SCIP* scip, /**< SCIP data structure */
2003  SCIP_VAR* var, /**< variable to change the bound for */
2004  SCIP_Real newbound, /**< new value for bound */
2005  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
2006  int inferinfo, /**< user information for inference to help resolving the conflict */
2007  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2008  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2009  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2010  );
2011 
2012 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2013  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2014  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2015  * for the deduction of the bound change
2016  *
2017  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2018  * SCIPgetVars()) gets resorted.
2019  *
2020  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2021  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2022  *
2023  * @pre This method can be called if @p scip is in one of the following stages:
2024  * - \ref SCIP_STAGE_PROBLEM
2025  * - \ref SCIP_STAGE_PRESOLVING
2026  * - \ref SCIP_STAGE_SOLVING
2027  *
2028  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2029  */
2030 SCIP_EXPORT
2032  SCIP* scip, /**< SCIP data structure */
2033  SCIP_VAR* var, /**< variable to change the bound for */
2034  SCIP_Real newbound, /**< new value for bound */
2035  SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2036  int inferinfo, /**< user information for inference to help resolving the conflict */
2037  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2038  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2039  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2040  );
2041 
2042 /** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2043  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason for the
2044  * deduction of the fixing
2045  *
2046  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2047  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2048  *
2049  * @pre This method can be called if @p scip is in one of the following stages:
2050  * - \ref SCIP_STAGE_PROBLEM
2051  * - \ref SCIP_STAGE_PRESOLVING
2052  * - \ref SCIP_STAGE_SOLVING
2053  */
2054 SCIP_EXPORT
2056  SCIP* scip, /**< SCIP data structure */
2057  SCIP_VAR* var, /**< binary variable to fix */
2058  SCIP_Bool fixedval, /**< value to fix binary variable to */
2059  SCIP_CONS* infercons, /**< constraint that deduced the fixing */
2060  int inferinfo, /**< user information for inference to help resolving the conflict */
2061  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2062  SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2063  );
2064 
2065 /** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
2066  * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
2067  * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
2068  *
2069  * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
2070  * changes first the lowerbound by calling SCIPinferVarLbProp and second the upperbound by calling
2071  * SCIPinferVarUbProp
2072  *
2073  * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
2074  * SCIPgetVars()) gets resorted.
2075  *
2076  * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
2077  */
2078 SCIP_EXPORT
2080  SCIP* scip, /**< SCIP data structure */
2081  SCIP_VAR* var, /**< variable to change the bound for */
2082  SCIP_Real fixedval, /**< new value for fixation */
2083  SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2084  int inferinfo, /**< user information for inference to help resolving the conflict */
2085  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2086  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2087  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2088  );
2089 
2090 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2091  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2092  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2093  * for the deduction of the bound change
2094  *
2095  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2096  * SCIPgetVars()) gets resorted.
2097  *
2098  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2099  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2100  *
2101  * @pre This method can be called if @p scip is in one of the following stages:
2102  * - \ref SCIP_STAGE_PROBLEM
2103  * - \ref SCIP_STAGE_PRESOLVING
2104  * - \ref SCIP_STAGE_SOLVING
2105  *
2106  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2107  */
2108 SCIP_EXPORT
2110  SCIP* scip, /**< SCIP data structure */
2111  SCIP_VAR* var, /**< variable to change the bound for */
2112  SCIP_Real newbound, /**< new value for bound */
2113  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
2114  int inferinfo, /**< user information for inference to help resolving the conflict */
2115  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2116  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2117  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2118  );
2119 
2120 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2121  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2122  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2123  * for the deduction of the bound change
2124  *
2125  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2126  * SCIPgetVars()) gets resorted.
2127  *
2128  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2129  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2130  *
2131  * @pre This method can be called if @p scip is in one of the following stages:
2132  * - \ref SCIP_STAGE_PROBLEM
2133  * - \ref SCIP_STAGE_PRESOLVING
2134  * - \ref SCIP_STAGE_SOLVING
2135  *
2136  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2137  */
2138 SCIP_EXPORT
2140  SCIP* scip, /**< SCIP data structure */
2141  SCIP_VAR* var, /**< variable to change the bound for */
2142  SCIP_Real newbound, /**< new value for bound */
2143  SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2144  int inferinfo, /**< user information for inference to help resolving the conflict */
2145  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2146  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2147  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2148  );
2149 
2150 /** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2151  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason for the
2152  * deduction of the fixing
2153  *
2154  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2155  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2156  *
2157  * @pre This method can be called if @p scip is in one of the following stages:
2158  * - \ref SCIP_STAGE_PROBLEM
2159  * - \ref SCIP_STAGE_PRESOLVING
2160  * - \ref SCIP_STAGE_PRESOLVED
2161  * - \ref SCIP_STAGE_SOLVING
2162  */
2163 SCIP_EXPORT
2165  SCIP* scip, /**< SCIP data structure */
2166  SCIP_VAR* var, /**< binary variable to fix */
2167  SCIP_Bool fixedval, /**< value to fix binary variable to */
2168  SCIP_PROP* inferprop, /**< propagator that deduced the fixing */
2169  int inferinfo, /**< user information for inference to help resolving the conflict */
2170  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2171  SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2172  );
2173 
2174 /** changes global lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2175  * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2176  * also tightens the local bound, if the global bound is better than the local bound
2177  *
2178  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2179  * SCIPgetVars()) gets resorted.
2180  *
2181  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2182  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2183  *
2184  * @pre This method can be called if @p scip is in one of the following stages:
2185  * - \ref SCIP_STAGE_PROBLEM
2186  * - \ref SCIP_STAGE_TRANSFORMING
2187  * - \ref SCIP_STAGE_PRESOLVING
2188  * - \ref SCIP_STAGE_SOLVING
2189  *
2190  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2191  */
2192 SCIP_EXPORT
2194  SCIP* scip, /**< SCIP data structure */
2195  SCIP_VAR* var, /**< variable to change the bound for */
2196  SCIP_Real newbound, /**< new value for bound */
2197  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2198  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2199  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2200  );
2201 
2202 /** changes global upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2203  * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2204  * also tightens the local bound, if the global bound is better than the local bound
2205  *
2206  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2207  * SCIPgetVars()) gets resorted.
2208  *
2209  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2210  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2211  *
2212  * @pre This method can be called if @p scip is in one of the following stages:
2213  * - \ref SCIP_STAGE_PROBLEM
2214  * - \ref SCIP_STAGE_TRANSFORMING
2215  * - \ref SCIP_STAGE_PRESOLVING
2216  * - \ref SCIP_STAGE_SOLVING
2217  *
2218  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2219  */
2220 SCIP_EXPORT
2222  SCIP* scip, /**< SCIP data structure */
2223  SCIP_VAR* var, /**< variable to change the bound for */
2224  SCIP_Real newbound, /**< new value for bound */
2225  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2226  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2227  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2228  );
2229 
2230 /** for a multi-aggregated variable, returns the global lower bound computed by adding the global bounds from all aggregation variables
2231  *
2232  * This global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is not updated if bounds of aggregation variables are changing
2233  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbGlobal.
2234  *
2235  * @return the global lower bound computed by adding the global bounds from all aggregation variables
2236  */
2237 SCIP_EXPORT
2239  SCIP* scip, /**< SCIP data structure */
2240  SCIP_VAR* var /**< variable to compute the bound for */
2241  );
2242 
2243 /** for a multi-aggregated variable, returns the global upper bound computed by adding the global bounds from all aggregation variables
2244  *
2245  * This global bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is not updated if bounds of aggregation variables are changing
2246  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbGlobal.
2247  *
2248  * @return the global upper bound computed by adding the global bounds from all aggregation variables
2249  */
2250 SCIP_EXPORT
2252  SCIP* scip, /**< SCIP data structure */
2253  SCIP_VAR* var /**< variable to compute the bound for */
2254  );
2255 
2256 /** for a multi-aggregated variable, returns the local lower bound computed by adding the local bounds from all aggregation variables
2257  *
2258  * This local bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is not updated if bounds of aggregation variables are changing
2259  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbLocal.
2260  *
2261  * @return the local lower bound computed by adding the global bounds from all aggregation variables
2262  */
2263 SCIP_EXPORT
2265  SCIP* scip, /**< SCIP data structure */
2266  SCIP_VAR* var /**< variable to compute the bound for */
2267  );
2268 
2269 /** for a multi-aggregated variable, returns the local upper bound computed by adding the local bounds from all aggregation variables
2270  *
2271  * This local bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is not updated if bounds of aggregation variables are changing
2272  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbLocal.
2273  *
2274  * @return the local upper bound computed by adding the global bounds from all aggregation variables
2275  */
2276 SCIP_EXPORT
2278  SCIP* scip, /**< SCIP data structure */
2279  SCIP_VAR* var /**< variable to compute the bound for */
2280  );
2281 
2282 /** for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all
2283  * aggregation variables, this global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is
2284  * not updated if bounds of aggregation variables are changing
2285  *
2286  * calling this function for a non-multi-aggregated variable is not allowed
2287  */
2288 SCIP_EXPORT
2290  SCIP* scip, /**< SCIP data structure */
2291  SCIP_VAR* var /**< variable to compute the bound for */
2292  );
2293 
2294 /** for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all
2295  * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is
2296  * not updated if bounds of aggregation variables are changing
2297  *
2298  * calling this function for a non-multi-aggregated variable is not allowed
2299  */
2300 SCIP_EXPORT
2302  SCIP* scip, /**< SCIP data structure */
2303  SCIP_VAR* var /**< variable to compute the bound for */
2304  );
2305 
2306 /** for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all
2307  * aggregation variables, this lower bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is
2308  * not updated if bounds of aggregation variables are changing
2309  *
2310  * calling this function for a non-multi-aggregated variable is not allowed
2311  */
2312 SCIP_EXPORT
2314  SCIP* scip, /**< SCIP data structure */
2315  SCIP_VAR* var /**< variable to compute the bound for */
2316  );
2317 
2318 /** for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all
2319  * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is
2320  * not updated if bounds of aggregation variables are changing
2321  *
2322  * calling this function for a non-multi-aggregated variable is not allowed
2323  */
2324 SCIP_EXPORT
2326  SCIP* scip, /**< SCIP data structure */
2327  SCIP_VAR* var /**< variable to compute the bound for */
2328  );
2329 
2330 #ifdef NDEBUG
2331 
2332 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
2333  * speed up the algorithms.
2334  */
2335 
2336 #define SCIPcomputeVarLbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbGlobal(scip, var) : SCIPvarGetLbGlobal(var))
2337 #define SCIPcomputeVarUbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbGlobal(scip, var) : SCIPvarGetUbGlobal(var))
2338 #define SCIPcomputeVarLbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbLocal(scip, var) : SCIPvarGetLbLocal(var))
2339 #define SCIPcomputeVarUbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbLocal(scip, var) : SCIPvarGetUbLocal(var))
2340 
2341 #endif
2342 
2343 /** returns solution value and index of variable lower bound that is closest to the variable's value in the given primal
2344  * solution or current LP solution if no primal solution is given; returns an index of -1 if no variable lower bound is
2345  * available
2346  *
2347  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2348  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2349  *
2350  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2351  */
2352 SCIP_EXPORT
2354  SCIP* scip, /**< SCIP data structure */
2355  SCIP_VAR* var, /**< active problem variable */
2356  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2357  SCIP_Real* closestvlb, /**< pointer to store the value of the closest variable lower bound */
2358  int* closestvlbidx /**< pointer to store the index of the closest variable lower bound */
2359  );
2360 
2361 /** returns solution value and index of variable upper bound that is closest to the variable's value in the given primal solution;
2362  * or current LP solution if no primal solution is given; returns an index of -1 if no variable upper bound is available
2363  *
2364  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2365  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2366  *
2367  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2368  */
2369 SCIP_EXPORT
2371  SCIP* scip, /**< SCIP data structure */
2372  SCIP_VAR* var, /**< active problem variable */
2373  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2374  SCIP_Real* closestvub, /**< pointer to store the value of the closest variable lower bound */
2375  int* closestvubidx /**< pointer to store the index of the closest variable lower bound */
2376  );
2377 
2378 /** informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z;
2379  * if z is binary, the corresponding valid implication for z is also added;
2380  * if z is non-continuous and 1/b not too small, the corresponding valid upper/lower bound
2381  * z <= (x-d)/b or z >= (x-d)/b (depending on the sign of of b) is added, too;
2382  * improves the global bounds of the variable and the vlb variable if possible
2383  *
2384  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2385  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2386  *
2387  * @pre This method can be called if @p scip is in one of the following stages:
2388  * - \ref SCIP_STAGE_PRESOLVING
2389  * - \ref SCIP_STAGE_PRESOLVED
2390  * - \ref SCIP_STAGE_SOLVING
2391  */
2392 SCIP_EXPORT
2394  SCIP* scip, /**< SCIP data structure */
2395  SCIP_VAR* var, /**< problem variable */
2396  SCIP_VAR* vlbvar, /**< variable z in x >= b*z + d */
2397  SCIP_Real vlbcoef, /**< coefficient b in x >= b*z + d */
2398  SCIP_Real vlbconstant, /**< constant d in x >= b*z + d */
2399  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2400  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2401  );
2402 
2403 
2404 /** informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z;
2405  * if z is binary, the corresponding valid implication for z is also added;
2406  * if z is non-continuous and 1/b not too small, the corresponding valid lower/upper bound
2407  * z >= (x-d)/b or z <= (x-d)/b (depending on the sign of of b) is added, too;
2408  * improves the global bounds of the variable and the vlb variable if possible
2409  *
2410  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2411  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2412  *
2413  * @pre This method can be called if @p scip is in one of the following stages:
2414  * - \ref SCIP_STAGE_PRESOLVING
2415  * - \ref SCIP_STAGE_PRESOLVED
2416  * - \ref SCIP_STAGE_SOLVING
2417  */
2418 SCIP_EXPORT
2420  SCIP* scip, /**< SCIP data structure */
2421  SCIP_VAR* var, /**< problem variable */
2422  SCIP_VAR* vubvar, /**< variable z in x <= b*z + d */
2423  SCIP_Real vubcoef, /**< coefficient b in x <= b*z + d */
2424  SCIP_Real vubconstant, /**< constant d in x <= b*z + d */
2425  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2426  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2427  );
2428 
2429 /** informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b;
2430  * also adds the corresponding implication or variable bound to the implied variable;
2431  * if the implication is conflicting, the variable is fixed to the opposite value;
2432  * if the variable is already fixed to the given value, the implication is performed immediately;
2433  * if the implication is redundant with respect to the variables' global bounds, it is ignored
2434  *
2435  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2436  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2437  *
2438  * @pre This method can be called if @p scip is in one of the following stages:
2439  * - \ref SCIP_STAGE_TRANSFORMED
2440  * - \ref SCIP_STAGE_PRESOLVING
2441  * - \ref SCIP_STAGE_PRESOLVED
2442  * - \ref SCIP_STAGE_SOLVING
2443  */
2444 SCIP_EXPORT
2446  SCIP* scip, /**< SCIP data structure */
2447  SCIP_VAR* var, /**< problem variable */
2448  SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
2449  SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
2450  SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER)
2451  * or y >= b (SCIP_BOUNDTYPE_LOWER) */
2452  SCIP_Real implbound, /**< bound b in implication y <= b or y >= b */
2453  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2454  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2455  );
2456 
2457 /** adds a clique information to SCIP, stating that at most one of the given binary variables can be set to 1;
2458  * if a variable appears twice in the same clique, the corresponding implications are performed
2459  *
2460  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2461  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2462  *
2463  * @pre This method can be called if @p scip is in one of the following stages:
2464  * - \ref SCIP_STAGE_TRANSFORMED
2465  * - \ref SCIP_STAGE_PRESOLVING
2466  * - \ref SCIP_STAGE_PRESOLVED
2467  * - \ref SCIP_STAGE_SOLVING
2468  */
2469 SCIP_EXPORT
2471  SCIP* scip, /**< SCIP data structure */
2472  SCIP_VAR** vars, /**< binary variables in the clique from which at most one can be set to 1 */
2473  SCIP_Bool* values, /**< values of the variables in the clique; NULL to use TRUE for all vars */
2474  int nvars, /**< number of variables in the clique */
2475  SCIP_Bool isequation, /**< is the clique an equation or an inequality? */
2476  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2477  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2478  );
2479 
2480 /** calculates a partition of the given set of binary variables into cliques; takes into account independent clique components
2481  *
2482  * The algorithm performs the following steps:
2483  * - recomputes connected components of the clique table, if necessary
2484  * - computes a clique partition for every connected component greedily.
2485  * - relabels the resulting clique partition such that it satisfies the description below
2486  *
2487  * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2488  * were assigned to the same clique;
2489  * the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of
2490  * the preceding variables was assigned to clique i-1;
2491  * for each clique at most 1 variables can be set to TRUE in a feasible solution;
2492  *
2493  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2494  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2495  *
2496  * @pre This method can be called if @p scip is in one of the following stages:
2497  * - \ref SCIP_STAGE_INITPRESOLVE
2498  * - \ref SCIP_STAGE_PRESOLVING
2499  * - \ref SCIP_STAGE_EXITPRESOLVE
2500  * - \ref SCIP_STAGE_PRESOLVED
2501  * - \ref SCIP_STAGE_SOLVING
2502  */
2503 SCIP_EXPORT
2505  SCIP*const scip, /**< SCIP data structure */
2506  SCIP_VAR**const vars, /**< binary variables in the clique from which at most one can be set to 1 */
2507  int const nvars, /**< number of variables in the clique */
2508  int*const cliquepartition, /**< array of length nvars to store the clique partition */
2509  int*const ncliques /**< pointer to store the number of cliques actually contained in the partition */
2510  );
2511 
2512 /** calculates a partition of the given set of binary variables into negated cliques;
2513  * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2514  * were assigned to the same negated clique;
2515  * the first variable is always assigned to clique 0 and a variable can only be assigned to clique i if at least one of
2516  * the preceding variables was assigned to clique i-1;
2517  * for each clique with n_c variables at least n_c-1 variables can be set to TRUE in a feasible solution;
2518  *
2519  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2520  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2521  *
2522  * @pre This method can be called if @p scip is in one of the following stages:
2523  * - \ref SCIP_STAGE_INITPRESOLVE
2524  * - \ref SCIP_STAGE_PRESOLVING
2525  * - \ref SCIP_STAGE_EXITPRESOLVE
2526  * - \ref SCIP_STAGE_PRESOLVED
2527  * - \ref SCIP_STAGE_SOLVING
2528  */
2529 SCIP_EXPORT
2531  SCIP*const scip, /**< SCIP data structure */
2532  SCIP_VAR**const vars, /**< binary variables in the clique from which at most one can be set to 1 */
2533  int const nvars, /**< number of variables in the clique */
2534  int*const cliquepartition, /**< array of length nvars to store the clique partition */
2535  int*const ncliques /**< pointer to store the number of cliques actually contained in the partition */
2536  );
2537 
2538 /** force SCIP to clean up all cliques; cliques do not get automatically cleaned up after presolving. Use
2539  * this method to prevent inactive variables in cliques when retrieved via SCIPgetCliques()
2540  *
2541  * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
2542  *
2543  * @pre This method can be called if @p scip is in one of the following stages:
2544  * - \ref SCIP_STAGE_TRANSFORMED
2545  * - \ref SCIP_STAGE_INITPRESOLVE
2546  * - \ref SCIP_STAGE_PRESOLVING
2547  * - \ref SCIP_STAGE_EXITPRESOLVE
2548  * - \ref SCIP_STAGE_PRESOLVED
2549  * - \ref SCIP_STAGE_INITSOLVE
2550  * - \ref SCIP_STAGE_SOLVING
2551  * - \ref SCIP_STAGE_SOLVED
2552  * - \ref SCIP_STAGE_EXITSOLVE
2553  */
2554 SCIP_EXPORT
2556  SCIP* scip, /**< SCIP data structure */
2557  SCIP_Bool* infeasible /**< pointer to store if cleanup detected infeasibility */
2558  );
2559 
2560 /** gets the number of cliques in the clique table
2561  *
2562  * @return number of cliques in the clique table
2563  *
2564  * @pre This method can be called if @p scip is in one of the following stages:
2565  * - \ref SCIP_STAGE_TRANSFORMED
2566  * - \ref SCIP_STAGE_INITPRESOLVE
2567  * - \ref SCIP_STAGE_PRESOLVING
2568  * - \ref SCIP_STAGE_EXITPRESOLVE
2569  * - \ref SCIP_STAGE_PRESOLVED
2570  * - \ref SCIP_STAGE_INITSOLVE
2571  * - \ref SCIP_STAGE_SOLVING
2572  * - \ref SCIP_STAGE_SOLVED
2573  * - \ref SCIP_STAGE_EXITSOLVE
2574  */
2575 SCIP_EXPORT
2576 int SCIPgetNCliques(
2577  SCIP* scip /**< SCIP data structure */
2578  );
2579 
2580 /** gets the number of cliques created so far by the cliquetable
2581  *
2582  * @return number of cliques created so far by the cliquetable
2583  *
2584  * @pre This method can be called if @p scip is in one of the following stages:
2585  * - \ref SCIP_STAGE_TRANSFORMED
2586  * - \ref SCIP_STAGE_INITPRESOLVE
2587  * - \ref SCIP_STAGE_PRESOLVING
2588  * - \ref SCIP_STAGE_EXITPRESOLVE
2589  * - \ref SCIP_STAGE_PRESOLVED
2590  * - \ref SCIP_STAGE_INITSOLVE
2591  * - \ref SCIP_STAGE_SOLVING
2592  * - \ref SCIP_STAGE_SOLVED
2593  * - \ref SCIP_STAGE_EXITSOLVE
2594  */
2595 SCIP_EXPORT
2597  SCIP* scip /**< SCIP data structure */
2598  );
2599 
2600 /** gets the array of cliques in the clique table
2601  *
2602  * @return array of cliques in the clique table
2603  *
2604  * @pre This method can be called if @p scip is in one of the following stages:
2605  * - \ref SCIP_STAGE_TRANSFORMED
2606  * - \ref SCIP_STAGE_INITPRESOLVE
2607  * - \ref SCIP_STAGE_PRESOLVING
2608  * - \ref SCIP_STAGE_EXITPRESOLVE
2609  * - \ref SCIP_STAGE_PRESOLVED
2610  * - \ref SCIP_STAGE_INITSOLVE
2611  * - \ref SCIP_STAGE_SOLVING
2612  * - \ref SCIP_STAGE_SOLVED
2613  * - \ref SCIP_STAGE_EXITSOLVE
2614  */
2615 SCIP_EXPORT
2617  SCIP* scip /**< SCIP data structure */
2618  );
2619 
2620 /** returns whether there is a clique that contains both given variable/value pairs;
2621  * the variables must be active binary variables;
2622  * if regardimplics is FALSE, only the cliques in the clique table are looked at;
2623  * if regardimplics is TRUE, both the cliques and the implications of the implication graph are regarded
2624  *
2625  * @return TRUE, if there is a clique that contains both variable/clique pairs; FALSE, otherwise
2626  *
2627  * @pre This method can be called if @p scip is in one of the following stages:
2628  * - \ref SCIP_STAGE_TRANSFORMED
2629  * - \ref SCIP_STAGE_INITPRESOLVE
2630  * - \ref SCIP_STAGE_PRESOLVING
2631  * - \ref SCIP_STAGE_EXITPRESOLVE
2632  * - \ref SCIP_STAGE_PRESOLVED
2633  * - \ref SCIP_STAGE_INITSOLVE
2634  * - \ref SCIP_STAGE_SOLVING
2635  * - \ref SCIP_STAGE_SOLVED
2636  * - \ref SCIP_STAGE_EXITSOLVE
2637  *
2638  * @note a variable with it's negated variable are NOT! in a clique
2639  * @note a variable with itself are in a clique
2640  */
2641 SCIP_EXPORT
2643  SCIP* scip, /**< SCIP data structure */
2644  SCIP_VAR* var1, /**< first variable */
2645  SCIP_Bool value1, /**< value of first variable */
2646  SCIP_VAR* var2, /**< second variable */
2647  SCIP_Bool value2, /**< value of second variable */
2648  SCIP_Bool regardimplics /**< should the implication graph also be searched for a clique? */
2649  );
2650 
2651 /** writes the clique graph to a gml file
2652  *
2653  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2654  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2655  *
2656  * @pre This method can be called if @p scip is in one of the following stages:
2657  * - \ref SCIP_STAGE_TRANSFORMED
2658  * - \ref SCIP_STAGE_INITPRESOLVE
2659  * - \ref SCIP_STAGE_PRESOLVING
2660  * - \ref SCIP_STAGE_EXITPRESOLVE
2661  * - \ref SCIP_STAGE_PRESOLVED
2662  * - \ref SCIP_STAGE_INITSOLVE
2663  * - \ref SCIP_STAGE_SOLVING
2664  * - \ref SCIP_STAGE_SOLVED
2665  * - \ref SCIP_STAGE_EXITSOLVE
2666  *
2667  * @note there can be duplicated arcs in the output file
2668  *
2669  * If @p writenodeweights is true, only nodes corresponding to variables that have a fractional value and only edges
2670  * between such nodes are written.
2671  */
2672 SCIP_EXPORT
2674  SCIP* scip, /**< SCIP data structure */
2675  const char* fname, /**< name of file */
2676  SCIP_Bool writenodeweights /**< should we write weights of nodes? */
2677  );
2678 
2679 /** Removes (irrelevant) variable from all its global structures, i.e. cliques, implications and variable bounds.
2680  * This is an advanced method which should be used with care.
2681  *
2682  * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
2683  *
2684  * @pre This method can be called if @p scip is in one of the following stages:
2685  * - \ref SCIP_STAGE_TRANSFORMED
2686  * - \ref SCIP_STAGE_INITPRESOLVE
2687  * - \ref SCIP_STAGE_PRESOLVING
2688  * - \ref SCIP_STAGE_EXITPRESOLVE
2689  * - \ref SCIP_STAGE_PRESOLVED
2690  * - \ref SCIP_STAGE_INITSOLVE
2691  * - \ref SCIP_STAGE_SOLVING
2692  * - \ref SCIP_STAGE_SOLVED
2693  * - \ref SCIP_STAGE_EXITSOLVE
2694  */
2695 SCIP_EXPORT
2697  SCIP* scip, /**< SCIP data structure */
2698  SCIP_VAR* var /**< variable to remove from global structures */
2699  );
2700 
2701 /** sets the branch factor of the variable; this value can be used in the branching methods to scale the score
2702  * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
2703  *
2704  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2705  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2706  *
2707  * @pre This method can be called if @p scip is in one of the following stages:
2708  * - \ref SCIP_STAGE_PROBLEM
2709  * - \ref SCIP_STAGE_TRANSFORMING
2710  * - \ref SCIP_STAGE_TRANSFORMED
2711  * - \ref SCIP_STAGE_INITPRESOLVE
2712  * - \ref SCIP_STAGE_PRESOLVING
2713  * - \ref SCIP_STAGE_EXITPRESOLVE
2714  * - \ref SCIP_STAGE_PRESOLVED
2715  * - \ref SCIP_STAGE_SOLVING
2716  */
2717 SCIP_EXPORT
2719  SCIP* scip, /**< SCIP data structure */
2720  SCIP_VAR* var, /**< problem variable */
2721  SCIP_Real branchfactor /**< factor to weigh variable's branching score with */
2722  );
2723 
2724 /** scales the branch factor of the variable with the given value
2725  *
2726  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2727  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2728  *
2729  * @pre This method can be called if @p scip is in one of the following stages:
2730  * - \ref SCIP_STAGE_PROBLEM
2731  * - \ref SCIP_STAGE_TRANSFORMING
2732  * - \ref SCIP_STAGE_TRANSFORMED
2733  * - \ref SCIP_STAGE_INITPRESOLVE
2734  * - \ref SCIP_STAGE_PRESOLVING
2735  * - \ref SCIP_STAGE_EXITPRESOLVE
2736  * - \ref SCIP_STAGE_PRESOLVED
2737  * - \ref SCIP_STAGE_SOLVING
2738  */
2739 SCIP_EXPORT
2741  SCIP* scip, /**< SCIP data structure */
2742  SCIP_VAR* var, /**< problem variable */
2743  SCIP_Real scale /**< factor to scale variable's branching factor with */
2744  );
2745 
2746 /** adds the given value to the branch factor of the variable
2747  *
2748  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2749  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2750  *
2751  * @pre This method can be called if @p scip is in one of the following stages:
2752  * - \ref SCIP_STAGE_PROBLEM
2753  * - \ref SCIP_STAGE_TRANSFORMING
2754  * - \ref SCIP_STAGE_TRANSFORMED
2755  * - \ref SCIP_STAGE_INITPRESOLVE
2756  * - \ref SCIP_STAGE_PRESOLVING
2757  * - \ref SCIP_STAGE_EXITPRESOLVE
2758  * - \ref SCIP_STAGE_PRESOLVED
2759  * - \ref SCIP_STAGE_SOLVING
2760  */
2761 SCIP_EXPORT
2763  SCIP* scip, /**< SCIP data structure */
2764  SCIP_VAR* var, /**< problem variable */
2765  SCIP_Real addfactor /**< value to add to the branch factor of the variable */
2766  );
2767 
2768 /** sets the branch priority of the variable; variables with higher branch priority are always preferred to variables
2769  * with lower priority in selection of branching variable
2770  *
2771  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2772  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2773  *
2774  * @pre This method can be called if @p scip is in one of the following stages:
2775  * - \ref SCIP_STAGE_PROBLEM
2776  * - \ref SCIP_STAGE_TRANSFORMING
2777  * - \ref SCIP_STAGE_TRANSFORMED
2778  * - \ref SCIP_STAGE_INITPRESOLVE
2779  * - \ref SCIP_STAGE_PRESOLVING
2780  * - \ref SCIP_STAGE_EXITPRESOLVE
2781  * - \ref SCIP_STAGE_PRESOLVED
2782  * - \ref SCIP_STAGE_SOLVING
2783  *
2784  * @note the default branching priority is 0
2785  */
2786 SCIP_EXPORT
2788  SCIP* scip, /**< SCIP data structure */
2789  SCIP_VAR* var, /**< problem variable */
2790  int branchpriority /**< branch priority of the variable */
2791  );
2792 
2793 /** changes the branch priority of the variable to the given value, if it is larger than the current priority
2794  *
2795  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2796  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2797  *
2798  * @pre This method can be called if @p scip is in one of the following stages:
2799  * - \ref SCIP_STAGE_PROBLEM
2800  * - \ref SCIP_STAGE_TRANSFORMING
2801  * - \ref SCIP_STAGE_TRANSFORMED
2802  * - \ref SCIP_STAGE_INITPRESOLVE
2803  * - \ref SCIP_STAGE_PRESOLVING
2804  * - \ref SCIP_STAGE_EXITPRESOLVE
2805  * - \ref SCIP_STAGE_PRESOLVED
2806  * - \ref SCIP_STAGE_SOLVING
2807  */
2808 SCIP_EXPORT
2810  SCIP* scip, /**< SCIP data structure */
2811  SCIP_VAR* var, /**< problem variable */
2812  int branchpriority /**< new branch priority of the variable, if it is larger than current priority */
2813  );
2814 
2815 /** adds the given value to the branch priority of the variable
2816  *
2817  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2818  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2819  *
2820  * @pre This method can be called if @p scip is in one of the following stages:
2821  * - \ref SCIP_STAGE_PROBLEM
2822  * - \ref SCIP_STAGE_TRANSFORMING
2823  * - \ref SCIP_STAGE_TRANSFORMED
2824  * - \ref SCIP_STAGE_INITPRESOLVE
2825  * - \ref SCIP_STAGE_PRESOLVING
2826  * - \ref SCIP_STAGE_EXITPRESOLVE
2827  * - \ref SCIP_STAGE_PRESOLVED
2828  * - \ref SCIP_STAGE_SOLVING
2829  */
2830 SCIP_EXPORT
2832  SCIP* scip, /**< SCIP data structure */
2833  SCIP_VAR* var, /**< problem variable */
2834  int addpriority /**< value to add to the branch priority of the variable */
2835  );
2836 
2837 /** sets the branch direction of the variable (-1: prefer downwards branch, 0: automatic selection, +1: prefer upwards
2838  * branch)
2839  *
2840  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2841  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2842  *
2843  * @pre This method can be called if @p scip is in one of the following stages:
2844  * - \ref SCIP_STAGE_PROBLEM
2845  * - \ref SCIP_STAGE_TRANSFORMING
2846  * - \ref SCIP_STAGE_TRANSFORMED
2847  * - \ref SCIP_STAGE_INITPRESOLVE
2848  * - \ref SCIP_STAGE_PRESOLVING
2849  * - \ref SCIP_STAGE_EXITPRESOLVE
2850  * - \ref SCIP_STAGE_PRESOLVED
2851  * - \ref SCIP_STAGE_SOLVING
2852  */
2853 SCIP_EXPORT
2855  SCIP* scip, /**< SCIP data structure */
2856  SCIP_VAR* var, /**< problem variable */
2857  SCIP_BRANCHDIR branchdirection /**< preferred branch direction of the variable (downwards, upwards, auto) */
2858  );
2859 
2860 /** changes type of variable in the problem;
2861  *
2862  * @warning This type change might change the variable array returned from SCIPgetVars() and SCIPgetVarsData();
2863  *
2864  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2865  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2866  *
2867  * @pre This method can be called if @p scip is in one of the following stages:
2868  * - \ref SCIP_STAGE_PROBLEM
2869  * - \ref SCIP_STAGE_TRANSFORMING
2870  * - \ref SCIP_STAGE_PRESOLVING
2871  *
2872  * @note If SCIP is already beyond the SCIP_STAGE_PROBLEM and a original variable is passed, the variable type of the
2873  * corresponding transformed variable is changed; the type of the original variable does not change
2874  *
2875  * @note If the type changes from a continuous variable to a non-continuous variable the bounds of the variable get
2876  * adjusted w.r.t. to integrality information
2877  */
2878 SCIP_EXPORT
2880  SCIP* scip, /**< SCIP data structure */
2881  SCIP_VAR* var, /**< variable to change the bound for */
2882  SCIP_VARTYPE vartype, /**< new type of variable */
2883  SCIP_Bool* infeasible /**< pointer to store whether an infeasibility was detected (, due to
2884  * integrality condition of the new variable type) */
2885  );
2886 
2887 /** in problem creation and solving stage, both bounds of the variable are set to the given value;
2888  * in presolving stage, the variable is converted into a fixed variable, and bounds are changed respectively;
2889  * conversion into a fixed variable changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
2890  * and also renders arrays returned from the SCIPvarGetImpl...() methods invalid
2891  *
2892  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2893  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2894  *
2895  * @pre This method can be called if @p scip is in one of the following stages:
2896  * - \ref SCIP_STAGE_PROBLEM
2897  * - \ref SCIP_STAGE_PRESOLVING
2898  * - \ref SCIP_STAGE_SOLVING
2899  */
2900 SCIP_EXPORT
2902  SCIP* scip, /**< SCIP data structure */
2903  SCIP_VAR* var, /**< variable to fix */
2904  SCIP_Real fixedval, /**< value to fix variable to */
2905  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2906  SCIP_Bool* fixed /**< pointer to store whether the fixing was performed (variable was unfixed) */
2907  );
2908 
2909 /** From a given equality a*x + b*y == c, aggregates one of the variables and removes it from the set of
2910  * active problem variables. This changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
2911  * and also renders the arrays returned from the SCIPvarGetImpl...() methods for the two variables invalid.
2912  * In the first step, the equality is transformed into an equality with active problem variables
2913  * a'*x' + b'*y' == c'. If x' == y', this leads to the detection of redundancy if a' == -b' and c' == 0,
2914  * of infeasibility, if a' == -b' and c' != 0, or to a variable fixing x' == c'/(a'+b') (and possible
2915  * infeasibility) otherwise.
2916  * In the second step, the variable to be aggregated is chosen among x' and y', prefering a less strict variable
2917  * type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers
2918  * over integers, and integers over binaries). If none of the variables is continuous, it is tried to find an integer
2919  * aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to
2920  * the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by
2921  * aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
2922  *
2923  * The output flags have the following meaning:
2924  * - infeasible: the problem is infeasible
2925  * - redundant: the equality can be deleted from the constraint set
2926  * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
2927  *
2928  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2929  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2930  *
2931  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
2932  */
2933 SCIP_EXPORT
2935  SCIP* scip, /**< SCIP data structure */
2936  SCIP_VAR* varx, /**< variable x in equality a*x + b*y == c */
2937  SCIP_VAR* vary, /**< variable y in equality a*x + b*y == c */
2938  SCIP_Real scalarx, /**< multiplier a in equality a*x + b*y == c */
2939  SCIP_Real scalary, /**< multiplier b in equality a*x + b*y == c */
2940  SCIP_Real rhs, /**< right hand side c in equality a*x + b*y == c */
2941  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
2942  SCIP_Bool* redundant, /**< pointer to store whether the equality is (now) redundant */
2943  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
2944  );
2945 
2946 /** converts variable into multi-aggregated variable; this changes the variable array returned from
2947  * SCIPgetVars() and SCIPgetVarsData();
2948  *
2949  * @warning The integrality condition is not checked anymore on the multi-aggregated variable. You must not
2950  * multi-aggregate an integer variable without being sure, that integrality on the aggregation variables
2951  * implies integrality on the aggregated variable.
2952  *
2953  * The output flags have the following meaning:
2954  * - infeasible: the problem is infeasible
2955  * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
2956  *
2957  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2958  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2959  *
2960  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
2961  */
2962 SCIP_EXPORT
2964  SCIP* scip, /**< SCIP data structure */
2965  SCIP_VAR* var, /**< variable x to aggregate */
2966  int naggvars, /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2967  SCIP_VAR** aggvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2968  SCIP_Real* scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2969  SCIP_Real constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2970  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
2971  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
2972  );
2973 
2974 /** returns whether aggregation of variables is not allowed */
2975 SCIP_EXPORT
2977  SCIP* scip /**< SCIP data structure */
2978  );
2979 
2980 /** returns whether multi-aggregation is disabled */
2981 SCIP_EXPORT
2983  SCIP* scip /**< SCIP data structure */
2984  );
2985 
2986 /** returns whether variable is not allowed to be aggregated */
2987 SCIP_EXPORT
2989  SCIP* scip, /**< SCIP data structure */
2990  SCIP_VAR* var /**< variable x to aggregate */
2991  );
2992 
2993 /** returns whether variable is not allowed to be multi-aggregated */
2994 SCIP_EXPORT
2996  SCIP* scip, /**< SCIP data structure */
2997  SCIP_VAR* var /**< variable x to aggregate */
2998  );
2999 
3000 /** returns whether dual reductions are allowed during propagation and presolving
3001  *
3002  * @deprecated Please use SCIPallowStrongDualReds()
3003  */
3004 SCIP_EXPORT
3006  SCIP* scip /**< SCIP data structure */
3007  );
3008 
3009 /** returns whether strong dual reductions are allowed during propagation and presolving
3010  *
3011  * @note A reduction is called strong dual, if it may discard feasible/optimal solutions, but leaves at least one
3012  * optimal solution intact. Often such reductions are based on analyzing the objective function and variable
3013  * locks.
3014  */
3015 SCIP_EXPORT
3017  SCIP* scip /**< SCIP data structure */
3018  );
3019 
3020 /** returns whether propagation w.r.t. current objective is allowed
3021  *
3022  * @deprecated Please use SCIPallowWeakDualReds()
3023  */
3024 SCIP_EXPORT
3026  SCIP* scip /**< SCIP data structure */
3027  );
3028 
3029 /** returns whether weak dual reductions are allowed during propagation and presolving
3030  *
3031  * @note A reduction is called weak dual, if it may discard feasible solutions, but leaves at all optimal solutions
3032  * intact. Often such reductions are based on analyzing the objective function, reduced costs, and/or dual LPs.
3033  */
3034 SCIP_EXPORT
3036  SCIP* scip /**< SCIP data structure */
3037  );
3038 
3039 /** marks the variable that it must not be aggregated
3040  *
3041  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3042  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3043  *
3044  * @pre This method can be called if @p scip is in one of the following stages:
3045  * - \ref SCIP_STAGE_INIT
3046  * - \ref SCIP_STAGE_PROBLEM
3047  * - \ref SCIP_STAGE_TRANSFORMING
3048  * - \ref SCIP_STAGE_TRANSFORMED
3049  * - \ref SCIP_STAGE_INITPRESOLVE
3050  * - \ref SCIP_STAGE_PRESOLVING
3051  * - \ref SCIP_STAGE_EXITPRESOLVE
3052  *
3053  * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3054  * aggregated that this is will be the case.
3055  */
3056 SCIP_EXPORT
3058  SCIP* scip, /**< SCIP data structure */
3059  SCIP_VAR* var /**< variable to delete */
3060  );
3061 
3062 /** marks the variable that it must not be multi-aggregated
3063  *
3064  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3065  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3066  *
3067  * @pre This method can be called if @p scip is in one of the following stages:
3068  * - \ref SCIP_STAGE_INIT
3069  * - \ref SCIP_STAGE_PROBLEM
3070  * - \ref SCIP_STAGE_TRANSFORMING
3071  * - \ref SCIP_STAGE_TRANSFORMED
3072  * - \ref SCIP_STAGE_INITPRESOLVE
3073  * - \ref SCIP_STAGE_PRESOLVING
3074  * - \ref SCIP_STAGE_EXITPRESOLVE
3075  *
3076  * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3077  * multi-aggregated that this is will be the case.
3078  */
3079 SCIP_EXPORT
3081  SCIP* scip, /**< SCIP data structure */
3082  SCIP_VAR* var /**< variable to delete */
3083  );
3084 
3085 /** enables the collection of statistics for a variable
3086  *
3087  * @pre This method can be called if @p scip is in one of the following stages:
3088  * - \ref SCIP_STAGE_PROBLEM
3089  * - \ref SCIP_STAGE_INITPRESOLVE
3090  * - \ref SCIP_STAGE_PRESOLVING
3091  * - \ref SCIP_STAGE_EXITPRESOLVE
3092  * - \ref SCIP_STAGE_SOLVING
3093  * - \ref SCIP_STAGE_SOLVED
3094  */
3095 SCIP_EXPORT
3097  SCIP* scip /**< SCIP data structure */
3098  );
3099 
3100 /** disables the collection of any statistic for a variable
3101  *
3102  * @pre This method can be called if @p scip is in one of the following stages:
3103  * - \ref SCIP_STAGE_PROBLEM
3104  * - \ref SCIP_STAGE_INITPRESOLVE
3105  * - \ref SCIP_STAGE_PRESOLVING
3106  * - \ref SCIP_STAGE_EXITPRESOLVE
3107  * - \ref SCIP_STAGE_SOLVING
3108  * - \ref SCIP_STAGE_SOLVED
3109  */
3110 SCIP_EXPORT
3112  SCIP* scip /**< SCIP data structure */
3113  );
3114 
3115 /** updates the pseudo costs of the given variable and the global pseudo costs after a change of "solvaldelta" in the
3116  * variable's solution value and resulting change of "objdelta" in the in the LP's objective value;
3117  * the update is ignored, if the objective value difference is infinite
3118  *
3119  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3120  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3121  *
3122  * @pre This method can be called if @p scip is in one of the following stages:
3123  * - \ref SCIP_STAGE_SOLVING
3124  * - \ref SCIP_STAGE_SOLVED
3125  */
3126 SCIP_EXPORT
3128  SCIP* scip, /**< SCIP data structure */
3129  SCIP_VAR* var, /**< problem variable */
3130  SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
3131  SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
3132  SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
3133  );
3134 
3135 /** gets the variable's pseudo cost value for the given change of the variable's LP value
3136  *
3137  * @return the variable's pseudo cost value for the given change of the variable's LP value
3138  *
3139  * @pre This method can be called if @p scip is in one of the following stages:
3140  * - \ref SCIP_STAGE_INITPRESOLVE
3141  * - \ref SCIP_STAGE_PRESOLVING
3142  * - \ref SCIP_STAGE_EXITPRESOLVE
3143  * - \ref SCIP_STAGE_PRESOLVED
3144  * - \ref SCIP_STAGE_INITSOLVE
3145  * - \ref SCIP_STAGE_SOLVING
3146  * - \ref SCIP_STAGE_SOLVED
3147  */
3148 SCIP_EXPORT
3150  SCIP* scip, /**< SCIP data structure */
3151  SCIP_VAR* var, /**< problem variable */
3152  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3153  );
3154 
3155 /** gets the variable's pseudo cost value for the given change of the variable's LP value,
3156  * only using the pseudo cost information of the current run
3157  *
3158  * @return the variable's pseudo cost value for the given change of the variable's LP value,
3159  * only using the pseudo cost information of the current run
3160  *
3161  * @pre This method can be called if @p scip is in one of the following stages:
3162  * - \ref SCIP_STAGE_INITPRESOLVE
3163  * - \ref SCIP_STAGE_PRESOLVING
3164  * - \ref SCIP_STAGE_EXITPRESOLVE
3165  * - \ref SCIP_STAGE_PRESOLVED
3166  * - \ref SCIP_STAGE_INITSOLVE
3167  * - \ref SCIP_STAGE_SOLVING
3168  * - \ref SCIP_STAGE_SOLVED
3169  */
3170 SCIP_EXPORT
3172  SCIP* scip, /**< SCIP data structure */
3173  SCIP_VAR* var, /**< problem variable */
3174  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3175  );
3176 
3177 /** gets the variable's pseudo cost value for the given direction
3178  *
3179  * @return the variable's pseudo cost value for the given direction
3180  *
3181  * @pre This method can be called if @p scip is in one of the following stages:
3182  * - \ref SCIP_STAGE_INITPRESOLVE
3183  * - \ref SCIP_STAGE_PRESOLVING
3184  * - \ref SCIP_STAGE_EXITPRESOLVE
3185  * - \ref SCIP_STAGE_PRESOLVED
3186  * - \ref SCIP_STAGE_INITSOLVE
3187  * - \ref SCIP_STAGE_SOLVING
3188  * - \ref SCIP_STAGE_SOLVED
3189  */
3190 SCIP_EXPORT
3192  SCIP* scip, /**< SCIP data structure */
3193  SCIP_VAR* var, /**< problem variable */
3194  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3195  );
3196 
3197 /** gets the variable's pseudo cost value for the given direction,
3198  * only using the pseudo cost information of the current run
3199  *
3200  * @return the variable's pseudo cost value for the given direction,
3201  * only using the pseudo cost information of the current run
3202  *
3203  * @pre This method can be called if @p scip is in one of the following stages:
3204  * - \ref SCIP_STAGE_INITPRESOLVE
3205  * - \ref SCIP_STAGE_PRESOLVING
3206  * - \ref SCIP_STAGE_EXITPRESOLVE
3207  * - \ref SCIP_STAGE_PRESOLVED
3208  * - \ref SCIP_STAGE_INITSOLVE
3209  * - \ref SCIP_STAGE_SOLVING
3210  * - \ref SCIP_STAGE_SOLVED
3211  */
3212 SCIP_EXPORT
3214  SCIP* scip, /**< SCIP data structure */
3215  SCIP_VAR* var, /**< problem variable */
3216  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3217  );
3218 
3219 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction
3220  *
3221  * @return the variable's (possible fractional) number of pseudo cost updates for the given direction
3222  *
3223  * @pre This method can be called if @p scip is in one of the following stages:
3224  * - \ref SCIP_STAGE_INITPRESOLVE
3225  * - \ref SCIP_STAGE_PRESOLVING
3226  * - \ref SCIP_STAGE_EXITPRESOLVE
3227  * - \ref SCIP_STAGE_PRESOLVED
3228  * - \ref SCIP_STAGE_INITSOLVE
3229  * - \ref SCIP_STAGE_SOLVING
3230  * - \ref SCIP_STAGE_SOLVED
3231  */
3232 SCIP_EXPORT
3234  SCIP* scip, /**< SCIP data structure */
3235  SCIP_VAR* var, /**< problem variable */
3236  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3237  );
3238 
3239 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction,
3240  * only using the pseudo cost information of the current run
3241  *
3242  * @return the variable's (possible fractional) number of pseudo cost updates for the given direction,
3243  * only using the pseudo cost information of the current run
3244  *
3245  * @pre This method can be called if @p scip is in one of the following stages:
3246  * - \ref SCIP_STAGE_INITPRESOLVE
3247  * - \ref SCIP_STAGE_PRESOLVING
3248  * - \ref SCIP_STAGE_EXITPRESOLVE
3249  * - \ref SCIP_STAGE_PRESOLVED
3250  * - \ref SCIP_STAGE_INITSOLVE
3251  * - \ref SCIP_STAGE_SOLVING
3252  * - \ref SCIP_STAGE_SOLVED
3253  */
3254 SCIP_EXPORT
3256  SCIP* scip, /**< SCIP data structure */
3257  SCIP_VAR* var, /**< problem variable */
3258  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3259  );
3260 
3261 /** get pseudo cost variance of the variable, either for entire solve or only for current branch and bound run
3262  *
3263  * @return returns the (corrected) variance of pseudo code information collected so far.
3264  *
3265  * @pre This method can be called if @p scip is in one of the following stages:
3266  * - \ref SCIP_STAGE_INITPRESOLVE
3267  * - \ref SCIP_STAGE_PRESOLVING
3268  * - \ref SCIP_STAGE_EXITPRESOLVE
3269  * - \ref SCIP_STAGE_PRESOLVED
3270  * - \ref SCIP_STAGE_INITSOLVE
3271  * - \ref SCIP_STAGE_SOLVING
3272  * - \ref SCIP_STAGE_SOLVED
3273  */
3274 SCIP_EXPORT
3276  SCIP* scip, /**< SCIP data structure */
3277  SCIP_VAR* var, /**< problem variable */
3278  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
3279  SCIP_Bool onlycurrentrun /**< only for pseudo costs of current branch and bound run */
3280  );
3281 
3282 /** calculates a confidence bound for this variable under the assumption of normally distributed pseudo costs
3283  *
3284  * The confidence bound \f$ \theta \geq 0\f$ denotes the interval borders \f$ [X - \theta, \ X + \theta]\f$, which contains
3285  * the true pseudo costs of the variable, i.e., the expected value of the normal distribution, with a probability
3286  * of 2 * clevel - 1.
3287  *
3288  * @return value of confidence bound for this variable
3289  */
3290 SCIP_EXPORT
3292  SCIP* scip, /**< SCIP data structure */
3293  SCIP_VAR* var, /**< variable in question */
3294  SCIP_BRANCHDIR dir, /**< the branching direction for the confidence bound */
3295  SCIP_Bool onlycurrentrun, /**< should only the current run be taken into account */
3296  SCIP_CONFIDENCELEVEL clevel /**< confidence level for the interval */
3297  );
3298 
3299 /** check if variable pseudo-costs have a significant difference in location. The significance depends on
3300  * the choice of \p clevel and on the kind of tested hypothesis. The one-sided hypothesis, which
3301  * should be rejected, is that fracy * mu_y >= fracx * mu_x, where mu_y and mu_x denote the
3302  * unknown location means of the underlying pseudo-cost distributions of x and y.
3303  *
3304  * This method is applied best if variable x has a better pseudo-cost score than y. The method hypothesizes that y were actually
3305  * better than x (despite the current information), meaning that y can be expected to yield branching
3306  * decisions as least as good as x in the long run. If the method returns TRUE, the current history information is
3307  * sufficient to safely rely on the alternative hypothesis that x yields indeed a better branching score (on average)
3308  * than y.
3309  *
3310  * @note The order of x and y matters for the one-sided hypothesis
3311  *
3312  * @note set \p onesided to FALSE if you are not sure which variable is better. The hypothesis tested then reads
3313  * fracy * mu_y == fracx * mu_x vs the alternative hypothesis fracy * mu_y != fracx * mu_x.
3314  *
3315  * @return TRUE if the hypothesis can be safely rejected at the given confidence level
3316  */
3317 SCIP_EXPORT
3319  SCIP* scip, /**< SCIP data structure */
3320  SCIP_VAR* varx, /**< variable x */
3321  SCIP_Real fracx, /**< the fractionality of variable x */
3322  SCIP_VAR* vary, /**< variable y */
3323  SCIP_Real fracy, /**< the fractionality of variable y */
3324  SCIP_BRANCHDIR dir, /**< branching direction */
3325  SCIP_CONFIDENCELEVEL clevel, /**< confidence level for rejecting hypothesis */
3326  SCIP_Bool onesided /**< should a one-sided hypothesis y >= x be tested? */
3327  );
3328 
3329 /** tests at a given confidence level whether the variable pseudo-costs only have a small probability to
3330  * exceed a \p threshold. This is useful to determine if past observations provide enough evidence
3331  * to skip an expensive strong-branching step if there is already a candidate that has been proven to yield an improvement
3332  * of at least \p threshold.
3333  *
3334  * @note use \p clevel to adjust the level of confidence. For SCIP_CONFIDENCELEVEL_MIN, the method returns TRUE if
3335  * the estimated probability to exceed \p threshold is less than 25 %.
3336  *
3337  * @see SCIP_Confidencelevel for a list of available levels. The used probability limits refer to the one-sided levels
3338  * of confidence.
3339  *
3340  * @return TRUE if the variable pseudo-cost probabilistic model is likely to be smaller than \p threshold
3341  * at the given confidence level \p clevel.
3342  */
3343 SCIP_EXPORT
3345  SCIP* scip, /**< SCIP data structure */
3346  SCIP_VAR* var, /**< variable x */
3347  SCIP_Real frac, /**< the fractionality of variable x */
3348  SCIP_Real threshold, /**< the threshold to test against */
3349  SCIP_BRANCHDIR dir, /**< branching direction */
3350  SCIP_CONFIDENCELEVEL clevel /**< confidence level for rejecting hypothesis */
3351  );
3352 
3353 /** check if the current pseudo cost relative error in a direction violates the given threshold. The Relative
3354  * Error is calculated at a specific confidence level
3355  *
3356  * @return TRUE if relative error in variable pseudo costs is smaller than \p threshold
3357  */
3358 SCIP_EXPORT
3360  SCIP* scip, /**< SCIP data structure */
3361  SCIP_VAR* var, /**< variable in question */
3362  SCIP_Real threshold, /**< threshold for relative errors to be considered reliable (enough) */
3363  SCIP_CONFIDENCELEVEL clevel /**< a given confidence level */
3364  );
3365 
3366 /** gets the variable's pseudo cost score value for the given LP solution value
3367  *
3368  * @return the variable's pseudo cost score value for the given LP solution value
3369  *
3370  * @pre This method can be called if @p scip is in one of the following stages:
3371  * - \ref SCIP_STAGE_INITPRESOLVE
3372  * - \ref SCIP_STAGE_PRESOLVING
3373  * - \ref SCIP_STAGE_EXITPRESOLVE
3374  * - \ref SCIP_STAGE_PRESOLVED
3375  * - \ref SCIP_STAGE_INITSOLVE
3376  * - \ref SCIP_STAGE_SOLVING
3377  * - \ref SCIP_STAGE_SOLVED
3378  */
3379 SCIP_EXPORT
3381  SCIP* scip, /**< SCIP data structure */
3382  SCIP_VAR* var, /**< problem variable */
3383  SCIP_Real solval /**< variable's LP solution value */
3384  );
3385 
3386 /** gets the variable's pseudo cost score value for the given LP solution value,
3387  * only using the pseudo cost information of the current run
3388  *
3389  * @return the variable's pseudo cost score value for the given LP solution value,
3390  * only using the pseudo cost information of the current run
3391  *
3392  * @pre This method can be called if @p scip is in one of the following stages:
3393  * - \ref SCIP_STAGE_INITPRESOLVE
3394  * - \ref SCIP_STAGE_PRESOLVING
3395  * - \ref SCIP_STAGE_EXITPRESOLVE
3396  * - \ref SCIP_STAGE_PRESOLVED
3397  * - \ref SCIP_STAGE_INITSOLVE
3398  * - \ref SCIP_STAGE_SOLVING
3399  * - \ref SCIP_STAGE_SOLVED
3400  */
3401 SCIP_EXPORT
3403  SCIP* scip, /**< SCIP data structure */
3404  SCIP_VAR* var, /**< problem variable */
3405  SCIP_Real solval /**< variable's LP solution value */
3406  );
3407 
3408 /** returns the variable's VSIDS value
3409  *
3410  * @return the variable's VSIDS value
3411  *
3412  * @pre This method can be called if @p scip is in one of the following stages:
3413  * - \ref SCIP_STAGE_INITPRESOLVE
3414  * - \ref SCIP_STAGE_PRESOLVING
3415  * - \ref SCIP_STAGE_EXITPRESOLVE
3416  * - \ref SCIP_STAGE_PRESOLVED
3417  * - \ref SCIP_STAGE_INITSOLVE
3418  * - \ref SCIP_STAGE_SOLVING
3419  * - \ref SCIP_STAGE_SOLVED
3420  */
3421 SCIP_EXPORT
3423  SCIP* scip, /**< SCIP data structure */
3424  SCIP_VAR* var, /**< problem variable */
3425  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3426  );
3427 
3428 /** returns the variable's VSIDS value only using conflicts of the current run
3429  *
3430  * @return the variable's VSIDS value only using conflicts of the current run
3431  *
3432  * @pre This method can be called if @p scip is in one of the following stages:
3433  * - \ref SCIP_STAGE_INITPRESOLVE
3434  * - \ref SCIP_STAGE_PRESOLVING
3435  * - \ref SCIP_STAGE_EXITPRESOLVE
3436  * - \ref SCIP_STAGE_PRESOLVED
3437  * - \ref SCIP_STAGE_INITSOLVE
3438  * - \ref SCIP_STAGE_SOLVING
3439  * - \ref SCIP_STAGE_SOLVED
3440  */
3441 SCIP_EXPORT
3443  SCIP* scip, /**< SCIP data structure */
3444  SCIP_VAR* var, /**< problem variable */
3445  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3446  );
3447 
3448 /** returns the variable's conflict score value
3449  *
3450  * @return the variable's conflict score value
3451  *
3452  * @pre This method can be called if @p scip is in one of the following stages:
3453  * - \ref SCIP_STAGE_INITPRESOLVE
3454  * - \ref SCIP_STAGE_PRESOLVING
3455  * - \ref SCIP_STAGE_EXITPRESOLVE
3456  * - \ref SCIP_STAGE_PRESOLVED
3457  * - \ref SCIP_STAGE_INITSOLVE
3458  * - \ref SCIP_STAGE_SOLVING
3459  * - \ref SCIP_STAGE_SOLVED
3460  */
3461 SCIP_EXPORT
3463  SCIP* scip, /**< SCIP data structure */
3464  SCIP_VAR* var /**< problem variable */
3465  );
3466 
3467 /** returns the variable's conflict score value only using conflicts of the current run
3468  *
3469  * @return the variable's conflict score value only using conflicts of the current run
3470  *
3471  * @pre This method can be called if @p scip is in one of the following stages:
3472  * - \ref SCIP_STAGE_INITPRESOLVE
3473  * - \ref SCIP_STAGE_PRESOLVING
3474  * - \ref SCIP_STAGE_EXITPRESOLVE
3475  * - \ref SCIP_STAGE_PRESOLVED
3476  * - \ref SCIP_STAGE_INITSOLVE
3477  * - \ref SCIP_STAGE_SOLVING
3478  * - \ref SCIP_STAGE_SOLVED
3479  */
3480 SCIP_EXPORT
3482  SCIP* scip, /**< SCIP data structure */
3483  SCIP_VAR* var /**< problem variable */
3484  );
3485 
3486 /** returns the variable's conflict length score
3487  *
3488  * @return the variable's conflict length score
3489  *
3490  * @pre This method can be called if @p scip is in one of the following stages:
3491  * - \ref SCIP_STAGE_INITPRESOLVE
3492  * - \ref SCIP_STAGE_PRESOLVING
3493  * - \ref SCIP_STAGE_EXITPRESOLVE
3494  * - \ref SCIP_STAGE_PRESOLVED
3495  * - \ref SCIP_STAGE_INITSOLVE
3496  * - \ref SCIP_STAGE_SOLVING
3497  * - \ref SCIP_STAGE_SOLVED
3498  */
3499 SCIP_EXPORT
3501  SCIP* scip, /**< SCIP data structure */
3502  SCIP_VAR* var /**< problem variable */
3503  );
3504 
3505 /** returns the variable's conflict length score only using conflicts of the current run
3506  *
3507  * @return the variable's conflict length score only using conflicts of the current run
3508  *
3509  * @pre This method can be called if @p scip is in one of the following stages:
3510  * - \ref SCIP_STAGE_INITPRESOLVE
3511  * - \ref SCIP_STAGE_PRESOLVING
3512  * - \ref SCIP_STAGE_EXITPRESOLVE
3513  * - \ref SCIP_STAGE_PRESOLVED
3514  * - \ref SCIP_STAGE_INITSOLVE
3515  * - \ref SCIP_STAGE_SOLVING
3516  * - \ref SCIP_STAGE_SOLVED
3517  */
3518 SCIP_EXPORT
3520  SCIP* scip, /**< SCIP data structure */
3521  SCIP_VAR* var /**< problem variable */
3522  );
3523 
3524 /** returns the variable's average conflict length
3525  *
3526  * @return the variable's average conflict length
3527  *
3528  * @pre This method can be called if @p scip is in one of the following stages:
3529  * - \ref SCIP_STAGE_INITPRESOLVE
3530  * - \ref SCIP_STAGE_PRESOLVING
3531  * - \ref SCIP_STAGE_EXITPRESOLVE
3532  * - \ref SCIP_STAGE_PRESOLVED
3533  * - \ref SCIP_STAGE_INITSOLVE
3534  * - \ref SCIP_STAGE_SOLVING
3535  * - \ref SCIP_STAGE_SOLVED
3536  */
3537 SCIP_EXPORT
3539  SCIP* scip, /**< SCIP data structure */
3540  SCIP_VAR* var, /**< problem variable */
3541  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3542  );
3543 
3544 /** returns the variable's average conflict length only using conflicts of the current run
3545  *
3546  * @return the variable's average conflict length only using conflicts of the current run
3547  *
3548  * @pre This method can be called if @p scip is in one of the following stages:
3549  * - \ref SCIP_STAGE_INITPRESOLVE
3550  * - \ref SCIP_STAGE_PRESOLVING
3551  * - \ref SCIP_STAGE_EXITPRESOLVE
3552  * - \ref SCIP_STAGE_PRESOLVED
3553  * - \ref SCIP_STAGE_INITSOLVE
3554  * - \ref SCIP_STAGE_SOLVING
3555  * - \ref SCIP_STAGE_SOLVED
3556  */
3557 SCIP_EXPORT
3559  SCIP* scip, /**< SCIP data structure */
3560  SCIP_VAR* var, /**< problem variable */
3561  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3562  );
3563 
3564 /** returns the average number of inferences found after branching on the variable in given direction;
3565  * if branching on the variable in the given direction was yet evaluated, the average number of inferences
3566  * over all variables for branching in the given direction is returned
3567  *
3568  * @return the average number of inferences found after branching on the variable in given direction
3569  *
3570  * @pre This method can be called if @p scip is in one of the following stages:
3571  * - \ref SCIP_STAGE_INITPRESOLVE
3572  * - \ref SCIP_STAGE_PRESOLVING
3573  * - \ref SCIP_STAGE_EXITPRESOLVE
3574  * - \ref SCIP_STAGE_PRESOLVED
3575  * - \ref SCIP_STAGE_INITSOLVE
3576  * - \ref SCIP_STAGE_SOLVING
3577  * - \ref SCIP_STAGE_SOLVED
3578  */
3579 SCIP_EXPORT
3581  SCIP* scip, /**< SCIP data structure */
3582  SCIP_VAR* var, /**< problem variable */
3583  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3584  );
3585 
3586 /** returns the average number of inferences found after branching on the variable in given direction in the current run;
3587  * if branching on the variable in the given direction was yet evaluated, the average number of inferences
3588  * over all variables for branching in the given direction is returned
3589  *
3590  * @return the average number of inferences found after branching on the variable in given direction in the current run
3591  *
3592  * @pre This method can be called if @p scip is in one of the following stages:
3593  * - \ref SCIP_STAGE_INITPRESOLVE
3594  * - \ref SCIP_STAGE_PRESOLVING
3595  * - \ref SCIP_STAGE_EXITPRESOLVE
3596  * - \ref SCIP_STAGE_PRESOLVED
3597  * - \ref SCIP_STAGE_INITSOLVE
3598  * - \ref SCIP_STAGE_SOLVING
3599  * - \ref SCIP_STAGE_SOLVED
3600  */
3601 SCIP_EXPORT
3603  SCIP* scip, /**< SCIP data structure */
3604  SCIP_VAR* var, /**< problem variable */
3605  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3606  );
3607 
3608 /** returns the variable's average inference score value
3609  *
3610  * @return the variable's average inference score value
3611  *
3612  * @pre This method can be called if @p scip is in one of the following stages:
3613  * - \ref SCIP_STAGE_INITPRESOLVE
3614  * - \ref SCIP_STAGE_PRESOLVING
3615  * - \ref SCIP_STAGE_EXITPRESOLVE
3616  * - \ref SCIP_STAGE_PRESOLVED
3617  * - \ref SCIP_STAGE_INITSOLVE
3618  * - \ref SCIP_STAGE_SOLVING
3619  * - \ref SCIP_STAGE_SOLVED
3620  */
3621 SCIP_EXPORT
3623  SCIP* scip, /**< SCIP data structure */
3624  SCIP_VAR* var /**< problem variable */
3625  );
3626 
3627 /** returns the variable's average inference score value only using inferences of the current run
3628  *
3629  * @return the variable's average inference score value only using inferences of the current run
3630  *
3631  * @pre This method can be called if @p scip is in one of the following stages:
3632  * - \ref SCIP_STAGE_INITPRESOLVE
3633  * - \ref SCIP_STAGE_PRESOLVING
3634  * - \ref SCIP_STAGE_EXITPRESOLVE
3635  * - \ref SCIP_STAGE_PRESOLVED
3636  * - \ref SCIP_STAGE_INITSOLVE
3637  * - \ref SCIP_STAGE_SOLVING
3638  * - \ref SCIP_STAGE_SOLVED
3639  */
3640 SCIP_EXPORT
3642  SCIP* scip, /**< SCIP data structure */
3643  SCIP_VAR* var /**< problem variable */
3644  );
3645 
3646 /** initializes the upwards and downwards pseudocosts, conflict scores, conflict lengths, inference scores, cutoff scores
3647  * of a variable to the given values
3648  *
3649  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3650  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3651  *
3652  * @pre This method can be called if @p scip is in one of the following stages:
3653  * - \ref SCIP_STAGE_TRANSFORMED
3654  * - \ref SCIP_STAGE_INITPRESOLVE
3655  * - \ref SCIP_STAGE_PRESOLVING
3656  * - \ref SCIP_STAGE_EXITPRESOLVE
3657  * - \ref SCIP_STAGE_PRESOLVED
3658  * - \ref SCIP_STAGE_INITSOLVE
3659  * - \ref SCIP_STAGE_SOLVING
3660  */
3661 SCIP_EXPORT
3663  SCIP* scip, /**< SCIP data structure */
3664  SCIP_VAR* var, /**< variable which should be initialized */
3665  SCIP_Real downpscost, /**< value to which pseudocosts for downwards branching should be initialized */
3666  SCIP_Real uppscost, /**< value to which pseudocosts for upwards branching should be initialized */
3667  SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
3668  SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
3669  SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
3670  SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
3671  SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
3672  SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
3673  SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
3674  SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
3675  );
3676 
3677 /** initializes the upwards and downwards conflict scores, conflict lengths, inference scores, cutoff scores of a
3678  * variable w.r.t. a value by the given values (SCIP_VALUEHISTORY)
3679  *
3680  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3681  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3682  *
3683  * @pre This method can be called if @p scip is in one of the following stages:
3684  * - \ref SCIP_STAGE_TRANSFORMED
3685  * - \ref SCIP_STAGE_INITPRESOLVE
3686  * - \ref SCIP_STAGE_PRESOLVING
3687  * - \ref SCIP_STAGE_EXITPRESOLVE
3688  * - \ref SCIP_STAGE_PRESOLVED
3689  * - \ref SCIP_STAGE_INITSOLVE
3690  * - \ref SCIP_STAGE_SOLVING
3691  */
3692 SCIP_EXPORT
3694  SCIP* scip, /**< SCIP data structure */
3695  SCIP_VAR* var, /**< variable which should be initialized */
3696  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
3697  SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
3698  SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
3699  SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
3700  SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
3701  SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
3702  SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
3703  SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
3704  SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
3705  );
3706 
3707 /** returns the average number of cutoffs found after branching on the variable in given direction;
3708  * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
3709  * over all variables for branching in the given direction is returned
3710  *
3711  * @return the average number of cutoffs found after branching on the variable in given direction
3712  *
3713  * @pre This method can be called if @p scip is in one of the following stages:
3714  * - \ref SCIP_STAGE_INITPRESOLVE
3715  * - \ref SCIP_STAGE_PRESOLVING
3716  * - \ref SCIP_STAGE_EXITPRESOLVE
3717  * - \ref SCIP_STAGE_PRESOLVED
3718  * - \ref SCIP_STAGE_INITSOLVE
3719  * - \ref SCIP_STAGE_SOLVING
3720  * - \ref SCIP_STAGE_SOLVED
3721  */
3722 SCIP_EXPORT
3724  SCIP* scip, /**< SCIP data structure */
3725  SCIP_VAR* var, /**< problem variable */
3726  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3727  );
3728 
3729 /** returns the average number of cutoffs found after branching on the variable in given direction in the current run;
3730  * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
3731  * over all variables for branching in the given direction is returned
3732  *
3733  * @return the average number of cutoffs found after branching on the variable in given direction in the current run
3734  *
3735  * @pre This method can be called if @p scip is in one of the following stages:
3736  * - \ref SCIP_STAGE_INITPRESOLVE
3737  * - \ref SCIP_STAGE_PRESOLVING
3738  * - \ref SCIP_STAGE_EXITPRESOLVE
3739  * - \ref SCIP_STAGE_PRESOLVED
3740  * - \ref SCIP_STAGE_INITSOLVE
3741  * - \ref SCIP_STAGE_SOLVING
3742  * - \ref SCIP_STAGE_SOLVED
3743  */
3744 SCIP_EXPORT
3746  SCIP* scip, /**< SCIP data structure */
3747  SCIP_VAR* var, /**< problem variable */
3748  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3749  );
3750 
3751 /** returns the variable's average cutoff score value
3752  *
3753  * @return the variable's average cutoff score value
3754  *
3755  * @pre This method can be called if @p scip is in one of the following stages:
3756  * - \ref SCIP_STAGE_INITPRESOLVE
3757  * - \ref SCIP_STAGE_PRESOLVING
3758  * - \ref SCIP_STAGE_EXITPRESOLVE
3759  * - \ref SCIP_STAGE_PRESOLVED
3760  * - \ref SCIP_STAGE_INITSOLVE
3761  * - \ref SCIP_STAGE_SOLVING
3762  * - \ref SCIP_STAGE_SOLVED
3763  */
3764 SCIP_EXPORT
3766  SCIP* scip, /**< SCIP data structure */
3767  SCIP_VAR* var /**< problem variable */
3768  );
3769 
3770 /** returns the variable's average cutoff score value, only using cutoffs of the current run
3771  *
3772  * @return the variable's average cutoff score value, only using cutoffs of the current run
3773  *
3774  * @pre This method can be called if @p scip is in one of the following stages:
3775  * - \ref SCIP_STAGE_INITPRESOLVE
3776  * - \ref SCIP_STAGE_PRESOLVING
3777  * - \ref SCIP_STAGE_EXITPRESOLVE
3778  * - \ref SCIP_STAGE_PRESOLVED
3779  * - \ref SCIP_STAGE_INITSOLVE
3780  * - \ref SCIP_STAGE_SOLVING
3781  * - \ref SCIP_STAGE_SOLVED
3782  */
3783 SCIP_EXPORT
3785  SCIP* scip, /**< SCIP data structure */
3786  SCIP_VAR* var /**< problem variable */
3787  );
3788 
3789 /** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
3790  * factor
3791  *
3792  * @return the variable's average inference/cutoff score value
3793  *
3794  * @pre This method can be called if @p scip is in one of the following stages:
3795  * - \ref SCIP_STAGE_INITPRESOLVE
3796  * - \ref SCIP_STAGE_PRESOLVING
3797  * - \ref SCIP_STAGE_EXITPRESOLVE
3798  * - \ref SCIP_STAGE_PRESOLVED
3799  * - \ref SCIP_STAGE_INITSOLVE
3800  * - \ref SCIP_STAGE_SOLVING
3801  * - \ref SCIP_STAGE_SOLVED
3802  */
3803 SCIP_EXPORT
3805  SCIP* scip, /**< SCIP data structure */
3806  SCIP_VAR* var, /**< problem variable */
3807  SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
3808  );
3809 
3810 /** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
3811  * factor, only using inferences and cutoffs of the current run
3812  *
3813  * @return the variable's average inference/cutoff score value, only using inferences and cutoffs of the current run
3814  *
3815  * @pre This method can be called if @p scip is in one of the following stages:
3816  * - \ref SCIP_STAGE_INITPRESOLVE
3817  * - \ref SCIP_STAGE_PRESOLVING
3818  * - \ref SCIP_STAGE_EXITPRESOLVE
3819  * - \ref SCIP_STAGE_PRESOLVED
3820  * - \ref SCIP_STAGE_INITSOLVE
3821  * - \ref SCIP_STAGE_SOLVING
3822  * - \ref SCIP_STAGE_SOLVED
3823  */
3824 SCIP_EXPORT
3826  SCIP* scip, /**< SCIP data structure */
3827  SCIP_VAR* var, /**< problem variable */
3828  SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
3829  );
3830 
3831 /** returns the variable's average GMI efficacy score value
3832  *
3833  * @return the variable's average GMI efficacy score value (for when it was fractional and basic in the LP)
3834  *
3835  * @pre This method can be called if @p scip is in one of the following stages:
3836  * - \ref SCIP_STAGE_INITPRESOLVE
3837  * - \ref SCIP_STAGE_PRESOLVING
3838  * - \ref SCIP_STAGE_EXITPRESOLVE
3839  * - \ref SCIP_STAGE_PRESOLVED
3840  * - \ref SCIP_STAGE_INITSOLVE
3841  * - \ref SCIP_STAGE_SOLVING
3842  * - \ref SCIP_STAGE_SOLVED
3843  */
3844 SCIP_EXPORT
3846  SCIP* scip, /**< SCIP data structure */
3847  SCIP_VAR* var /**< problem variable */
3848  );
3849 
3850 /** sets the variable's avg GMI efficacy score value
3851  *
3852  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3853  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3854  *
3855  * @pre This method can be called if @p scip is in one of the following stages:
3856  * - \ref SCIP_STAGE_INITPRESOLVE
3857  * - \ref SCIP_STAGE_PRESOLVING
3858  * - \ref SCIP_STAGE_EXITPRESOLVE
3859  * - \ref SCIP_STAGE_PRESOLVED
3860  * - \ref SCIP_STAGE_INITSOLVE
3861  * - \ref SCIP_STAGE_SOLVING
3862  * - \ref SCIP_STAGE_SOLVED
3863  */
3864 SCIP_EXPORT
3866  SCIP* scip, /**< SCIP data structure */
3867  SCIP_VAR* var, /**< problem variable */
3868  SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
3869  );
3870 
3871 /** returns the variable's last GMI efficacy score value
3872  *
3873  * @return the variable's last GMI efficacy score value (for when it was fractional and basic in the LP)
3874  *
3875  * @pre This method can be called if @p scip is in one of the following stages:
3876  * - \ref SCIP_STAGE_INITPRESOLVE
3877  * - \ref SCIP_STAGE_PRESOLVING
3878  * - \ref SCIP_STAGE_EXITPRESOLVE
3879  * - \ref SCIP_STAGE_PRESOLVED
3880  * - \ref SCIP_STAGE_INITSOLVE
3881  * - \ref SCIP_STAGE_SOLVING
3882  * - \ref SCIP_STAGE_SOLVED
3883  */
3884 SCIP_EXPORT
3886  SCIP* scip, /**< SCIP data structure */
3887  SCIP_VAR* var /**< problem variable */
3888  );
3889 
3890 /** sets the variable's last GMI efficacy score value
3891  *
3892  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3893  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3894  *
3895  * @pre This method can be called if @p scip is in one of the following stages:
3896  * - \ref SCIP_STAGE_INITPRESOLVE
3897  * - \ref SCIP_STAGE_PRESOLVING
3898  * - \ref SCIP_STAGE_EXITPRESOLVE
3899  * - \ref SCIP_STAGE_PRESOLVED
3900  * - \ref SCIP_STAGE_INITSOLVE
3901  * - \ref SCIP_STAGE_SOLVING
3902  * - \ref SCIP_STAGE_SOLVED
3903  */
3904 SCIP_EXPORT
3906  SCIP* scip, /**< SCIP data structure */
3907  SCIP_VAR* var, /**< problem variable */
3908  SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
3909  );
3910 
3911 /** outputs variable information to file stream via the message system
3912  *
3913  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3914  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3915  *
3916  * @pre This method can be called if @p scip is in one of the following stages:
3917  * - \ref SCIP_STAGE_PROBLEM
3918  * - \ref SCIP_STAGE_TRANSFORMING
3919  * - \ref SCIP_STAGE_TRANSFORMED
3920  * - \ref SCIP_STAGE_INITPRESOLVE
3921  * - \ref SCIP_STAGE_PRESOLVING
3922  * - \ref SCIP_STAGE_EXITPRESOLVE
3923  * - \ref SCIP_STAGE_PRESOLVED
3924  * - \ref SCIP_STAGE_INITSOLVE
3925  * - \ref SCIP_STAGE_SOLVING
3926  * - \ref SCIP_STAGE_SOLVED
3927  * - \ref SCIP_STAGE_EXITSOLVE
3928  * - \ref SCIP_STAGE_FREETRANS
3929  *
3930  * @note If the message handler is set to a NULL pointer nothing will be printed
3931  */
3932 SCIP_EXPORT
3934  SCIP* scip, /**< SCIP data structure */
3935  SCIP_VAR* var, /**< problem variable */
3936  FILE* file /**< output file (or NULL for standard output) */
3937  );
3938 
3939 /**@} */
3940 
3941 #ifdef __cplusplus
3942 }
3943 #endif
3944 
3945 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:59
SCIP_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1692
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4942
SCIP_Real SCIPgetVarAvgInferences(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9418
SCIP_Real SCIPgetVarAvgCutoffs(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9672
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5202
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2127
SCIP_RETCODE SCIPsetRelaxSolValsSol(SCIP *scip, SCIP_RELAX *relax, SCIP_SOL *sol, SCIP_Bool includeslp)
Definition: scip_var.c:2488
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
Definition: scip_var.c:1596
type definitions for miscellaneous datastructures
SCIP_Real SCIPgetVarAvgInferenceCutoffScore(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:9789
type definitions for implications, variable bounds, and cliques
SCIP_RETCODE SCIPaddVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real addobj)
Definition: scip_var.c:4561
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:1991
SCIP_RETCODE SCIPclearRelaxSolVals(SCIP *scip, SCIP_RELAX *relax)
Definition: scip_var.c:2363
SCIP_Real SCIPgetVarAvgInferencesCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9446
SCIP_Real SCIPgetVarConflictlengthScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9333
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:151
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:8813
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1863
SCIP_RETCODE SCIPgetNegatedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **negvars)
Definition: scip_var.c:1559
SCIP_RETCODE SCIPgetVarStrongbranchLast(SCIP *scip, SCIP_VAR *var, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Real *solval, SCIP_Real *lpobjval)
Definition: scip_var.c:4009
SCIP_RETCODE SCIPinferVarLbProp(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5894
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4845
SCIP_Bool SCIPpscostThresholdProbabilityTest(SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:9058
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:1438
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
Definition: scip_var.c:533
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
Definition: scip_var.c:1247
SCIP_RETCODE SCIPsetVarLastGMIScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:9957
SCIP_RETCODE SCIPchgVarUbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazyub)
Definition: scip_var.c:5163
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8949
SCIP_RETCODE SCIPsetRelaxSolVals(SCIP *scip, SCIP_RELAX *relax, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Bool includeslp)
Definition: scip_var.c:2446
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:9140
SCIP_Real SCIPgetVarLastGMIScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9931
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:4644
SCIP_Real SCIPgetVarVSIDS(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9176
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:120
SCIP_RETCODE SCIPinferBinvarProp(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6119
SCIP_Real SCIPgetVarMultaggrUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6590
SCIP_Real SCIPgetVarPseudocostValCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:8841
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
Definition: scip_var.c:4316
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4159
#define SCIP_DECL_VARCOPY(x)
Definition: type_var.h:194
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
Definition: scip_var.c:194
SCIP_Real SCIPgetVarAvgCutoffsCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9700
SCIP_Real SCIPgetVarVSIDSCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9208
SCIP_Real SCIPgetVarAvgCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9757
public methods for problem variables
SCIP_Bool SCIPisVarPscostRelerrorReliable(SCIP *scip, SCIP_VAR *var, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:9077
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5319
SCIP_Real SCIPgetRelaxSolObj(SCIP *scip)
Definition: scip_var.c:2631
SCIP_Bool SCIPgetVarWasFixedAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2281
type definitions for return codes for SCIP methods
SCIP_Real SCIPgetVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8867
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4889
SCIP_RETCODE SCIPwriteVarsPolynomial(SCIP *scip, FILE *file, SCIP_VAR ***monomialvars, SCIP_Real **monomialexps, SCIP_Real *monomialcoefs, int *monomialnvars, int nmonomials, SCIP_Bool type)
Definition: scip_var.c:404
SCIP_Real SCIPgetVarMultaggrUbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6560
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4675
SCIP_RETCODE SCIPaddVarVlb(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vlbvar, SCIP_Real vlbcoef, SCIP_Real vlbconstant, SCIP_Bool *infeasible, int *nbdchgs)
Definition: scip_var.c:6660
SCIP_RETCODE SCIPmarkRelaxSolInvalid(SCIP *scip)
Definition: scip_var.c:2581
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:4612
enum SCIP_LPSolStat SCIP_LPSOLSTAT
Definition: type_lp.h:51
SCIP_RETCODE SCIPaddVarVub(SCIP *scip, SCIP_VAR *var, SCIP_VAR *vubvar, SCIP_Real vubcoef, SCIP_Real vubconstant, SCIP_Bool *infeasible, int *nbdchgs)
Definition: scip_var.c:6719
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:5031
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:1479
SCIP_RETCODE SCIPgetVarStrongbranchInt(SCIP *scip, SCIP_VAR *var, int itlim, SCIP_Bool idempotent, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
Definition: scip_var.c:3661
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
Definition: scip_var.c:704
SCIP_RETCODE SCIPgetVarClosestVlb(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvlb, int *closestvlbidx)
Definition: scip_var.c:6608
SCIP_Real SCIPcomputeVarUbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6483
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6504
SCIP_Bool SCIPisStrongbranchDownFirst(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2654
SCIP_RETCODE SCIPtransformVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:1388
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:9102
SCIP_RETCODE SCIPscaleVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real scale)
Definition: scip_var.c:7920
#define SCIP_DECL_VARDELTRANS(x)
Definition: type_var.h:164
type definitions for LP management
SCIP_RETCODE SCIPtryStrongbranchLPSol(SCIP *scip, SCIP_Bool *foundsol, SCIP_Bool *cutoff)
Definition: scip_var.c:4078
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
Definition: scip_var.c:4258
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: scip_var.c:8779
SCIP_Real SCIPgetVarBdAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2263
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:48
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
Definition: scip_var.c:8175
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
Definition: scip_var.c:6920
SCIP_RETCODE SCIPmultiaggregateVar(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_Real *scalars, SCIP_Real constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
Definition: scip_var.c:8534
SCIP_RETCODE SCIPparseVarsList(SCIP *scip, const char *str, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize, char **endptr, char delimiter, SCIP_Bool *success)
Definition: scip_var.c:610
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
Definition: type_misc.h:53
SCIP_RETCODE SCIPmarkDoNotAggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8681
SCIP_Real SCIPgetVarPseudocostVariance(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition: scip_var.c:8975
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:100
SCIP_RETCODE SCIPgetBinvarRepresentatives(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
Definition: scip_var.c:1643
SCIP_RETCODE SCIPincVarGMISumScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:9903
SCIP_Bool SCIPdoNotAggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8584
SCIP_RETCODE SCIPchgVarLbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazylb)
Definition: scip_var.c:5122
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8597
SCIP_RETCODE SCIPinferVarFixCons(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5431
SCIP_RETCODE SCIPinitVarBranchStats(SCIP *scip, SCIP_VAR *var, SCIP_Real downpscost, SCIP_Real uppscost, SCIP_Real downvsids, SCIP_Real upvsids, SCIP_Real downconflen, SCIP_Real upconflen, SCIP_Real downinfer, SCIP_Real upinfer, SCIP_Real downcutoff, SCIP_Real upcutoff)
Definition: scip_var.c:9536
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: scip_var.c:1793
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPaddVarImplication(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing, SCIP_VAR *implvar, SCIP_BOUNDTYPE impltype, SCIP_Real implbound, SCIP_Bool *infeasible, int *nbdchgs)
Definition: scip_var.c:6779
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:4436
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4765
SCIP_Real SCIPcalculatePscostConfidenceBound(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:8997
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8714
SCIP_RETCODE SCIPsetRelaxSolVal(SCIP *scip, SCIP_RELAX *relax, SCIP_VAR *var, SCIP_Real val)
Definition: scip_var.c:2413
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6227
SCIP_Real SCIPgetVarConflictlengthScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9302
SCIP_Real SCIPgetVarAvgInferenceScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9503
SCIP_Bool SCIPsignificantVarPscostDifference(SCIP *scip, SCIP_VAR *varx, SCIP_Real fracx, SCIP_VAR *vary, SCIP_Real fracy, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel, SCIP_Bool onesided)
Definition: scip_var.c:9028
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6525
SCIP_RETCODE SCIPinferVarUbProp(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6009
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
Definition: scip_var.c:1737
SCIP_Real SCIPgetVarAvgConflictlength(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9364
SCIP_RETCODE SCIPremoveVarFromGlobalStructures(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:7858
SCIP_RETCODE SCIPgetVarClosestVub(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvub, int *closestvubidx)
Definition: scip_var.c:6631
type definitions for problem variables
SCIP_Longint SCIPgetVarStrongbranchLPAge(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4193
type definitions for relaxators
SCIP_Real SCIPgetVarPseudocostCount(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8921
SCIP_Real SCIPgetVarPseudocostCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8895
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_var.c:4512
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
Definition: scip_var.c:2685
#define SCIP_Bool
Definition: def.h:91
SCIP_RETCODE SCIPinferVarFixProp(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_PROP *inferprop, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5825
int SCIPgetNCliquesCreated(SCIP *scip)
Definition: scip_var.c:7601
SCIP_RETCODE SCIPgetVarStrongbranchWithPropagation(SCIP *scip, SCIP_VAR *var, SCIP_Real solval, SCIP_Real lpobjval, int itlim, int maxproprounds, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Longint *ndomredsdown, SCIP_Longint *ndomredsup, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror, SCIP_Real *newlbs, SCIP_Real *newubs)
Definition: scip_var.c:3351
SCIP_RETCODE SCIPmarkRelaxSolValid(SCIP *scip, SCIP_RELAX *relax, SCIP_Bool includeslp)
Definition: scip_var.c:2556
SCIP_RETCODE SCIPcalcCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
Definition: scip_var.c:7255
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
Definition: scip_var.c:7709
void SCIPenableVarHistory(SCIP *scip)
Definition: scip_var.c:8740
SCIP_Real SCIPcomputeVarLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6462
SCIP_Real SCIPgetVarAvgInferenceCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:9833
SCIP_RETCODE SCIPgetVarsStrongbranchesInt(SCIP *scip, SCIP_VAR **vars, int nvars, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
Definition: scip_var.c:3883
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
Definition: scip_var.c:114
type definitions for branch and bound tree
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
Definition: scip_var.c:8655
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
Definition: scip_var.c:8275
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip_var.c:7979
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:4350
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5500
SCIP_RETCODE SCIPgetVarStrongbranchFrac(SCIP *scip, SCIP_VAR *var, int itlim, SCIP_Bool idempotent, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
Definition: scip_var.c:2918
type definitions for storing primal CIP solutions
SCIP_Real SCIPgetVarMultaggrLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6575
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
Definition: scip_var.c:343
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:131
type definitions for propagators
SCIP_CLIQUE ** SCIPgetCliques(SCIP *scip)
Definition: scip_var.c:7628
SCIP_Real SCIPgetVarAvgConflictlengthCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9390
SCIP_RETCODE SCIPaddVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real addfactor)
Definition: scip_var.c:7948
SCIP_LPSOLSTAT SCIPgetLastStrongbranchLPSolStat(SCIP *scip, SCIP_BRANCHDIR branchdir)
Definition: scip_var.c:3987
SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
Definition: scip_var.c:292
SCIP_RETCODE SCIPsetVarStrongbranchData(SCIP *scip, SCIP_VAR *var, SCIP_Real lpobjval, SCIP_Real primsol, SCIP_Real down, SCIP_Real up, SCIP_Bool downvalid, SCIP_Bool upvalid, SCIP_Longint iter, int itlim)
Definition: scip_var.c:4043
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
Definition: scip_var.c:1908
void SCIPfreeParseVarsPolynomialData(SCIP *scip, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int nmonomials)
Definition: scip_var.c:1157
static const SCIP_Real scalars[]
Definition: lp.c:5743
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5614
SCIP_RETCODE SCIPgetVarsStrongbranchesFrac(SCIP *scip, SCIP_VAR **vars, int nvars, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, SCIP_Bool *downinf, SCIP_Bool *upinf, SCIP_Bool *downconflict, SCIP_Bool *upconflict, SCIP_Bool *lperror)
Definition: scip_var.c:3772
SCIP_RETCODE SCIPgetVarSols(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_var.c:2326
SCIP_RETCODE SCIPendStrongbranch(SCIP *scip)
Definition: scip_var.c:2743
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
Definition: scip_var.c:2536
SCIP_Bool SCIPallowDualReds(SCIP *scip)
Definition: scip_var.c:8613
int SCIPgetNCliques(SCIP *scip)
Definition: scip_var.c:7574
SCIP_RETCODE SCIPaddVarBranchPriority(SCIP *scip, SCIP_VAR *var, int addpriority)
Definition: scip_var.c:8053
SCIP_RETCODE SCIPcalcNegatedCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
Definition: scip_var.c:7474
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
Definition: scip_var.c:8400
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1213
#define SCIP_Real
Definition: def.h:173
result codes for SCIP callback methods
type definitions for branching and inference history
SCIP_Real SCIPgetVarAvgGMIScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9876
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: scip_var.c:8084
SCIP_Bool SCIPhaveVarsCommonClique(SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
Definition: scip_var.c:7658
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
Definition: scip_var.c:8564
SCIP_RETCODE SCIPtransformVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:1348
#define SCIP_Longint
Definition: def.h:158
SCIP_RETCODE SCIPparseVarsPolynomial(SCIP *scip, const char *str, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int *nmonomials, char **endptr, SCIP_Bool *success)
Definition: scip_var.c:813
SCIP_Bool SCIPdoNotMultaggr(SCIP *scip)
Definition: scip_var.c:8574
SCIP_Real SCIPgetVarConflictScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9271
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:73
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2306
SCIP_Real SCIPgetVarMultaggrLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6545
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6347
SCIP_RETCODE SCIPinitVarValueBranchStats(SCIP *scip, SCIP_VAR *var, SCIP_Real value, SCIP_Real downvsids, SCIP_Real upvsids, SCIP_Real downconflen, SCIP_Real upconflen, SCIP_Real downinfer, SCIP_Real upinfer, SCIP_Real downcutoff, SCIP_Real upcutoff)
Definition: scip_var.c:9607
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPupdateVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip_var.c:8020
SCIP_RETCODE SCIPcleanupCliques(SCIP *scip, SCIP_Bool *infeasible)
Definition: scip_var.c:7531
SCIP_Real SCIPgetVarFarkasCoef(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1953
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
Definition: scip_var.c:230
int SCIPgetVarNStrongbranchs(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4225
SCIP_RETCODE SCIPgetActiveVars(SCIP *scip, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
Definition: scip_var.c:1829
void SCIPdisableVarHistory(SCIP *scip)
Definition: scip_var.c:8759
SCIP_Real SCIPgetVarAvgInferenceScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9472
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
Definition: scip_var.c:8628
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5722
SCIP_RETCODE SCIPparseVar(SCIP *scip, SCIP_VAR **var, const char *str, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARCOPY((*varcopy)), SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_VARDATA *vardata, char **endptr, SCIP_Bool *success)
Definition: scip_var.c:474
SCIP_RETCODE SCIPchgVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real branchfactor)
Definition: scip_var.c:7892
SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)
Definition: scip_var.c:9993
SCIP_Bool SCIPallowObjProp(SCIP *scip)
Definition: scip_var.c:8641
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
Definition: scip_var.c:1526
type definitions for constraints and constraint handlers
SCIP_Real SCIPgetVarConflictScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9240
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2602
SCIP_RETCODE SCIPchgVarName(SCIP *scip, SCIP_VAR *var, const char *name)
Definition: scip_var.c:1298
SCIP_Real SCIPgetVarAvgCutoffScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9726