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  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
453  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
454  *
455  * @pre This method can be called if @p scip is in one of the following stages:
456  * - \ref SCIP_STAGE_PROBLEM
457  * - \ref SCIP_STAGE_TRANSFORMING
458  * - \ref SCIP_STAGE_INITPRESOLVE
459  * - \ref SCIP_STAGE_PRESOLVING
460  * - \ref SCIP_STAGE_EXITPRESOLVE
461  * - \ref SCIP_STAGE_PRESOLVED
462  * - \ref SCIP_STAGE_SOLVING
463  */
464 SCIP_EXPORT
466  SCIP* scip, /**< SCIP data structure */
467  SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
468  SCIP_Real*** monomialexps, /**< pointer to store arrays with variable exponents */
469  SCIP_Real** monomialcoefs, /**< pointer to store array with monomial coefficients */
470  int** monomialnvars, /**< pointer to store array with number of variables for each monomial */
471  int nmonomials /**< pointer to store number of parsed monomials */
472  );
473 
474 /** increases usage counter of variable
475  *
476  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
477  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
478  *
479  * @pre This method can be called if @p scip is in one of the following stages:
480  * - \ref SCIP_STAGE_PROBLEM
481  * - \ref SCIP_STAGE_TRANSFORMING
482  * - \ref SCIP_STAGE_TRANSFORMED
483  * - \ref SCIP_STAGE_INITPRESOLVE
484  * - \ref SCIP_STAGE_PRESOLVING
485  * - \ref SCIP_STAGE_EXITPRESOLVE
486  * - \ref SCIP_STAGE_PRESOLVED
487  * - \ref SCIP_STAGE_INITSOLVE
488  * - \ref SCIP_STAGE_SOLVING
489  * - \ref SCIP_STAGE_SOLVED
490  * - \ref SCIP_STAGE_EXITSOLVE
491  */
492 SCIP_EXPORT
494  SCIP* scip, /**< SCIP data structure */
495  SCIP_VAR* var /**< variable to capture */
496  );
497 
498 /** decreases usage counter of variable, if the usage pointer reaches zero the variable gets freed
499  *
500  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
501  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
502  *
503  * @pre This method can be called if @p scip is in one of the following stages:
504  * - \ref SCIP_STAGE_PROBLEM
505  * - \ref SCIP_STAGE_TRANSFORMING
506  * - \ref SCIP_STAGE_TRANSFORMED
507  * - \ref SCIP_STAGE_INITPRESOLVE
508  * - \ref SCIP_STAGE_PRESOLVING
509  * - \ref SCIP_STAGE_EXITPRESOLVE
510  * - \ref SCIP_STAGE_PRESOLVED
511  * - \ref SCIP_STAGE_INITSOLVE
512  * - \ref SCIP_STAGE_SOLVING
513  * - \ref SCIP_STAGE_SOLVED
514  * - \ref SCIP_STAGE_EXITSOLVE
515  * - \ref SCIP_STAGE_FREETRANS
516  *
517  * @note the pointer of the variable will be NULLed
518  */
519 SCIP_EXPORT
521  SCIP* scip, /**< SCIP data structure */
522  SCIP_VAR** var /**< pointer to variable */
523  );
524 
525 /** changes the name of a variable
526  *
527  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
528  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
529  *
530  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PROBLEM
531  *
532  * @note to get the current name of a variable, use SCIPvarGetName() from pub_var.h
533  */
534 SCIP_EXPORT
536  SCIP* scip, /**< SCIP data structure */
537  SCIP_VAR* var, /**< variable */
538  const char* name /**< new name of constraint */
539  );
540 
541 /** gets and captures transformed variable of a given variable; if the variable is not yet transformed,
542  * a new transformed variable for this variable is created
543  *
544  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
545  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
546  *
547  * @pre This method can be called if @p scip is in one of the following stages:
548  * - \ref SCIP_STAGE_TRANSFORMING
549  * - \ref SCIP_STAGE_TRANSFORMED
550  * - \ref SCIP_STAGE_INITPRESOLVE
551  * - \ref SCIP_STAGE_PRESOLVING
552  * - \ref SCIP_STAGE_EXITPRESOLVE
553  * - \ref SCIP_STAGE_PRESOLVED
554  * - \ref SCIP_STAGE_INITSOLVE
555  * - \ref SCIP_STAGE_SOLVING
556  */
557 SCIP_EXPORT
559  SCIP* scip, /**< SCIP data structure */
560  SCIP_VAR* var, /**< variable to get/create transformed variable for */
561  SCIP_VAR** transvar /**< pointer to store the transformed variable */
562  );
563 
564 /** gets and captures transformed variables for an array of variables;
565  * if a variable of the array is not yet transformed, a new transformed variable for this variable is created;
566  * it is possible to call this method with vars == transvars
567  *
568  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
569  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
570  *
571  * @pre This method can be called if @p scip is in one of the following stages:
572  * - \ref SCIP_STAGE_TRANSFORMING
573  * - \ref SCIP_STAGE_TRANSFORMED
574  * - \ref SCIP_STAGE_INITPRESOLVE
575  * - \ref SCIP_STAGE_PRESOLVING
576  * - \ref SCIP_STAGE_EXITPRESOLVE
577  * - \ref SCIP_STAGE_PRESOLVED
578  * - \ref SCIP_STAGE_INITSOLVE
579  * - \ref SCIP_STAGE_SOLVING
580  */
581 SCIP_EXPORT
583  SCIP* scip, /**< SCIP data structure */
584  int nvars, /**< number of variables to get/create transformed variables for */
585  SCIP_VAR** vars, /**< array with variables to get/create transformed variables for */
586  SCIP_VAR** transvars /**< array to store the transformed variables */
587  );
588 
589 /** gets corresponding transformed variable of a given variable;
590  * returns NULL as transvar, if transformed variable is not yet existing
591  *
592  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
593  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
594  *
595  * @pre This method can be called if @p scip is in one of the following stages:
596  * - \ref SCIP_STAGE_TRANSFORMING
597  * - \ref SCIP_STAGE_TRANSFORMED
598  * - \ref SCIP_STAGE_INITPRESOLVE
599  * - \ref SCIP_STAGE_PRESOLVING
600  * - \ref SCIP_STAGE_EXITPRESOLVE
601  * - \ref SCIP_STAGE_PRESOLVED
602  * - \ref SCIP_STAGE_INITSOLVE
603  * - \ref SCIP_STAGE_SOLVING
604  * - \ref SCIP_STAGE_SOLVED
605  * - \ref SCIP_STAGE_EXITSOLVE
606  * - \ref SCIP_STAGE_FREETRANS
607  */
608 SCIP_EXPORT
610  SCIP* scip, /**< SCIP data structure */
611  SCIP_VAR* var, /**< variable to get transformed variable for */
612  SCIP_VAR** transvar /**< pointer to store the transformed variable */
613  );
614 
615 /** gets corresponding transformed variables for an array of variables;
616  * stores NULL in a transvars slot, if the transformed variable is not yet existing;
617  * it is possible to call this method with vars == transvars, but remember that variables that are not
618  * yet transformed will be replaced with NULL
619  *
620  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
621  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
622  *
623  * @pre This method can be called if @p scip is in one of the following stages:
624  * - \ref SCIP_STAGE_TRANSFORMING
625  * - \ref SCIP_STAGE_TRANSFORMED
626  * - \ref SCIP_STAGE_INITPRESOLVE
627  * - \ref SCIP_STAGE_PRESOLVING
628  * - \ref SCIP_STAGE_EXITPRESOLVE
629  * - \ref SCIP_STAGE_PRESOLVED
630  * - \ref SCIP_STAGE_INITSOLVE
631  * - \ref SCIP_STAGE_SOLVING
632  * - \ref SCIP_STAGE_SOLVED
633  * - \ref SCIP_STAGE_EXITSOLVE
634  * - \ref SCIP_STAGE_FREETRANS
635  */
636 SCIP_EXPORT
638  SCIP* scip, /**< SCIP data structure */
639  int nvars, /**< number of variables to get transformed variables for */
640  SCIP_VAR** vars, /**< array with variables to get transformed variables for */
641  SCIP_VAR** transvars /**< array to store the transformed variables */
642  );
643 
644 /** gets negated variable x' = lb + ub - x of variable x; negated variable is created, if not yet existing
645  *
646  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
647  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
648  *
649  * @pre This method can be called if @p scip is in one of the following stages:
650  * - \ref SCIP_STAGE_PROBLEM
651  * - \ref SCIP_STAGE_TRANSFORMING
652  * - \ref SCIP_STAGE_TRANSFORMED
653  * - \ref SCIP_STAGE_INITPRESOLVE
654  * - \ref SCIP_STAGE_PRESOLVING
655  * - \ref SCIP_STAGE_EXITPRESOLVE
656  * - \ref SCIP_STAGE_PRESOLVED
657  * - \ref SCIP_STAGE_INITSOLVE
658  * - \ref SCIP_STAGE_SOLVING
659  * - \ref SCIP_STAGE_SOLVED
660  * - \ref SCIP_STAGE_EXITSOLVE
661  * - \ref SCIP_STAGE_FREETRANS
662  */
663 SCIP_EXPORT
665  SCIP* scip, /**< SCIP data structure */
666  SCIP_VAR* var, /**< variable to get negated variable for */
667  SCIP_VAR** negvar /**< pointer to store the negated variable */
668  );
669 
670 /** gets negated variables x' = lb + ub - x of variables x; negated variables are created, if not yet existing;
671  * in difference to \ref SCIPcreateVar, the negated variable must not be released (unless captured explicitly)
672  *
673  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
674  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
675  *
676  * @pre This method can be called if @p scip is in one of the following stages:
677  * - \ref SCIP_STAGE_PROBLEM
678  * - \ref SCIP_STAGE_TRANSFORMING
679  * - \ref SCIP_STAGE_TRANSFORMED
680  * - \ref SCIP_STAGE_INITPRESOLVE
681  * - \ref SCIP_STAGE_PRESOLVING
682  * - \ref SCIP_STAGE_EXITPRESOLVE
683  * - \ref SCIP_STAGE_PRESOLVED
684  * - \ref SCIP_STAGE_INITSOLVE
685  * - \ref SCIP_STAGE_SOLVING
686  * - \ref SCIP_STAGE_SOLVED
687  * - \ref SCIP_STAGE_EXITSOLVE
688  * - \ref SCIP_STAGE_FREETRANS
689  */
690 SCIP_EXPORT
692  SCIP* scip, /**< SCIP data structure */
693  int nvars, /**< number of variables to get negated variables for */
694  SCIP_VAR** vars, /**< array of variables to get negated variables for */
695  SCIP_VAR** negvars /**< array to store the negated variables */
696  );
697 
698 /** gets a binary variable that is equal to the given binary variable, and that is either active, fixed, or
699  * multi-aggregated, or the negated variable of an active, fixed, or multi-aggregated variable
700  *
701  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
702  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
703  *
704  * @pre This method can be called if @p scip is in one of the following stages:
705  * - \ref SCIP_STAGE_PROBLEM
706  * - \ref SCIP_STAGE_TRANSFORMED
707  * - \ref SCIP_STAGE_INITPRESOLVE
708  * - \ref SCIP_STAGE_PRESOLVING
709  * - \ref SCIP_STAGE_EXITPRESOLVE
710  * - \ref SCIP_STAGE_PRESOLVED
711  * - \ref SCIP_STAGE_INITSOLVE
712  * - \ref SCIP_STAGE_SOLVING
713  * - \ref SCIP_STAGE_SOLVED
714  * - \ref SCIP_STAGE_EXITSOLVE
715  */
716 SCIP_EXPORT
718  SCIP* scip, /**< SCIP data structure */
719  SCIP_VAR* var, /**< binary variable to get binary representative for */
720  SCIP_VAR** repvar, /**< pointer to store the binary representative */
721  SCIP_Bool* negated /**< pointer to store whether the negation of an active variable was returned */
722  );
723 
724 /** gets binary variables that are equal to the given binary variables, and which are either active, fixed, or
725  * multi-aggregated, or the negated variables of active, fixed, or multi-aggregated variables
726  *
727  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
728  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
729  *
730  * @pre This method can be called if @p scip is in one of the following stages:
731  * - \ref SCIP_STAGE_PROBLEM
732  * - \ref SCIP_STAGE_TRANSFORMED
733  * - \ref SCIP_STAGE_INITPRESOLVE
734  * - \ref SCIP_STAGE_PRESOLVING
735  * - \ref SCIP_STAGE_EXITPRESOLVE
736  * - \ref SCIP_STAGE_PRESOLVED
737  * - \ref SCIP_STAGE_INITSOLVE
738  * - \ref SCIP_STAGE_SOLVING
739  * - \ref SCIP_STAGE_SOLVED
740  * - \ref SCIP_STAGE_EXITSOLVE
741  */
742 SCIP_EXPORT
744  SCIP* scip, /**< SCIP data structure */
745  int nvars, /**< number of binary variables to get representatives for */
746  SCIP_VAR** vars, /**< binary variables to get binary representatives for */
747  SCIP_VAR** repvars, /**< array to store the binary representatives */
748  SCIP_Bool* negated /**< array to store whether the negation of an active variable was returned */
749  );
750 
751 /** flattens aggregation graph of multi-aggregated variable in order to avoid exponential recursion later on
752  *
753  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
754  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
755  *
756  * @pre This method can be called if @p scip is in one of the following stages:
757  * - \ref SCIP_STAGE_INITPRESOLVE
758  * - \ref SCIP_STAGE_PRESOLVING
759  * - \ref SCIP_STAGE_EXITPRESOLVE
760  * - \ref SCIP_STAGE_PRESOLVED
761  * - \ref SCIP_STAGE_INITSOLVE
762  * - \ref SCIP_STAGE_SOLVING
763  * - \ref SCIP_STAGE_SOLVED
764  */
765 SCIP_EXPORT
767  SCIP* scip, /**< SCIP data structure */
768  SCIP_VAR* var /**< problem variable */
769  );
770 
771 /** Transforms a given linear sum of variables, that is a_1*x_1 + ... + a_n*x_n + c into a corresponding linear sum of
772  * active variables, that is b_1*y_1 + ... + b_m*y_m + d.
773  *
774  * If the number of needed active variables is greater than the available slots in the variable array, nothing happens
775  * except that the required size is stored in the corresponding variable (requiredsize). Otherwise, the active variable
776  * representation is stored in the variable array, scalar array and constant.
777  *
778  * The reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been
779  * allocated (e.g., by a C++ 'new' or SCIP functions).
780  *
781  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
782  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
783  *
784  * @pre This method can be called if @p scip is in one of the following stages:
785  * - \ref SCIP_STAGE_TRANSFORMED
786  * - \ref SCIP_STAGE_INITPRESOLVE
787  * - \ref SCIP_STAGE_PRESOLVING
788  * - \ref SCIP_STAGE_EXITPRESOLVE
789  * - \ref SCIP_STAGE_PRESOLVED
790  * - \ref SCIP_STAGE_INITSOLVE
791  * - \ref SCIP_STAGE_SOLVING
792  * - \ref SCIP_STAGE_SOLVED
793  * - \ref SCIP_STAGE_EXITSOLVE
794  * - \ref SCIP_STAGE_FREETRANS
795  *
796  * @note The resulting linear sum is stored into the given variable array, scalar array, and constant. That means the
797  * given entries are overwritten.
798  *
799  * @note That method can be used to convert a single variables into variable space of active variables. Therefore call
800  * the method with the linear sum 1.0*x + 0.0.
801  */
802 SCIP_EXPORT
804  SCIP* scip, /**< SCIP data structure */
805  SCIP_VAR** vars, /**< variable array x_1, ..., x_n in the linear sum which will be
806  * overwritten by the variable array y_1, ..., y_m in the linear sum
807  * w.r.t. active variables */
808  SCIP_Real* scalars, /**< scalars a_1, ..., a_n in linear sum which will be overwritten to the
809  * scalars b_1, ..., b_m in the linear sum of the active variables */
810  int* nvars, /**< pointer to number of variables in the linear sum which will be
811  * overwritten by the number of variables in the linear sum corresponding
812  * to the active variables */
813  int varssize, /**< available slots in vars and scalars array which is needed to check if
814  * the array are large enough for the linear sum w.r.t. active
815  * variables */
816  SCIP_Real* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c which
817  * will chnage to constant d in the linear sum b_1*y_1 + ... + b_m*y_m +
818  * d w.r.t. the active variables */
819  int* requiredsize, /**< pointer to store the required array size for the linear sum w.r.t. the
820  * active variables */
821  SCIP_Bool mergemultiples /**< should multiple occurrences of a var be replaced by a single coeff? */
822  );
823 
824 /** transforms given variable, scalar and constant to the corresponding active, fixed, or
825  * multi-aggregated variable, scalar and constant; if the variable resolves to a fixed variable,
826  * "scalar" will be 0.0 and the value of the sum will be stored in "constant"; a multi-aggregation
827  * with only one active variable (this can happen due to fixings after the multi-aggregation),
828  * is treated like an aggregation; if the multi-aggregation constant is infinite, "scalar" will be 0.0
829  *
830  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
831  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
832  *
833  * @pre This method can be called if @p scip is in one of the following stages:
834  * - \ref SCIP_STAGE_TRANSFORMED
835  * - \ref SCIP_STAGE_INITPRESOLVE
836  * - \ref SCIP_STAGE_PRESOLVING
837  * - \ref SCIP_STAGE_EXITPRESOLVE
838  * - \ref SCIP_STAGE_PRESOLVED
839  * - \ref SCIP_STAGE_INITSOLVE
840  * - \ref SCIP_STAGE_SOLVING
841  * - \ref SCIP_STAGE_SOLVED
842  * - \ref SCIP_STAGE_EXITSOLVE
843  * - \ref SCIP_STAGE_FREETRANS
844  */
845 SCIP_EXPORT
847  SCIP* scip, /**< SCIP data structure */
848  SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
849  SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
850  SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
851  );
852 
853 /** return for given variables all their active counterparts; all active variables will be pairwise different
854  * @note It does not hold that the first output variable is the active variable for the first input variable.
855  *
856  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
857  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
858  *
859  * @pre This method can be called if @p scip is in one of the following stages:
860  * - \ref SCIP_STAGE_TRANSFORMED
861  * - \ref SCIP_STAGE_INITPRESOLVE
862  * - \ref SCIP_STAGE_PRESOLVING
863  * - \ref SCIP_STAGE_EXITPRESOLVE
864  * - \ref SCIP_STAGE_PRESOLVED
865  * - \ref SCIP_STAGE_INITSOLVE
866  * - \ref SCIP_STAGE_SOLVING
867  * - \ref SCIP_STAGE_SOLVED
868  * - \ref SCIP_STAGE_EXITSOLVE
869  * - \ref SCIP_STAGE_FREETRANS
870  */
871 SCIP_EXPORT
873  SCIP* scip, /**< SCIP data structure */
874  SCIP_VAR** vars, /**< variable array with given variables and as output all active
875  * variables, if enough slots exist */
876  int* nvars, /**< number of given variables, and as output number of active variables,
877  * if enough slots exist */
878  int varssize, /**< available slots in vars array */
879  int* requiredsize /**< pointer to store the required array size for the active variables */
880  );
881 
882 /** returns the reduced costs of the variable in the current node's LP relaxation;
883  * the current node has to have a feasible LP.
884  *
885  * returns SCIP_INVALID if the variable is active but not in the current LP;
886  * returns 0 if the variable has been aggregated out or fixed in presolving.
887  *
888  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
889  *
890  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
891  */
892 SCIP_EXPORT
894  SCIP* scip, /**< SCIP data structure */
895  SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
896  );
897 
898 /** returns the implied reduced costs of the variable in the current node's LP relaxation;
899  * the current node has to have a feasible LP.
900  *
901  * returns SCIP_INVALID if the variable is active but not in the current LP;
902  * returns 0 if the variable has been aggregated out or fixed in presolving.
903  *
904  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
905  *
906  * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
907  */
908 SCIP_EXPORT
910  SCIP* scip, /**< SCIP data structure */
911  SCIP_VAR* var, /**< variable to get reduced costs, should be a column in current node LP */
912  SCIP_Bool varfixing /**< FALSE if for x == 0, TRUE for x == 1 */
913  );
914 
915 /** returns the Farkas coefficient of the variable in the current node's LP relaxation;
916  * the current node has to have an infeasible LP.
917  *
918  * returns SCIP_INVALID if the variable is active but not in the current LP;
919  * returns 0 if the variable has been aggregated out or fixed in presolving.
920  *
921  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
922  */
923 SCIP_EXPORT
925  SCIP* scip, /**< SCIP data structure */
926  SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
927  );
928 
929 /** returns lower bound of variable directly before or after the bound change given by the bound change index
930  * was applied
931  */
932 SCIP_EXPORT
934  SCIP* scip, /**< SCIP data structure */
935  SCIP_VAR* var, /**< problem variable */
936  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
937  SCIP_Bool after /**< should the bound change with given index be included? */
938  );
939 
940 /** returns upper bound of variable directly before or after the bound change given by the bound change index
941  * was applied
942  */
943 SCIP_EXPORT
945  SCIP* scip, /**< SCIP data structure */
946  SCIP_VAR* var, /**< problem variable */
947  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
948  SCIP_Bool after /**< should the bound change with given index be included? */
949  );
950 
951 /** returns lower or upper bound of variable directly before or after the bound change given by the bound change index
952  * was applied
953  */
954 SCIP_EXPORT
956  SCIP* scip, /**< SCIP data structure */
957  SCIP_VAR* var, /**< problem variable */
958  SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
959  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
960  SCIP_Bool after /**< should the bound change with given index be included? */
961  );
962 
963 /** returns whether the binary variable was fixed at the time given by the bound change index */
964 SCIP_EXPORT
966  SCIP* scip, /**< SCIP data structure */
967  SCIP_VAR* var, /**< problem variable */
968  SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
969  SCIP_Bool after /**< should the bound change with given index be included? */
970  );
971 
972 /** gets solution value for variable in current node
973  *
974  * @return solution value for variable in current node
975  *
976  * @pre This method can be called if @p scip is in one of the following stages:
977  * - \ref SCIP_STAGE_PRESOLVED
978  * - \ref SCIP_STAGE_SOLVING
979  */
980 SCIP_EXPORT
982  SCIP* scip, /**< SCIP data structure */
983  SCIP_VAR* var /**< variable to get solution value for */
984  );
985 
986 /** gets solution values of multiple variables in current node
987  *
988  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
989  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
990  *
991  * @pre This method can be called if @p scip is in one of the following stages:
992  * - \ref SCIP_STAGE_PRESOLVED
993  * - \ref SCIP_STAGE_SOLVING
994  */
995 SCIP_EXPORT
997  SCIP* scip, /**< SCIP data structure */
998  int nvars, /**< number of variables to get solution value for */
999  SCIP_VAR** vars, /**< array with variables to get value for */
1000  SCIP_Real* vals /**< array to store solution values of variables */
1001  );
1002 
1003 /** sets the solution value of all variables in the global relaxation solution to zero
1004  *
1005  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1006  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1007  *
1008  * @pre This method can be called if @p scip is in one of the following stages:
1009  * - \ref SCIP_STAGE_PRESOLVED
1010  * - \ref SCIP_STAGE_SOLVING
1011  */
1012 SCIP_EXPORT
1014  SCIP* scip, /**< SCIP data structure */
1015  SCIP_RELAX* relax /**< relaxator data structure */
1016  );
1017 
1018 /** sets the value of the given variable in the global relaxation solution;
1019  * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1020  * You can use SCIPclearRelaxSolVals() to set all values to zero, initially;
1021  * after setting all solution values, you have to call SCIPmarkRelaxSolValid()
1022  * to inform SCIP that the stored solution is valid
1023  *
1024  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1025  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1026  *
1027  * @pre This method can be called if @p scip is in one of the following stages:
1028  * - \ref SCIP_STAGE_PRESOLVED
1029  * - \ref SCIP_STAGE_SOLVING
1030  *
1031  * @note This method incrementally updates the objective value of the relaxation solution. If the whole solution
1032  * should be updated, using SCIPsetRelaxSolVals() instead or calling SCIPclearRelaxSolVals() before setting
1033  * the first value to reset the solution and the objective value to 0 may help the numerics.
1034  */
1035 SCIP_EXPORT
1037  SCIP* scip, /**< SCIP data structure */
1038  SCIP_RELAX* relax, /**< relaxator data structure */
1039  SCIP_VAR* var, /**< variable to set value for */
1040  SCIP_Real val /**< solution value of variable */
1041  );
1042 
1043 /** sets the values of the given variables in the global relaxation solution and informs SCIP about the validity
1044  * and whether the solution can be enforced via linear cuts;
1045  * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1046  * the solution is automatically cleared, s.t. all other variables get value 0.0
1047  *
1048  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1049  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1050  *
1051  * @pre This method can be called if @p scip is in one of the following stages:
1052  * - \ref SCIP_STAGE_PRESOLVED
1053  * - \ref SCIP_STAGE_SOLVING
1054  */
1055 SCIP_EXPORT
1057  SCIP* scip, /**< SCIP data structure */
1058  SCIP_RELAX* relax, /**< relaxator data structure */
1059  int nvars, /**< number of variables to set relaxation solution value for */
1060  SCIP_VAR** vars, /**< array with variables to set value for */
1061  SCIP_Real* vals, /**< array with solution values of variables */
1062  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1063  );
1064 
1065 /** sets the values of the variables in the global relaxation solution to the values in the given primal solution
1066  * and informs SCIP about the validity and whether the solution can be enforced via linear cuts;
1067  * the relaxation solution can be filled by the relaxation handlers and might be used by heuristics and for separation
1068  *
1069  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1070  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1071  *
1072  * @pre This method can be called if @p scip is in one of the following stages:
1073  * - \ref SCIP_STAGE_PRESOLVED
1074  * - \ref SCIP_STAGE_SOLVING
1075  */
1076 SCIP_EXPORT
1078  SCIP* scip, /**< SCIP data structure */
1079  SCIP_RELAX* relax, /**< relaxator data structure */
1080  SCIP_SOL* sol, /**< primal relaxation solution */
1081  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1082  );
1083 
1084 /** returns whether the relaxation solution is valid
1085  *
1086  * @return TRUE, if the relaxation solution is valid; FALSE, otherwise
1087  *
1088  * @pre This method can be called if @p scip is in one of the following stages:
1089  * - \ref SCIP_STAGE_PRESOLVED
1090  * - \ref SCIP_STAGE_SOLVING
1091  */
1092 SCIP_EXPORT
1094  SCIP* scip /**< SCIP data structure */
1095  );
1096 
1097 /** informs SCIP that the relaxation solution is valid and whether the relaxation can be enforced through linear cuts
1098  *
1099  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1100  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1101  *
1102  * @pre This method can be called if @p scip is in one of the following stages:
1103  * - \ref SCIP_STAGE_PRESOLVED
1104  * - \ref SCIP_STAGE_SOLVING
1105  */
1106 SCIP_EXPORT
1108  SCIP* scip, /**< SCIP data structure */
1109  SCIP_RELAX* relax, /**< relaxator data structure that set the current relaxation solution */
1110  SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1111  );
1112 
1113 /** informs SCIP, that the relaxation solution is invalid
1114  *
1115  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1116  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1117  *
1118  * @pre This method can be called if @p scip is in one of the following stages:
1119  * - \ref SCIP_STAGE_PRESOLVED
1120  * - \ref SCIP_STAGE_SOLVING
1121  */
1122 SCIP_EXPORT
1124  SCIP* scip /**< SCIP data structure */
1125  );
1126 
1127 /** gets the relaxation solution value of the given variable
1128  *
1129  * @return the relaxation solution value of the given variable
1130  *
1131  * @pre This method can be called if @p scip is in one of the following stages:
1132  * - \ref SCIP_STAGE_PRESOLVED
1133  * - \ref SCIP_STAGE_SOLVING
1134  */
1135 SCIP_EXPORT
1137  SCIP* scip, /**< SCIP data structure */
1138  SCIP_VAR* var /**< variable to get value for */
1139  );
1140 
1141 /** gets the relaxation solution objective value
1142  *
1143  * @return the objective value of the relaxation solution
1144  *
1145  * @pre This method can be called if @p scip is in one of the following stages:
1146  * - \ref SCIP_STAGE_PRESOLVED
1147  * - \ref SCIP_STAGE_SOLVING
1148  */
1149 SCIP_EXPORT
1151  SCIP* scip /**< SCIP data structure */
1152  );
1153 
1154 /** determine which branching direction should be evaluated first by strong branching
1155  *
1156  * @return TRUE iff strong branching should first evaluate the down child
1157  *
1158  */
1159 SCIP_EXPORT
1161  SCIP* scip, /**< SCIP data structure */
1162  SCIP_VAR* var /**< variable to determine the branching direction on */
1163  );
1164 
1165 /** start strong branching - call before any strong branching
1166  *
1167  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1168  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1169  *
1170  * @pre This method can be called if @p scip is in one of the following stages:
1171  * - \ref SCIP_STAGE_PRESOLVED
1172  * - \ref SCIP_STAGE_SOLVING
1173  *
1174  * @note if propagation is enabled, strong branching is not done directly on the LP, but probing nodes are created
1175  * which allow to perform propagation but also creates some overhead
1176  */
1177 SCIP_EXPORT
1179  SCIP* scip, /**< SCIP data structure */
1180  SCIP_Bool enablepropagation /**< should propagation be done before solving the strong branching LP? */
1181  );
1182 
1183 /** end strong branching - call after any strong branching
1184  *
1185  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1186  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1187  *
1188  * @pre This method can be called if @p scip is in one of the following stages:
1189  * - \ref SCIP_STAGE_PRESOLVED
1190  * - \ref SCIP_STAGE_SOLVING
1191  */
1192 SCIP_EXPORT
1194  SCIP* scip /**< SCIP data structure */
1195  );
1196 
1197 /** gets strong branching information on column variable with fractional value
1198  *
1199  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1200  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1201  *
1202  * @pre This method can be called if @p scip is in one of the following stages:
1203  * - \ref SCIP_STAGE_PRESOLVED
1204  * - \ref SCIP_STAGE_SOLVING
1205  */
1206 SCIP_EXPORT
1208  SCIP* scip, /**< SCIP data structure */
1209  SCIP_VAR* var, /**< variable to get strong branching values for */
1210  int itlim, /**< iteration limit for strong branchings */
1211  SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1212  SCIP_Real* down, /**< stores dual bound after branching column down */
1213  SCIP_Real* up, /**< stores dual bound after branching column up */
1214  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1215  * otherwise, it can only be used as an estimate value */
1216  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1217  * otherwise, it can only be used as an estimate value */
1218  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1219  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1220  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1221  * infeasible downwards branch, or NULL */
1222  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1223  * infeasible upwards branch, or NULL */
1224  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1225  * solving process should be stopped (e.g., due to a time limit) */
1226  );
1227 
1228 /** gets strong branching information with previous domain propagation on column variable
1229  *
1230  * Before calling this method, the strong branching mode must have been activated by calling SCIPstartStrongbranch();
1231  * after strong branching was done for all candidate variables, the strong branching mode must be ended by
1232  * SCIPendStrongbranch(). Since this method applies domain propagation before strongbranching, propagation has to be be
1233  * enabled in the SCIPstartStrongbranch() call.
1234  *
1235  * Before solving the strong branching LP, domain propagation can be performed. The number of propagation rounds
1236  * can be specified by the parameter @p maxproprounds.
1237  *
1238  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1239  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1240  *
1241  * @pre This method can be called if @p scip is in one of the following stages:
1242  * - \ref SCIP_STAGE_PRESOLVED
1243  * - \ref SCIP_STAGE_SOLVING
1244  *
1245  * @warning When using this method, LP banching candidates and solution values must be copied beforehand, because
1246  * they are updated w.r.t. the strong branching LP solution.
1247  */
1248 SCIP_EXPORT
1250  SCIP* scip, /**< SCIP data structure */
1251  SCIP_VAR* var, /**< variable to get strong branching values for */
1252  SCIP_Real solval, /**< value of the variable in the current LP solution */
1253  SCIP_Real lpobjval, /**< LP objective value of the current LP solution */
1254  int itlim, /**< iteration limit for strong branchings */
1255  int maxproprounds, /**< maximum number of propagation rounds (-1: no limit, -2: parameter
1256  * settings) */
1257  SCIP_Real* down, /**< stores dual bound after branching column down */
1258  SCIP_Real* up, /**< stores dual bound after branching column up */
1259  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1260  * otherwise, it can only be used as an estimate value */
1261  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1262  * otherwise, it can only be used as an estimate value */
1263  SCIP_Longint* ndomredsdown, /**< pointer to store the number of domain reductions down, or NULL */
1264  SCIP_Longint* ndomredsup, /**< pointer to store the number of domain reductions up, or NULL */
1265  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1266  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1267  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1268  * infeasible downwards branch, or NULL */
1269  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1270  * infeasible upwards branch, or NULL */
1271  SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred or the
1272  * solving process should be stopped (e.g., due to a time limit) */
1273  SCIP_Real* newlbs, /**< array to store valid lower bounds for all active variables, or NULL */
1274  SCIP_Real* newubs /**< array to store valid upper bounds for all active variables, or NULL */
1275  );
1276 
1277 /** gets strong branching information on column variable x with integral LP solution value (val); that is, the down branch
1278  * is (val -1.0) and the up brach ins (val +1.0)
1279  *
1280  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1281  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1282  *
1283  * @pre This method can be called if @p scip is in one of the following stages:
1284  * - \ref SCIP_STAGE_PRESOLVED
1285  * - \ref SCIP_STAGE_SOLVING
1286  *
1287  * @note If the integral LP solution value is the lower or upper bound of the variable, the corresponding branch will be
1288  * marked as infeasible. That is, the valid pointer and the infeasible pointer are set to TRUE.
1289  */
1290 SCIP_EXPORT
1292  SCIP* scip, /**< SCIP data structure */
1293  SCIP_VAR* var, /**< variable to get strong branching values for */
1294  int itlim, /**< iteration limit for strong branchings */
1295  SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1296  SCIP_Real* down, /**< stores dual bound after branching column down */
1297  SCIP_Real* up, /**< stores dual bound after branching column up */
1298  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1299  * otherwise, it can only be used as an estimate value */
1300  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1301  * otherwise, it can only be used as an estimate value */
1302  SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1303  SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1304  SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1305  * infeasible downwards branch, or NULL */
1306  SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1307  * infeasible upwards branch, or NULL */
1308  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1309  * solving process should be stopped (e.g., due to a time limit) */
1310  );
1311 
1312 /** gets strong branching information on column variables with fractional values
1313  *
1314  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1315  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1316  *
1317  * @pre This method can be called if @p scip is in one of the following stages:
1318  * - \ref SCIP_STAGE_PRESOLVED
1319  * - \ref SCIP_STAGE_SOLVING
1320  */
1321 SCIP_EXPORT
1323  SCIP* scip, /**< SCIP data structure */
1324  SCIP_VAR** vars, /**< variables to get strong branching values for */
1325  int nvars, /**< number of variables */
1326  int itlim, /**< iteration limit for strong branchings */
1327  SCIP_Real* down, /**< stores dual bounds after branching variables down */
1328  SCIP_Real* up, /**< stores dual bounds after branching variables up */
1329  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1330  * otherwise, they can only be used as an estimate value */
1331  SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1332  * otherwise, they can only be used as an estimate value */
1333  SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1334  SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1335  SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1336  * infeasible downward branches, or NULL */
1337  SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1338  * infeasible upward branches, or NULL */
1339  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1340  * solving process should be stopped (e.g., due to a time limit) */
1341  );
1342 
1343 /** gets strong branching information on column variables with integral values
1344  *
1345  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1346  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1347  *
1348  * @pre This method can be called if @p scip is in one of the following stages:
1349  * - \ref SCIP_STAGE_PRESOLVED
1350  * - \ref SCIP_STAGE_SOLVING
1351  */
1352 SCIP_EXPORT
1354  SCIP* scip, /**< SCIP data structure */
1355  SCIP_VAR** vars, /**< variables to get strong branching values for */
1356  int nvars, /**< number of variables */
1357  int itlim, /**< iteration limit for strong branchings */
1358  SCIP_Real* down, /**< stores dual bounds after branching variables down */
1359  SCIP_Real* up, /**< stores dual bounds after branching variables up */
1360  SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1361  * otherwise, they can only be used as an estimate value */
1362  SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1363  * otherwise, they can only be used as an estimate value */
1364  SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1365  SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1366  SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1367  * infeasible downward branches, or NULL */
1368  SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1369  * infeasible upward branches, or NULL */
1370  SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1371  * solving process should be stopped (e.g., due to a time limit) */
1372  );
1373 
1374 /** get LP solution status of last strong branching call (currently only works for strong branching with propagation) */
1375 SCIP_EXPORT
1377  SCIP* scip, /**< SCIP data structure */
1378  SCIP_BRANCHDIR branchdir /**< branching direction for which LP solution status is requested */
1379  );
1380 
1381 /** gets strong branching information on COLUMN variable of the last SCIPgetVarStrongbranch() call;
1382  * returns values of SCIP_INVALID, if strong branching was not yet called on the given variable;
1383  * keep in mind, that the returned old values may have nothing to do with the current LP solution
1384  *
1385  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1386  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1387  *
1388  * @pre This method can be called if @p scip is in one of the following stages:
1389  * - \ref SCIP_STAGE_SOLVING
1390  * - \ref SCIP_STAGE_SOLVED
1391  */
1392 SCIP_EXPORT
1394  SCIP* scip, /**< SCIP data structure */
1395  SCIP_VAR* var, /**< variable to get last strong branching values for */
1396  SCIP_Real* down, /**< stores dual bound after branching column down, or NULL */
1397  SCIP_Real* up, /**< stores dual bound after branching column up, or NULL */
1398  SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1399  * otherwise, it can only be used as an estimate value */
1400  SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1401  * otherwise, it can only be used as an estimate value */
1402  SCIP_Real* solval, /**< stores LP solution value of variable at last strong branching call, or NULL */
1403  SCIP_Real* lpobjval /**< stores LP objective value at last strong branching call, or NULL */
1404  );
1405 
1406 /** sets strong branching information for a column variable
1407  *
1408  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1409  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1410  *
1411  * @pre This method can be called if @p scip is in one of the following stages:
1412  * - \ref SCIP_STAGE_SOLVING
1413  */
1414 SCIP_EXPORT
1416  SCIP* scip, /**< SCIP data structure */
1417  SCIP_VAR* var, /**< variable to set last strong branching values for */
1418  SCIP_Real lpobjval, /**< objective value of the current LP */
1419  SCIP_Real primsol, /**< primal solution value of the column in the current LP */
1420  SCIP_Real down, /**< dual bound after branching column down */
1421  SCIP_Real up, /**< dual bound after branching column up */
1422  SCIP_Bool downvalid, /**< is the returned down value a valid dual bound? */
1423  SCIP_Bool upvalid, /**< is the returned up value a valid dual bound? */
1424  SCIP_Longint iter, /**< total number of strong branching iterations */
1425  int itlim /**< iteration limit applied to the strong branching call */
1426  );
1427 
1428 /** rounds the current solution and tries it afterwards; if feasible, adds it to storage
1429  *
1430  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1431  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1432  *
1433  * @pre This method can be called if @p scip is in one of the following stages:
1434  * - \ref SCIP_STAGE_SOLVING
1435  */
1436 SCIP_EXPORT
1438  SCIP* scip, /**< SCIP data structure */
1439  SCIP_Bool* foundsol, /**< stores whether solution was feasible and good enough to keep */
1440  SCIP_Bool* cutoff /**< stores whether solution was cutoff due to exceeding the cutoffbound */
1441  );
1442 
1443 /** gets node number of the last node in current branch and bound run, where strong branching was used on the
1444  * given variable, or -1 if strong branching was never applied to the variable in current run
1445  *
1446  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1447  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1448  *
1449  * @pre This method can be called if @p scip is in one of the following stages:
1450  * - \ref SCIP_STAGE_TRANSFORMING
1451  * - \ref SCIP_STAGE_TRANSFORMED
1452  * - \ref SCIP_STAGE_INITPRESOLVE
1453  * - \ref SCIP_STAGE_PRESOLVING
1454  * - \ref SCIP_STAGE_EXITPRESOLVE
1455  * - \ref SCIP_STAGE_PRESOLVED
1456  * - \ref SCIP_STAGE_INITSOLVE
1457  * - \ref SCIP_STAGE_SOLVING
1458  * - \ref SCIP_STAGE_SOLVED
1459  * - \ref SCIP_STAGE_EXITSOLVE
1460  */
1461 SCIP_EXPORT
1463  SCIP* scip, /**< SCIP data structure */
1464  SCIP_VAR* var /**< variable to get last strong branching node for */
1465  );
1466 
1467 /** if strong branching was already applied on the variable at the current node, returns the number of LPs solved after
1468  * the LP where the strong branching on this variable was applied;
1469  * if strong branching was not yet applied on the variable at the current node, returns INT_MAX
1470  *
1471  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1472  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1473  *
1474  * @pre This method can be called if @p scip is in one of the following stages:
1475  * - \ref SCIP_STAGE_TRANSFORMING
1476  * - \ref SCIP_STAGE_TRANSFORMED
1477  * - \ref SCIP_STAGE_INITPRESOLVE
1478  * - \ref SCIP_STAGE_PRESOLVING
1479  * - \ref SCIP_STAGE_EXITPRESOLVE
1480  * - \ref SCIP_STAGE_PRESOLVED
1481  * - \ref SCIP_STAGE_INITSOLVE
1482  * - \ref SCIP_STAGE_SOLVING
1483  * - \ref SCIP_STAGE_SOLVED
1484  * - \ref SCIP_STAGE_EXITSOLVE
1485  */
1486 SCIP_EXPORT
1488  SCIP* scip, /**< SCIP data structure */
1489  SCIP_VAR* var /**< variable to get strong branching LP age for */
1490  );
1491 
1492 /** gets number of times, strong branching was applied in current run on the given variable
1493  *
1494  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1495  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1496  *
1497  * @pre This method can be called if @p scip is in one of the following stages:
1498  * - \ref SCIP_STAGE_TRANSFORMING
1499  * - \ref SCIP_STAGE_TRANSFORMED
1500  * - \ref SCIP_STAGE_INITPRESOLVE
1501  * - \ref SCIP_STAGE_PRESOLVING
1502  * - \ref SCIP_STAGE_EXITPRESOLVE
1503  * - \ref SCIP_STAGE_PRESOLVED
1504  * - \ref SCIP_STAGE_INITSOLVE
1505  * - \ref SCIP_STAGE_SOLVING
1506  * - \ref SCIP_STAGE_SOLVED
1507  * - \ref SCIP_STAGE_EXITSOLVE
1508  */
1509 SCIP_EXPORT
1511  SCIP* scip, /**< SCIP data structure */
1512  SCIP_VAR* var /**< variable to get last strong branching node for */
1513  );
1514 
1515 /** adds given values to lock numbers of type @p locktype of variable for rounding
1516  *
1517  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1518  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1519  *
1520  * @pre This method can be called if @p scip is in one of the following stages:
1521  * - \ref SCIP_STAGE_PROBLEM
1522  * - \ref SCIP_STAGE_TRANSFORMING
1523  * - \ref SCIP_STAGE_TRANSFORMED
1524  * - \ref SCIP_STAGE_INITPRESOLVE
1525  * - \ref SCIP_STAGE_PRESOLVING
1526  * - \ref SCIP_STAGE_EXITPRESOLVE
1527  * - \ref SCIP_STAGE_PRESOLVED
1528  * - \ref SCIP_STAGE_INITSOLVE
1529  * - \ref SCIP_STAGE_SOLVING
1530  * - \ref SCIP_STAGE_EXITSOLVE
1531  * - \ref SCIP_STAGE_FREETRANS
1532  */
1533 SCIP_EXPORT
1535  SCIP* scip, /**< SCIP data structure */
1536  SCIP_VAR* var, /**< problem variable */
1537  SCIP_LOCKTYPE locktype, /**< type of the variable locks */
1538  int nlocksdown, /**< modification in number of rounding down locks */
1539  int nlocksup /**< modification in number of rounding up locks */
1540  );
1541 
1542 
1543 /** adds given values to lock numbers of variable for rounding
1544  *
1545  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1546  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1547  *
1548  * @pre This method can be called if @p scip is in one of the following stages:
1549  * - \ref SCIP_STAGE_PROBLEM
1550  * - \ref SCIP_STAGE_TRANSFORMING
1551  * - \ref SCIP_STAGE_TRANSFORMED
1552  * - \ref SCIP_STAGE_INITPRESOLVE
1553  * - \ref SCIP_STAGE_PRESOLVING
1554  * - \ref SCIP_STAGE_EXITPRESOLVE
1555  * - \ref SCIP_STAGE_PRESOLVED
1556  * - \ref SCIP_STAGE_INITSOLVE
1557  * - \ref SCIP_STAGE_SOLVING
1558  * - \ref SCIP_STAGE_EXITSOLVE
1559  * - \ref SCIP_STAGE_FREETRANS
1560  *
1561  * @note This method will always add variable locks of type model
1562  */
1563 SCIP_EXPORT
1565  SCIP* scip, /**< SCIP data structure */
1566  SCIP_VAR* var, /**< problem variable */
1567  int nlocksdown, /**< modification in number of rounding down locks */
1568  int nlocksup /**< modification in number of rounding up locks */
1569  );
1570 
1571 
1572 /** add locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1573  * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1574  * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1575  * added or removed
1576  *
1577  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1578  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1579  *
1580  * @pre This method can be called if @p scip is in one of the following stages:
1581  * - \ref SCIP_STAGE_PROBLEM
1582  * - \ref SCIP_STAGE_TRANSFORMING
1583  * - \ref SCIP_STAGE_INITPRESOLVE
1584  * - \ref SCIP_STAGE_PRESOLVING
1585  * - \ref SCIP_STAGE_EXITPRESOLVE
1586  * - \ref SCIP_STAGE_INITSOLVE
1587  * - \ref SCIP_STAGE_SOLVING
1588  * - \ref SCIP_STAGE_EXITSOLVE
1589  * - \ref SCIP_STAGE_FREETRANS
1590  */
1591 SCIP_EXPORT
1593  SCIP* scip, /**< SCIP data structure */
1594  SCIP_VAR* var, /**< problem variable */
1595  SCIP_CONS* cons, /**< constraint */
1596  SCIP_Bool lockdown, /**< should the rounding be locked in downwards direction? */
1597  SCIP_Bool lockup /**< should the rounding be locked in upwards direction? */
1598  );
1599 
1600 /** remove locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1601  * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1602  * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1603  * added or removed
1604  *
1605  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1606  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1607  *
1608  * @pre This method can be called if @p scip is in one of the following stages:
1609  * - \ref SCIP_STAGE_PROBLEM
1610  * - \ref SCIP_STAGE_TRANSFORMING
1611  * - \ref SCIP_STAGE_INITPRESOLVE
1612  * - \ref SCIP_STAGE_PRESOLVING
1613  * - \ref SCIP_STAGE_EXITPRESOLVE
1614  * - \ref SCIP_STAGE_INITSOLVE
1615  * - \ref SCIP_STAGE_SOLVING
1616  * - \ref SCIP_STAGE_EXITSOLVE
1617  * - \ref SCIP_STAGE_FREETRANS
1618  */
1619 SCIP_EXPORT
1621  SCIP* scip, /**< SCIP data structure */
1622  SCIP_VAR* var, /**< problem variable */
1623  SCIP_CONS* cons, /**< constraint */
1624  SCIP_Bool lockdown, /**< should the rounding be unlocked in downwards direction? */
1625  SCIP_Bool lockup /**< should the rounding be unlocked in upwards direction? */
1626  );
1627 
1628 /** changes variable's objective value
1629  *
1630  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1631  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1632  *
1633  * @pre This method can be called if @p scip is in one of the following stages:
1634  * - \ref SCIP_STAGE_PROBLEM
1635  * - \ref SCIP_STAGE_TRANSFORMING
1636  * - \ref SCIP_STAGE_PRESOLVING
1637  */
1638 SCIP_EXPORT
1640  SCIP* scip, /**< SCIP data structure */
1641  SCIP_VAR* var, /**< variable to change the objective value for */
1642  SCIP_Real newobj /**< new objective value */
1643  );
1644 
1645 /** adds value to variable's objective value
1646  *
1647  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1648  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1649  *
1650  * @pre This method can be called if @p scip is in one of the following stages:
1651  * - \ref SCIP_STAGE_PROBLEM
1652  * - \ref SCIP_STAGE_TRANSFORMING
1653  * - \ref SCIP_STAGE_PRESOLVING
1654  * - \ref SCIP_STAGE_EXITPRESOLVE
1655  * - \ref SCIP_STAGE_PRESOLVED
1656  */
1657 SCIP_EXPORT
1659  SCIP* scip, /**< SCIP data structure */
1660  SCIP_VAR* var, /**< variable to change the objective value for */
1661  SCIP_Real addobj /**< additional objective value */
1662  );
1663 
1664 /** returns the adjusted (i.e. rounded, if the given variable is of integral type) lower bound value;
1665  * does not change the bounds of the variable
1666  *
1667  * @return adjusted lower bound for the given variable; the bound of the variable is not changed
1668  *
1669  * @pre This method can be called if @p scip is in one of the following stages:
1670  * - \ref SCIP_STAGE_PROBLEM
1671  * - \ref SCIP_STAGE_TRANSFORMING
1672  * - \ref SCIP_STAGE_TRANSFORMED
1673  * - \ref SCIP_STAGE_INITPRESOLVE
1674  * - \ref SCIP_STAGE_PRESOLVING
1675  * - \ref SCIP_STAGE_EXITPRESOLVE
1676  * - \ref SCIP_STAGE_PRESOLVED
1677  * - \ref SCIP_STAGE_INITSOLVE
1678  * - \ref SCIP_STAGE_SOLVING
1679  * - \ref SCIP_STAGE_SOLVED
1680  * - \ref SCIP_STAGE_EXITSOLVE
1681  * - \ref SCIP_STAGE_FREETRANS
1682  */
1683 SCIP_EXPORT
1685  SCIP* scip, /**< SCIP data structure */
1686  SCIP_VAR* var, /**< variable to adjust the bound for */
1687  SCIP_Real lb /**< lower bound value to adjust */
1688  );
1689 
1690 /** returns the adjusted (i.e. rounded, if the given variable is of integral type) upper bound value;
1691  * does not change the bounds of the variable
1692  *
1693  * @return adjusted upper bound for the given variable; the bound of the variable is not changed
1694  *
1695  * @pre This method can be called if @p scip is in one of the following stages:
1696  * - \ref SCIP_STAGE_PROBLEM
1697  * - \ref SCIP_STAGE_TRANSFORMING
1698  * - \ref SCIP_STAGE_TRANSFORMED
1699  * - \ref SCIP_STAGE_INITPRESOLVE
1700  * - \ref SCIP_STAGE_PRESOLVING
1701  * - \ref SCIP_STAGE_EXITPRESOLVE
1702  * - \ref SCIP_STAGE_PRESOLVED
1703  * - \ref SCIP_STAGE_INITSOLVE
1704  * - \ref SCIP_STAGE_SOLVING
1705  * - \ref SCIP_STAGE_SOLVED
1706  * - \ref SCIP_STAGE_EXITSOLVE
1707  * - \ref SCIP_STAGE_FREETRANS
1708  */
1709 SCIP_EXPORT
1711  SCIP* scip, /**< SCIP data structure */
1712  SCIP_VAR* var, /**< variable to adjust the bound for */
1713  SCIP_Real ub /**< upper bound value to adjust */
1714  );
1715 
1716 /** depending on SCIP's stage, changes lower bound of variable in the problem, in preprocessing, or in current node;
1717  * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1718  * that in conflict analysis, this change is treated like a branching decision
1719  *
1720  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1721  * SCIPgetVars()) gets resorted.
1722  *
1723  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1724  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1725  *
1726  * @pre This method can be called if @p scip is in one of the following stages:
1727  * - \ref SCIP_STAGE_PROBLEM
1728  * - \ref SCIP_STAGE_TRANSFORMING
1729  * - \ref SCIP_STAGE_PRESOLVING
1730  * - \ref SCIP_STAGE_SOLVING
1731  *
1732  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1733  */
1734 SCIP_EXPORT
1736  SCIP* scip, /**< SCIP data structure */
1737  SCIP_VAR* var, /**< variable to change the bound for */
1738  SCIP_Real newbound /**< new value for bound */
1739  );
1740 
1741 /** depending on SCIP's stage, changes upper bound of variable in the problem, in preprocessing, or in current node;
1742  * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1743  * that in conflict analysis, this change is treated like a branching decision
1744  *
1745  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1746  * SCIPgetVars()) gets resorted.
1747  *
1748  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1749  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1750  *
1751  * @pre This method can be called if @p scip is in one of the following stages:
1752  * - \ref SCIP_STAGE_PROBLEM
1753  * - \ref SCIP_STAGE_TRANSFORMING
1754  * - \ref SCIP_STAGE_PRESOLVING
1755  * - \ref SCIP_STAGE_SOLVING
1756  *
1757  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1758  */
1759 SCIP_EXPORT
1761  SCIP* scip, /**< SCIP data structure */
1762  SCIP_VAR* var, /**< variable to change the bound for */
1763  SCIP_Real newbound /**< new value for bound */
1764  );
1765 
1766 /** changes lower bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
1767  * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
1768  * decision
1769  *
1770  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1771  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1772  *
1773  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1774  */
1775 SCIP_EXPORT
1777  SCIP* scip, /**< SCIP data structure */
1778  SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
1779  SCIP_VAR* var, /**< variable to change the bound for */
1780  SCIP_Real newbound /**< new value for bound */
1781  );
1782 
1783 /** changes upper bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
1784  * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
1785  * decision
1786  *
1787  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1788  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1789  *
1790  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1791  */
1792 SCIP_EXPORT
1794  SCIP* scip, /**< SCIP data structure */
1795  SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
1796  SCIP_VAR* var, /**< variable to change the bound for */
1797  SCIP_Real newbound /**< new value for bound */
1798  );
1799 
1800 /** changes global lower bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
1801  * if the global bound is better than the local bound
1802  *
1803  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1804  * SCIPgetVars()) gets resorted.
1805  *
1806  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1807  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1808  *
1809  * @pre This method can be called if @p scip is in one of the following stages:
1810  * - \ref SCIP_STAGE_PROBLEM
1811  * - \ref SCIP_STAGE_TRANSFORMING
1812  * - \ref SCIP_STAGE_TRANSFORMED
1813  * - \ref SCIP_STAGE_PRESOLVING
1814  * - \ref SCIP_STAGE_SOLVING
1815  *
1816  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1817  */
1818 SCIP_EXPORT
1820  SCIP* scip, /**< SCIP data structure */
1821  SCIP_VAR* var, /**< variable to change the bound for */
1822  SCIP_Real newbound /**< new value for bound */
1823  );
1824 
1825 /** changes global upper bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
1826  * if the global bound is better than the local bound
1827  *
1828  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1829  * SCIPgetVars()) gets resorted.
1830  *
1831  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1832  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1833  *
1834  * @pre This method can be called if @p scip is in one of the following stages:
1835  * - \ref SCIP_STAGE_PROBLEM
1836  * - \ref SCIP_STAGE_TRANSFORMING
1837  * - \ref SCIP_STAGE_TRANSFORMED
1838  * - \ref SCIP_STAGE_PRESOLVING
1839  * - \ref SCIP_STAGE_SOLVING
1840  *
1841  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1842  */
1843 SCIP_EXPORT
1845  SCIP* scip, /**< SCIP data structure */
1846  SCIP_VAR* var, /**< variable to change the bound for */
1847  SCIP_Real newbound /**< new value for bound */
1848  );
1849 
1850 /** changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet
1851  *
1852  * Lazy bounds are bounds that are already enforced by constraints and the objective function.
1853  * Setting a lazy lower bound has the consequence that for variables which lower bound equals the lazy lower bound,
1854  * the lower bound does not need to be passed on to the LP solver.
1855  * This is especially useful in a column generation (branch-and-price) setting.
1856  *
1857  * @attention If the variable has a global lower bound below lazylb, then the global lower bound is tightened to
1858  * lazylb by a call to SCIPchgVarLbGlobal().
1859  *
1860  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1861  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1862  *
1863  * @pre This method can be called if @p scip is in one of the following stages:
1864  * - \ref SCIP_STAGE_PROBLEM
1865  * - \ref SCIP_STAGE_TRANSFORMING
1866  * - \ref SCIP_STAGE_TRANSFORMED
1867  * - \ref SCIP_STAGE_PRESOLVING
1868  * - \ref SCIP_STAGE_SOLVING
1869  */
1870 SCIP_EXPORT
1872  SCIP* scip, /**< SCIP data structure */
1873  SCIP_VAR* var, /**< problem variable */
1874  SCIP_Real lazylb /**< the lazy lower bound to be set */
1875  );
1876 
1877 /** changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet
1878  *
1879  * Lazy bounds are bounds that are already enforced by constraints and the objective function.
1880  * Setting a lazy upper bound has the consequence that for variables which upper bound equals the lazy upper bound,
1881  * the upper bound does not need to be passed on to the LP solver.
1882  * This is especially useful in a column generation (branch-and-price) setting.
1883  *
1884  * @attention If the variable has a global upper bound above lazyub, then the global upper bound is tightened to
1885  * lazyub by a call to SCIPchgVarUbGlobal().
1886  *
1887  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1888  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1889  *
1890  * @pre This method can be called if @p scip is in one of the following stages:
1891  * - \ref SCIP_STAGE_PROBLEM
1892  * - \ref SCIP_STAGE_TRANSFORMING
1893  * - \ref SCIP_STAGE_TRANSFORMED
1894  * - \ref SCIP_STAGE_PRESOLVING
1895  * - \ref SCIP_STAGE_SOLVING
1896  */
1897 SCIP_EXPORT
1899  SCIP* scip, /**< SCIP data structure */
1900  SCIP_VAR* var, /**< problem variable */
1901  SCIP_Real lazyub /**< the lazy lower bound to be set */
1902  );
1903 
1904 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
1905  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1906  * doesn't store any inference information in the bound change, such that in conflict analysis, this change
1907  * is treated like a branching decision
1908  *
1909  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1910  * SCIPgetVars()) gets resorted.
1911  *
1912  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1913  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1914  *
1915  * @pre This method can be called if @p scip is in one of the following stages:
1916  * - \ref SCIP_STAGE_PROBLEM
1917  * - \ref SCIP_STAGE_PRESOLVING
1918  * - \ref SCIP_STAGE_SOLVING
1919  *
1920  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1921  */
1922 SCIP_EXPORT
1924  SCIP* scip, /**< SCIP data structure */
1925  SCIP_VAR* var, /**< variable to change the bound for */
1926  SCIP_Real newbound, /**< new value for bound */
1927  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1928  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
1929  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1930  );
1931 
1932 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
1933  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1934  * doesn't store any inference information in the bound change, such that in conflict analysis, this change
1935  * is treated like a branching decision
1936  *
1937  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1938  * SCIPgetVars()) gets resorted.
1939  *
1940  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1941  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1942  *
1943  * @pre This method can be called if @p scip is in one of the following stages:
1944  * - \ref SCIP_STAGE_PROBLEM
1945  * - \ref SCIP_STAGE_PRESOLVING
1946  * - \ref SCIP_STAGE_SOLVING
1947  *
1948  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1949  */
1950 SCIP_EXPORT
1952  SCIP* scip, /**< SCIP data structure */
1953  SCIP_VAR* var, /**< variable to change the bound for */
1954  SCIP_Real newbound, /**< new value for bound */
1955  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1956  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
1957  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1958  );
1959 
1960 /** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
1961  * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
1962  * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
1963  *
1964  * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
1965  * changes first the lowerbound by calling SCIPinferVarLbCons and second the upperbound by calling
1966  * SCIPinferVarUbCons
1967  *
1968  * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
1969  * SCIPgetVars()) gets resorted.
1970  *
1971  * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
1972  */
1973 SCIP_EXPORT
1975  SCIP* scip, /**< SCIP data structure */
1976  SCIP_VAR* var, /**< variable to change the bound for */
1977  SCIP_Real fixedval, /**< new value for fixation */
1978  SCIP_CONS* infercons, /**< constraint that deduced the bound change */
1979  int inferinfo, /**< user information for inference to help resolving the conflict */
1980  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
1981  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
1982  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
1983  );
1984 
1985 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
1986  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
1987  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
1988  * for the deduction of the bound change
1989  *
1990  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1991  * SCIPgetVars()) gets resorted.
1992  *
1993  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1994  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1995  *
1996  * @pre This method can be called if @p scip is in one of the following stages:
1997  * - \ref SCIP_STAGE_PROBLEM
1998  * - \ref SCIP_STAGE_PRESOLVING
1999  * - \ref SCIP_STAGE_SOLVING
2000  *
2001  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2002  */
2003 SCIP_EXPORT
2005  SCIP* scip, /**< SCIP data structure */
2006  SCIP_VAR* var, /**< variable to change the bound for */
2007  SCIP_Real newbound, /**< new value for bound */
2008  SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
2009  int inferinfo, /**< user information for inference to help resolving the conflict */
2010  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2011  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2012  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2013  );
2014 
2015 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2016  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2017  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2018  * for the deduction of the bound change
2019  *
2020  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2021  * SCIPgetVars()) gets resorted.
2022  *
2023  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2024  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2025  *
2026  * @pre This method can be called if @p scip is in one of the following stages:
2027  * - \ref SCIP_STAGE_PROBLEM
2028  * - \ref SCIP_STAGE_PRESOLVING
2029  * - \ref SCIP_STAGE_SOLVING
2030  *
2031  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2032  */
2033 SCIP_EXPORT
2035  SCIP* scip, /**< SCIP data structure */
2036  SCIP_VAR* var, /**< variable to change the bound for */
2037  SCIP_Real newbound, /**< new value for bound */
2038  SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2039  int inferinfo, /**< user information for inference to help resolving the conflict */
2040  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2041  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2042  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2043  );
2044 
2045 /** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2046  * the given inference constraint is stored, such that the conflict analysis is able to find out the reason for the
2047  * deduction of the fixing
2048  *
2049  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2050  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2051  *
2052  * @pre This method can be called if @p scip is in one of the following stages:
2053  * - \ref SCIP_STAGE_PROBLEM
2054  * - \ref SCIP_STAGE_PRESOLVING
2055  * - \ref SCIP_STAGE_SOLVING
2056  */
2057 SCIP_EXPORT
2059  SCIP* scip, /**< SCIP data structure */
2060  SCIP_VAR* var, /**< binary variable to fix */
2061  SCIP_Bool fixedval, /**< value to fix binary variable to */
2062  SCIP_CONS* infercons, /**< constraint that deduced the fixing */
2063  int inferinfo, /**< user information for inference to help resolving the conflict */
2064  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2065  SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2066  );
2067 
2068 /** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
2069  * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
2070  * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
2071  *
2072  * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
2073  * changes first the lowerbound by calling SCIPinferVarLbProp and second the upperbound by calling
2074  * SCIPinferVarUbProp
2075  *
2076  * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
2077  * SCIPgetVars()) gets resorted.
2078  *
2079  * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
2080  */
2081 SCIP_EXPORT
2083  SCIP* scip, /**< SCIP data structure */
2084  SCIP_VAR* var, /**< variable to change the bound for */
2085  SCIP_Real fixedval, /**< new value for fixation */
2086  SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2087  int inferinfo, /**< user information for inference to help resolving the conflict */
2088  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2089  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2090  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2091  );
2092 
2093 /** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2094  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2095  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2096  * for the deduction of the bound change
2097  *
2098  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2099  * SCIPgetVars()) gets resorted.
2100  *
2101  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2102  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2103  *
2104  * @pre This method can be called if @p scip is in one of the following stages:
2105  * - \ref SCIP_STAGE_PROBLEM
2106  * - \ref SCIP_STAGE_PRESOLVING
2107  * - \ref SCIP_STAGE_SOLVING
2108  *
2109  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2110  */
2111 SCIP_EXPORT
2113  SCIP* scip, /**< SCIP data structure */
2114  SCIP_VAR* var, /**< variable to change the bound for */
2115  SCIP_Real newbound, /**< new value for bound */
2116  SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
2117  int inferinfo, /**< user information for inference to help resolving the conflict */
2118  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2119  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2120  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2121  );
2122 
2123 /** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2124  * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2125  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2126  * for the deduction of the bound change
2127  *
2128  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2129  * SCIPgetVars()) gets resorted.
2130  *
2131  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2132  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2133  *
2134  * @pre This method can be called if @p scip is in one of the following stages:
2135  * - \ref SCIP_STAGE_PROBLEM
2136  * - \ref SCIP_STAGE_PRESOLVING
2137  * - \ref SCIP_STAGE_SOLVING
2138  *
2139  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2140  */
2141 SCIP_EXPORT
2143  SCIP* scip, /**< SCIP data structure */
2144  SCIP_VAR* var, /**< variable to change the bound for */
2145  SCIP_Real newbound, /**< new value for bound */
2146  SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2147  int inferinfo, /**< user information for inference to help resolving the conflict */
2148  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2149  SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2150  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2151  );
2152 
2153 /** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2154  * the given inference propagator is stored, such that the conflict analysis is able to find out the reason for the
2155  * deduction of the fixing
2156  *
2157  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2158  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2159  *
2160  * @pre This method can be called if @p scip is in one of the following stages:
2161  * - \ref SCIP_STAGE_PROBLEM
2162  * - \ref SCIP_STAGE_PRESOLVING
2163  * - \ref SCIP_STAGE_PRESOLVED
2164  * - \ref SCIP_STAGE_SOLVING
2165  */
2166 SCIP_EXPORT
2168  SCIP* scip, /**< SCIP data structure */
2169  SCIP_VAR* var, /**< binary variable to fix */
2170  SCIP_Bool fixedval, /**< value to fix binary variable to */
2171  SCIP_PROP* inferprop, /**< propagator that deduced the fixing */
2172  int inferinfo, /**< user information for inference to help resolving the conflict */
2173  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2174  SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2175  );
2176 
2177 /** changes global lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2178  * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2179  * also tightens the local bound, if the global bound is better than the local bound
2180  *
2181  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2182  * SCIPgetVars()) gets resorted.
2183  *
2184  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2185  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2186  *
2187  * @pre This method can be called if @p scip is in one of the following stages:
2188  * - \ref SCIP_STAGE_PROBLEM
2189  * - \ref SCIP_STAGE_TRANSFORMING
2190  * - \ref SCIP_STAGE_PRESOLVING
2191  * - \ref SCIP_STAGE_SOLVING
2192  *
2193  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2194  */
2195 SCIP_EXPORT
2197  SCIP* scip, /**< SCIP data structure */
2198  SCIP_VAR* var, /**< variable to change the bound for */
2199  SCIP_Real newbound, /**< new value for bound */
2200  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2201  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2202  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2203  );
2204 
2205 /** changes global upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2206  * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2207  * also tightens the local bound, if the global bound is better than the local bound
2208  *
2209  * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2210  * SCIPgetVars()) gets resorted.
2211  *
2212  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2213  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2214  *
2215  * @pre This method can be called if @p scip is in one of the following stages:
2216  * - \ref SCIP_STAGE_PROBLEM
2217  * - \ref SCIP_STAGE_TRANSFORMING
2218  * - \ref SCIP_STAGE_PRESOLVING
2219  * - \ref SCIP_STAGE_SOLVING
2220  *
2221  * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2222  */
2223 SCIP_EXPORT
2225  SCIP* scip, /**< SCIP data structure */
2226  SCIP_VAR* var, /**< variable to change the bound for */
2227  SCIP_Real newbound, /**< new value for bound */
2228  SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2229  SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2230  SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2231  );
2232 
2233 /** for a multi-aggregated variable, returns the global lower bound computed by adding the global bounds from all aggregation variables
2234  *
2235  * 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
2236  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbGlobal.
2237  *
2238  * @return the global lower bound computed by adding the global bounds from all aggregation variables
2239  */
2240 SCIP_EXPORT
2242  SCIP* scip, /**< SCIP data structure */
2243  SCIP_VAR* var /**< variable to compute the bound for */
2244  );
2245 
2246 /** for a multi-aggregated variable, returns the global upper bound computed by adding the global bounds from all aggregation variables
2247  *
2248  * 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
2249  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbGlobal.
2250  *
2251  * @return the global upper bound computed by adding the global bounds from all aggregation variables
2252  */
2253 SCIP_EXPORT
2255  SCIP* scip, /**< SCIP data structure */
2256  SCIP_VAR* var /**< variable to compute the bound for */
2257  );
2258 
2259 /** for a multi-aggregated variable, returns the local lower bound computed by adding the local bounds from all aggregation variables
2260  *
2261  * 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
2262  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbLocal.
2263  *
2264  * @return the local lower bound computed by adding the global bounds from all aggregation variables
2265  */
2266 SCIP_EXPORT
2268  SCIP* scip, /**< SCIP data structure */
2269  SCIP_VAR* var /**< variable to compute the bound for */
2270  );
2271 
2272 /** for a multi-aggregated variable, returns the local upper bound computed by adding the local bounds from all aggregation variables
2273  *
2274  * 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
2275  * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbLocal.
2276  *
2277  * @return the local upper bound computed by adding the global bounds from all aggregation variables
2278  */
2279 SCIP_EXPORT
2281  SCIP* scip, /**< SCIP data structure */
2282  SCIP_VAR* var /**< variable to compute the bound for */
2283  );
2284 
2285 /** for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all
2286  * aggregation variables, this global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is
2287  * not updated if bounds of aggregation variables are changing
2288  *
2289  * calling this function for a non-multi-aggregated variable is not allowed
2290  */
2291 SCIP_EXPORT
2293  SCIP* scip, /**< SCIP data structure */
2294  SCIP_VAR* var /**< variable to compute the bound for */
2295  );
2296 
2297 /** for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all
2298  * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is
2299  * not updated if bounds of aggregation variables are changing
2300  *
2301  * calling this function for a non-multi-aggregated variable is not allowed
2302  */
2303 SCIP_EXPORT
2305  SCIP* scip, /**< SCIP data structure */
2306  SCIP_VAR* var /**< variable to compute the bound for */
2307  );
2308 
2309 /** for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all
2310  * aggregation variables, this lower bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is
2311  * not updated if bounds of aggregation variables are changing
2312  *
2313  * calling this function for a non-multi-aggregated variable is not allowed
2314  */
2315 SCIP_EXPORT
2317  SCIP* scip, /**< SCIP data structure */
2318  SCIP_VAR* var /**< variable to compute the bound for */
2319  );
2320 
2321 /** for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all
2322  * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is
2323  * not updated if bounds of aggregation variables are changing
2324  *
2325  * calling this function for a non-multi-aggregated variable is not allowed
2326  */
2327 SCIP_EXPORT
2329  SCIP* scip, /**< SCIP data structure */
2330  SCIP_VAR* var /**< variable to compute the bound for */
2331  );
2332 
2333 #ifdef NDEBUG
2334 
2335 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
2336  * speed up the algorithms.
2337  */
2338 
2339 #define SCIPcomputeVarLbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbGlobal(scip, var) : SCIPvarGetLbGlobal(var))
2340 #define SCIPcomputeVarUbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbGlobal(scip, var) : SCIPvarGetUbGlobal(var))
2341 #define SCIPcomputeVarLbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbLocal(scip, var) : SCIPvarGetLbLocal(var))
2342 #define SCIPcomputeVarUbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbLocal(scip, var) : SCIPvarGetUbLocal(var))
2343 
2344 #endif
2345 
2346 /** returns solution value and index of variable lower bound that is closest to the variable's value in the given primal
2347  * solution or current LP solution if no primal solution is given; returns an index of -1 if no variable lower bound is
2348  * available
2349  *
2350  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2351  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2352  *
2353  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2354  */
2355 SCIP_EXPORT
2357  SCIP* scip, /**< SCIP data structure */
2358  SCIP_VAR* var, /**< active problem variable */
2359  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2360  SCIP_Real* closestvlb, /**< pointer to store the value of the closest variable lower bound */
2361  int* closestvlbidx /**< pointer to store the index of the closest variable lower bound */
2362  );
2363 
2364 /** returns solution value and index of variable upper bound that is closest to the variable's value in the given primal solution;
2365  * or current LP solution if no primal solution is given; returns an index of -1 if no variable upper bound is available
2366  *
2367  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2368  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2369  *
2370  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2371  */
2372 SCIP_EXPORT
2374  SCIP* scip, /**< SCIP data structure */
2375  SCIP_VAR* var, /**< active problem variable */
2376  SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2377  SCIP_Real* closestvub, /**< pointer to store the value of the closest variable lower bound */
2378  int* closestvubidx /**< pointer to store the index of the closest variable lower bound */
2379  );
2380 
2381 /** informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z;
2382  * if z is binary, the corresponding valid implication for z is also added;
2383  * if z is non-continuous and 1/b not too small, the corresponding valid upper/lower bound
2384  * z <= (x-d)/b or z >= (x-d)/b (depending on the sign of of b) is added, too;
2385  * improves the global bounds of the variable and the vlb variable if possible
2386  *
2387  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2388  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2389  *
2390  * @pre This method can be called if @p scip is in one of the following stages:
2391  * - \ref SCIP_STAGE_PRESOLVING
2392  * - \ref SCIP_STAGE_PRESOLVED
2393  * - \ref SCIP_STAGE_SOLVING
2394  */
2395 SCIP_EXPORT
2397  SCIP* scip, /**< SCIP data structure */
2398  SCIP_VAR* var, /**< problem variable */
2399  SCIP_VAR* vlbvar, /**< variable z in x >= b*z + d */
2400  SCIP_Real vlbcoef, /**< coefficient b in x >= b*z + d */
2401  SCIP_Real vlbconstant, /**< constant d in x >= b*z + d */
2402  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2403  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2404  );
2405 
2406 
2407 /** informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z;
2408  * if z is binary, the corresponding valid implication for z is also added;
2409  * if z is non-continuous and 1/b not too small, the corresponding valid lower/upper bound
2410  * z >= (x-d)/b or z <= (x-d)/b (depending on the sign of of b) is added, too;
2411  * improves the global bounds of the variable and the vlb variable if possible
2412  *
2413  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2414  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2415  *
2416  * @pre This method can be called if @p scip is in one of the following stages:
2417  * - \ref SCIP_STAGE_PRESOLVING
2418  * - \ref SCIP_STAGE_PRESOLVED
2419  * - \ref SCIP_STAGE_SOLVING
2420  */
2421 SCIP_EXPORT
2423  SCIP* scip, /**< SCIP data structure */
2424  SCIP_VAR* var, /**< problem variable */
2425  SCIP_VAR* vubvar, /**< variable z in x <= b*z + d */
2426  SCIP_Real vubcoef, /**< coefficient b in x <= b*z + d */
2427  SCIP_Real vubconstant, /**< constant d in x <= b*z + d */
2428  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2429  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2430  );
2431 
2432 /** informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b;
2433  * also adds the corresponding implication or variable bound to the implied variable;
2434  * if the implication is conflicting, the variable is fixed to the opposite value;
2435  * if the variable is already fixed to the given value, the implication is performed immediately;
2436  * if the implication is redundant with respect to the variables' global bounds, it is ignored
2437  *
2438  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2439  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2440  *
2441  * @pre This method can be called if @p scip is in one of the following stages:
2442  * - \ref SCIP_STAGE_TRANSFORMED
2443  * - \ref SCIP_STAGE_PRESOLVING
2444  * - \ref SCIP_STAGE_PRESOLVED
2445  * - \ref SCIP_STAGE_SOLVING
2446  */
2447 SCIP_EXPORT
2449  SCIP* scip, /**< SCIP data structure */
2450  SCIP_VAR* var, /**< problem variable */
2451  SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
2452  SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
2453  SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER)
2454  * or y >= b (SCIP_BOUNDTYPE_LOWER) */
2455  SCIP_Real implbound, /**< bound b in implication y <= b or y >= b */
2456  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2457  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2458  );
2459 
2460 /** adds a clique information to SCIP, stating that at most one of the given binary variables can be set to 1;
2461  * if a variable appears twice in the same clique, the corresponding implications are performed
2462  *
2463  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2464  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2465  *
2466  * @pre This method can be called if @p scip is in one of the following stages:
2467  * - \ref SCIP_STAGE_TRANSFORMED
2468  * - \ref SCIP_STAGE_PRESOLVING
2469  * - \ref SCIP_STAGE_PRESOLVED
2470  * - \ref SCIP_STAGE_SOLVING
2471  */
2472 SCIP_EXPORT
2474  SCIP* scip, /**< SCIP data structure */
2475  SCIP_VAR** vars, /**< binary variables in the clique from which at most one can be set to 1 */
2476  SCIP_Bool* values, /**< values of the variables in the clique; NULL to use TRUE for all vars */
2477  int nvars, /**< number of variables in the clique */
2478  SCIP_Bool isequation, /**< is the clique an equation or an inequality? */
2479  SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2480  int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2481  );
2482 
2483 /** calculates a partition of the given set of binary variables into cliques; takes into account independent clique components
2484  *
2485  * The algorithm performs the following steps:
2486  * - recomputes connected components of the clique table, if necessary
2487  * - computes a clique partition for every connected component greedily.
2488  * - relabels the resulting clique partition such that it satisfies the description below
2489  *
2490  * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2491  * were assigned to the same clique;
2492  * the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of
2493  * the preceding variables was assigned to clique i-1;
2494  * for each clique at most 1 variables can be set to TRUE in a feasible solution;
2495  *
2496  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2497  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2498  *
2499  * @pre This method can be called if @p scip is in one of the following stages:
2500  * - \ref SCIP_STAGE_INITPRESOLVE
2501  * - \ref SCIP_STAGE_PRESOLVING
2502  * - \ref SCIP_STAGE_EXITPRESOLVE
2503  * - \ref SCIP_STAGE_PRESOLVED
2504  * - \ref SCIP_STAGE_SOLVING
2505  */
2506 SCIP_EXPORT
2508  SCIP*const scip, /**< SCIP data structure */
2509  SCIP_VAR**const vars, /**< binary variables in the clique from which at most one can be set to 1 */
2510  int const nvars, /**< number of variables in the clique */
2511  int*const cliquepartition, /**< array of length nvars to store the clique partition */
2512  int*const ncliques /**< pointer to store the number of cliques actually contained in the partition */
2513  );
2514 
2515 /** calculates a partition of the given set of binary variables into negated cliques;
2516  * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2517  * were assigned to the same negated clique;
2518  * the first variable is always assigned to clique 0 and a variable can only be assigned to clique i if at least one of
2519  * the preceding variables was assigned to clique i-1;
2520  * for each clique with n_c variables at least n_c-1 variables can be set to TRUE in a feasible solution;
2521  *
2522  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2523  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2524  *
2525  * @pre This method can be called if @p scip is in one of the following stages:
2526  * - \ref SCIP_STAGE_INITPRESOLVE
2527  * - \ref SCIP_STAGE_PRESOLVING
2528  * - \ref SCIP_STAGE_EXITPRESOLVE
2529  * - \ref SCIP_STAGE_PRESOLVED
2530  * - \ref SCIP_STAGE_SOLVING
2531  */
2532 SCIP_EXPORT
2534  SCIP*const scip, /**< SCIP data structure */
2535  SCIP_VAR**const vars, /**< binary variables in the clique from which at most one can be set to 1 */
2536  int const nvars, /**< number of variables in the clique */
2537  int*const cliquepartition, /**< array of length nvars to store the clique partition */
2538  int*const ncliques /**< pointer to store the number of cliques actually contained in the partition */
2539  );
2540 
2541 /** force SCIP to clean up all cliques; cliques do not get automatically cleaned up after presolving. Use
2542  * this method to prevent inactive variables in cliques when retrieved via SCIPgetCliques()
2543  *
2544  * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
2545  *
2546  * @pre This method can be called if @p scip is in one of the following stages:
2547  * - \ref SCIP_STAGE_TRANSFORMED
2548  * - \ref SCIP_STAGE_INITPRESOLVE
2549  * - \ref SCIP_STAGE_PRESOLVING
2550  * - \ref SCIP_STAGE_EXITPRESOLVE
2551  * - \ref SCIP_STAGE_PRESOLVED
2552  * - \ref SCIP_STAGE_INITSOLVE
2553  * - \ref SCIP_STAGE_SOLVING
2554  * - \ref SCIP_STAGE_SOLVED
2555  * - \ref SCIP_STAGE_EXITSOLVE
2556  */
2557 SCIP_EXPORT
2559  SCIP* scip, /**< SCIP data structure */
2560  SCIP_Bool* infeasible /**< pointer to store if cleanup detected infeasibility */
2561  );
2562 
2563 /** gets the number of cliques in the clique table
2564  *
2565  * @return number of cliques in the clique table
2566  *
2567  * @pre This method can be called if @p scip is in one of the following stages:
2568  * - \ref SCIP_STAGE_TRANSFORMED
2569  * - \ref SCIP_STAGE_INITPRESOLVE
2570  * - \ref SCIP_STAGE_PRESOLVING
2571  * - \ref SCIP_STAGE_EXITPRESOLVE
2572  * - \ref SCIP_STAGE_PRESOLVED
2573  * - \ref SCIP_STAGE_INITSOLVE
2574  * - \ref SCIP_STAGE_SOLVING
2575  * - \ref SCIP_STAGE_SOLVED
2576  * - \ref SCIP_STAGE_EXITSOLVE
2577  */
2578 SCIP_EXPORT
2579 int SCIPgetNCliques(
2580  SCIP* scip /**< SCIP data structure */
2581  );
2582 
2583 /** gets the number of cliques created so far by the cliquetable
2584  *
2585  * @return number of cliques created so far by the cliquetable
2586  *
2587  * @pre This method can be called if @p scip is in one of the following stages:
2588  * - \ref SCIP_STAGE_TRANSFORMED
2589  * - \ref SCIP_STAGE_INITPRESOLVE
2590  * - \ref SCIP_STAGE_PRESOLVING
2591  * - \ref SCIP_STAGE_EXITPRESOLVE
2592  * - \ref SCIP_STAGE_PRESOLVED
2593  * - \ref SCIP_STAGE_INITSOLVE
2594  * - \ref SCIP_STAGE_SOLVING
2595  * - \ref SCIP_STAGE_SOLVED
2596  * - \ref SCIP_STAGE_EXITSOLVE
2597  */
2598 SCIP_EXPORT
2600  SCIP* scip /**< SCIP data structure */
2601  );
2602 
2603 /** gets the array of cliques in the clique table
2604  *
2605  * @return array of cliques in the clique table
2606  *
2607  * @pre This method can be called if @p scip is in one of the following stages:
2608  * - \ref SCIP_STAGE_TRANSFORMED
2609  * - \ref SCIP_STAGE_INITPRESOLVE
2610  * - \ref SCIP_STAGE_PRESOLVING
2611  * - \ref SCIP_STAGE_EXITPRESOLVE
2612  * - \ref SCIP_STAGE_PRESOLVED
2613  * - \ref SCIP_STAGE_INITSOLVE
2614  * - \ref SCIP_STAGE_SOLVING
2615  * - \ref SCIP_STAGE_SOLVED
2616  * - \ref SCIP_STAGE_EXITSOLVE
2617  */
2618 SCIP_EXPORT
2620  SCIP* scip /**< SCIP data structure */
2621  );
2622 
2623 /** returns whether there is a clique that contains both given variable/value pairs;
2624  * the variables must be active binary variables;
2625  * if regardimplics is FALSE, only the cliques in the clique table are looked at;
2626  * if regardimplics is TRUE, both the cliques and the implications of the implication graph are regarded
2627  *
2628  * @return TRUE, if there is a clique that contains both variable/clique pairs; FALSE, otherwise
2629  *
2630  * @pre This method can be called if @p scip is in one of the following stages:
2631  * - \ref SCIP_STAGE_TRANSFORMED
2632  * - \ref SCIP_STAGE_INITPRESOLVE
2633  * - \ref SCIP_STAGE_PRESOLVING
2634  * - \ref SCIP_STAGE_EXITPRESOLVE
2635  * - \ref SCIP_STAGE_PRESOLVED
2636  * - \ref SCIP_STAGE_INITSOLVE
2637  * - \ref SCIP_STAGE_SOLVING
2638  * - \ref SCIP_STAGE_SOLVED
2639  * - \ref SCIP_STAGE_EXITSOLVE
2640  *
2641  * @note a variable with it's negated variable are NOT! in a clique
2642  * @note a variable with itself are in a clique
2643  */
2644 SCIP_EXPORT
2646  SCIP* scip, /**< SCIP data structure */
2647  SCIP_VAR* var1, /**< first variable */
2648  SCIP_Bool value1, /**< value of first variable */
2649  SCIP_VAR* var2, /**< second variable */
2650  SCIP_Bool value2, /**< value of second variable */
2651  SCIP_Bool regardimplics /**< should the implication graph also be searched for a clique? */
2652  );
2653 
2654 /** writes the clique graph to a gml file
2655  *
2656  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2657  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2658  *
2659  * @pre This method can be called if @p scip is in one of the following stages:
2660  * - \ref SCIP_STAGE_TRANSFORMED
2661  * - \ref SCIP_STAGE_INITPRESOLVE
2662  * - \ref SCIP_STAGE_PRESOLVING
2663  * - \ref SCIP_STAGE_EXITPRESOLVE
2664  * - \ref SCIP_STAGE_PRESOLVED
2665  * - \ref SCIP_STAGE_INITSOLVE
2666  * - \ref SCIP_STAGE_SOLVING
2667  * - \ref SCIP_STAGE_SOLVED
2668  * - \ref SCIP_STAGE_EXITSOLVE
2669  *
2670  * @note there can be duplicated arcs in the output file
2671  *
2672  * If @p writenodeweights is true, only nodes corresponding to variables that have a fractional value and only edges
2673  * between such nodes are written.
2674  */
2675 SCIP_EXPORT
2677  SCIP* scip, /**< SCIP data structure */
2678  const char* fname, /**< name of file */
2679  SCIP_Bool writenodeweights /**< should we write weights of nodes? */
2680  );
2681 
2682 /** Removes (irrelevant) variable from all its global structures, i.e. cliques, implications and variable bounds.
2683  * This is an advanced method which should be used with care.
2684  *
2685  * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
2686  *
2687  * @pre This method can be called if @p scip is in one of the following stages:
2688  * - \ref SCIP_STAGE_TRANSFORMED
2689  * - \ref SCIP_STAGE_INITPRESOLVE
2690  * - \ref SCIP_STAGE_PRESOLVING
2691  * - \ref SCIP_STAGE_EXITPRESOLVE
2692  * - \ref SCIP_STAGE_PRESOLVED
2693  * - \ref SCIP_STAGE_INITSOLVE
2694  * - \ref SCIP_STAGE_SOLVING
2695  * - \ref SCIP_STAGE_SOLVED
2696  * - \ref SCIP_STAGE_EXITSOLVE
2697  */
2698 SCIP_EXPORT
2700  SCIP* scip, /**< SCIP data structure */
2701  SCIP_VAR* var /**< variable to remove from global structures */
2702  );
2703 
2704 /** sets the branch factor of the variable; this value can be used in the branching methods to scale the score
2705  * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
2706  *
2707  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2708  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2709  *
2710  * @pre This method can be called if @p scip is in one of the following stages:
2711  * - \ref SCIP_STAGE_PROBLEM
2712  * - \ref SCIP_STAGE_TRANSFORMING
2713  * - \ref SCIP_STAGE_TRANSFORMED
2714  * - \ref SCIP_STAGE_INITPRESOLVE
2715  * - \ref SCIP_STAGE_PRESOLVING
2716  * - \ref SCIP_STAGE_EXITPRESOLVE
2717  * - \ref SCIP_STAGE_PRESOLVED
2718  * - \ref SCIP_STAGE_SOLVING
2719  */
2720 SCIP_EXPORT
2722  SCIP* scip, /**< SCIP data structure */
2723  SCIP_VAR* var, /**< problem variable */
2724  SCIP_Real branchfactor /**< factor to weigh variable's branching score with */
2725  );
2726 
2727 /** scales the branch factor of the variable with the given value
2728  *
2729  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2730  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2731  *
2732  * @pre This method can be called if @p scip is in one of the following stages:
2733  * - \ref SCIP_STAGE_PROBLEM
2734  * - \ref SCIP_STAGE_TRANSFORMING
2735  * - \ref SCIP_STAGE_TRANSFORMED
2736  * - \ref SCIP_STAGE_INITPRESOLVE
2737  * - \ref SCIP_STAGE_PRESOLVING
2738  * - \ref SCIP_STAGE_EXITPRESOLVE
2739  * - \ref SCIP_STAGE_PRESOLVED
2740  * - \ref SCIP_STAGE_SOLVING
2741  */
2742 SCIP_EXPORT
2744  SCIP* scip, /**< SCIP data structure */
2745  SCIP_VAR* var, /**< problem variable */
2746  SCIP_Real scale /**< factor to scale variable's branching factor with */
2747  );
2748 
2749 /** adds the given value to the branch factor of the variable
2750  *
2751  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2752  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2753  *
2754  * @pre This method can be called if @p scip is in one of the following stages:
2755  * - \ref SCIP_STAGE_PROBLEM
2756  * - \ref SCIP_STAGE_TRANSFORMING
2757  * - \ref SCIP_STAGE_TRANSFORMED
2758  * - \ref SCIP_STAGE_INITPRESOLVE
2759  * - \ref SCIP_STAGE_PRESOLVING
2760  * - \ref SCIP_STAGE_EXITPRESOLVE
2761  * - \ref SCIP_STAGE_PRESOLVED
2762  * - \ref SCIP_STAGE_SOLVING
2763  */
2764 SCIP_EXPORT
2766  SCIP* scip, /**< SCIP data structure */
2767  SCIP_VAR* var, /**< problem variable */
2768  SCIP_Real addfactor /**< value to add to the branch factor of the variable */
2769  );
2770 
2771 /** sets the branch priority of the variable; variables with higher branch priority are always preferred to variables
2772  * with lower priority in selection of branching variable
2773  *
2774  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2775  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2776  *
2777  * @pre This method can be called if @p scip is in one of the following stages:
2778  * - \ref SCIP_STAGE_PROBLEM
2779  * - \ref SCIP_STAGE_TRANSFORMING
2780  * - \ref SCIP_STAGE_TRANSFORMED
2781  * - \ref SCIP_STAGE_INITPRESOLVE
2782  * - \ref SCIP_STAGE_PRESOLVING
2783  * - \ref SCIP_STAGE_EXITPRESOLVE
2784  * - \ref SCIP_STAGE_PRESOLVED
2785  * - \ref SCIP_STAGE_SOLVING
2786  *
2787  * @note the default branching priority is 0
2788  */
2789 SCIP_EXPORT
2791  SCIP* scip, /**< SCIP data structure */
2792  SCIP_VAR* var, /**< problem variable */
2793  int branchpriority /**< branch priority of the variable */
2794  );
2795 
2796 /** changes the branch priority of the variable to the given value, if it is larger than the current priority
2797  *
2798  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2799  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2800  *
2801  * @pre This method can be called if @p scip is in one of the following stages:
2802  * - \ref SCIP_STAGE_PROBLEM
2803  * - \ref SCIP_STAGE_TRANSFORMING
2804  * - \ref SCIP_STAGE_TRANSFORMED
2805  * - \ref SCIP_STAGE_INITPRESOLVE
2806  * - \ref SCIP_STAGE_PRESOLVING
2807  * - \ref SCIP_STAGE_EXITPRESOLVE
2808  * - \ref SCIP_STAGE_PRESOLVED
2809  * - \ref SCIP_STAGE_SOLVING
2810  */
2811 SCIP_EXPORT
2813  SCIP* scip, /**< SCIP data structure */
2814  SCIP_VAR* var, /**< problem variable */
2815  int branchpriority /**< new branch priority of the variable, if it is larger than current priority */
2816  );
2817 
2818 /** adds the given value to the branch priority of the variable
2819  *
2820  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2821  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2822  *
2823  * @pre This method can be called if @p scip is in one of the following stages:
2824  * - \ref SCIP_STAGE_PROBLEM
2825  * - \ref SCIP_STAGE_TRANSFORMING
2826  * - \ref SCIP_STAGE_TRANSFORMED
2827  * - \ref SCIP_STAGE_INITPRESOLVE
2828  * - \ref SCIP_STAGE_PRESOLVING
2829  * - \ref SCIP_STAGE_EXITPRESOLVE
2830  * - \ref SCIP_STAGE_PRESOLVED
2831  * - \ref SCIP_STAGE_SOLVING
2832  */
2833 SCIP_EXPORT
2835  SCIP* scip, /**< SCIP data structure */
2836  SCIP_VAR* var, /**< problem variable */
2837  int addpriority /**< value to add to the branch priority of the variable */
2838  );
2839 
2840 /** sets the branch direction of the variable (-1: prefer downwards branch, 0: automatic selection, +1: prefer upwards
2841  * branch)
2842  *
2843  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2844  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2845  *
2846  * @pre This method can be called if @p scip is in one of the following stages:
2847  * - \ref SCIP_STAGE_PROBLEM
2848  * - \ref SCIP_STAGE_TRANSFORMING
2849  * - \ref SCIP_STAGE_TRANSFORMED
2850  * - \ref SCIP_STAGE_INITPRESOLVE
2851  * - \ref SCIP_STAGE_PRESOLVING
2852  * - \ref SCIP_STAGE_EXITPRESOLVE
2853  * - \ref SCIP_STAGE_PRESOLVED
2854  * - \ref SCIP_STAGE_SOLVING
2855  */
2856 SCIP_EXPORT
2858  SCIP* scip, /**< SCIP data structure */
2859  SCIP_VAR* var, /**< problem variable */
2860  SCIP_BRANCHDIR branchdirection /**< preferred branch direction of the variable (downwards, upwards, auto) */
2861  );
2862 
2863 /** changes type of variable in the problem;
2864  *
2865  * @warning This type change might change the variable array returned from SCIPgetVars() and SCIPgetVarsData();
2866  *
2867  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2868  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2869  *
2870  * @pre This method can be called if @p scip is in one of the following stages:
2871  * - \ref SCIP_STAGE_PROBLEM
2872  * - \ref SCIP_STAGE_TRANSFORMING
2873  * - \ref SCIP_STAGE_PRESOLVING
2874  *
2875  * @note If SCIP is already beyond the SCIP_STAGE_PROBLEM and a original variable is passed, the variable type of the
2876  * corresponding transformed variable is changed; the type of the original variable does not change
2877  *
2878  * @note If the type changes from a continuous variable to a non-continuous variable the bounds of the variable get
2879  * adjusted w.r.t. to integrality information
2880  */
2881 SCIP_EXPORT
2883  SCIP* scip, /**< SCIP data structure */
2884  SCIP_VAR* var, /**< variable to change the bound for */
2885  SCIP_VARTYPE vartype, /**< new type of variable */
2886  SCIP_Bool* infeasible /**< pointer to store whether an infeasibility was detected (, due to
2887  * integrality condition of the new variable type) */
2888  );
2889 
2890 /** in problem creation and solving stage, both bounds of the variable are set to the given value;
2891  * in presolving stage, the variable is converted into a fixed variable, and bounds are changed respectively;
2892  * conversion into a fixed variable changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
2893  * and also renders arrays returned from the SCIPvarGetImpl...() methods invalid
2894  *
2895  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2896  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2897  *
2898  * @pre This method can be called if @p scip is in one of the following stages:
2899  * - \ref SCIP_STAGE_PROBLEM
2900  * - \ref SCIP_STAGE_PRESOLVING
2901  * - \ref SCIP_STAGE_SOLVING
2902  */
2903 SCIP_EXPORT
2905  SCIP* scip, /**< SCIP data structure */
2906  SCIP_VAR* var, /**< variable to fix */
2907  SCIP_Real fixedval, /**< value to fix variable to */
2908  SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2909  SCIP_Bool* fixed /**< pointer to store whether the fixing was performed (variable was unfixed) */
2910  );
2911 
2912 /** From a given equality a*x + b*y == c, aggregates one of the variables and removes it from the set of
2913  * active problem variables. This changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
2914  * and also renders the arrays returned from the SCIPvarGetImpl...() methods for the two variables invalid.
2915  * In the first step, the equality is transformed into an equality with active problem variables
2916  * a'*x' + b'*y' == c'. If x' == y', this leads to the detection of redundancy if a' == -b' and c' == 0,
2917  * of infeasibility, if a' == -b' and c' != 0, or to a variable fixing x' == c'/(a'+b') (and possible
2918  * infeasibility) otherwise.
2919  * In the second step, the variable to be aggregated is chosen among x' and y', prefering a less strict variable
2920  * type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers
2921  * over integers, and integers over binaries). If none of the variables is continuous, it is tried to find an integer
2922  * aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to
2923  * the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by
2924  * aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
2925  *
2926  * The output flags have the following meaning:
2927  * - infeasible: the problem is infeasible
2928  * - redundant: the equality can be deleted from the constraint set
2929  * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
2930  *
2931  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2932  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2933  *
2934  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
2935  */
2936 SCIP_EXPORT
2938  SCIP* scip, /**< SCIP data structure */
2939  SCIP_VAR* varx, /**< variable x in equality a*x + b*y == c */
2940  SCIP_VAR* vary, /**< variable y in equality a*x + b*y == c */
2941  SCIP_Real scalarx, /**< multiplier a in equality a*x + b*y == c */
2942  SCIP_Real scalary, /**< multiplier b in equality a*x + b*y == c */
2943  SCIP_Real rhs, /**< right hand side c in equality a*x + b*y == c */
2944  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
2945  SCIP_Bool* redundant, /**< pointer to store whether the equality is (now) redundant */
2946  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
2947  );
2948 
2949 /** converts variable into multi-aggregated variable; this changes the variable array returned from
2950  * SCIPgetVars() and SCIPgetVarsData();
2951  *
2952  * @warning The integrality condition is not checked anymore on the multi-aggregated variable. You must not
2953  * multi-aggregate an integer variable without being sure, that integrality on the aggregation variables
2954  * implies integrality on the aggregated variable.
2955  *
2956  * The output flags have the following meaning:
2957  * - infeasible: the problem is infeasible
2958  * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
2959  *
2960  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2961  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2962  *
2963  * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
2964  */
2965 SCIP_EXPORT
2967  SCIP* scip, /**< SCIP data structure */
2968  SCIP_VAR* var, /**< variable x to aggregate */
2969  int naggvars, /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2970  SCIP_VAR** aggvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2971  SCIP_Real* scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2972  SCIP_Real constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
2973  SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
2974  SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
2975  );
2976 
2977 /** returns whether aggregation of variables is not allowed */
2978 SCIP_EXPORT
2980  SCIP* scip /**< SCIP data structure */
2981  );
2982 
2983 /** returns whether multi-aggregation is disabled */
2984 SCIP_EXPORT
2986  SCIP* scip /**< SCIP data structure */
2987  );
2988 
2989 /** returns whether variable is not allowed to be aggregated */
2990 SCIP_EXPORT
2992  SCIP* scip, /**< SCIP data structure */
2993  SCIP_VAR* var /**< variable x to aggregate */
2994  );
2995 
2996 /** returns whether variable is not allowed to be multi-aggregated */
2997 SCIP_EXPORT
2999  SCIP* scip, /**< SCIP data structure */
3000  SCIP_VAR* var /**< variable x to aggregate */
3001  );
3002 
3003 /** returns whether dual reductions are allowed during propagation and presolving
3004  *
3005  * @deprecated Please use SCIPallowStrongDualReds()
3006  */
3007 SCIP_EXPORT
3009  SCIP* scip /**< SCIP data structure */
3010  );
3011 
3012 /** returns whether strong dual reductions are allowed during propagation and presolving
3013  *
3014  * @note A reduction is called strong dual, if it may discard feasible/optimal solutions, but leaves at least one
3015  * optimal solution intact. Often such reductions are based on analyzing the objective function and variable
3016  * locks.
3017  */
3018 SCIP_EXPORT
3020  SCIP* scip /**< SCIP data structure */
3021  );
3022 
3023 /** returns whether propagation w.r.t. current objective is allowed
3024  *
3025  * @deprecated Please use SCIPallowWeakDualReds()
3026  */
3027 SCIP_EXPORT
3029  SCIP* scip /**< SCIP data structure */
3030  );
3031 
3032 /** returns whether weak dual reductions are allowed during propagation and presolving
3033  *
3034  * @note A reduction is called weak dual, if it may discard feasible solutions, but leaves at all optimal solutions
3035  * intact. Often such reductions are based on analyzing the objective function, reduced costs, and/or dual LPs.
3036  */
3037 SCIP_EXPORT
3039  SCIP* scip /**< SCIP data structure */
3040  );
3041 
3042 /** marks the variable that it must not be aggregated
3043  *
3044  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3045  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3046  *
3047  * @pre This method can be called if @p scip is in one of the following stages:
3048  * - \ref SCIP_STAGE_INIT
3049  * - \ref SCIP_STAGE_PROBLEM
3050  * - \ref SCIP_STAGE_TRANSFORMING
3051  * - \ref SCIP_STAGE_TRANSFORMED
3052  * - \ref SCIP_STAGE_INITPRESOLVE
3053  * - \ref SCIP_STAGE_PRESOLVING
3054  * - \ref SCIP_STAGE_EXITPRESOLVE
3055  *
3056  * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3057  * aggregated that this is will be the case.
3058  */
3059 SCIP_EXPORT
3061  SCIP* scip, /**< SCIP data structure */
3062  SCIP_VAR* var /**< variable to delete */
3063  );
3064 
3065 /** marks the variable that it must not be multi-aggregated
3066  *
3067  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3068  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3069  *
3070  * @pre This method can be called if @p scip is in one of the following stages:
3071  * - \ref SCIP_STAGE_INIT
3072  * - \ref SCIP_STAGE_PROBLEM
3073  * - \ref SCIP_STAGE_TRANSFORMING
3074  * - \ref SCIP_STAGE_TRANSFORMED
3075  * - \ref SCIP_STAGE_INITPRESOLVE
3076  * - \ref SCIP_STAGE_PRESOLVING
3077  * - \ref SCIP_STAGE_EXITPRESOLVE
3078  *
3079  * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3080  * multi-aggregated that this is will be the case.
3081  */
3082 SCIP_EXPORT
3084  SCIP* scip, /**< SCIP data structure */
3085  SCIP_VAR* var /**< variable to delete */
3086  );
3087 
3088 /** enables the collection of statistics for a variable
3089  *
3090  * @pre This method can be called if @p scip is in one of the following stages:
3091  * - \ref SCIP_STAGE_PROBLEM
3092  * - \ref SCIP_STAGE_INITPRESOLVE
3093  * - \ref SCIP_STAGE_PRESOLVING
3094  * - \ref SCIP_STAGE_EXITPRESOLVE
3095  * - \ref SCIP_STAGE_SOLVING
3096  * - \ref SCIP_STAGE_SOLVED
3097  */
3098 SCIP_EXPORT
3100  SCIP* scip /**< SCIP data structure */
3101  );
3102 
3103 /** disables the collection of any statistic for a variable
3104  *
3105  * @pre This method can be called if @p scip is in one of the following stages:
3106  * - \ref SCIP_STAGE_PROBLEM
3107  * - \ref SCIP_STAGE_INITPRESOLVE
3108  * - \ref SCIP_STAGE_PRESOLVING
3109  * - \ref SCIP_STAGE_EXITPRESOLVE
3110  * - \ref SCIP_STAGE_SOLVING
3111  * - \ref SCIP_STAGE_SOLVED
3112  */
3113 SCIP_EXPORT
3115  SCIP* scip /**< SCIP data structure */
3116  );
3117 
3118 /** updates the pseudo costs of the given variable and the global pseudo costs after a change of "solvaldelta" in the
3119  * variable's solution value and resulting change of "objdelta" in the in the LP's objective value;
3120  * the update is ignored, if the objective value difference is infinite
3121  *
3122  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3123  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3124  *
3125  * @pre This method can be called if @p scip is in one of the following stages:
3126  * - \ref SCIP_STAGE_SOLVING
3127  * - \ref SCIP_STAGE_SOLVED
3128  */
3129 SCIP_EXPORT
3131  SCIP* scip, /**< SCIP data structure */
3132  SCIP_VAR* var, /**< problem variable */
3133  SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
3134  SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
3135  SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
3136  );
3137 
3138 /** gets the variable's pseudo cost value for the given change of the variable's LP value
3139  *
3140  * @return the variable's pseudo cost value for the given change of the variable's LP value
3141  *
3142  * @pre This method can be called if @p scip is in one of the following stages:
3143  * - \ref SCIP_STAGE_INITPRESOLVE
3144  * - \ref SCIP_STAGE_PRESOLVING
3145  * - \ref SCIP_STAGE_EXITPRESOLVE
3146  * - \ref SCIP_STAGE_PRESOLVED
3147  * - \ref SCIP_STAGE_INITSOLVE
3148  * - \ref SCIP_STAGE_SOLVING
3149  * - \ref SCIP_STAGE_SOLVED
3150  */
3151 SCIP_EXPORT
3153  SCIP* scip, /**< SCIP data structure */
3154  SCIP_VAR* var, /**< problem variable */
3155  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3156  );
3157 
3158 /** gets 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  * @return the variable's pseudo cost value for the given change of the variable's LP value,
3162  * only using the pseudo cost information of the current run
3163  *
3164  * @pre This method can be called if @p scip is in one of the following stages:
3165  * - \ref SCIP_STAGE_INITPRESOLVE
3166  * - \ref SCIP_STAGE_PRESOLVING
3167  * - \ref SCIP_STAGE_EXITPRESOLVE
3168  * - \ref SCIP_STAGE_PRESOLVED
3169  * - \ref SCIP_STAGE_INITSOLVE
3170  * - \ref SCIP_STAGE_SOLVING
3171  * - \ref SCIP_STAGE_SOLVED
3172  */
3173 SCIP_EXPORT
3175  SCIP* scip, /**< SCIP data structure */
3176  SCIP_VAR* var, /**< problem variable */
3177  SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3178  );
3179 
3180 /** gets the variable's pseudo cost value for the given direction
3181  *
3182  * @return the variable's pseudo cost value for the given direction
3183  *
3184  * @pre This method can be called if @p scip is in one of the following stages:
3185  * - \ref SCIP_STAGE_INITPRESOLVE
3186  * - \ref SCIP_STAGE_PRESOLVING
3187  * - \ref SCIP_STAGE_EXITPRESOLVE
3188  * - \ref SCIP_STAGE_PRESOLVED
3189  * - \ref SCIP_STAGE_INITSOLVE
3190  * - \ref SCIP_STAGE_SOLVING
3191  * - \ref SCIP_STAGE_SOLVED
3192  */
3193 SCIP_EXPORT
3195  SCIP* scip, /**< SCIP data structure */
3196  SCIP_VAR* var, /**< problem variable */
3197  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3198  );
3199 
3200 /** gets the variable's pseudo cost value for the given direction,
3201  * only using the pseudo cost information of the current run
3202  *
3203  * @return the variable's pseudo cost value for the given direction,
3204  * only using the pseudo cost information of the current run
3205  *
3206  * @pre This method can be called if @p scip is in one of the following stages:
3207  * - \ref SCIP_STAGE_INITPRESOLVE
3208  * - \ref SCIP_STAGE_PRESOLVING
3209  * - \ref SCIP_STAGE_EXITPRESOLVE
3210  * - \ref SCIP_STAGE_PRESOLVED
3211  * - \ref SCIP_STAGE_INITSOLVE
3212  * - \ref SCIP_STAGE_SOLVING
3213  * - \ref SCIP_STAGE_SOLVED
3214  */
3215 SCIP_EXPORT
3217  SCIP* scip, /**< SCIP data structure */
3218  SCIP_VAR* var, /**< problem variable */
3219  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3220  );
3221 
3222 /** gets the variable's (possible fractional) number of pseudo cost updates for the given direction
3223  *
3224  * @return the variable's (possible fractional) number of pseudo cost updates for the given direction
3225  *
3226  * @pre This method can be called if @p scip is in one of the following stages:
3227  * - \ref SCIP_STAGE_INITPRESOLVE
3228  * - \ref SCIP_STAGE_PRESOLVING
3229  * - \ref SCIP_STAGE_EXITPRESOLVE
3230  * - \ref SCIP_STAGE_PRESOLVED
3231  * - \ref SCIP_STAGE_INITSOLVE
3232  * - \ref SCIP_STAGE_SOLVING
3233  * - \ref SCIP_STAGE_SOLVED
3234  */
3235 SCIP_EXPORT
3237  SCIP* scip, /**< SCIP data structure */
3238  SCIP_VAR* var, /**< problem variable */
3239  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3240  );
3241 
3242 /** gets 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  * @return the variable's (possible fractional) number of pseudo cost updates for the given direction,
3246  * only using the pseudo cost information of the current run
3247  *
3248  * @pre This method can be called if @p scip is in one of the following stages:
3249  * - \ref SCIP_STAGE_INITPRESOLVE
3250  * - \ref SCIP_STAGE_PRESOLVING
3251  * - \ref SCIP_STAGE_EXITPRESOLVE
3252  * - \ref SCIP_STAGE_PRESOLVED
3253  * - \ref SCIP_STAGE_INITSOLVE
3254  * - \ref SCIP_STAGE_SOLVING
3255  * - \ref SCIP_STAGE_SOLVED
3256  */
3257 SCIP_EXPORT
3259  SCIP* scip, /**< SCIP data structure */
3260  SCIP_VAR* var, /**< problem variable */
3261  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3262  );
3263 
3264 /** get pseudo cost variance of the variable, either for entire solve or only for current branch and bound run
3265  *
3266  * @return returns the (corrected) variance of pseudo code information collected so far.
3267  *
3268  * @pre This method can be called if @p scip is in one of the following stages:
3269  * - \ref SCIP_STAGE_INITPRESOLVE
3270  * - \ref SCIP_STAGE_PRESOLVING
3271  * - \ref SCIP_STAGE_EXITPRESOLVE
3272  * - \ref SCIP_STAGE_PRESOLVED
3273  * - \ref SCIP_STAGE_INITSOLVE
3274  * - \ref SCIP_STAGE_SOLVING
3275  * - \ref SCIP_STAGE_SOLVED
3276  */
3277 SCIP_EXPORT
3279  SCIP* scip, /**< SCIP data structure */
3280  SCIP_VAR* var, /**< problem variable */
3281  SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
3282  SCIP_Bool onlycurrentrun /**< only for pseudo costs of current branch and bound run */
3283  );
3284 
3285 /** calculates a confidence bound for this variable under the assumption of normally distributed pseudo costs
3286  *
3287  * The confidence bound \f$ \theta \geq 0\f$ denotes the interval borders \f$ [X - \theta, \ X + \theta]\f$, which contains
3288  * the true pseudo costs of the variable, i.e., the expected value of the normal distribution, with a probability
3289  * of 2 * clevel - 1.
3290  *
3291  * @return value of confidence bound for this variable
3292  */
3293 SCIP_EXPORT
3295  SCIP* scip, /**< SCIP data structure */
3296  SCIP_VAR* var, /**< variable in question */
3297  SCIP_BRANCHDIR dir, /**< the branching direction for the confidence bound */
3298  SCIP_Bool onlycurrentrun, /**< should only the current run be taken into account */
3299  SCIP_CONFIDENCELEVEL clevel /**< confidence level for the interval */
3300  );
3301 
3302 /** check if variable pseudo-costs have a significant difference in location. The significance depends on
3303  * the choice of \p clevel and on the kind of tested hypothesis. The one-sided hypothesis, which
3304  * should be rejected, is that fracy * mu_y >= fracx * mu_x, where mu_y and mu_x denote the
3305  * unknown location means of the underlying pseudo-cost distributions of x and y.
3306  *
3307  * This method is applied best if variable x has a better pseudo-cost score than y. The method hypothesizes that y were actually
3308  * better than x (despite the current information), meaning that y can be expected to yield branching
3309  * decisions as least as good as x in the long run. If the method returns TRUE, the current history information is
3310  * sufficient to safely rely on the alternative hypothesis that x yields indeed a better branching score (on average)
3311  * than y.
3312  *
3313  * @note The order of x and y matters for the one-sided hypothesis
3314  *
3315  * @note set \p onesided to FALSE if you are not sure which variable is better. The hypothesis tested then reads
3316  * fracy * mu_y == fracx * mu_x vs the alternative hypothesis fracy * mu_y != fracx * mu_x.
3317  *
3318  * @return TRUE if the hypothesis can be safely rejected at the given confidence level
3319  */
3320 SCIP_EXPORT
3322  SCIP* scip, /**< SCIP data structure */
3323  SCIP_VAR* varx, /**< variable x */
3324  SCIP_Real fracx, /**< the fractionality of variable x */
3325  SCIP_VAR* vary, /**< variable y */
3326  SCIP_Real fracy, /**< the fractionality of variable y */
3327  SCIP_BRANCHDIR dir, /**< branching direction */
3328  SCIP_CONFIDENCELEVEL clevel, /**< confidence level for rejecting hypothesis */
3329  SCIP_Bool onesided /**< should a one-sided hypothesis y >= x be tested? */
3330  );
3331 
3332 /** tests at a given confidence level whether the variable pseudo-costs only have a small probability to
3333  * exceed a \p threshold. This is useful to determine if past observations provide enough evidence
3334  * to skip an expensive strong-branching step if there is already a candidate that has been proven to yield an improvement
3335  * of at least \p threshold.
3336  *
3337  * @note use \p clevel to adjust the level of confidence. For SCIP_CONFIDENCELEVEL_MIN, the method returns TRUE if
3338  * the estimated probability to exceed \p threshold is less than 25 %.
3339  *
3340  * @see SCIP_Confidencelevel for a list of available levels. The used probability limits refer to the one-sided levels
3341  * of confidence.
3342  *
3343  * @return TRUE if the variable pseudo-cost probabilistic model is likely to be smaller than \p threshold
3344  * at the given confidence level \p clevel.
3345  */
3346 SCIP_EXPORT
3348  SCIP* scip, /**< SCIP data structure */
3349  SCIP_VAR* var, /**< variable x */
3350  SCIP_Real frac, /**< the fractionality of variable x */
3351  SCIP_Real threshold, /**< the threshold to test against */
3352  SCIP_BRANCHDIR dir, /**< branching direction */
3353  SCIP_CONFIDENCELEVEL clevel /**< confidence level for rejecting hypothesis */
3354  );
3355 
3356 /** check if the current pseudo cost relative error in a direction violates the given threshold. The Relative
3357  * Error is calculated at a specific confidence level
3358  *
3359  * @return TRUE if relative error in variable pseudo costs is smaller than \p threshold
3360  */
3361 SCIP_EXPORT
3363  SCIP* scip, /**< SCIP data structure */
3364  SCIP_VAR* var, /**< variable in question */
3365  SCIP_Real threshold, /**< threshold for relative errors to be considered reliable (enough) */
3366  SCIP_CONFIDENCELEVEL clevel /**< a given confidence level */
3367  );
3368 
3369 /** gets the variable's pseudo cost score value for the given LP solution value
3370  *
3371  * @return the variable's pseudo cost score value for the given LP solution value
3372  *
3373  * @pre This method can be called if @p scip is in one of the following stages:
3374  * - \ref SCIP_STAGE_INITPRESOLVE
3375  * - \ref SCIP_STAGE_PRESOLVING
3376  * - \ref SCIP_STAGE_EXITPRESOLVE
3377  * - \ref SCIP_STAGE_PRESOLVED
3378  * - \ref SCIP_STAGE_INITSOLVE
3379  * - \ref SCIP_STAGE_SOLVING
3380  * - \ref SCIP_STAGE_SOLVED
3381  */
3382 SCIP_EXPORT
3384  SCIP* scip, /**< SCIP data structure */
3385  SCIP_VAR* var, /**< problem variable */
3386  SCIP_Real solval /**< variable's LP solution value */
3387  );
3388 
3389 /** gets 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  * @return the variable's pseudo cost score value for the given LP solution value,
3393  * only using the pseudo cost information of the current run
3394  *
3395  * @pre This method can be called if @p scip is in one of the following stages:
3396  * - \ref SCIP_STAGE_INITPRESOLVE
3397  * - \ref SCIP_STAGE_PRESOLVING
3398  * - \ref SCIP_STAGE_EXITPRESOLVE
3399  * - \ref SCIP_STAGE_PRESOLVED
3400  * - \ref SCIP_STAGE_INITSOLVE
3401  * - \ref SCIP_STAGE_SOLVING
3402  * - \ref SCIP_STAGE_SOLVED
3403  */
3404 SCIP_EXPORT
3406  SCIP* scip, /**< SCIP data structure */
3407  SCIP_VAR* var, /**< problem variable */
3408  SCIP_Real solval /**< variable's LP solution value */
3409  );
3410 
3411 /** returns the variable's VSIDS value
3412  *
3413  * @return the variable's VSIDS value
3414  *
3415  * @pre This method can be called if @p scip is in one of the following stages:
3416  * - \ref SCIP_STAGE_INITPRESOLVE
3417  * - \ref SCIP_STAGE_PRESOLVING
3418  * - \ref SCIP_STAGE_EXITPRESOLVE
3419  * - \ref SCIP_STAGE_PRESOLVED
3420  * - \ref SCIP_STAGE_INITSOLVE
3421  * - \ref SCIP_STAGE_SOLVING
3422  * - \ref SCIP_STAGE_SOLVED
3423  */
3424 SCIP_EXPORT
3426  SCIP* scip, /**< SCIP data structure */
3427  SCIP_VAR* var, /**< problem variable */
3428  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3429  );
3430 
3431 /** returns the variable's VSIDS value only using conflicts of the current run
3432  *
3433  * @return the variable's VSIDS value only using conflicts of the current run
3434  *
3435  * @pre This method can be called if @p scip is in one of the following stages:
3436  * - \ref SCIP_STAGE_INITPRESOLVE
3437  * - \ref SCIP_STAGE_PRESOLVING
3438  * - \ref SCIP_STAGE_EXITPRESOLVE
3439  * - \ref SCIP_STAGE_PRESOLVED
3440  * - \ref SCIP_STAGE_INITSOLVE
3441  * - \ref SCIP_STAGE_SOLVING
3442  * - \ref SCIP_STAGE_SOLVED
3443  */
3444 SCIP_EXPORT
3446  SCIP* scip, /**< SCIP data structure */
3447  SCIP_VAR* var, /**< problem variable */
3448  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3449  );
3450 
3451 /** returns the variable's conflict score value
3452  *
3453  * @return the variable's conflict score value
3454  *
3455  * @pre This method can be called if @p scip is in one of the following stages:
3456  * - \ref SCIP_STAGE_INITPRESOLVE
3457  * - \ref SCIP_STAGE_PRESOLVING
3458  * - \ref SCIP_STAGE_EXITPRESOLVE
3459  * - \ref SCIP_STAGE_PRESOLVED
3460  * - \ref SCIP_STAGE_INITSOLVE
3461  * - \ref SCIP_STAGE_SOLVING
3462  * - \ref SCIP_STAGE_SOLVED
3463  */
3464 SCIP_EXPORT
3466  SCIP* scip, /**< SCIP data structure */
3467  SCIP_VAR* var /**< problem variable */
3468  );
3469 
3470 /** returns the variable's conflict score value only using conflicts of the current run
3471  *
3472  * @return the variable's conflict score value only using conflicts of the current run
3473  *
3474  * @pre This method can be called if @p scip is in one of the following stages:
3475  * - \ref SCIP_STAGE_INITPRESOLVE
3476  * - \ref SCIP_STAGE_PRESOLVING
3477  * - \ref SCIP_STAGE_EXITPRESOLVE
3478  * - \ref SCIP_STAGE_PRESOLVED
3479  * - \ref SCIP_STAGE_INITSOLVE
3480  * - \ref SCIP_STAGE_SOLVING
3481  * - \ref SCIP_STAGE_SOLVED
3482  */
3483 SCIP_EXPORT
3485  SCIP* scip, /**< SCIP data structure */
3486  SCIP_VAR* var /**< problem variable */
3487  );
3488 
3489 /** returns the variable's conflict length score
3490  *
3491  * @return the variable's conflict length score
3492  *
3493  * @pre This method can be called if @p scip is in one of the following stages:
3494  * - \ref SCIP_STAGE_INITPRESOLVE
3495  * - \ref SCIP_STAGE_PRESOLVING
3496  * - \ref SCIP_STAGE_EXITPRESOLVE
3497  * - \ref SCIP_STAGE_PRESOLVED
3498  * - \ref SCIP_STAGE_INITSOLVE
3499  * - \ref SCIP_STAGE_SOLVING
3500  * - \ref SCIP_STAGE_SOLVED
3501  */
3502 SCIP_EXPORT
3504  SCIP* scip, /**< SCIP data structure */
3505  SCIP_VAR* var /**< problem variable */
3506  );
3507 
3508 /** returns the variable's conflict length score only using conflicts of the current run
3509  *
3510  * @return the variable's conflict length score only using conflicts of the current run
3511  *
3512  * @pre This method can be called if @p scip is in one of the following stages:
3513  * - \ref SCIP_STAGE_INITPRESOLVE
3514  * - \ref SCIP_STAGE_PRESOLVING
3515  * - \ref SCIP_STAGE_EXITPRESOLVE
3516  * - \ref SCIP_STAGE_PRESOLVED
3517  * - \ref SCIP_STAGE_INITSOLVE
3518  * - \ref SCIP_STAGE_SOLVING
3519  * - \ref SCIP_STAGE_SOLVED
3520  */
3521 SCIP_EXPORT
3523  SCIP* scip, /**< SCIP data structure */
3524  SCIP_VAR* var /**< problem variable */
3525  );
3526 
3527 /** returns the variable's average conflict length
3528  *
3529  * @return the variable's average conflict length
3530  *
3531  * @pre This method can be called if @p scip is in one of the following stages:
3532  * - \ref SCIP_STAGE_INITPRESOLVE
3533  * - \ref SCIP_STAGE_PRESOLVING
3534  * - \ref SCIP_STAGE_EXITPRESOLVE
3535  * - \ref SCIP_STAGE_PRESOLVED
3536  * - \ref SCIP_STAGE_INITSOLVE
3537  * - \ref SCIP_STAGE_SOLVING
3538  * - \ref SCIP_STAGE_SOLVED
3539  */
3540 SCIP_EXPORT
3542  SCIP* scip, /**< SCIP data structure */
3543  SCIP_VAR* var, /**< problem variable */
3544  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3545  );
3546 
3547 /** returns the variable's average conflict length only using conflicts of the current run
3548  *
3549  * @return the variable's average conflict length only using conflicts of the current run
3550  *
3551  * @pre This method can be called if @p scip is in one of the following stages:
3552  * - \ref SCIP_STAGE_INITPRESOLVE
3553  * - \ref SCIP_STAGE_PRESOLVING
3554  * - \ref SCIP_STAGE_EXITPRESOLVE
3555  * - \ref SCIP_STAGE_PRESOLVED
3556  * - \ref SCIP_STAGE_INITSOLVE
3557  * - \ref SCIP_STAGE_SOLVING
3558  * - \ref SCIP_STAGE_SOLVED
3559  */
3560 SCIP_EXPORT
3562  SCIP* scip, /**< SCIP data structure */
3563  SCIP_VAR* var, /**< problem variable */
3564  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3565  );
3566 
3567 /** returns the average number of inferences found after branching on the variable in given direction;
3568  * if branching on the variable in the given direction was yet evaluated, the average number of inferences
3569  * over all variables for branching in the given direction is returned
3570  *
3571  * @return the average number of inferences found after branching on the variable in given direction
3572  *
3573  * @pre This method can be called if @p scip is in one of the following stages:
3574  * - \ref SCIP_STAGE_INITPRESOLVE
3575  * - \ref SCIP_STAGE_PRESOLVING
3576  * - \ref SCIP_STAGE_EXITPRESOLVE
3577  * - \ref SCIP_STAGE_PRESOLVED
3578  * - \ref SCIP_STAGE_INITSOLVE
3579  * - \ref SCIP_STAGE_SOLVING
3580  * - \ref SCIP_STAGE_SOLVED
3581  */
3582 SCIP_EXPORT
3584  SCIP* scip, /**< SCIP data structure */
3585  SCIP_VAR* var, /**< problem variable */
3586  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3587  );
3588 
3589 /** returns the average number of inferences found after branching on the variable in given direction in the current run;
3590  * if branching on the variable in the given direction was yet evaluated, the average number of inferences
3591  * over all variables for branching in the given direction is returned
3592  *
3593  * @return the average number of inferences found after branching on the variable in given direction in the current run
3594  *
3595  * @pre This method can be called if @p scip is in one of the following stages:
3596  * - \ref SCIP_STAGE_INITPRESOLVE
3597  * - \ref SCIP_STAGE_PRESOLVING
3598  * - \ref SCIP_STAGE_EXITPRESOLVE
3599  * - \ref SCIP_STAGE_PRESOLVED
3600  * - \ref SCIP_STAGE_INITSOLVE
3601  * - \ref SCIP_STAGE_SOLVING
3602  * - \ref SCIP_STAGE_SOLVED
3603  */
3604 SCIP_EXPORT
3606  SCIP* scip, /**< SCIP data structure */
3607  SCIP_VAR* var, /**< problem variable */
3608  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3609  );
3610 
3611 /** returns the variable's average inference score value
3612  *
3613  * @return the variable's average inference score value
3614  *
3615  * @pre This method can be called if @p scip is in one of the following stages:
3616  * - \ref SCIP_STAGE_INITPRESOLVE
3617  * - \ref SCIP_STAGE_PRESOLVING
3618  * - \ref SCIP_STAGE_EXITPRESOLVE
3619  * - \ref SCIP_STAGE_PRESOLVED
3620  * - \ref SCIP_STAGE_INITSOLVE
3621  * - \ref SCIP_STAGE_SOLVING
3622  * - \ref SCIP_STAGE_SOLVED
3623  */
3624 SCIP_EXPORT
3626  SCIP* scip, /**< SCIP data structure */
3627  SCIP_VAR* var /**< problem variable */
3628  );
3629 
3630 /** returns the variable's average inference score value only using inferences of the current run
3631  *
3632  * @return the variable's average inference score value only using inferences of the current run
3633  *
3634  * @pre This method can be called if @p scip is in one of the following stages:
3635  * - \ref SCIP_STAGE_INITPRESOLVE
3636  * - \ref SCIP_STAGE_PRESOLVING
3637  * - \ref SCIP_STAGE_EXITPRESOLVE
3638  * - \ref SCIP_STAGE_PRESOLVED
3639  * - \ref SCIP_STAGE_INITSOLVE
3640  * - \ref SCIP_STAGE_SOLVING
3641  * - \ref SCIP_STAGE_SOLVED
3642  */
3643 SCIP_EXPORT
3645  SCIP* scip, /**< SCIP data structure */
3646  SCIP_VAR* var /**< problem variable */
3647  );
3648 
3649 /** initializes the upwards and downwards pseudocosts, conflict scores, conflict lengths, inference scores, cutoff scores
3650  * of a variable to the given values
3651  *
3652  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3653  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3654  *
3655  * @pre This method can be called if @p scip is in one of the following stages:
3656  * - \ref SCIP_STAGE_TRANSFORMED
3657  * - \ref SCIP_STAGE_INITPRESOLVE
3658  * - \ref SCIP_STAGE_PRESOLVING
3659  * - \ref SCIP_STAGE_EXITPRESOLVE
3660  * - \ref SCIP_STAGE_PRESOLVED
3661  * - \ref SCIP_STAGE_INITSOLVE
3662  * - \ref SCIP_STAGE_SOLVING
3663  */
3664 SCIP_EXPORT
3666  SCIP* scip, /**< SCIP data structure */
3667  SCIP_VAR* var, /**< variable which should be initialized */
3668  SCIP_Real downpscost, /**< value to which pseudocosts for downwards branching should be initialized */
3669  SCIP_Real uppscost, /**< value to which pseudocosts for upwards branching should be initialized */
3670  SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
3671  SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
3672  SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
3673  SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
3674  SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
3675  SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
3676  SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
3677  SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
3678  );
3679 
3680 /** initializes the upwards and downwards conflict scores, conflict lengths, inference scores, cutoff scores of a
3681  * variable w.r.t. a value by the given values (SCIP_VALUEHISTORY)
3682  *
3683  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3684  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3685  *
3686  * @pre This method can be called if @p scip is in one of the following stages:
3687  * - \ref SCIP_STAGE_TRANSFORMED
3688  * - \ref SCIP_STAGE_INITPRESOLVE
3689  * - \ref SCIP_STAGE_PRESOLVING
3690  * - \ref SCIP_STAGE_EXITPRESOLVE
3691  * - \ref SCIP_STAGE_PRESOLVED
3692  * - \ref SCIP_STAGE_INITSOLVE
3693  * - \ref SCIP_STAGE_SOLVING
3694  */
3695 SCIP_EXPORT
3697  SCIP* scip, /**< SCIP data structure */
3698  SCIP_VAR* var, /**< variable which should be initialized */
3699  SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
3700  SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
3701  SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
3702  SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
3703  SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
3704  SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
3705  SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
3706  SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
3707  SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
3708  );
3709 
3710 /** returns the average number of cutoffs found after branching on the variable in given direction;
3711  * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
3712  * over all variables for branching in the given direction is returned
3713  *
3714  * @return the average number of cutoffs found after branching on the variable in given direction
3715  *
3716  * @pre This method can be called if @p scip is in one of the following stages:
3717  * - \ref SCIP_STAGE_INITPRESOLVE
3718  * - \ref SCIP_STAGE_PRESOLVING
3719  * - \ref SCIP_STAGE_EXITPRESOLVE
3720  * - \ref SCIP_STAGE_PRESOLVED
3721  * - \ref SCIP_STAGE_INITSOLVE
3722  * - \ref SCIP_STAGE_SOLVING
3723  * - \ref SCIP_STAGE_SOLVED
3724  */
3725 SCIP_EXPORT
3727  SCIP* scip, /**< SCIP data structure */
3728  SCIP_VAR* var, /**< problem variable */
3729  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3730  );
3731 
3732 /** returns the average number of cutoffs found after branching on the variable in given direction in the current run;
3733  * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
3734  * over all variables for branching in the given direction is returned
3735  *
3736  * @return the average number of cutoffs found after branching on the variable in given direction in the current run
3737  *
3738  * @pre This method can be called if @p scip is in one of the following stages:
3739  * - \ref SCIP_STAGE_INITPRESOLVE
3740  * - \ref SCIP_STAGE_PRESOLVING
3741  * - \ref SCIP_STAGE_EXITPRESOLVE
3742  * - \ref SCIP_STAGE_PRESOLVED
3743  * - \ref SCIP_STAGE_INITSOLVE
3744  * - \ref SCIP_STAGE_SOLVING
3745  * - \ref SCIP_STAGE_SOLVED
3746  */
3747 SCIP_EXPORT
3749  SCIP* scip, /**< SCIP data structure */
3750  SCIP_VAR* var, /**< problem variable */
3751  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3752  );
3753 
3754 /** returns the variable's average cutoff score value
3755  *
3756  * @return the variable's average cutoff score value
3757  *
3758  * @pre This method can be called if @p scip is in one of the following stages:
3759  * - \ref SCIP_STAGE_INITPRESOLVE
3760  * - \ref SCIP_STAGE_PRESOLVING
3761  * - \ref SCIP_STAGE_EXITPRESOLVE
3762  * - \ref SCIP_STAGE_PRESOLVED
3763  * - \ref SCIP_STAGE_INITSOLVE
3764  * - \ref SCIP_STAGE_SOLVING
3765  * - \ref SCIP_STAGE_SOLVED
3766  */
3767 SCIP_EXPORT
3769  SCIP* scip, /**< SCIP data structure */
3770  SCIP_VAR* var /**< problem variable */
3771  );
3772 
3773 /** returns the variable's average cutoff score value, only using cutoffs of the current run
3774  *
3775  * @return the variable's average cutoff score value, only using cutoffs of the current run
3776  *
3777  * @pre This method can be called if @p scip is in one of the following stages:
3778  * - \ref SCIP_STAGE_INITPRESOLVE
3779  * - \ref SCIP_STAGE_PRESOLVING
3780  * - \ref SCIP_STAGE_EXITPRESOLVE
3781  * - \ref SCIP_STAGE_PRESOLVED
3782  * - \ref SCIP_STAGE_INITSOLVE
3783  * - \ref SCIP_STAGE_SOLVING
3784  * - \ref SCIP_STAGE_SOLVED
3785  */
3786 SCIP_EXPORT
3788  SCIP* scip, /**< SCIP data structure */
3789  SCIP_VAR* var /**< problem variable */
3790  );
3791 
3792 /** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
3793  * factor
3794  *
3795  * @return the variable's average inference/cutoff score value
3796  *
3797  * @pre This method can be called if @p scip is in one of the following stages:
3798  * - \ref SCIP_STAGE_INITPRESOLVE
3799  * - \ref SCIP_STAGE_PRESOLVING
3800  * - \ref SCIP_STAGE_EXITPRESOLVE
3801  * - \ref SCIP_STAGE_PRESOLVED
3802  * - \ref SCIP_STAGE_INITSOLVE
3803  * - \ref SCIP_STAGE_SOLVING
3804  * - \ref SCIP_STAGE_SOLVED
3805  */
3806 SCIP_EXPORT
3808  SCIP* scip, /**< SCIP data structure */
3809  SCIP_VAR* var, /**< problem variable */
3810  SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
3811  );
3812 
3813 /** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
3814  * factor, only using inferences and cutoffs of the current run
3815  *
3816  * @return the variable's average inference/cutoff score value, only using inferences and cutoffs of the current run
3817  *
3818  * @pre This method can be called if @p scip is in one of the following stages:
3819  * - \ref SCIP_STAGE_INITPRESOLVE
3820  * - \ref SCIP_STAGE_PRESOLVING
3821  * - \ref SCIP_STAGE_EXITPRESOLVE
3822  * - \ref SCIP_STAGE_PRESOLVED
3823  * - \ref SCIP_STAGE_INITSOLVE
3824  * - \ref SCIP_STAGE_SOLVING
3825  * - \ref SCIP_STAGE_SOLVED
3826  */
3827 SCIP_EXPORT
3829  SCIP* scip, /**< SCIP data structure */
3830  SCIP_VAR* var, /**< problem variable */
3831  SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
3832  );
3833 
3834 /** returns the variable's average GMI efficacy score value
3835  *
3836  * @return the variable's average GMI efficacy score value (for when it was fractional and basic in the LP)
3837  *
3838  * @pre This method can be called if @p scip is in one of the following stages:
3839  * - \ref SCIP_STAGE_INITPRESOLVE
3840  * - \ref SCIP_STAGE_PRESOLVING
3841  * - \ref SCIP_STAGE_EXITPRESOLVE
3842  * - \ref SCIP_STAGE_PRESOLVED
3843  * - \ref SCIP_STAGE_INITSOLVE
3844  * - \ref SCIP_STAGE_SOLVING
3845  * - \ref SCIP_STAGE_SOLVED
3846  */
3847 SCIP_EXPORT
3849  SCIP* scip, /**< SCIP data structure */
3850  SCIP_VAR* var /**< problem variable */
3851  );
3852 
3853 /** sets the variable's avg GMI efficacy score value
3854  *
3855  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3856  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3857  *
3858  * @pre This method can be called if @p scip is in one of the following stages:
3859  * - \ref SCIP_STAGE_INITPRESOLVE
3860  * - \ref SCIP_STAGE_PRESOLVING
3861  * - \ref SCIP_STAGE_EXITPRESOLVE
3862  * - \ref SCIP_STAGE_PRESOLVED
3863  * - \ref SCIP_STAGE_INITSOLVE
3864  * - \ref SCIP_STAGE_SOLVING
3865  * - \ref SCIP_STAGE_SOLVED
3866  */
3867 SCIP_EXPORT
3869  SCIP* scip, /**< SCIP data structure */
3870  SCIP_VAR* var, /**< problem variable */
3871  SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
3872  );
3873 
3874 /** returns the variable's last GMI efficacy score value
3875  *
3876  * @return the variable's last GMI efficacy score value (for when it was fractional and basic in the LP)
3877  *
3878  * @pre This method can be called if @p scip is in one of the following stages:
3879  * - \ref SCIP_STAGE_INITPRESOLVE
3880  * - \ref SCIP_STAGE_PRESOLVING
3881  * - \ref SCIP_STAGE_EXITPRESOLVE
3882  * - \ref SCIP_STAGE_PRESOLVED
3883  * - \ref SCIP_STAGE_INITSOLVE
3884  * - \ref SCIP_STAGE_SOLVING
3885  * - \ref SCIP_STAGE_SOLVED
3886  */
3887 SCIP_EXPORT
3889  SCIP* scip, /**< SCIP data structure */
3890  SCIP_VAR* var /**< problem variable */
3891  );
3892 
3893 /** sets the variable's last GMI efficacy score value
3894  *
3895  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3896  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3897  *
3898  * @pre This method can be called if @p scip is in one of the following stages:
3899  * - \ref SCIP_STAGE_INITPRESOLVE
3900  * - \ref SCIP_STAGE_PRESOLVING
3901  * - \ref SCIP_STAGE_EXITPRESOLVE
3902  * - \ref SCIP_STAGE_PRESOLVED
3903  * - \ref SCIP_STAGE_INITSOLVE
3904  * - \ref SCIP_STAGE_SOLVING
3905  * - \ref SCIP_STAGE_SOLVED
3906  */
3907 SCIP_EXPORT
3909  SCIP* scip, /**< SCIP data structure */
3910  SCIP_VAR* var, /**< problem variable */
3911  SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
3912  );
3913 
3914 /** outputs variable information to file stream via the message system
3915  *
3916  * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3917  * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3918  *
3919  * @pre This method can be called if @p scip is in one of the following stages:
3920  * - \ref SCIP_STAGE_PROBLEM
3921  * - \ref SCIP_STAGE_TRANSFORMING
3922  * - \ref SCIP_STAGE_TRANSFORMED
3923  * - \ref SCIP_STAGE_INITPRESOLVE
3924  * - \ref SCIP_STAGE_PRESOLVING
3925  * - \ref SCIP_STAGE_EXITPRESOLVE
3926  * - \ref SCIP_STAGE_PRESOLVED
3927  * - \ref SCIP_STAGE_INITSOLVE
3928  * - \ref SCIP_STAGE_SOLVING
3929  * - \ref SCIP_STAGE_SOLVED
3930  * - \ref SCIP_STAGE_EXITSOLVE
3931  * - \ref SCIP_STAGE_FREETRANS
3932  *
3933  * @note If the message handler is set to a NULL pointer nothing will be printed
3934  */
3935 SCIP_EXPORT
3937  SCIP* scip, /**< SCIP data structure */
3938  SCIP_VAR* var, /**< problem variable */
3939  FILE* file /**< output file (or NULL for standard output) */
3940  );
3941 
3942 /**@} */
3943 
3944 #ifdef __cplusplus
3945 }
3946 #endif
3947 
3948 #endif
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:59
SCIP_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1695
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4945
SCIP_Real SCIPgetVarAvgInferences(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9421
SCIP_Real SCIPgetVarAvgCutoffs(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9675
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5205
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2130
SCIP_RETCODE SCIPsetRelaxSolValsSol(SCIP *scip, SCIP_RELAX *relax, SCIP_SOL *sol, SCIP_Bool includeslp)
Definition: scip_var.c:2491
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
Definition: scip_var.c:1599
type definitions for miscellaneous datastructures
SCIP_Real SCIPgetVarAvgInferenceCutoffScore(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:9792
type definitions for implications, variable bounds, and cliques
SCIP_RETCODE SCIPaddVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real addobj)
Definition: scip_var.c:4564
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:1994
SCIP_RETCODE SCIPclearRelaxSolVals(SCIP *scip, SCIP_RELAX *relax)
Definition: scip_var.c:2366
SCIP_Real SCIPgetVarAvgInferencesCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9449
SCIP_Real SCIPgetVarConflictlengthScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9336
#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:8816
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1866
SCIP_RETCODE SCIPgetNegatedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **negvars)
Definition: scip_var.c:1562
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:4012
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:5897
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4848
SCIP_Bool SCIPpscostThresholdProbabilityTest(SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:9061
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:1441
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:1250
SCIP_RETCODE SCIPsetVarLastGMIScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:9962
SCIP_RETCODE SCIPchgVarUbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazyub)
Definition: scip_var.c:5166
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8952
SCIP_RETCODE SCIPsetRelaxSolVals(SCIP *scip, SCIP_RELAX *relax, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Bool includeslp)
Definition: scip_var.c:2449
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:9143
SCIP_Real SCIPgetVarLastGMIScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9935
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:4647
SCIP_Real SCIPgetVarVSIDS(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9179
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:6122
SCIP_Real SCIPgetVarMultaggrUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6593
SCIP_Real SCIPgetVarPseudocostValCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:8844
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:4319
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4162
#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:9703
SCIP_Real SCIPgetVarVSIDSCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9211
SCIP_Real SCIPgetVarAvgCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9760
public methods for problem variables
SCIP_Bool SCIPisVarPscostRelerrorReliable(SCIP *scip, SCIP_VAR *var, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:9080
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:5322
SCIP_Real SCIPgetRelaxSolObj(SCIP *scip)
Definition: scip_var.c:2634
SCIP_Bool SCIPgetVarWasFixedAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2284
type definitions for return codes for SCIP methods
SCIP_Real SCIPgetVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8870
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4892
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:6563
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4678
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:6663
SCIP_RETCODE SCIPmarkRelaxSolInvalid(SCIP *scip)
Definition: scip_var.c:2584
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:4615
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:6722
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:5034
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:1482
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:3664
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:6611
SCIP_Real SCIPcomputeVarUbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6486
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6507
SCIP_Bool SCIPisStrongbranchDownFirst(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2657
SCIP_RETCODE SCIPtransformVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:1391
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:9105
SCIP_RETCODE SCIPscaleVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real scale)
Definition: scip_var.c:7923
#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:4081
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
Definition: scip_var.c:4261
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: scip_var.c:8782
SCIP_Real SCIPgetVarBdAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2266
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:8178
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:6923
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:8537
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:8684
SCIP_Real SCIPgetVarPseudocostVariance(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition: scip_var.c:8978
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:1646
SCIP_RETCODE SCIPincVarGMISumScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:9907
SCIP_Bool SCIPdoNotAggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8587
SCIP_RETCODE SCIPchgVarLbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazylb)
Definition: scip_var.c:5125
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8600
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:5434
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:9539
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: scip_var.c:1796
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:6782
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:4439
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:4768
SCIP_Real SCIPcalculatePscostConfidenceBound(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:9000
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8717
SCIP_RETCODE SCIPsetRelaxSolVal(SCIP *scip, SCIP_RELAX *relax, SCIP_VAR *var, SCIP_Real val)
Definition: scip_var.c:2416
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6230
SCIP_Real SCIPgetVarConflictlengthScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9305
SCIP_Real SCIPgetVarAvgInferenceScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9506
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:9031
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6528
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:6012
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:1740
SCIP_Real SCIPgetVarAvgConflictlength(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9367
SCIP_RETCODE SCIPremoveVarFromGlobalStructures(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:7861
SCIP_RETCODE SCIPgetVarClosestVub(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvub, int *closestvubidx)
Definition: scip_var.c:6634
type definitions for problem variables
SCIP_Longint SCIPgetVarStrongbranchLPAge(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:4196
type definitions for relaxators
SCIP_Real SCIPgetVarPseudocostCount(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8924
SCIP_Real SCIPgetVarPseudocostCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:8898
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_var.c:4515
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
Definition: scip_var.c:2688
#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:5828
int SCIPgetNCliquesCreated(SCIP *scip)
Definition: scip_var.c:7604
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:3354
SCIP_RETCODE SCIPmarkRelaxSolValid(SCIP *scip, SCIP_RELAX *relax, SCIP_Bool includeslp)
Definition: scip_var.c:2559
SCIP_RETCODE SCIPcalcCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
Definition: scip_var.c:7258
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
Definition: scip_var.c:7712
void SCIPenableVarHistory(SCIP *scip)
Definition: scip_var.c:8743
SCIP_Real SCIPcomputeVarLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6465
SCIP_Real SCIPgetVarAvgInferenceCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:9836
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:3886
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:8658
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
Definition: scip_var.c:8278
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip_var.c:7982
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:4353
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:5503
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:2921
type definitions for storing primal CIP solutions
SCIP_Real SCIPgetVarMultaggrLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6578
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:7631
SCIP_Real SCIPgetVarAvgConflictlengthCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:9393
SCIP_RETCODE SCIPaddVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real addfactor)
Definition: scip_var.c:7951
SCIP_LPSOLSTAT SCIPgetLastStrongbranchLPSolStat(SCIP *scip, SCIP_BRANCHDIR branchdir)
Definition: scip_var.c:3990
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:4046
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
Definition: scip_var.c:1911
void SCIPfreeParseVarsPolynomialData(SCIP *scip, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int nmonomials)
Definition: scip_var.c:1160
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:5617
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:3775
SCIP_RETCODE SCIPgetVarSols(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_var.c:2329
SCIP_RETCODE SCIPendStrongbranch(SCIP *scip)
Definition: scip_var.c:2746
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
Definition: scip_var.c:2539
SCIP_Bool SCIPallowDualReds(SCIP *scip)
Definition: scip_var.c:8616
int SCIPgetNCliques(SCIP *scip)
Definition: scip_var.c:7577
SCIP_RETCODE SCIPaddVarBranchPriority(SCIP *scip, SCIP_VAR *var, int addpriority)
Definition: scip_var.c:8056
SCIP_RETCODE SCIPcalcNegatedCliquePartition(SCIP *const scip, SCIP_VAR **const vars, int const nvars, int *const cliquepartition, int *const ncliques)
Definition: scip_var.c:7477
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:8403
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1216
#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:9879
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: scip_var.c:8087
SCIP_Bool SCIPhaveVarsCommonClique(SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
Definition: scip_var.c:7661
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
Definition: scip_var.c:8567
SCIP_RETCODE SCIPtransformVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:1351
#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:8577
SCIP_Real SCIPgetVarConflictScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9274
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:73
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2309
SCIP_Real SCIPgetVarMultaggrLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:6548
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6350
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:9610
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:8023
SCIP_RETCODE SCIPcleanupCliques(SCIP *scip, SCIP_Bool *infeasible)
Definition: scip_var.c:7534
SCIP_Real SCIPgetVarFarkasCoef(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1956
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:4228
SCIP_RETCODE SCIPgetActiveVars(SCIP *scip, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
Definition: scip_var.c:1832
void SCIPdisableVarHistory(SCIP *scip)
Definition: scip_var.c:8762
SCIP_Real SCIPgetVarAvgInferenceScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9475
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
Definition: scip_var.c:8631
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:5725
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:7895
SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)
Definition: scip_var.c:9998
SCIP_Bool SCIPallowObjProp(SCIP *scip)
Definition: scip_var.c:8644
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
Definition: scip_var.c:1529
type definitions for constraints and constraint handlers
SCIP_Real SCIPgetVarConflictScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9243
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2605
SCIP_RETCODE SCIPchgVarName(SCIP *scip, SCIP_VAR *var, const char *name)
Definition: scip_var.c:1301
SCIP_Real SCIPgetVarAvgCutoffScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9729