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-2025 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
71extern "C" {
72#endif
73
74/**@addtogroup PublicVariableMethods
75 *
76 *@{
77 */
78
79/** creates and captures problem variable
80 *
81 * If variable is of integral type, fractional bounds are automatically rounded.
82 * An integer variable with bounds zero and one is automatically converted into a binary variable.
83 *
84 * @warning When doing column generation and the original problem is a maximization problem, notice that SCIP will
85 * transform the problem into a minimization problem by multiplying the objective function by -1. Thus, the
86 * original objective function value of variables created during the solving process has to be multiplied by
87 * -1, too.
88 *
89 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
90 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
91 *
92 * @pre This method can be called if @p scip is in one of the following stages:
93 * - \ref SCIP_STAGE_PROBLEM
94 * - \ref SCIP_STAGE_TRANSFORMING
95 * - \ref SCIP_STAGE_INITPRESOLVE
96 * - \ref SCIP_STAGE_PRESOLVING
97 * - \ref SCIP_STAGE_EXITPRESOLVE
98 * - \ref SCIP_STAGE_PRESOLVED
99 * - \ref SCIP_STAGE_SOLVING
100 *
101 * @note the variable gets captured, hence at one point you have to release it using the method SCIPreleaseVar()
102 */
103SCIP_EXPORT
105 SCIP* scip, /**< SCIP data structure */
106 SCIP_VAR** var, /**< pointer to variable object */
107 const char* name, /**< name of variable, or NULL for automatic name creation */
108 SCIP_Real lb, /**< lower bound of variable */
109 SCIP_Real ub, /**< upper bound of variable */
110 SCIP_Real obj, /**< objective function value */
111 SCIP_VARTYPE vartype, /**< type of variable */
112 SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
113 SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
114 SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable, or NULL */
115 SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data, or NULL */
116 SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable, or NULL */
117 SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
118 SCIP_VARDATA* vardata /**< user data for this specific variable, or NULL */
119 );
120
121/** creates and captures problem variable without setting optional callbacks and variable data.
122 *
123 * Callbacks and variable data can be set in the following using SCIPvarSetDelorigData(), SCIPvarSetTransData(),
124 * SCIPvarSetDeltransData(), SCIPvarSetCopy(), and SCIPvarSetData().
125 *
126 * Variable flags are set as initial = TRUE and removable = FALSE, and can be adjusted by using SCIPvarSetInitial() and SCIPvarSetRemovable(), resp.
127 *
128 * If variable is of integral type, fractional bounds are automatically rounded.
129 * An integer variable with bounds zero and one is automatically converted into a binary variable.
130 *
131 * @warning When doing column generation and the original problem is a maximization problem, notice that SCIP will
132 * transform the problem into a minimization problem by multiplying the objective function by -1. Thus, the
133 * original objective function value of variables created during the solving process has to be multiplied by
134 * -1, too.
135 *
136 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
137 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
138 *
139 * @pre This method can be called if @p scip is in one of the following stages:
140 * - \ref SCIP_STAGE_PROBLEM
141 * - \ref SCIP_STAGE_TRANSFORMING
142 * - \ref SCIP_STAGE_INITPRESOLVE
143 * - \ref SCIP_STAGE_PRESOLVING
144 * - \ref SCIP_STAGE_EXITPRESOLVE
145 * - \ref SCIP_STAGE_PRESOLVED
146 * - \ref SCIP_STAGE_SOLVING
147 *
148 * @note the variable gets captured, hence at one point you have to release it using the method SCIPreleaseVar()
149 */
150SCIP_EXPORT
152 SCIP* scip, /**< SCIP data structure */
153 SCIP_VAR** var, /**< pointer to variable object */
154 const char* name, /**< name of variable, or NULL for automatic name creation */
155 SCIP_Real lb, /**< lower bound of variable */
156 SCIP_Real ub, /**< upper bound of variable */
157 SCIP_Real obj, /**< objective function value */
158 SCIP_VARTYPE vartype /**< type of variable */
159 );
160
161/** creates and captures problem variable that may be implied integral
162 *
163 * If variable is of integral type, fractional bounds are automatically rounded.
164 * An integer variable with bounds zero and one is automatically converted into a binary variable.
165 *
166 * @warning When doing column generation and the original problem is a maximization problem, notice that SCIP will
167 * transform the problem into a minimization problem by multiplying the objective function by -1. Thus, the
168 * original objective function value of variables created during the solving process has to be multiplied by
169 * -1, too.
170 *
171 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
172 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
173 *
174 * @pre This method can be called if @p scip is in one of the following stages:
175 * - \ref SCIP_STAGE_PROBLEM
176 * - \ref SCIP_STAGE_TRANSFORMING
177 * - \ref SCIP_STAGE_INITPRESOLVE
178 * - \ref SCIP_STAGE_PRESOLVING
179 * - \ref SCIP_STAGE_EXITPRESOLVE
180 * - \ref SCIP_STAGE_PRESOLVED
181 * - \ref SCIP_STAGE_SOLVING
182 *
183 * @note the variable gets captured, hence at one point you have to release it using the method SCIPreleaseVar()
184 */
185SCIP_EXPORT
187 SCIP* scip, /**< SCIP data structure */
188 SCIP_VAR** var, /**< pointer to variable object */
189 const char* name, /**< name of variable, or NULL for automatic name creation */
190 SCIP_Real lb, /**< lower bound of variable */
191 SCIP_Real ub, /**< upper bound of variable */
192 SCIP_Real obj, /**< objective function value */
193 SCIP_VARTYPE vartype, /**< type of variable */
194 SCIP_IMPLINTTYPE impltype, /**< implied integral type of the variable (none, weak or strong) */
195 SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
196 SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
197 SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable, or NULL */
198 SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data, or NULL */
199 SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable, or NULL */
200 SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
201 SCIP_VARDATA* vardata /**< user data for this specific variable, or NULL */
202);
203
204/** adds exact data to variable
205 *
206 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
207 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
208 *
209 * @pre This method can be called if @p scip is in one of the following stages:
210 * - \ref SCIP_STAGE_PROBLEM
211 * - \ref SCIP_STAGE_TRANSFORMING
212 * - \ref SCIP_STAGE_INITPRESOLVE
213 * - \ref SCIP_STAGE_PRESOLVING
214 * - \ref SCIP_STAGE_EXITPRESOLVE
215 * - \ref SCIP_STAGE_PRESOLVED
216 * - \ref SCIP_STAGE_SOLVING
217 */
218SCIP_EXPORT
220 SCIP* scip, /**< SCIP data structure */
221 SCIP_VAR* var, /**< pointer to variable */
222 SCIP_RATIONAL* lb, /**< lower bounf of variable */
223 SCIP_RATIONAL* ub, /**< upper bound of variable */
224 SCIP_RATIONAL* obj /** < objective function value */
225 );
226
227/** outputs the variable name to the file stream
228 *
229 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
230 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
231 *
232 * @pre This method can be called if @p scip is in one of the following stages:
233 * - \ref SCIP_STAGE_PROBLEM
234 * - \ref SCIP_STAGE_TRANSFORMING
235 * - \ref SCIP_STAGE_TRANSFORMED
236 * - \ref SCIP_STAGE_INITPRESOLVE
237 * - \ref SCIP_STAGE_PRESOLVING
238 * - \ref SCIP_STAGE_EXITPRESOLVE
239 * - \ref SCIP_STAGE_PRESOLVED
240 * - \ref SCIP_STAGE_INITSOLVE
241 * - \ref SCIP_STAGE_SOLVING
242 * - \ref SCIP_STAGE_SOLVED
243 * - \ref SCIP_STAGE_EXITSOLVE
244 * - \ref SCIP_STAGE_FREETRANS
245 */
246SCIP_EXPORT
248 SCIP* scip, /**< SCIP data structure */
249 FILE* file, /**< output file, or NULL for stdout */
250 SCIP_VAR* var, /**< variable to output */
251 SCIP_Bool type /**< should the variable type be also posted */
252 );
253
254/** print the given list of variables to output stream separated by the given delimiter character;
255 *
256 * i. e. the variables x1, x2, ..., xn with given delimiter ',' are written as: <x1>, <x2>, ..., <xn>;
257 *
258 * the method SCIPparseVarsList() can parse such a string
259 *
260 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
261 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
262 *
263 * @pre This method can be called if @p scip is in one of the following stages:
264 * - \ref SCIP_STAGE_PROBLEM
265 * - \ref SCIP_STAGE_TRANSFORMING
266 * - \ref SCIP_STAGE_TRANSFORMED
267 * - \ref SCIP_STAGE_INITPRESOLVE
268 * - \ref SCIP_STAGE_PRESOLVING
269 * - \ref SCIP_STAGE_EXITPRESOLVE
270 * - \ref SCIP_STAGE_PRESOLVED
271 * - \ref SCIP_STAGE_INITSOLVE
272 * - \ref SCIP_STAGE_SOLVING
273 * - \ref SCIP_STAGE_SOLVED
274 * - \ref SCIP_STAGE_EXITSOLVE
275 * - \ref SCIP_STAGE_FREETRANS
276 *
277 * @note The printing process is done via the message handler system.
278 */
279SCIP_EXPORT
281 SCIP* scip, /**< SCIP data structure */
282 FILE* file, /**< output file, or NULL for stdout */
283 SCIP_VAR** vars, /**< variable array to output */
284 int nvars, /**< number of variables */
285 SCIP_Bool type, /**< should the variable type be also posted */
286 char delimiter /**< character which is used for delimitation */
287 );
288
289/** print the given variables and coefficients as linear sum in the following form
290 * c1 <x1> + c2 <x2> ... + cn <xn>
291 *
292 * This string can be parsed by the method SCIPparseVarsLinearsum().
293 *
294 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
295 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
296 *
297 * @pre This method can be called if @p scip is in one of the following stages:
298 * - \ref SCIP_STAGE_PROBLEM
299 * - \ref SCIP_STAGE_TRANSFORMING
300 * - \ref SCIP_STAGE_TRANSFORMED
301 * - \ref SCIP_STAGE_INITPRESOLVE
302 * - \ref SCIP_STAGE_PRESOLVING
303 * - \ref SCIP_STAGE_EXITPRESOLVE
304 * - \ref SCIP_STAGE_PRESOLVED
305 * - \ref SCIP_STAGE_INITSOLVE
306 * - \ref SCIP_STAGE_SOLVING
307 * - \ref SCIP_STAGE_SOLVED
308 * - \ref SCIP_STAGE_EXITSOLVE
309 * - \ref SCIP_STAGE_FREETRANS
310 *
311 * @note The printing process is done via the message handler system.
312 */
313SCIP_EXPORT
315 SCIP* scip, /**< SCIP data structure */
316 FILE* file, /**< output file, or NULL for stdout */
317 SCIP_VAR** vars, /**< variable array to output */
318 SCIP_Real* vals, /**< array of coefficients or NULL if all coefficients are 1.0 */
319 int nvars, /**< number of variables */
320 SCIP_Bool type /**< should the variable type be also posted */
321 );
322
323
324/** print the given monomials as polynomial in the following form
325 * c1 <x11>^e11 <x12>^e12 ... <x1n>^e1n + c2 <x21>^e21 <x22>^e22 ... + ... + cn <xn1>^en1 ...
326 *
327 * This string can be parsed by the method SCIPparseVarsPolynomial().
328 *
329 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
330 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
331 *
332 * @pre This method can be called if @p scip is in one of the following stages:
333 * - \ref SCIP_STAGE_PROBLEM
334 * - \ref SCIP_STAGE_TRANSFORMING
335 * - \ref SCIP_STAGE_TRANSFORMED
336 * - \ref SCIP_STAGE_INITPRESOLVE
337 * - \ref SCIP_STAGE_PRESOLVING
338 * - \ref SCIP_STAGE_EXITPRESOLVE
339 * - \ref SCIP_STAGE_PRESOLVED
340 * - \ref SCIP_STAGE_INITSOLVE
341 * - \ref SCIP_STAGE_SOLVING
342 * - \ref SCIP_STAGE_SOLVED
343 * - \ref SCIP_STAGE_EXITSOLVE
344 * - \ref SCIP_STAGE_FREETRANS
345 *
346 * @note The printing process is done via the message handler system.
347 */
348SCIP_EXPORT
350 SCIP* scip, /**< SCIP data structure */
351 FILE* file, /**< output file, or NULL for stdout */
352 SCIP_VAR*** monomialvars, /**< arrays with variables for each monomial */
353 SCIP_Real** monomialexps, /**< arrays with variable exponents, or NULL if always 1.0 */
354 SCIP_Real* monomialcoefs, /**< array with monomial coefficients */
355 int* monomialnvars, /**< array with number of variables for each monomial */
356 int nmonomials, /**< number of monomials */
357 SCIP_Bool type /**< should the variable type be also posted */
358 );
359
360/** parses variable information (in cip format) out of a string; if the parsing process was successful a variable is
361 * created and captured; if variable is of integral type, fractional bounds are automatically rounded; an integer
362 * variable with bounds zero and one is automatically converted into a binary variable
363 *
364 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
365 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
366 *
367 * @pre This method can be called if @p scip is in one of the following stages:
368 * - \ref SCIP_STAGE_PROBLEM
369 * - \ref SCIP_STAGE_TRANSFORMING
370 * - \ref SCIP_STAGE_INITPRESOLVE
371 * - \ref SCIP_STAGE_PRESOLVING
372 * - \ref SCIP_STAGE_EXITPRESOLVE
373 * - \ref SCIP_STAGE_PRESOLVED
374 * - \ref SCIP_STAGE_SOLVING
375 */
376SCIP_EXPORT
378 SCIP* scip, /**< SCIP data structure */
379 SCIP_VAR** var, /**< pointer to store the problem variable */
380 const char* str, /**< string to parse */
381 SCIP_Bool initial, /**< should var's column be present in the initial root LP? */
382 SCIP_Bool removable, /**< is var's column removable from the LP (due to aging or cleanup)? */
383 SCIP_DECL_VARCOPY ((*varcopy)), /**< copies variable data if wanted to subscip, or NULL */
384 SCIP_DECL_VARDELORIG ((*vardelorig)), /**< frees user data of original variable */
385 SCIP_DECL_VARTRANS ((*vartrans)), /**< creates transformed user data by transforming original user data */
386 SCIP_DECL_VARDELTRANS ((*vardeltrans)), /**< frees user data of transformed variable */
387 SCIP_VARDATA* vardata, /**< user data for this specific variable */
388 char** endptr, /**< pointer to store the final string position if successful */
389 SCIP_Bool* success /**< pointer store if the paring process was successful */
390 );
391
392/** parses the given string for a variable name and stores the variable in the corresponding pointer if such a variable
393 * exits and returns the position where the parsing stopped
394 *
395 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
396 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
397 *
398 * @pre This method can be called if @p scip is in one of the following stages:
399 * - \ref SCIP_STAGE_PROBLEM
400 * - \ref SCIP_STAGE_TRANSFORMING
401 * - \ref SCIP_STAGE_INITPRESOLVE
402 * - \ref SCIP_STAGE_PRESOLVING
403 * - \ref SCIP_STAGE_EXITPRESOLVE
404 * - \ref SCIP_STAGE_PRESOLVED
405 * - \ref SCIP_STAGE_SOLVING
406 */
407SCIP_EXPORT
409 SCIP* scip, /**< SCIP data structure */
410 const char* str, /**< string to parse */
411 SCIP_VAR** var, /**< pointer to store the problem variable, or NULL if it does not exit */
412 char** endptr /**< pointer to store the final string position if successful */
413 );
414
415/** parse the given string as variable list (here ',' is the delimiter)) (<x1>, <x2>, ..., <xn>) (see
416 * SCIPwriteVarsList() ); if it was successful, the pointer success is set to TRUE
417 *
418 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
419 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
420 *
421 * @pre This method can be called if @p scip is in one of the following stages:
422 * - \ref SCIP_STAGE_PROBLEM
423 * - \ref SCIP_STAGE_TRANSFORMING
424 * - \ref SCIP_STAGE_INITPRESOLVE
425 * - \ref SCIP_STAGE_PRESOLVING
426 * - \ref SCIP_STAGE_EXITPRESOLVE
427 * - \ref SCIP_STAGE_PRESOLVED
428 * - \ref SCIP_STAGE_SOLVING
429 *
430 * @note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.
431 *
432 * @note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens
433 * except that the required size is stored in the corresponding integer; the reason for this approach is that we
434 * cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP
435 * memory functions).
436 */
437SCIP_EXPORT
439 SCIP* scip, /**< SCIP data structure */
440 const char* str, /**< string to parse */
441 SCIP_VAR** vars, /**< array to store the parsed variable */
442 int* nvars, /**< pointer to store number of parsed variables */
443 int varssize, /**< size of the variable array */
444 int* requiredsize, /**< pointer to store the required array size for the active variables */
445 char** endptr, /**< pointer to store the final string position if successful */
446 char delimiter, /**< character which is used for delimitation */
447 SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
448 );
449
450/** parse the given string as linear sum of variables and coefficients (c1 <x1> + c2 <x2> + ... + cn <xn>)
451 * (see SCIPwriteVarsLinearsum() ); if it was successful, the pointer success is set to TRUE
452 *
453 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
454 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
455 *
456 * @pre This method can be called if @p scip is in one of the following stages:
457 * - \ref SCIP_STAGE_PROBLEM
458 * - \ref SCIP_STAGE_TRANSFORMING
459 * - \ref SCIP_STAGE_INITPRESOLVE
460 * - \ref SCIP_STAGE_PRESOLVING
461 * - \ref SCIP_STAGE_EXITPRESOLVE
462 * - \ref SCIP_STAGE_PRESOLVED
463 * - \ref SCIP_STAGE_SOLVING
464 *
465 * @note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.
466 *
467 * @note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens
468 * except that the required size is stored in the corresponding integer; the reason for this approach is that we
469 * cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP
470 * memory functions).
471 */
472SCIP_EXPORT
474 SCIP* scip, /**< SCIP data structure */
475 const char* str, /**< string to parse */
476 SCIP_VAR** vars, /**< array to store the parsed variables */
477 SCIP_Real* vals, /**< array to store the parsed coefficients */
478 int* nvars, /**< pointer to store number of parsed variables */
479 int varssize, /**< size of the variable array */
480 int* requiredsize, /**< pointer to store the required array size for the active variables */
481 char** endptr, /**< pointer to store the final string position if successful */
482 SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
483 );
484
485/** parse the given string as linear sum of variables and coefficients (c1 <x1> + c2 <x2> + ... + cn <xn>)
486 * (see SCIPwriteVarsLinearsum() ); if it was successful, the pointer success is set to TRUE
487 *
488 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
489 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
490 *
491 * @pre This method can be called if @p scip is in one of the following stages:
492 * - \ref SCIP_STAGE_PROBLEM
493 * - \ref SCIP_STAGE_TRANSFORMING
494 * - \ref SCIP_STAGE_INITPRESOLVE
495 * - \ref SCIP_STAGE_PRESOLVING
496 * - \ref SCIP_STAGE_EXITPRESOLVE
497 * - \ref SCIP_STAGE_PRESOLVED
498 * - \ref SCIP_STAGE_SOLVING
499 *
500 * @note The pointer success in only set to FALSE in the case that a variable with a parsed variable name does not exist.
501 *
502 * @note If the number of (parsed) variables is greater than the available slots in the variable array, nothing happens
503 * except that the required size is stored in the corresponding integer; the reason for this approach is that we
504 * cannot reallocate memory, since we do not know how the memory has been allocated (e.g., by a C++ 'new' or SCIP
505 * memory functions).
506 */
507SCIP_EXPORT
509 SCIP* scip, /**< SCIP data structure */
510 char* str, /**< string to parse */
511 SCIP_VAR** vars, /**< array to store the parsed variables */
512 SCIP_RATIONAL** vals, /**< array to store the parsed coefficients */
513 int* nvars, /**< pointer to store number of parsed variables */
514 int varssize, /**< size of the variable array */
515 int* requiredsize, /**< pointer to store the required array size for the active variables */
516 char** endptr, /**< pointer to store the final string position if successful */
517 SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
518 );
519
520/** parse the given string as signomial of variables and coefficients
521 * (c1 <x11>^e11 <x12>^e12 ... <x1n>^e1n + c2 <x21>^e21 <x22>^e22 ... + ... + cn <xn1>^en1 ...)
522 * (see SCIPwriteVarsPolynomial()); if it was successful, the pointer success is set to TRUE
523 *
524 * The user has to call SCIPfreeParseVarsPolynomialData(scip, monomialvars, monomialexps,
525 * monomialcoefs, monomialnvars, *nmonomials) short after SCIPparseVarsPolynomial to free all the
526 * allocated memory again. Do not keep the arrays created by SCIPparseVarsPolynomial around, since
527 * they use buffer memory that is intended for short term use only.
528 *
529 * Parsing is stopped at the end of string (indicated by the \\0-character) or when no more monomials
530 * are recognized.
531 *
532 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
533 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
534 *
535 * @pre This method can be called if @p scip is in one of the following stages:
536 * - \ref SCIP_STAGE_PROBLEM
537 * - \ref SCIP_STAGE_TRANSFORMING
538 * - \ref SCIP_STAGE_INITPRESOLVE
539 * - \ref SCIP_STAGE_PRESOLVING
540 * - \ref SCIP_STAGE_EXITPRESOLVE
541 * - \ref SCIP_STAGE_PRESOLVED
542 * - \ref SCIP_STAGE_SOLVING
543 */
544SCIP_EXPORT
546 SCIP* scip, /**< SCIP data structure */
547 const char* str, /**< string to parse */
548 SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
549 SCIP_Real*** monomialexps, /**< pointer to store arrays with variable exponents */
550 SCIP_Real** monomialcoefs, /**< pointer to store array with monomial coefficients */
551 int** monomialnvars, /**< pointer to store array with number of variables for each monomial */
552 int* nmonomials, /**< pointer to store number of parsed monomials */
553 char** endptr, /**< pointer to store the final string position if successful */
554 SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
555 );
556
557/** frees memory allocated when parsing a signomial from a string
558 *
559 * @pre This method can be called if @p scip is in one of the following stages:
560 * - \ref SCIP_STAGE_PROBLEM
561 * - \ref SCIP_STAGE_TRANSFORMING
562 * - \ref SCIP_STAGE_INITPRESOLVE
563 * - \ref SCIP_STAGE_PRESOLVING
564 * - \ref SCIP_STAGE_EXITPRESOLVE
565 * - \ref SCIP_STAGE_PRESOLVED
566 * - \ref SCIP_STAGE_SOLVING
567 */
568SCIP_EXPORT
570 SCIP* scip, /**< SCIP data structure */
571 SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
572 SCIP_RATIONAL*** monomialcoefs, /**< pointer to store array with monomial coefficients */
573 int nmonomials /**< pointer to store number of parsed monomials */
574 );
575
576/** parse the given string as signomial of variables and coefficients
577 * (c1 <x11>^e11 <x12>^e12 ... <x1n>^e1n + c2 <x21>^e21 <x22>^e22 ... + ... + cn <xn1>^en1 ...)
578 * (see SCIPwriteVarsPolynomial()); if it was successful, the pointer success is set to TRUE
579 *
580 * The user has to call SCIPfreeParseVarsPolynomialData(scip, monomialvars, monomialexps,
581 * monomialcoefs, monomialnvars, *nmonomials) short after SCIPparseVarsPolynomial to free all the
582 * allocated memory again.
583 *
584 * Parsing is stopped at the end of string (indicated by the \\0-character) or when no more monomials
585 * are recognized.
586 *
587 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
588 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
589 *
590 * @pre This method can be called if @p scip is in one of the following stages:
591 * - \ref SCIP_STAGE_PROBLEM
592 * - \ref SCIP_STAGE_TRANSFORMING
593 * - \ref SCIP_STAGE_INITPRESOLVE
594 * - \ref SCIP_STAGE_PRESOLVING
595 * - \ref SCIP_STAGE_EXITPRESOLVE
596 * - \ref SCIP_STAGE_PRESOLVED
597 * - \ref SCIP_STAGE_SOLVING
598 */
599SCIP_EXPORT
601 SCIP* scip, /**< SCIP data structure */
602 char* str, /**< string to parse */
603 SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
604 SCIP_RATIONAL*** monomialcoefs, /**< pointer to store array with monomial coefficients */
605 int* nmonomials, /**< pointer to store number of parsed monomials */
606 char** endptr, /**< pointer to store the final string position if successful */
607 SCIP_Bool* success /**< pointer to store the whether the parsing was successful or not */
608 );
609
610/** frees memory allocated when parsing a signomial from a string
611 *
612 * @pre This method can be called if @p scip is in one of the following stages:
613 * - \ref SCIP_STAGE_PROBLEM
614 * - \ref SCIP_STAGE_TRANSFORMING
615 * - \ref SCIP_STAGE_INITPRESOLVE
616 * - \ref SCIP_STAGE_PRESOLVING
617 * - \ref SCIP_STAGE_EXITPRESOLVE
618 * - \ref SCIP_STAGE_PRESOLVED
619 * - \ref SCIP_STAGE_SOLVING
620 */
621SCIP_EXPORT
623 SCIP* scip, /**< SCIP data structure */
624 SCIP_VAR**** monomialvars, /**< pointer to store arrays with variables for each monomial */
625 SCIP_Real*** monomialexps, /**< pointer to store arrays with variable exponents */
626 SCIP_Real** monomialcoefs, /**< pointer to store array with monomial coefficients */
627 int** monomialnvars, /**< pointer to store array with number of variables for each monomial */
628 int nmonomials /**< pointer to store number of parsed monomials */
629 );
630
631/** increases usage counter of variable
632 *
633 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
634 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
635 *
636 * @pre This method can be called if @p scip is in one of the following stages:
637 * - \ref SCIP_STAGE_PROBLEM
638 * - \ref SCIP_STAGE_TRANSFORMING
639 * - \ref SCIP_STAGE_TRANSFORMED
640 * - \ref SCIP_STAGE_INITPRESOLVE
641 * - \ref SCIP_STAGE_PRESOLVING
642 * - \ref SCIP_STAGE_EXITPRESOLVE
643 * - \ref SCIP_STAGE_PRESOLVED
644 * - \ref SCIP_STAGE_INITSOLVE
645 * - \ref SCIP_STAGE_SOLVING
646 * - \ref SCIP_STAGE_SOLVED
647 * - \ref SCIP_STAGE_EXITSOLVE
648 */
649SCIP_EXPORT
651 SCIP* scip, /**< SCIP data structure */
652 SCIP_VAR* var /**< variable to capture */
653 );
654
655/** decreases usage counter of variable, if the usage pointer reaches zero the variable gets freed
656 *
657 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
658 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
659 *
660 * @pre This method can be called if @p scip is in one of the following stages:
661 * - \ref SCIP_STAGE_PROBLEM
662 * - \ref SCIP_STAGE_TRANSFORMING
663 * - \ref SCIP_STAGE_TRANSFORMED
664 * - \ref SCIP_STAGE_INITPRESOLVE
665 * - \ref SCIP_STAGE_PRESOLVING
666 * - \ref SCIP_STAGE_EXITPRESOLVE
667 * - \ref SCIP_STAGE_PRESOLVED
668 * - \ref SCIP_STAGE_INITSOLVE
669 * - \ref SCIP_STAGE_SOLVING
670 * - \ref SCIP_STAGE_SOLVED
671 * - \ref SCIP_STAGE_EXITSOLVE
672 * - \ref SCIP_STAGE_FREETRANS
673 *
674 * @note the pointer of the variable will be NULLed
675 */
676SCIP_EXPORT
678 SCIP* scip, /**< SCIP data structure */
679 SCIP_VAR** var /**< pointer to variable */
680 );
681
682/** changes the name of a variable
683 *
684 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
685 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
686 *
687 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PROBLEM
688 *
689 * @note to get the current name of a variable, use SCIPvarGetName() from pub_var.h
690 */
691SCIP_EXPORT
693 SCIP* scip, /**< SCIP data structure */
694 SCIP_VAR* var, /**< variable */
695 const char* name /**< new name of constraint */
696 );
697
698/** gets and captures transformed variable of a given variable; if the variable is not yet transformed,
699 * a new transformed variable for this variable is created
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_TRANSFORMING
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 */
714SCIP_EXPORT
716 SCIP* scip, /**< SCIP data structure */
717 SCIP_VAR* var, /**< variable to get/create transformed variable for */
718 SCIP_VAR** transvar /**< pointer to store the transformed variable */
719 );
720
721/** gets and captures transformed variables for an array of variables;
722 * if a variable of the array is not yet transformed, a new transformed variable for this variable is created;
723 * it is possible to call this method with vars == transvars
724 *
725 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
726 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
727 *
728 * @pre This method can be called if @p scip is in one of the following stages:
729 * - \ref SCIP_STAGE_TRANSFORMING
730 * - \ref SCIP_STAGE_TRANSFORMED
731 * - \ref SCIP_STAGE_INITPRESOLVE
732 * - \ref SCIP_STAGE_PRESOLVING
733 * - \ref SCIP_STAGE_EXITPRESOLVE
734 * - \ref SCIP_STAGE_PRESOLVED
735 * - \ref SCIP_STAGE_INITSOLVE
736 * - \ref SCIP_STAGE_SOLVING
737 */
738SCIP_EXPORT
740 SCIP* scip, /**< SCIP data structure */
741 int nvars, /**< number of variables to get/create transformed variables for */
742 SCIP_VAR** vars, /**< array with variables to get/create transformed variables for */
743 SCIP_VAR** transvars /**< array to store the transformed variables */
744 );
745
746/** gets corresponding transformed variable of a given variable;
747 * returns NULL as transvar, if transformed variable is not yet existing
748 *
749 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
750 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
751 *
752 * @pre This method can be called if @p scip is in one of the following stages:
753 * - \ref SCIP_STAGE_TRANSFORMING
754 * - \ref SCIP_STAGE_TRANSFORMED
755 * - \ref SCIP_STAGE_INITPRESOLVE
756 * - \ref SCIP_STAGE_PRESOLVING
757 * - \ref SCIP_STAGE_EXITPRESOLVE
758 * - \ref SCIP_STAGE_PRESOLVED
759 * - \ref SCIP_STAGE_INITSOLVE
760 * - \ref SCIP_STAGE_SOLVING
761 * - \ref SCIP_STAGE_SOLVED
762 * - \ref SCIP_STAGE_EXITSOLVE
763 * - \ref SCIP_STAGE_FREETRANS
764 */
765SCIP_EXPORT
767 SCIP* scip, /**< SCIP data structure */
768 SCIP_VAR* var, /**< variable to get transformed variable for */
769 SCIP_VAR** transvar /**< pointer to store the transformed variable */
770 );
771
772/** gets corresponding transformed variables for an array of variables;
773 * stores NULL in a transvars slot, if the transformed variable is not yet existing;
774 * it is possible to call this method with vars == transvars, but remember that variables that are not
775 * yet transformed will be replaced with NULL
776 *
777 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
778 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
779 *
780 * @pre This method can be called if @p scip is in one of the following stages:
781 * - \ref SCIP_STAGE_TRANSFORMING
782 * - \ref SCIP_STAGE_TRANSFORMED
783 * - \ref SCIP_STAGE_INITPRESOLVE
784 * - \ref SCIP_STAGE_PRESOLVING
785 * - \ref SCIP_STAGE_EXITPRESOLVE
786 * - \ref SCIP_STAGE_PRESOLVED
787 * - \ref SCIP_STAGE_INITSOLVE
788 * - \ref SCIP_STAGE_SOLVING
789 * - \ref SCIP_STAGE_SOLVED
790 * - \ref SCIP_STAGE_EXITSOLVE
791 * - \ref SCIP_STAGE_FREETRANS
792 */
793SCIP_EXPORT
795 SCIP* scip, /**< SCIP data structure */
796 int nvars, /**< number of variables to get transformed variables for */
797 SCIP_VAR** vars, /**< array with variables to get transformed variables for */
798 SCIP_VAR** transvars /**< array to store the transformed variables */
799 );
800
801/** gets negated variable x' = lb + ub - x of variable x; negated variable is created, if not yet existing
802 *
803 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
804 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
805 *
806 * @pre This method can be called if @p scip is in one of the following stages:
807 * - \ref SCIP_STAGE_PROBLEM
808 * - \ref SCIP_STAGE_TRANSFORMING
809 * - \ref SCIP_STAGE_TRANSFORMED
810 * - \ref SCIP_STAGE_INITPRESOLVE
811 * - \ref SCIP_STAGE_PRESOLVING
812 * - \ref SCIP_STAGE_EXITPRESOLVE
813 * - \ref SCIP_STAGE_PRESOLVED
814 * - \ref SCIP_STAGE_INITSOLVE
815 * - \ref SCIP_STAGE_SOLVING
816 * - \ref SCIP_STAGE_SOLVED
817 * - \ref SCIP_STAGE_EXITSOLVE
818 * - \ref SCIP_STAGE_FREETRANS
819 */
820SCIP_EXPORT
822 SCIP* scip, /**< SCIP data structure */
823 SCIP_VAR* var, /**< variable to get negated variable for */
824 SCIP_VAR** negvar /**< pointer to store the negated variable */
825 );
826
827/** gets negated variables x' = lb + ub - x of variables x; negated variables are created, if not yet existing;
828 * in difference to \ref SCIPcreateVar, the negated variable must not be released (unless captured explicitly)
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_PROBLEM
835 * - \ref SCIP_STAGE_TRANSFORMING
836 * - \ref SCIP_STAGE_TRANSFORMED
837 * - \ref SCIP_STAGE_INITPRESOLVE
838 * - \ref SCIP_STAGE_PRESOLVING
839 * - \ref SCIP_STAGE_EXITPRESOLVE
840 * - \ref SCIP_STAGE_PRESOLVED
841 * - \ref SCIP_STAGE_INITSOLVE
842 * - \ref SCIP_STAGE_SOLVING
843 * - \ref SCIP_STAGE_SOLVED
844 * - \ref SCIP_STAGE_EXITSOLVE
845 * - \ref SCIP_STAGE_FREETRANS
846 */
847SCIP_EXPORT
849 SCIP* scip, /**< SCIP data structure */
850 int nvars, /**< number of variables to get negated variables for */
851 SCIP_VAR** vars, /**< array of variables to get negated variables for */
852 SCIP_VAR** negvars /**< array to store the negated variables */
853 );
854
855/** gets a binary variable that is equal to the given binary variable, and that is either active, fixed, or
856 * multi-aggregated, or the negated variable of an active, fixed, or multi-aggregated variable
857 *
858 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
859 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
860 *
861 * @pre This method can be called if @p scip is in one of the following stages:
862 * - \ref SCIP_STAGE_PROBLEM
863 * - \ref SCIP_STAGE_TRANSFORMED
864 * - \ref SCIP_STAGE_INITPRESOLVE
865 * - \ref SCIP_STAGE_PRESOLVING
866 * - \ref SCIP_STAGE_EXITPRESOLVE
867 * - \ref SCIP_STAGE_PRESOLVED
868 * - \ref SCIP_STAGE_INITSOLVE
869 * - \ref SCIP_STAGE_SOLVING
870 * - \ref SCIP_STAGE_SOLVED
871 * - \ref SCIP_STAGE_EXITSOLVE
872 */
873SCIP_EXPORT
875 SCIP* scip, /**< SCIP data structure */
876 SCIP_VAR* var, /**< binary variable to get binary representative for */
877 SCIP_VAR** repvar, /**< pointer to store the binary representative */
878 SCIP_Bool* negated /**< pointer to store whether the negation of an active variable was returned */
879 );
880
881/** gets binary variables that are equal to the given binary variables, and which are either active, fixed, or
882 * multi-aggregated, or the negated variables of active, fixed, or multi-aggregated variables
883 *
884 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
885 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
886 *
887 * @pre This method can be called if @p scip is in one of the following stages:
888 * - \ref SCIP_STAGE_PROBLEM
889 * - \ref SCIP_STAGE_TRANSFORMED
890 * - \ref SCIP_STAGE_INITPRESOLVE
891 * - \ref SCIP_STAGE_PRESOLVING
892 * - \ref SCIP_STAGE_EXITPRESOLVE
893 * - \ref SCIP_STAGE_PRESOLVED
894 * - \ref SCIP_STAGE_INITSOLVE
895 * - \ref SCIP_STAGE_SOLVING
896 * - \ref SCIP_STAGE_SOLVED
897 * - \ref SCIP_STAGE_EXITSOLVE
898 */
899SCIP_EXPORT
901 SCIP* scip, /**< SCIP data structure */
902 int nvars, /**< number of binary variables to get representatives for */
903 SCIP_VAR** vars, /**< binary variables to get binary representatives for */
904 SCIP_VAR** repvars, /**< array to store the binary representatives */
905 SCIP_Bool* negated /**< array to store whether the negation of an active variable was returned */
906 );
907
908/** flattens aggregation graph of multi-aggregated variable in order to avoid exponential recursion later on
909 *
910 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
911 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
912 *
913 * @pre This method can be called if @p scip is in one of the following stages:
914 * - \ref SCIP_STAGE_INITPRESOLVE
915 * - \ref SCIP_STAGE_PRESOLVING
916 * - \ref SCIP_STAGE_EXITPRESOLVE
917 * - \ref SCIP_STAGE_PRESOLVED
918 * - \ref SCIP_STAGE_INITSOLVE
919 * - \ref SCIP_STAGE_SOLVING
920 * - \ref SCIP_STAGE_SOLVED
921 */
922SCIP_EXPORT
924 SCIP* scip, /**< SCIP data structure */
925 SCIP_VAR* var /**< problem variable */
926 );
927
928/** Transforms a given linear sum of variables, that is a_1*x_1 + ... + a_n*x_n + c into a corresponding linear sum of
929 * active variables, that is b_1*y_1 + ... + b_m*y_m + d.
930 *
931 * If the number of needed active variables is greater than the available slots in the variable array, nothing happens
932 * except that an upper bound on the required size is stored in the variable requiredsize; otherwise, the active
933 * variable representation is stored in the arrays.
934 *
935 * The reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been
936 * allocated (e.g., by a C++ 'new' or SCIP functions). Note that requiredsize is an upper bound due to possible
937 * cancelations.
938 *
939 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
940 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
941 *
942 * @pre This method can be called if @p scip is in one of the following stages:
943 * - \ref SCIP_STAGE_TRANSFORMED
944 * - \ref SCIP_STAGE_INITPRESOLVE
945 * - \ref SCIP_STAGE_PRESOLVING
946 * - \ref SCIP_STAGE_EXITPRESOLVE
947 * - \ref SCIP_STAGE_PRESOLVED
948 * - \ref SCIP_STAGE_INITSOLVE
949 * - \ref SCIP_STAGE_SOLVING
950 * - \ref SCIP_STAGE_SOLVED
951 * - \ref SCIP_STAGE_EXITSOLVE
952 * - \ref SCIP_STAGE_FREETRANS
953 *
954 * @note The resulting linear sum is stored into the given variable array, scalar array, and constant. That means the
955 * given entries are overwritten.
956 *
957 * @note That method can be used to convert a single variables into variable space of active variables. Therefore call
958 * the method with the linear sum 1.0*x + 0.0.
959 */
960SCIP_EXPORT
962 SCIP* scip, /**< SCIP data structure */
963 SCIP_VAR** vars, /**< variable array x_1, ..., x_n in the linear sum which will be
964 * overwritten by the variable array y_1, ..., y_m in the linear sum
965 * w.r.t. active variables */
966 SCIP_Real* scalars, /**< scalars a_1, ..., a_n in linear sum which will be overwritten to the
967 * scalars b_1, ..., b_m in the linear sum of the active variables */
968 int* nvars, /**< pointer to number of variables in the linear sum which will be
969 * overwritten by the number of variables in the linear sum corresponding
970 * to the active variables */
971 int varssize, /**< available slots in vars and scalars array which is needed to check if
972 * the array are large enough for the linear sum w.r.t. active
973 * variables */
974 SCIP_Real* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c which
975 * will chnage to constant d in the linear sum b_1*y_1 + ... + b_m*y_m +
976 * d w.r.t. the active variables */
977 int* requiredsize /**< pointer to store an upper bound on the required size for the linear sum
978 * w.r.t. the active variables */
979 );
980
981/** transforms given variable, scalar and constant to the corresponding active, fixed, or
982 * multi-aggregated variable, scalar and constant; if the variable resolves to a fixed variable,
983 * "scalar" will be 0.0 and the value of the sum will be stored in "constant"; a multi-aggregation
984 * with only one active variable (this can happen due to fixings after the multi-aggregation),
985 * is treated like an aggregation; if the multi-aggregation constant is infinite, "scalar" will be 0.0
986 *
987 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
988 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
989 *
990 * @pre This method can be called if @p scip is in one of the following stages:
991 * - \ref SCIP_STAGE_TRANSFORMED
992 * - \ref SCIP_STAGE_INITPRESOLVE
993 * - \ref SCIP_STAGE_PRESOLVING
994 * - \ref SCIP_STAGE_EXITPRESOLVE
995 * - \ref SCIP_STAGE_PRESOLVED
996 * - \ref SCIP_STAGE_INITSOLVE
997 * - \ref SCIP_STAGE_SOLVING
998 * - \ref SCIP_STAGE_SOLVED
999 * - \ref SCIP_STAGE_EXITSOLVE
1000 * - \ref SCIP_STAGE_FREETRANS
1001 */
1002SCIP_EXPORT
1004 SCIP* scip, /**< SCIP data structure */
1005 SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
1006 SCIP_Real* scalar, /**< pointer to scalar a in sum a*x + c */
1007 SCIP_Real* constant /**< pointer to constant c in sum a*x + c */
1008 );
1009
1010/** transforms given variable, scalar and constant to the corresponding active, fixed, or
1011 * multi-aggregated variable, scalar and constant; if the variable resolves to a fixed variable,
1012 * "scalar" will be 0.0 and the value of the sum will be stored in "constant"; a multi-aggregation
1013 * with only one active variable (this can happen due to fixings after the multi-aggregation),
1014 * is treated like an aggregation; if the multi-aggregation constant is infinite, "scalar" will be 0.0
1015 *
1016 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1017 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1018 *
1019 * @pre This method can be called if @p scip is in one of the following stages:
1020 * - \ref SCIP_STAGE_TRANSFORMED
1021 * - \ref SCIP_STAGE_INITPRESOLVE
1022 * - \ref SCIP_STAGE_PRESOLVING
1023 * - \ref SCIP_STAGE_EXITPRESOLVE
1024 * - \ref SCIP_STAGE_PRESOLVED
1025 * - \ref SCIP_STAGE_INITSOLVE
1026 * - \ref SCIP_STAGE_SOLVING
1027 * - \ref SCIP_STAGE_SOLVED
1028 * - \ref SCIP_STAGE_EXITSOLVE
1029 * - \ref SCIP_STAGE_FREETRANS
1030 */
1031SCIP_EXPORT
1033 SCIP* scip, /**< SCIP data structure */
1034 SCIP_VAR** var, /**< pointer to problem variable x in sum a*x + c */
1035 SCIP_RATIONAL* scalar, /**< pointer to scalar a in sum a*x + c */
1036 SCIP_RATIONAL* constant /**< pointer to constant c in sum a*x + c */
1037 );
1038
1039/** return for given variables all their active counterparts; all active variables will be pairwise different
1040 * @note It does not hold that the first output variable is the active variable for the first input variable.
1041 *
1042 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1043 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1044 *
1045 * @pre This method can be called if @p scip is in one of the following stages:
1046 * - \ref SCIP_STAGE_TRANSFORMED
1047 * - \ref SCIP_STAGE_INITPRESOLVE
1048 * - \ref SCIP_STAGE_PRESOLVING
1049 * - \ref SCIP_STAGE_EXITPRESOLVE
1050 * - \ref SCIP_STAGE_PRESOLVED
1051 * - \ref SCIP_STAGE_INITSOLVE
1052 * - \ref SCIP_STAGE_SOLVING
1053 * - \ref SCIP_STAGE_SOLVED
1054 * - \ref SCIP_STAGE_EXITSOLVE
1055 * - \ref SCIP_STAGE_FREETRANS
1056 */
1057SCIP_EXPORT
1059 SCIP* scip, /**< SCIP data structure */
1060 SCIP_VAR** vars, /**< variable array with given variables and as output all active
1061 * variables, if enough slots exist */
1062 int* nvars, /**< number of given variables, and as output number of active variables,
1063 * if enough slots exist */
1064 int varssize, /**< available slots in vars array */
1065 int* requiredsize /**< pointer to store the required array size for the active variables */
1066 );
1067
1068/** returns the reduced costs of the variable in the current node's LP relaxation;
1069 * the current node has to have a feasible LP.
1070 *
1071 * returns SCIP_INVALID if the variable is active but not in the current LP;
1072 * returns 0 if the variable has been aggregated out or fixed in presolving.
1073 *
1074 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1075 *
1076 * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
1077 */
1078SCIP_EXPORT
1080 SCIP* scip, /**< SCIP data structure */
1081 SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
1082 );
1083
1084/** returns the implied reduced costs of the variable in the current node's LP relaxation;
1085 * the current node has to have a feasible LP.
1086 *
1087 * returns SCIP_INVALID if the variable is active but not in the current LP;
1088 * returns 0 if the variable has been aggregated out or fixed in presolving.
1089 *
1090 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1091 *
1092 * @note The return value of this method should be used carefully if the dual feasibility check was explictely disabled.
1093 */
1094SCIP_EXPORT
1096 SCIP* scip, /**< SCIP data structure */
1097 SCIP_VAR* var, /**< variable to get reduced costs, should be a column in current node LP */
1098 SCIP_Bool varfixing /**< FALSE if for x == 0, TRUE for x == 1 */
1099 );
1100
1101/** returns the Farkas coefficient of the variable in the current node's LP relaxation;
1102 * the current node has to have an infeasible LP.
1103 *
1104 * returns SCIP_INVALID if the variable is active but not in the current LP;
1105 * returns 0 if the variable has been aggregated out or fixed in presolving.
1106 *
1107 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
1108 */
1109SCIP_EXPORT
1111 SCIP* scip, /**< SCIP data structure */
1112 SCIP_VAR* var /**< variable to get reduced costs, should be a column in current node LP */
1113 );
1114
1115/** returns lower bound of variable directly before or after the bound change given by the bound change index
1116 * was applied
1117 */
1118SCIP_EXPORT
1120 SCIP* scip, /**< SCIP data structure */
1121 SCIP_VAR* var, /**< problem variable */
1122 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1123 SCIP_Bool after /**< should the bound change with given index be included? */
1124 );
1125
1126/** returns upper bound of variable directly before or after the bound change given by the bound change index
1127 * was applied
1128 */
1129SCIP_EXPORT
1131 SCIP* scip, /**< SCIP data structure */
1132 SCIP_VAR* var, /**< problem variable */
1133 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1134 SCIP_Bool after /**< should the bound change with given index be included? */
1135 );
1136
1137/** returns lower or upper bound of variable directly before or after the bound change given by the bound change index
1138 * was applied
1139 */
1140SCIP_EXPORT
1142 SCIP* scip, /**< SCIP data structure */
1143 SCIP_VAR* var, /**< problem variable */
1144 SCIP_BOUNDTYPE boundtype, /**< type of bound: lower or upper bound */
1145 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1146 SCIP_Bool after /**< should the bound change with given index be included? */
1147 );
1148
1149/** returns whether the binary variable was fixed at the time given by the bound change index */
1150SCIP_EXPORT
1152 SCIP* scip, /**< SCIP data structure */
1153 SCIP_VAR* var, /**< problem variable */
1154 SCIP_BDCHGIDX* bdchgidx, /**< bound change index representing time on path to current node */
1155 SCIP_Bool after /**< should the bound change with given index be included? */
1156 );
1157
1158/** gets solution value for variable in current node
1159 *
1160 * @return solution value for variable in current node
1161 *
1162 * @pre This method can be called if @p scip is in one of the following stages:
1163 * - \ref SCIP_STAGE_PRESOLVED
1164 * - \ref SCIP_STAGE_SOLVING
1165 */
1166SCIP_EXPORT
1168 SCIP* scip, /**< SCIP data structure */
1169 SCIP_VAR* var /**< variable to get solution value for */
1170 );
1171
1172/** gets solution values of multiple variables in current node
1173 *
1174 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1175 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1176 *
1177 * @pre This method can be called if @p scip is in one of the following stages:
1178 * - \ref SCIP_STAGE_PRESOLVED
1179 * - \ref SCIP_STAGE_SOLVING
1180 */
1181SCIP_EXPORT
1183 SCIP* scip, /**< SCIP data structure */
1184 int nvars, /**< number of variables to get solution value for */
1185 SCIP_VAR** vars, /**< array with variables to get value for */
1186 SCIP_Real* vals /**< array to store solution values of variables */
1187 );
1188
1189/** sets the solution value of all variables in the global relaxation solution to zero
1190 *
1191 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1192 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1193 *
1194 * @pre This method can be called if @p scip is in one of the following stages:
1195 * - \ref SCIP_STAGE_PRESOLVED
1196 * - \ref SCIP_STAGE_SOLVING
1197 */
1198SCIP_EXPORT
1200 SCIP* scip, /**< SCIP data structure */
1201 SCIP_RELAX* relax /**< relaxator data structure */
1202 );
1203
1204/** sets the value of the given variable in the global relaxation solution;
1205 * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1206 * You can use SCIPclearRelaxSolVals() to set all values to zero, initially;
1207 * after setting all solution values, you have to call SCIPmarkRelaxSolValid()
1208 * to inform SCIP that the stored solution is valid
1209 *
1210 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1211 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1212 *
1213 * @pre This method can be called if @p scip is in one of the following stages:
1214 * - \ref SCIP_STAGE_PRESOLVED
1215 * - \ref SCIP_STAGE_SOLVING
1216 *
1217 * @note This method incrementally updates the objective value of the relaxation solution. If the whole solution
1218 * should be updated, using SCIPsetRelaxSolVals() instead or calling SCIPclearRelaxSolVals() before setting
1219 * the first value to reset the solution and the objective value to 0 may help the numerics.
1220 */
1221SCIP_EXPORT
1223 SCIP* scip, /**< SCIP data structure */
1224 SCIP_RELAX* relax, /**< relaxator data structure */
1225 SCIP_VAR* var, /**< variable to set value for */
1226 SCIP_Real val /**< solution value of variable */
1227 );
1228
1229/** sets the values of the given variables in the global relaxation solution and informs SCIP about the validity
1230 * and whether the solution can be enforced via linear cuts;
1231 * this solution can be filled by the relaxation handlers and can be used by heuristics and for separation;
1232 * the solution is automatically cleared, s.t. all other variables get value 0.0
1233 *
1234 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1235 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1236 *
1237 * @pre This method can be called if @p scip is in one of the following stages:
1238 * - \ref SCIP_STAGE_PRESOLVED
1239 * - \ref SCIP_STAGE_SOLVING
1240 */
1241SCIP_EXPORT
1243 SCIP* scip, /**< SCIP data structure */
1244 SCIP_RELAX* relax, /**< relaxator data structure */
1245 int nvars, /**< number of variables to set relaxation solution value for */
1246 SCIP_VAR** vars, /**< array with variables to set value for */
1247 SCIP_Real* vals, /**< array with solution values of variables */
1248 SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1249 );
1250
1251/** sets the values of the variables in the global relaxation solution to the values in the given primal solution
1252 * and informs SCIP about the validity and whether the solution can be enforced via linear cuts;
1253 * the relaxation solution can be filled by the relaxation handlers and might be used by heuristics and for separation
1254 *
1255 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1256 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1257 *
1258 * @pre This method can be called if @p scip is in one of the following stages:
1259 * - \ref SCIP_STAGE_PRESOLVED
1260 * - \ref SCIP_STAGE_SOLVING
1261 */
1262SCIP_EXPORT
1264 SCIP* scip, /**< SCIP data structure */
1265 SCIP_RELAX* relax, /**< relaxator data structure */
1266 SCIP_SOL* sol, /**< primal relaxation solution */
1267 SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1268 );
1269
1270/** returns whether the relaxation solution is valid
1271 *
1272 * @return TRUE, if the relaxation solution is valid; FALSE, otherwise
1273 *
1274 * @pre This method can be called if @p scip is in one of the following stages:
1275 * - \ref SCIP_STAGE_PRESOLVED
1276 * - \ref SCIP_STAGE_SOLVING
1277 */
1278SCIP_EXPORT
1280 SCIP* scip /**< SCIP data structure */
1281 );
1282
1283/** informs SCIP that the relaxation solution is valid and whether the relaxation can be enforced through linear cuts
1284 *
1285 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1286 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1287 *
1288 * @pre This method can be called if @p scip is in one of the following stages:
1289 * - \ref SCIP_STAGE_PRESOLVED
1290 * - \ref SCIP_STAGE_SOLVING
1291 */
1292SCIP_EXPORT
1294 SCIP* scip, /**< SCIP data structure */
1295 SCIP_RELAX* relax, /**< relaxator data structure that set the current relaxation solution */
1296 SCIP_Bool includeslp /**< does the relaxator contain all cuts in the LP? */
1297 );
1298
1299/** informs SCIP, that the relaxation solution is invalid
1300 *
1301 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1302 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1303 *
1304 * @pre This method can be called if @p scip is in one of the following stages:
1305 * - \ref SCIP_STAGE_PRESOLVED
1306 * - \ref SCIP_STAGE_SOLVING
1307 */
1308SCIP_EXPORT
1310 SCIP* scip /**< SCIP data structure */
1311 );
1312
1313/** gets the relaxation solution value of the given variable
1314 *
1315 * @return the relaxation solution value of the given variable
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 */
1321SCIP_EXPORT
1323 SCIP* scip, /**< SCIP data structure */
1324 SCIP_VAR* var /**< variable to get value for */
1325 );
1326
1327/** gets the relaxation solution objective value
1328 *
1329 * @return the objective value of the relaxation solution
1330 *
1331 * @pre This method can be called if @p scip is in one of the following stages:
1332 * - \ref SCIP_STAGE_PRESOLVED
1333 * - \ref SCIP_STAGE_SOLVING
1334 */
1335SCIP_EXPORT
1337 SCIP* scip /**< SCIP data structure */
1338 );
1339
1340/** determine which branching direction should be evaluated first by strong branching
1341 *
1342 * @return TRUE iff strong branching should first evaluate the down child
1343 *
1344 */
1345SCIP_EXPORT
1347 SCIP* scip, /**< SCIP data structure */
1348 SCIP_VAR* var /**< variable to determine the branching direction on */
1349 );
1350
1351/** start strong branching - call before any strong branching
1352 *
1353 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1354 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1355 *
1356 * @pre This method can be called if @p scip is in one of the following stages:
1357 * - \ref SCIP_STAGE_PRESOLVED
1358 * - \ref SCIP_STAGE_SOLVING
1359 *
1360 * @note if propagation is enabled, strong branching is not done directly on the LP, but probing nodes are created
1361 * which allow to perform propagation but also creates some overhead
1362 */
1363SCIP_EXPORT
1365 SCIP* scip, /**< SCIP data structure */
1366 SCIP_Bool enablepropagation /**< should propagation be done before solving the strong branching LP? */
1367 );
1368
1369/** end strong branching - call after any strong branching
1370 *
1371 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1372 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1373 *
1374 * @pre This method can be called if @p scip is in one of the following stages:
1375 * - \ref SCIP_STAGE_PRESOLVED
1376 * - \ref SCIP_STAGE_SOLVING
1377 */
1378SCIP_EXPORT
1380 SCIP* scip /**< SCIP data structure */
1381 );
1382
1383/** gets strong branching information on column variable with fractional value
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_PRESOLVED
1390 * - \ref SCIP_STAGE_SOLVING
1391 */
1392SCIP_EXPORT
1394 SCIP* scip, /**< SCIP data structure */
1395 SCIP_VAR* var, /**< variable to get strong branching values for */
1396 int itlim, /**< iteration limit for strong branchings */
1397 SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1398 SCIP_Real* down, /**< stores dual bound after branching column down */
1399 SCIP_Real* up, /**< stores dual bound after branching column up */
1400 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1401 * otherwise, it can only be used as an estimate value */
1402 SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1403 * otherwise, it can only be used as an estimate value */
1404 SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1405 SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1406 SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1407 * infeasible downwards branch, or NULL */
1408 SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1409 * infeasible upwards branch, or NULL */
1410 SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1411 * solving process should be stopped (e.g., due to a time limit) */
1412 );
1413
1414/** gets strong branching information with previous domain propagation on column variable
1415 *
1416 * Before calling this method, the strong branching mode must have been activated by calling SCIPstartStrongbranch();
1417 * after strong branching was done for all candidate variables, the strong branching mode must be ended by
1418 * SCIPendStrongbranch(). Since this method applies domain propagation before strongbranching, propagation has to be be
1419 * enabled in the SCIPstartStrongbranch() call.
1420 *
1421 * Before solving the strong branching LP, domain propagation can be performed. The number of propagation rounds
1422 * can be specified by the parameter @p maxproprounds.
1423 *
1424 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1425 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1426 *
1427 * @pre This method can be called if @p scip is in one of the following stages:
1428 * - \ref SCIP_STAGE_PRESOLVED
1429 * - \ref SCIP_STAGE_SOLVING
1430 *
1431 * @warning When using this method, LP banching candidates and solution values must be copied beforehand, because
1432 * they are updated w.r.t. the strong branching LP solution.
1433 */
1434SCIP_EXPORT
1436 SCIP* scip, /**< SCIP data structure */
1437 SCIP_VAR* var, /**< variable to get strong branching values for */
1438 SCIP_Real solval, /**< value of the variable in the current LP solution */
1439 SCIP_Real lpobjval, /**< LP objective value of the current LP solution */
1440 int itlim, /**< iteration limit for strong branchings */
1441 int maxproprounds, /**< maximum number of propagation rounds (-1: no limit, -2: parameter
1442 * settings) */
1443 SCIP_Real* down, /**< stores dual bound after branching column down */
1444 SCIP_Real* up, /**< stores dual bound after branching column up */
1445 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1446 * otherwise, it can only be used as an estimate value */
1447 SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1448 * otherwise, it can only be used as an estimate value */
1449 SCIP_Longint* ndomredsdown, /**< pointer to store the number of domain reductions down, or NULL */
1450 SCIP_Longint* ndomredsup, /**< pointer to store the number of domain reductions up, or NULL */
1451 SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1452 SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1453 SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1454 * infeasible downwards branch, or NULL */
1455 SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1456 * infeasible upwards branch, or NULL */
1457 SCIP_Bool* lperror, /**< pointer to store whether an unresolved LP error occurred or the
1458 * solving process should be stopped (e.g., due to a time limit) */
1459 SCIP_Real* newlbs, /**< array to store valid lower bounds for all active variables, or NULL */
1460 SCIP_Real* newubs /**< array to store valid upper bounds for all active variables, or NULL */
1461 );
1462
1463/** gets strong branching information on column variable x with integral LP solution value (val); that is, the down branch
1464 * is (val -1.0) and the up brach ins (val +1.0)
1465 *
1466 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1467 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1468 *
1469 * @pre This method can be called if @p scip is in one of the following stages:
1470 * - \ref SCIP_STAGE_PRESOLVED
1471 * - \ref SCIP_STAGE_SOLVING
1472 *
1473 * @note If the integral LP solution value is the lower or upper bound of the variable, the corresponding branch will be
1474 * marked as infeasible. That is, the valid pointer and the infeasible pointer are set to TRUE.
1475 */
1476SCIP_EXPORT
1478 SCIP* scip, /**< SCIP data structure */
1479 SCIP_VAR* var, /**< variable to get strong branching values for */
1480 int itlim, /**< iteration limit for strong branchings */
1481 SCIP_Bool idempotent, /**< should scip's state remain the same after the call (statistics, column states...), or should it be updated ? */
1482 SCIP_Real* down, /**< stores dual bound after branching column down */
1483 SCIP_Real* up, /**< stores dual bound after branching column up */
1484 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1485 * otherwise, it can only be used as an estimate value */
1486 SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1487 * otherwise, it can only be used as an estimate value */
1488 SCIP_Bool* downinf, /**< pointer to store whether the downwards branch is infeasible, or NULL */
1489 SCIP_Bool* upinf, /**< pointer to store whether the upwards branch is infeasible, or NULL */
1490 SCIP_Bool* downconflict, /**< pointer to store whether a conflict constraint was created for an
1491 * infeasible downwards branch, or NULL */
1492 SCIP_Bool* upconflict, /**< pointer to store whether a conflict constraint was created for an
1493 * infeasible upwards branch, or NULL */
1494 SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1495 * solving process should be stopped (e.g., due to a time limit) */
1496 );
1497
1498/** gets strong branching information on column variables with fractional values
1499 *
1500 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1501 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1502 *
1503 * @pre This method can be called if @p scip is in one of the following stages:
1504 * - \ref SCIP_STAGE_PRESOLVED
1505 * - \ref SCIP_STAGE_SOLVING
1506 */
1507SCIP_EXPORT
1509 SCIP* scip, /**< SCIP data structure */
1510 SCIP_VAR** vars, /**< variables to get strong branching values for */
1511 int nvars, /**< number of variables */
1512 int itlim, /**< iteration limit for strong branchings */
1513 SCIP_Real* down, /**< stores dual bounds after branching variables down */
1514 SCIP_Real* up, /**< stores dual bounds after branching variables up */
1515 SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1516 * otherwise, they can only be used as an estimate value */
1517 SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1518 * otherwise, they can only be used as an estimate value */
1519 SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1520 SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1521 SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1522 * infeasible downward branches, or NULL */
1523 SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1524 * infeasible upward branches, or NULL */
1525 SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1526 * solving process should be stopped (e.g., due to a time limit) */
1527 );
1528
1529/** gets strong branching information on column variables with integral values
1530 *
1531 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1532 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1533 *
1534 * @pre This method can be called if @p scip is in one of the following stages:
1535 * - \ref SCIP_STAGE_PRESOLVED
1536 * - \ref SCIP_STAGE_SOLVING
1537 */
1538SCIP_EXPORT
1540 SCIP* scip, /**< SCIP data structure */
1541 SCIP_VAR** vars, /**< variables to get strong branching values for */
1542 int nvars, /**< number of variables */
1543 int itlim, /**< iteration limit for strong branchings */
1544 SCIP_Real* down, /**< stores dual bounds after branching variables down */
1545 SCIP_Real* up, /**< stores dual bounds after branching variables up */
1546 SCIP_Bool* downvalid, /**< stores whether the returned down values are valid dual bounds, or NULL;
1547 * otherwise, they can only be used as an estimate value */
1548 SCIP_Bool* upvalid, /**< stores whether the returned up values are valid dual bounds, or NULL;
1549 * otherwise, they can only be used as an estimate value */
1550 SCIP_Bool* downinf, /**< array to store whether the downward branches are infeasible, or NULL */
1551 SCIP_Bool* upinf, /**< array to store whether the upward branches are infeasible, or NULL */
1552 SCIP_Bool* downconflict, /**< array to store whether conflict constraints were created for
1553 * infeasible downward branches, or NULL */
1554 SCIP_Bool* upconflict, /**< array to store whether conflict constraints were created for
1555 * infeasible upward branches, or NULL */
1556 SCIP_Bool* lperror /**< pointer to store whether an unresolved LP error occurred or the
1557 * solving process should be stopped (e.g., due to a time limit) */
1558 );
1559
1560/** get LP solution status of last strong branching call (currently only works for strong branching with propagation) */
1561SCIP_EXPORT
1563 SCIP* scip, /**< SCIP data structure */
1564 SCIP_BRANCHDIR branchdir /**< branching direction for which LP solution status is requested */
1565 );
1566
1567/** gets strong branching information on COLUMN variable of the last SCIPgetVarStrongbranch() call;
1568 * returns values of SCIP_INVALID, if strong branching was not yet called on the given variable;
1569 * keep in mind, that the returned old values may have nothing to do with the current LP solution
1570 *
1571 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1572 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1573 *
1574 * @pre This method can be called if @p scip is in one of the following stages:
1575 * - \ref SCIP_STAGE_SOLVING
1576 * - \ref SCIP_STAGE_SOLVED
1577 */
1578SCIP_EXPORT
1580 SCIP* scip, /**< SCIP data structure */
1581 SCIP_VAR* var, /**< variable to get last strong branching values for */
1582 SCIP_Real* down, /**< stores dual bound after branching column down, or NULL */
1583 SCIP_Real* up, /**< stores dual bound after branching column up, or NULL */
1584 SCIP_Bool* downvalid, /**< stores whether the returned down value is a valid dual bound, or NULL;
1585 * otherwise, it can only be used as an estimate value */
1586 SCIP_Bool* upvalid, /**< stores whether the returned up value is a valid dual bound, or NULL;
1587 * otherwise, it can only be used as an estimate value */
1588 SCIP_Real* solval, /**< stores LP solution value of variable at last strong branching call, or NULL */
1589 SCIP_Real* lpobjval /**< stores LP objective value at last strong branching call, or NULL */
1590 );
1591
1592/** sets strong branching information for a column variable
1593 *
1594 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1595 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1596 *
1597 * @pre This method can be called if @p scip is in one of the following stages:
1598 * - \ref SCIP_STAGE_SOLVING
1599 */
1600SCIP_EXPORT
1602 SCIP* scip, /**< SCIP data structure */
1603 SCIP_VAR* var, /**< variable to set last strong branching values for */
1604 SCIP_Real lpobjval, /**< objective value of the current LP */
1605 SCIP_Real primsol, /**< primal solution value of the column in the current LP */
1606 SCIP_Real down, /**< dual bound after branching column down */
1607 SCIP_Real up, /**< dual bound after branching column up */
1608 SCIP_Bool downvalid, /**< is the returned down value a valid dual bound? */
1609 SCIP_Bool upvalid, /**< is the returned up value a valid dual bound? */
1610 SCIP_Longint iter, /**< total number of strong branching iterations */
1611 int itlim /**< iteration limit applied to the strong branching call */
1612 );
1613
1614/** rounds the current solution and tries it afterwards; if feasible, adds it to storage
1615 *
1616 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1617 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1618 *
1619 * @pre This method can be called if @p scip is in one of the following stages:
1620 * - \ref SCIP_STAGE_SOLVING
1621 */
1622SCIP_EXPORT
1624 SCIP* scip, /**< SCIP data structure */
1625 SCIP_Bool* foundsol, /**< stores whether solution was feasible and good enough to keep */
1626 SCIP_Bool* cutoff /**< stores whether solution was cutoff due to exceeding the cutoffbound */
1627 );
1628
1629/** gets node number of the last node in current branch and bound run, where strong branching was used on the
1630 * given variable, or -1 if strong branching was never applied to the variable in current run
1631 *
1632 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1633 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1634 *
1635 * @pre This method can be called if @p scip is in one of the following stages:
1636 * - \ref SCIP_STAGE_TRANSFORMING
1637 * - \ref SCIP_STAGE_TRANSFORMED
1638 * - \ref SCIP_STAGE_INITPRESOLVE
1639 * - \ref SCIP_STAGE_PRESOLVING
1640 * - \ref SCIP_STAGE_EXITPRESOLVE
1641 * - \ref SCIP_STAGE_PRESOLVED
1642 * - \ref SCIP_STAGE_INITSOLVE
1643 * - \ref SCIP_STAGE_SOLVING
1644 * - \ref SCIP_STAGE_SOLVED
1645 * - \ref SCIP_STAGE_EXITSOLVE
1646 */
1647SCIP_EXPORT
1649 SCIP* scip, /**< SCIP data structure */
1650 SCIP_VAR* var /**< variable to get last strong branching node for */
1651 );
1652
1653/** if strong branching was already applied on the variable at the current node, returns the number of LPs solved after
1654 * the LP where the strong branching on this variable was applied;
1655 * if strong branching was not yet applied on the variable at the current node, returns INT_MAX
1656 *
1657 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1658 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1659 *
1660 * @pre This method can be called if @p scip is in one of the following stages:
1661 * - \ref SCIP_STAGE_TRANSFORMING
1662 * - \ref SCIP_STAGE_TRANSFORMED
1663 * - \ref SCIP_STAGE_INITPRESOLVE
1664 * - \ref SCIP_STAGE_PRESOLVING
1665 * - \ref SCIP_STAGE_EXITPRESOLVE
1666 * - \ref SCIP_STAGE_PRESOLVED
1667 * - \ref SCIP_STAGE_INITSOLVE
1668 * - \ref SCIP_STAGE_SOLVING
1669 * - \ref SCIP_STAGE_SOLVED
1670 * - \ref SCIP_STAGE_EXITSOLVE
1671 */
1672SCIP_EXPORT
1674 SCIP* scip, /**< SCIP data structure */
1675 SCIP_VAR* var /**< variable to get strong branching LP age for */
1676 );
1677
1678/** gets number of times, strong branching was applied in current run on the given variable
1679 *
1680 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1681 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1682 *
1683 * @pre This method can be called if @p scip is in one of the following stages:
1684 * - \ref SCIP_STAGE_TRANSFORMING
1685 * - \ref SCIP_STAGE_TRANSFORMED
1686 * - \ref SCIP_STAGE_INITPRESOLVE
1687 * - \ref SCIP_STAGE_PRESOLVING
1688 * - \ref SCIP_STAGE_EXITPRESOLVE
1689 * - \ref SCIP_STAGE_PRESOLVED
1690 * - \ref SCIP_STAGE_INITSOLVE
1691 * - \ref SCIP_STAGE_SOLVING
1692 * - \ref SCIP_STAGE_SOLVED
1693 * - \ref SCIP_STAGE_EXITSOLVE
1694 */
1695SCIP_EXPORT
1697 SCIP* scip, /**< SCIP data structure */
1698 SCIP_VAR* var /**< variable to get last strong branching node for */
1699 );
1700
1701/** adds given values to lock numbers of type @p locktype of variable for rounding
1702 *
1703 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1704 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1705 *
1706 * @pre This method can be called if @p scip is in one of the following stages:
1707 * - \ref SCIP_STAGE_PROBLEM
1708 * - \ref SCIP_STAGE_TRANSFORMING
1709 * - \ref SCIP_STAGE_TRANSFORMED
1710 * - \ref SCIP_STAGE_INITPRESOLVE
1711 * - \ref SCIP_STAGE_PRESOLVING
1712 * - \ref SCIP_STAGE_EXITPRESOLVE
1713 * - \ref SCIP_STAGE_PRESOLVED
1714 * - \ref SCIP_STAGE_INITSOLVE
1715 * - \ref SCIP_STAGE_SOLVING
1716 * - \ref SCIP_STAGE_EXITSOLVE
1717 * - \ref SCIP_STAGE_FREETRANS
1718 */
1719SCIP_EXPORT
1721 SCIP* scip, /**< SCIP data structure */
1722 SCIP_VAR* var, /**< problem variable */
1723 SCIP_LOCKTYPE locktype, /**< type of the variable locks */
1724 int nlocksdown, /**< modification in number of rounding down locks */
1725 int nlocksup /**< modification in number of rounding up locks */
1726 );
1727
1728
1729/** adds given values to lock numbers of variable for rounding
1730 *
1731 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1732 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1733 *
1734 * @pre This method can be called if @p scip is in one of the following stages:
1735 * - \ref SCIP_STAGE_PROBLEM
1736 * - \ref SCIP_STAGE_TRANSFORMING
1737 * - \ref SCIP_STAGE_TRANSFORMED
1738 * - \ref SCIP_STAGE_INITPRESOLVE
1739 * - \ref SCIP_STAGE_PRESOLVING
1740 * - \ref SCIP_STAGE_EXITPRESOLVE
1741 * - \ref SCIP_STAGE_PRESOLVED
1742 * - \ref SCIP_STAGE_INITSOLVE
1743 * - \ref SCIP_STAGE_SOLVING
1744 * - \ref SCIP_STAGE_EXITSOLVE
1745 * - \ref SCIP_STAGE_FREETRANS
1746 *
1747 * @note This method will always add variable locks of type model
1748 */
1749SCIP_EXPORT
1751 SCIP* scip, /**< SCIP data structure */
1752 SCIP_VAR* var, /**< problem variable */
1753 int nlocksdown, /**< modification in number of rounding down locks */
1754 int nlocksup /**< modification in number of rounding up locks */
1755 );
1756
1757
1758/** add locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1759 * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1760 * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1761 * added or removed
1762 *
1763 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1764 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1765 *
1766 * @pre This method can be called if @p scip is in one of the following stages:
1767 * - \ref SCIP_STAGE_PROBLEM
1768 * - \ref SCIP_STAGE_TRANSFORMING
1769 * - \ref SCIP_STAGE_INITPRESOLVE
1770 * - \ref SCIP_STAGE_PRESOLVING
1771 * - \ref SCIP_STAGE_EXITPRESOLVE
1772 * - \ref SCIP_STAGE_INITSOLVE
1773 * - \ref SCIP_STAGE_SOLVING
1774 * - \ref SCIP_STAGE_EXITSOLVE
1775 * - \ref SCIP_STAGE_FREETRANS
1776 */
1777SCIP_EXPORT
1779 SCIP* scip, /**< SCIP data structure */
1780 SCIP_VAR* var, /**< problem variable */
1781 SCIP_CONS* cons, /**< constraint */
1782 SCIP_Bool lockdown, /**< should the rounding be locked in downwards direction? */
1783 SCIP_Bool lockup /**< should the rounding be locked in upwards direction? */
1784 );
1785
1786/** remove locks of type @p locktype of variable with respect to the lock status of the constraint and its negation;
1787 * this method should be called whenever the lock status of a variable in a constraint changes, for example if
1788 * the coefficient of the variable changed its sign or if the left or right hand sides of the constraint were
1789 * added or removed
1790 *
1791 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1792 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1793 *
1794 * @pre This method can be called if @p scip is in one of the following stages:
1795 * - \ref SCIP_STAGE_PROBLEM
1796 * - \ref SCIP_STAGE_TRANSFORMING
1797 * - \ref SCIP_STAGE_INITPRESOLVE
1798 * - \ref SCIP_STAGE_PRESOLVING
1799 * - \ref SCIP_STAGE_EXITPRESOLVE
1800 * - \ref SCIP_STAGE_INITSOLVE
1801 * - \ref SCIP_STAGE_SOLVING
1802 * - \ref SCIP_STAGE_EXITSOLVE
1803 * - \ref SCIP_STAGE_FREETRANS
1804 */
1805SCIP_EXPORT
1807 SCIP* scip, /**< SCIP data structure */
1808 SCIP_VAR* var, /**< problem variable */
1809 SCIP_CONS* cons, /**< constraint */
1810 SCIP_Bool lockdown, /**< should the rounding be unlocked in downwards direction? */
1811 SCIP_Bool lockup /**< should the rounding be unlocked in upwards direction? */
1812 );
1813
1814/** changes variable's objective value
1815 *
1816 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1817 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1818 *
1819 * @pre This method can be called if @p scip is in one of the following stages:
1820 * - \ref SCIP_STAGE_PROBLEM
1821 * - \ref SCIP_STAGE_TRANSFORMING
1822 * - \ref SCIP_STAGE_PRESOLVING
1823 */
1824SCIP_EXPORT
1826 SCIP* scip, /**< SCIP data structure */
1827 SCIP_VAR* var, /**< variable to change the objective value for */
1828 SCIP_Real newobj /**< new objective value */
1829 );
1830
1831/** adds value to variable's objective value
1832 *
1833 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1834 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1835 *
1836 * @pre This method can be called if @p scip is in one of the following stages:
1837 * - \ref SCIP_STAGE_PROBLEM
1838 * - \ref SCIP_STAGE_TRANSFORMING
1839 * - \ref SCIP_STAGE_PRESOLVING
1840 * - \ref SCIP_STAGE_EXITPRESOLVE
1841 * - \ref SCIP_STAGE_PRESOLVED
1842 */
1843SCIP_EXPORT
1845 SCIP* scip, /**< SCIP data structure */
1846 SCIP_VAR* var, /**< variable to change the objective value for */
1847 SCIP_Real addobj /**< additional objective value */
1848 );
1849
1850/** returns the adjusted (i.e. rounded, if the given variable is of integral type) lower bound value;
1851 * does not change the bounds of the variable
1852 *
1853 * @return adjusted lower bound for the given variable; the bound of the variable is not changed
1854 *
1855 * @pre This method can be called if @p scip is in one of the following stages:
1856 * - \ref SCIP_STAGE_PROBLEM
1857 * - \ref SCIP_STAGE_TRANSFORMING
1858 * - \ref SCIP_STAGE_TRANSFORMED
1859 * - \ref SCIP_STAGE_INITPRESOLVE
1860 * - \ref SCIP_STAGE_PRESOLVING
1861 * - \ref SCIP_STAGE_EXITPRESOLVE
1862 * - \ref SCIP_STAGE_PRESOLVED
1863 * - \ref SCIP_STAGE_INITSOLVE
1864 * - \ref SCIP_STAGE_SOLVING
1865 * - \ref SCIP_STAGE_SOLVED
1866 * - \ref SCIP_STAGE_EXITSOLVE
1867 * - \ref SCIP_STAGE_FREETRANS
1868 */
1869SCIP_EXPORT
1871 SCIP* scip, /**< SCIP data structure */
1872 SCIP_VAR* var, /**< variable to adjust the bound for */
1873 SCIP_Real lb /**< lower bound value to adjust */
1874 );
1875
1876/** returns the adjusted (i.e. rounded, if the given variable is of integral type) lower bound value;
1877 * does not change the bounds of the variable
1878 *
1879 * @return adjusted lower bound for the given variable; the bound of the variable is not changed
1880 *
1881 * @pre This method can be called if @p scip is in one of the following stages:
1882 * - \ref SCIP_STAGE_PROBLEM
1883 * - \ref SCIP_STAGE_TRANSFORMING
1884 * - \ref SCIP_STAGE_TRANSFORMED
1885 * - \ref SCIP_STAGE_INITPRESOLVE
1886 * - \ref SCIP_STAGE_PRESOLVING
1887 * - \ref SCIP_STAGE_EXITPRESOLVE
1888 * - \ref SCIP_STAGE_PRESOLVED
1889 * - \ref SCIP_STAGE_INITSOLVE
1890 * - \ref SCIP_STAGE_SOLVING
1891 * - \ref SCIP_STAGE_SOLVED
1892 * - \ref SCIP_STAGE_EXITSOLVE
1893 * - \ref SCIP_STAGE_FREETRANS
1894 */
1895SCIP_EXPORT
1897 SCIP* scip, /**< SCIP data structure */
1898 SCIP_VAR* var, /**< variable to adjust the bound for */
1899 SCIP_Real lb /**< lower bound value to adjust */
1900 );
1901
1902/** returns the adjusted (i.e. rounded, if the given variable is of integral type) upper bound value;
1903 * does not change the bounds of the variable
1904 *
1905 * @return adjusted upper bound for the given variable; the bound of the variable is not changed
1906 *
1907 * @pre This method can be called if @p scip is in one of the following stages:
1908 * - \ref SCIP_STAGE_PROBLEM
1909 * - \ref SCIP_STAGE_TRANSFORMING
1910 * - \ref SCIP_STAGE_TRANSFORMED
1911 * - \ref SCIP_STAGE_INITPRESOLVE
1912 * - \ref SCIP_STAGE_PRESOLVING
1913 * - \ref SCIP_STAGE_EXITPRESOLVE
1914 * - \ref SCIP_STAGE_PRESOLVED
1915 * - \ref SCIP_STAGE_INITSOLVE
1916 * - \ref SCIP_STAGE_SOLVING
1917 * - \ref SCIP_STAGE_SOLVED
1918 * - \ref SCIP_STAGE_EXITSOLVE
1919 * - \ref SCIP_STAGE_FREETRANS
1920 */
1921SCIP_EXPORT
1923 SCIP* scip, /**< SCIP data structure */
1924 SCIP_VAR* var, /**< variable to adjust the bound for */
1925 SCIP_Real ub /**< upper bound value to adjust */
1926 );
1927
1928/** returns the adjusted (i.e. rounded, if the given variable is of integral type) upper bound value;
1929 * does not change the bounds of the variable
1930 *
1931 * @return adjusted upper bound for the given variable; the bound of the variable is not changed
1932 *
1933 * @pre This method can be called if @p scip is in one of the following stages:
1934 * - \ref SCIP_STAGE_PROBLEM
1935 * - \ref SCIP_STAGE_TRANSFORMING
1936 * - \ref SCIP_STAGE_TRANSFORMED
1937 * - \ref SCIP_STAGE_INITPRESOLVE
1938 * - \ref SCIP_STAGE_PRESOLVING
1939 * - \ref SCIP_STAGE_EXITPRESOLVE
1940 * - \ref SCIP_STAGE_PRESOLVED
1941 * - \ref SCIP_STAGE_INITSOLVE
1942 * - \ref SCIP_STAGE_SOLVING
1943 * - \ref SCIP_STAGE_SOLVED
1944 * - \ref SCIP_STAGE_EXITSOLVE
1945 * - \ref SCIP_STAGE_FREETRANS
1946 */
1947SCIP_EXPORT
1949 SCIP* scip, /**< SCIP data structure */
1950 SCIP_VAR* var, /**< variable to adjust the bound for */
1951 SCIP_Real ub /**< upper bound value to adjust */
1952 );
1953
1954/** depending on SCIP's stage, changes lower bound of variable in the problem, in preprocessing, or in current node;
1955 * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1956 * that in conflict analysis, this change is treated like a branching decision
1957 *
1958 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1959 * SCIPgetVars()) gets re-sorted.
1960 *
1961 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1962 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1963 *
1964 * @pre This method can be called if @p scip is in one of the following stages:
1965 * - \ref SCIP_STAGE_PROBLEM
1966 * - \ref SCIP_STAGE_TRANSFORMING
1967 * - \ref SCIP_STAGE_PRESOLVING
1968 * - \ref SCIP_STAGE_SOLVING
1969 *
1970 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1971 */
1972SCIP_EXPORT
1974 SCIP* scip, /**< SCIP data structure */
1975 SCIP_VAR* var, /**< variable to change the bound for */
1976 SCIP_Real newbound /**< new value for bound */
1977 );
1978
1979/** depending on SCIP's stage, changes exact lower bound of variable in the problem, in preprocessing, or in current node;
1980 * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
1981 * that in conflict analysis, this change is treated like a branching decision
1982 *
1983 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
1984 * SCIPgetVars()) gets resorted.
1985 *
1986 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1987 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1988 *
1989 * @pre This method can be called if @p scip is in one of the following stages:
1990 * - \ref SCIP_STAGE_PROBLEM
1991 * - \ref SCIP_STAGE_TRANSFORMING
1992 * - \ref SCIP_STAGE_PRESOLVING
1993 * - \ref SCIP_STAGE_SOLVING
1994 *
1995 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
1996 */
1997SCIP_EXPORT
1999 SCIP* scip, /**< SCIP data structure */
2000 SCIP_VAR* var, /**< variable to change the bound for */
2001 SCIP_RATIONAL* newbound /**< new value for bound */
2002 );
2003
2004/** depending on SCIP's stage, changes upper bound of variable in the problem, in preprocessing, or in current node;
2005 * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
2006 * that in conflict analysis, this change is treated like a branching decision
2007 *
2008 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2009 * SCIPgetVars()) gets re-sorted.
2010 *
2011 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2012 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2013 *
2014 * @pre This method can be called if @p scip is in one of the following stages:
2015 * - \ref SCIP_STAGE_PROBLEM
2016 * - \ref SCIP_STAGE_TRANSFORMING
2017 * - \ref SCIP_STAGE_PRESOLVING
2018 * - \ref SCIP_STAGE_SOLVING
2019 *
2020 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2021 */
2022SCIP_EXPORT
2024 SCIP* scip, /**< SCIP data structure */
2025 SCIP_VAR* var, /**< variable to change the bound for */
2026 SCIP_Real newbound /**< new value for bound */
2027 );
2028
2029/** depending on SCIP's stage, changes exact upper bound of variable in the problem, in preprocessing, or in current node;
2030 * if possible, adjusts bound to integral value; doesn't store any inference information in the bound change, such
2031 * that in conflict analysis, this change is treated like a branching decision
2032 *
2033 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2034 * SCIPgetVars()) gets resorted.
2035 *
2036 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2037 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2038 *
2039 * @pre This method can be called if @p scip is in one of the following stages:
2040 * - \ref SCIP_STAGE_PROBLEM
2041 * - \ref SCIP_STAGE_TRANSFORMING
2042 * - \ref SCIP_STAGE_PRESOLVING
2043 * - \ref SCIP_STAGE_SOLVING
2044 *
2045 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2046 */
2047SCIP_EXPORT
2049 SCIP* scip, /**< SCIP data structure */
2050 SCIP_VAR* var, /**< variable to change the bound for */
2051 SCIP_RATIONAL* newbound /**< new value for bound */
2052 );
2053
2054/** changes lower bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
2055 * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
2056 * decision
2057 *
2058 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2059 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2060 *
2061 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2062 */
2063SCIP_EXPORT
2065 SCIP* scip, /**< SCIP data structure */
2066 SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
2067 SCIP_VAR* var, /**< variable to change the bound for */
2068 SCIP_Real newbound /**< new value for bound */
2069 );
2070
2071/** changes upper bound of variable in the given node; if possible, adjust bound to integral value; doesn't store any
2072 * inference information in the bound change, such that in conflict analysis, this change is treated like a branching
2073 * decision
2074 *
2075 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2076 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2077 *
2078 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2079 */
2080SCIP_EXPORT
2082 SCIP* scip, /**< SCIP data structure */
2083 SCIP_NODE* node, /**< node to change bound at, or NULL for current node */
2084 SCIP_VAR* var, /**< variable to change the bound for */
2085 SCIP_Real newbound /**< new value for bound */
2086 );
2087
2088/** changes global lower bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
2089 * if the global bound is better than the local bound
2090 *
2091 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2092 * SCIPgetVars()) gets re-sorted.
2093 *
2094 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2095 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2096 *
2097 * @pre This method can be called if @p scip is in one of the following stages:
2098 * - \ref SCIP_STAGE_PROBLEM
2099 * - \ref SCIP_STAGE_TRANSFORMING
2100 * - \ref SCIP_STAGE_TRANSFORMED
2101 * - \ref SCIP_STAGE_PRESOLVING
2102 * - \ref SCIP_STAGE_SOLVING
2103 *
2104 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2105 */
2106SCIP_EXPORT
2108 SCIP* scip, /**< SCIP data structure */
2109 SCIP_VAR* var, /**< variable to change the bound for */
2110 SCIP_Real newbound /**< new value for bound */
2111 );
2112
2113/** changes global upper bound of variable; if possible, adjust bound to integral value; also tightens the local bound,
2114 * if the global bound is better than the local bound
2115 *
2116 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2117 * SCIPgetVars()) gets re-sorted.
2118 *
2119 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2120 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2121 *
2122 * @pre This method can be called if @p scip is in one of the following stages:
2123 * - \ref SCIP_STAGE_PROBLEM
2124 * - \ref SCIP_STAGE_TRANSFORMING
2125 * - \ref SCIP_STAGE_TRANSFORMED
2126 * - \ref SCIP_STAGE_PRESOLVING
2127 * - \ref SCIP_STAGE_SOLVING
2128 *
2129 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2130 */
2131SCIP_EXPORT
2133 SCIP* scip, /**< SCIP data structure */
2134 SCIP_VAR* var, /**< variable to change the bound for */
2135 SCIP_Real newbound /**< new value for bound */
2136 );
2137
2138/** changes lazy lower bound of the variable, this is only possible if the variable is not in the LP yet
2139 *
2140 * Lazy bounds are bounds that are already enforced by constraints and the objective function.
2141 * Setting a lazy lower bound has the consequence that for variables which lower bound equals the lazy lower bound,
2142 * the lower bound does not need to be passed on to the LP solver.
2143 * This is especially useful in a column generation (branch-and-price) setting.
2144 *
2145 * @attention If the variable has a global lower bound below lazylb, then the global lower bound is tightened to
2146 * lazylb by a call to SCIPchgVarLbGlobal().
2147 *
2148 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2149 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2150 *
2151 * @pre This method can be called if @p scip is in one of the following stages:
2152 * - \ref SCIP_STAGE_PROBLEM
2153 * - \ref SCIP_STAGE_TRANSFORMING
2154 * - \ref SCIP_STAGE_TRANSFORMED
2155 * - \ref SCIP_STAGE_PRESOLVING
2156 * - \ref SCIP_STAGE_SOLVING
2157 */
2158SCIP_EXPORT
2160 SCIP* scip, /**< SCIP data structure */
2161 SCIP_VAR* var, /**< problem variable */
2162 SCIP_Real lazylb /**< the lazy lower bound to be set */
2163 );
2164
2165/** changes lazy upper bound of the variable, this is only possible if the variable is not in the LP yet
2166 *
2167 * Lazy bounds are bounds that are already enforced by constraints and the objective function.
2168 * Setting a lazy upper bound has the consequence that for variables which upper bound equals the lazy upper bound,
2169 * the upper bound does not need to be passed on to the LP solver.
2170 * This is especially useful in a column generation (branch-and-price) setting.
2171 *
2172 * @attention If the variable has a global upper bound above lazyub, then the global upper bound is tightened to
2173 * lazyub by a call to SCIPchgVarUbGlobal().
2174 *
2175 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2176 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2177 *
2178 * @pre This method can be called if @p scip is in one of the following stages:
2179 * - \ref SCIP_STAGE_PROBLEM
2180 * - \ref SCIP_STAGE_TRANSFORMING
2181 * - \ref SCIP_STAGE_TRANSFORMED
2182 * - \ref SCIP_STAGE_PRESOLVING
2183 * - \ref SCIP_STAGE_SOLVING
2184 */
2185SCIP_EXPORT
2187 SCIP* scip, /**< SCIP data structure */
2188 SCIP_VAR* var, /**< problem variable */
2189 SCIP_Real lazyub /**< the lazy lower bound to be set */
2190 );
2191
2192/** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2193 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2194 * doesn't store any inference information in the bound change, such that in conflict analysis, this change
2195 * is treated like a branching decision
2196 *
2197 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2198 * SCIPgetVars()) gets re-sorted.
2199 *
2200 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2201 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2202 *
2203 * @pre This method can be called if @p scip is in one of the following stages:
2204 * - \ref SCIP_STAGE_PROBLEM
2205 * - \ref SCIP_STAGE_PRESOLVING
2206 * - \ref SCIP_STAGE_SOLVING
2207 *
2208 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2209 */
2210SCIP_EXPORT
2212 SCIP* scip, /**< SCIP data structure */
2213 SCIP_VAR* var, /**< variable to change the bound for */
2214 SCIP_Real newbound, /**< new value for bound */
2215 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2216 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2217 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2218 );
2219
2220/** changes exact lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2221 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2222 * doesn't store any inference information in the bound change, such that in conflict analysis, this change
2223 * is treated like a branching decision
2224 *
2225 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2226 * SCIPgetVars()) gets resorted.
2227 *
2228 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2229 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2230 *
2231 * @pre This method can be called if @p scip is in one of the following stages:
2232 * - \ref SCIP_STAGE_PROBLEM
2233 * - \ref SCIP_STAGE_PRESOLVING
2234 * - \ref SCIP_STAGE_SOLVING
2235 *
2236 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2237 */
2238SCIP_EXPORT
2240 SCIP* scip, /**< SCIP data structure */
2241 SCIP_VAR* var, /**< variable to change the bound for */
2242 SCIP_RATIONAL* newbound, /**< new value for bound */
2243 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2244 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2245 );
2246
2247/** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2248 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2249 * doesn't store any inference information in the bound change, such that in conflict analysis, this change
2250 * is treated like a branching decision
2251 *
2252 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2253 * SCIPgetVars()) gets re-sorted.
2254 *
2255 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2256 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2257 *
2258 * @pre This method can be called if @p scip is in one of the following stages:
2259 * - \ref SCIP_STAGE_PROBLEM
2260 * - \ref SCIP_STAGE_PRESOLVING
2261 * - \ref SCIP_STAGE_SOLVING
2262 *
2263 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2264 */
2265SCIP_EXPORT
2267 SCIP* scip, /**< SCIP data structure */
2268 SCIP_VAR* var, /**< variable to change the bound for */
2269 SCIP_Real newbound, /**< new value for bound */
2270 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2271 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2272 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2273 );
2274
2275/** changes exact upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2276 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2277 * doesn't store any inference information in the bound change, such that in conflict analysis, this change
2278 * is treated like a branching decision
2279 *
2280 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2281 * SCIPgetVars()) gets resorted.
2282 *
2283 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2284 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2285 *
2286 * @pre This method can be called if @p scip is in one of the following stages:
2287 * - \ref SCIP_STAGE_PROBLEM
2288 * - \ref SCIP_STAGE_PRESOLVING
2289 * - \ref SCIP_STAGE_SOLVING
2290 *
2291 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2292 */
2293SCIP_EXPORT
2295 SCIP* scip, /**< SCIP data structure */
2296 SCIP_VAR* var, /**< variable to change the bound for */
2297 SCIP_RATIONAL* newbound, /**< new value for bound */
2298 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2299 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2300 );
2301
2302/** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
2303 * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
2304 * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
2305 *
2306 * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
2307 * changes first the lowerbound by calling SCIPinferVarLbCons and second the upperbound by calling
2308 * SCIPinferVarUbCons
2309 *
2310 * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
2311 * SCIPgetVars()) gets re-sorted.
2312 *
2313 * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
2314 */
2315SCIP_EXPORT
2317 SCIP* scip, /**< SCIP data structure */
2318 SCIP_VAR* var, /**< variable to change the bound for */
2319 SCIP_Real fixedval, /**< new value for fixation */
2320 SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2321 int inferinfo, /**< user information for inference to help resolving the conflict */
2322 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2323 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2324 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2325 );
2326
2327/** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2328 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2329 * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2330 * for the deduction of the bound change
2331 *
2332 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2333 * SCIPgetVars()) gets re-sorted.
2334 *
2335 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2336 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2337 *
2338 * @pre This method can be called if @p scip is in one of the following stages:
2339 * - \ref SCIP_STAGE_PROBLEM
2340 * - \ref SCIP_STAGE_PRESOLVING
2341 * - \ref SCIP_STAGE_SOLVING
2342 *
2343 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2344 */
2345SCIP_EXPORT
2347 SCIP* scip, /**< SCIP data structure */
2348 SCIP_VAR* var, /**< variable to change the bound for */
2349 SCIP_Real newbound, /**< new value for bound */
2350 SCIP_CONS* infercons, /**< constraint that deduced the bound change, or NULL */
2351 int inferinfo, /**< user information for inference to help resolving the conflict */
2352 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2353 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2354 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2355 );
2356
2357/** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2358 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2359 * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2360 * for the deduction of the bound change
2361 *
2362 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2363 * SCIPgetVars()) gets re-sorted.
2364 *
2365 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2366 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2367 *
2368 * @pre This method can be called if @p scip is in one of the following stages:
2369 * - \ref SCIP_STAGE_PROBLEM
2370 * - \ref SCIP_STAGE_PRESOLVING
2371 * - \ref SCIP_STAGE_SOLVING
2372 *
2373 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2374 */
2375SCIP_EXPORT
2377 SCIP* scip, /**< SCIP data structure */
2378 SCIP_VAR* var, /**< variable to change the bound for */
2379 SCIP_Real newbound, /**< new value for bound */
2380 SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2381 int inferinfo, /**< user information for inference to help resolving the conflict */
2382 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2383 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2384 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2385 );
2386
2387/** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2388 * the given inference constraint is stored, such that the conflict analysis is able to find out the reason for the
2389 * deduction of the fixing
2390 *
2391 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2392 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2393 *
2394 * @pre This method can be called if @p scip is in one of the following stages:
2395 * - \ref SCIP_STAGE_PROBLEM
2396 * - \ref SCIP_STAGE_PRESOLVING
2397 * - \ref SCIP_STAGE_SOLVING
2398 */
2399SCIP_EXPORT
2401 SCIP* scip, /**< SCIP data structure */
2402 SCIP_VAR* var, /**< binary variable to fix */
2403 SCIP_Bool fixedval, /**< value to fix binary variable to */
2404 SCIP_CONS* infercons, /**< constraint that deduced the fixing */
2405 int inferinfo, /**< user information for inference to help resolving the conflict */
2406 SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2407 SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2408 );
2409
2410/** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2411 * than the current bound; if possible, adjusts bound to integral value;
2412 * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2413 * for the deduction of the bound change
2414 *
2415 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2416 * SCIPgetVars()) gets resorted.
2417 *
2418 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2419 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2420 *
2421 * @pre This method can be called if @p scip is in one of the following stages:
2422 * - \ref SCIP_STAGE_PROBLEM
2423 * - \ref SCIP_STAGE_PRESOLVING
2424 * - \ref SCIP_STAGE_SOLVING
2425 *
2426 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2427 */
2429 SCIP* scip, /**< SCIP data structure */
2430 SCIP_VAR* var, /**< variable to change the bound for */
2431 SCIP_RATIONAL* newbound, /**< new value for bound */
2432 SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2433 int inferinfo, /**< user information for inference to help resolving the conflict */
2434 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2435 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2436 );
2437
2438/** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2439 * than the current bound; if possible, adjusts bound to integral value;
2440 * the given inference constraint is stored, such that the conflict analysis is able to find out the reason
2441 * for the deduction of the bound change
2442 *
2443 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2444 * SCIPgetVars()) gets resorted.
2445 *
2446 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2447 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2448 *
2449 * @pre This method can be called if @p scip is in one of the following stages:
2450 * - \ref SCIP_STAGE_PROBLEM
2451 * - \ref SCIP_STAGE_PRESOLVING
2452 * - \ref SCIP_STAGE_SOLVING
2453 *
2454 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2455 */
2457 SCIP* scip, /**< SCIP data structure */
2458 SCIP_VAR* var, /**< variable to change the bound for */
2459 SCIP_RATIONAL* newbound, /**< new value for bound */
2460 SCIP_CONS* infercons, /**< constraint that deduced the bound change */
2461 int inferinfo, /**< user information for inference to help resolving the conflict */
2462 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2463 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2464 );
2465
2466/** fixes variable in preprocessing or in the current node, if the new bound is tighter (w.r.t. bound strengthening
2467 * epsilon) than the current bound; if possible, adjusts bound to integral value; the given inference constraint is
2468 * stored, such that the conflict analysis is able to find out the reason for the deduction of the bound change
2469 *
2470 * @note In presolving stage when not in probing mode the variable will be fixed directly, otherwise this method
2471 * changes first the lowerbound by calling SCIPinferVarLbProp and second the upperbound by calling
2472 * SCIPinferVarUbProp
2473 *
2474 * @note If SCIP is in presolving stage, it can happen that the internal variable array (which get be accessed via
2475 * SCIPgetVars()) gets re-sorted.
2476 *
2477 * @note During presolving, an integer variable which bound changes to {0,1} is upgraded to a binary variable.
2478 */
2479SCIP_EXPORT
2481 SCIP* scip, /**< SCIP data structure */
2482 SCIP_VAR* var, /**< variable to change the bound for */
2483 SCIP_Real fixedval, /**< new value for fixation */
2484 SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2485 int inferinfo, /**< user information for inference to help resolving the conflict */
2486 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2487 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2488 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2489 );
2490
2491/** changes lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2492 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2493 * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2494 * for the deduction of the bound change
2495 *
2496 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2497 * SCIPgetVars()) gets re-sorted.
2498 *
2499 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2500 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2501 *
2502 * @pre This method can be called if @p scip is in one of the following stages:
2503 * - \ref SCIP_STAGE_PROBLEM
2504 * - \ref SCIP_STAGE_PRESOLVING
2505 * - \ref SCIP_STAGE_SOLVING
2506 *
2507 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2508 */
2509SCIP_EXPORT
2511 SCIP* scip, /**< SCIP data structure */
2512 SCIP_VAR* var, /**< variable to change the bound for */
2513 SCIP_Real newbound, /**< new value for bound */
2514 SCIP_PROP* inferprop, /**< propagator that deduced the bound change, or NULL */
2515 int inferinfo, /**< user information for inference to help resolving the conflict */
2516 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2517 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2518 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2519 );
2520
2521/** changes upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2522 * (w.r.t. bound strengthening epsilon) than the current bound; if possible, adjusts bound to integral value;
2523 * the given inference propagator is stored, such that the conflict analysis is able to find out the reason
2524 * for the deduction of the bound change
2525 *
2526 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2527 * SCIPgetVars()) gets re-sorted.
2528 *
2529 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2530 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2531 *
2532 * @pre This method can be called if @p scip is in one of the following stages:
2533 * - \ref SCIP_STAGE_PROBLEM
2534 * - \ref SCIP_STAGE_PRESOLVING
2535 * - \ref SCIP_STAGE_SOLVING
2536 *
2537 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2538 */
2539SCIP_EXPORT
2541 SCIP* scip, /**< SCIP data structure */
2542 SCIP_VAR* var, /**< variable to change the bound for */
2543 SCIP_Real newbound, /**< new value for bound */
2544 SCIP_PROP* inferprop, /**< propagator that deduced the bound change */
2545 int inferinfo, /**< user information for inference to help resolving the conflict */
2546 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2547 SCIP_Bool* infeasible, /**< pointer to store whether the bound change is infeasible */
2548 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2549 );
2550
2551/** depending on SCIP's stage, fixes binary variable in the problem, in preprocessing, or in current node;
2552 * the given inference propagator is stored, such that the conflict analysis is able to find out the reason for the
2553 * deduction of the fixing
2554 *
2555 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2556 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2557 *
2558 * @pre This method can be called if @p scip is in one of the following stages:
2559 * - \ref SCIP_STAGE_PROBLEM
2560 * - \ref SCIP_STAGE_PRESOLVING
2561 * - \ref SCIP_STAGE_PRESOLVED
2562 * - \ref SCIP_STAGE_SOLVING
2563 */
2564SCIP_EXPORT
2566 SCIP* scip, /**< SCIP data structure */
2567 SCIP_VAR* var, /**< binary variable to fix */
2568 SCIP_Bool fixedval, /**< value to fix binary variable to */
2569 SCIP_PROP* inferprop, /**< propagator that deduced the fixing */
2570 int inferinfo, /**< user information for inference to help resolving the conflict */
2571 SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
2572 SCIP_Bool* tightened /**< pointer to store whether the fixing tightened the local bounds, or NULL */
2573 );
2574
2575/** changes global lower bound of variable in preprocessing or in the current node, if the new bound is tighter
2576 * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2577 * also tightens the local bound, if the global bound is better than the local bound
2578 *
2579 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2580 * SCIPgetVars()) gets re-sorted.
2581 *
2582 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2583 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2584 *
2585 * @pre This method can be called if @p scip is in one of the following stages:
2586 * - \ref SCIP_STAGE_PROBLEM
2587 * - \ref SCIP_STAGE_TRANSFORMING
2588 * - \ref SCIP_STAGE_PRESOLVING
2589 * - \ref SCIP_STAGE_SOLVING
2590 *
2591 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2592 */
2593SCIP_EXPORT
2595 SCIP* scip, /**< SCIP data structure */
2596 SCIP_VAR* var, /**< variable to change the bound for */
2597 SCIP_Real newbound, /**< new value for bound */
2598 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2599 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2600 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2601 );
2602
2603/** changes global upper bound of variable in preprocessing or in the current node, if the new bound is tighter
2604 * (w.r.t. bound strengthening epsilon) than the current global bound; if possible, adjusts bound to integral value;
2605 * also tightens the local bound, if the global bound is better than the local bound
2606 *
2607 * @warning If SCIP is in presolving stage, it can happen that the internal variable array (which can be accessed via
2608 * SCIPgetVars()) gets re-sorted.
2609 *
2610 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2611 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2612 *
2613 * @pre This method can be called if @p scip is in one of the following stages:
2614 * - \ref SCIP_STAGE_PROBLEM
2615 * - \ref SCIP_STAGE_TRANSFORMING
2616 * - \ref SCIP_STAGE_PRESOLVING
2617 * - \ref SCIP_STAGE_SOLVING
2618 *
2619 * @note During presolving, an integer variable whose bound changes to {0,1} is upgraded to a binary variable.
2620 */
2621SCIP_EXPORT
2623 SCIP* scip, /**< SCIP data structure */
2624 SCIP_VAR* var, /**< variable to change the bound for */
2625 SCIP_Real newbound, /**< new value for bound */
2626 SCIP_Bool force, /**< force tightening even if below bound strengthening tolerance */
2627 SCIP_Bool* infeasible, /**< pointer to store whether the new domain is empty */
2628 SCIP_Bool* tightened /**< pointer to store whether the bound was tightened, or NULL */
2629 );
2630
2631/** for a multi-aggregated variable, returns the global lower bound computed by adding the global bounds from all aggregation variables
2632 *
2633 * 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
2634 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbGlobal.
2635 *
2636 * @return the global lower bound computed by adding the global bounds from all aggregation variables
2637 */
2638SCIP_EXPORT
2640 SCIP* scip, /**< SCIP data structure */
2641 SCIP_VAR* var /**< variable to compute the bound for */
2642 );
2643
2644/** for a multi-aggregated variable, returns the global upper bound computed by adding the global bounds from all aggregation variables
2645 *
2646 * 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
2647 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbGlobal.
2648 *
2649 * @return the global upper bound computed by adding the global bounds from all aggregation variables
2650 */
2651SCIP_EXPORT
2653 SCIP* scip, /**< SCIP data structure */
2654 SCIP_VAR* var /**< variable to compute the bound for */
2655 );
2656
2657/** for a multi-aggregated variable, returns the local lower bound computed by adding the local bounds from all aggregation variables
2658 *
2659 * 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
2660 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbLocal.
2661 *
2662 * @return the local lower bound computed by adding the global bounds from all aggregation variables
2663 */
2664SCIP_EXPORT
2666 SCIP* scip, /**< SCIP data structure */
2667 SCIP_VAR* var /**< variable to compute the bound for */
2668 );
2669
2670/** for a multi-aggregated variable, returns the local lower bound computed by adding the local bounds from all aggregation variables
2671 *
2672 * 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
2673 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetLbLocal.
2674 *
2675 * @return the local lower bound computed by adding the global bounds from all aggregation variables
2676 */
2677SCIP_EXPORT
2679 SCIP* scip, /**< SCIP data structure */
2680 SCIP_VAR* var, /**< variable to compute the bound for */
2681 SCIP_RATIONAL* result /**< rational to store the resulting bound */
2682 );
2683
2684/** for a multi-aggregated variable, returns the local upper bound computed by adding the local bounds from all aggregation variables
2685 *
2686 * 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
2687 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbLocal.
2688 *
2689 * @return the local upper bound computed by adding the global bounds from all aggregation variables
2690 */
2691SCIP_EXPORT
2693 SCIP* scip, /**< SCIP data structure */
2694 SCIP_VAR* var /**< variable to compute the bound for */
2695 );
2696
2697/** for a multi-aggregated variable, returns the local upper bound computed by adding the local bounds from all aggregation variables
2698 *
2699 * 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
2700 * calling this function for a non-multi-aggregated variable results in a call to SCIPvarGetUbLocal.
2701 *
2702 * @return the local upper bound computed by adding the global bounds from all aggregation variables
2703 */
2704SCIP_EXPORT
2706 SCIP* scip, /**< SCIP data structure */
2707 SCIP_VAR* var, /**< variable to compute the bound for */
2708 SCIP_RATIONAL* result /**< rational to store the resulting bound */
2709 );
2710
2711/** for a multi-aggregated variable, gives the global lower bound computed by adding the global bounds from all
2712 * aggregation variables, this global bound may be tighter than the one given by SCIPvarGetLbGlobal, since the latter is
2713 * not updated if bounds of aggregation variables are changing
2714 *
2715 * calling this function for a non-multi-aggregated variable is not allowed
2716 */
2717SCIP_EXPORT
2719 SCIP* scip, /**< SCIP data structure */
2720 SCIP_VAR* var /**< variable to compute the bound for */
2721 );
2722
2723/** for a multi-aggregated variable, gives the global upper bound computed by adding the global bounds from all
2724 * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbGlobal, since the latter is
2725 * not updated if bounds of aggregation variables are changing
2726 *
2727 * calling this function for a non-multi-aggregated variable is not allowed
2728 */
2729SCIP_EXPORT
2731 SCIP* scip, /**< SCIP data structure */
2732 SCIP_VAR* var /**< variable to compute the bound for */
2733 );
2734
2735/** for a multi-aggregated variable, gives the local lower bound computed by adding the local bounds from all
2736 * aggregation variables, this lower bound may be tighter than the one given by SCIPvarGetLbLocal, since the latter is
2737 * not updated if bounds of aggregation variables are changing
2738 *
2739 * calling this function for a non-multi-aggregated variable is not allowed
2740 */
2741SCIP_EXPORT
2743 SCIP* scip, /**< SCIP data structure */
2744 SCIP_VAR* var /**< variable to compute the bound for */
2745 );
2746
2747/** for a multi-aggregated variable, gives the local upper bound computed by adding the local bounds from all
2748 * aggregation variables, this upper bound may be tighter than the one given by SCIPvarGetUbLocal, since the latter is
2749 * not updated if bounds of aggregation variables are changing
2750 *
2751 * calling this function for a non-multi-aggregated variable is not allowed
2752 */
2753SCIP_EXPORT
2755 SCIP* scip, /**< SCIP data structure */
2756 SCIP_VAR* var /**< variable to compute the bound for */
2757 );
2758
2759#ifdef NDEBUG
2760
2761/* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
2762 * speed up the algorithms.
2763 */
2764
2765#define SCIPcomputeVarLbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbGlobal(scip, var) : SCIPvarGetLbGlobal(var))
2766#define SCIPcomputeVarUbGlobal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbGlobal(scip, var) : SCIPvarGetUbGlobal(var))
2767#define SCIPcomputeVarLbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrLbLocal(scip, var) : SCIPvarGetLbLocal(var))
2768#define SCIPcomputeVarUbLocal(scip, var) (SCIPvarGetStatus(var) == SCIP_VARSTATUS_MULTAGGR ? SCIPgetVarMultaggrUbLocal(scip, var) : SCIPvarGetUbLocal(var))
2769
2770#endif
2771
2772/** returns solution value and index of variable lower bound that is closest to the variable's value in the given primal
2773 * solution or current LP solution if no primal solution is given; returns an index of -1 if no variable lower bound is
2774 * available
2775 *
2776 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2777 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2778 *
2779 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2780 */
2781SCIP_EXPORT
2783 SCIP* scip, /**< SCIP data structure */
2784 SCIP_VAR* var, /**< active problem variable */
2785 SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2786 SCIP_Real* closestvlb, /**< pointer to store the value of the closest variable lower bound */
2787 int* closestvlbidx /**< pointer to store the index of the closest variable lower bound */
2788 );
2789
2790/** returns solution value and index of variable upper bound that is closest to the variable's value in the given primal solution;
2791 * or current LP solution if no primal solution is given; returns an index of -1 if no variable upper bound is available
2792 *
2793 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2794 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2795 *
2796 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
2797 */
2798SCIP_EXPORT
2800 SCIP* scip, /**< SCIP data structure */
2801 SCIP_VAR* var, /**< active problem variable */
2802 SCIP_SOL* sol, /**< primal solution, or NULL for LP solution */
2803 SCIP_Real* closestvub, /**< pointer to store the value of the closest variable lower bound */
2804 int* closestvubidx /**< pointer to store the index of the closest variable lower bound */
2805 );
2806
2807/** informs variable x about a globally valid variable lower bound x >= b*z + d with integer variable z;
2808 * if z is binary, the corresponding valid implication for z is also added;
2809 * if z is non-continuous and 1/b not too small, the corresponding valid upper/lower bound
2810 * z <= (x-d)/b or z >= (x-d)/b (depending on the sign of of b) is added, too;
2811 * improves the global bounds of the variable and the vlb variable if possible
2812 *
2813 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2814 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2815 *
2816 * @pre This method can be called if @p scip is in one of the following stages:
2817 * - \ref SCIP_STAGE_PRESOLVING
2818 * - \ref SCIP_STAGE_PRESOLVED
2819 * - \ref SCIP_STAGE_SOLVING
2820 */
2821SCIP_EXPORT
2823 SCIP* scip, /**< SCIP data structure */
2824 SCIP_VAR* var, /**< problem variable */
2825 SCIP_VAR* vlbvar, /**< variable z in x >= b*z + d */
2826 SCIP_Real vlbcoef, /**< coefficient b in x >= b*z + d */
2827 SCIP_Real vlbconstant, /**< constant d in x >= b*z + d */
2828 SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2829 int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2830 );
2831
2832
2833/** informs variable x about a globally valid variable upper bound x <= b*z + d with integer variable z;
2834 * if z is binary, the corresponding valid implication for z is also added;
2835 * if z is non-continuous and 1/b not too small, the corresponding valid lower/upper bound
2836 * z >= (x-d)/b or z <= (x-d)/b (depending on the sign of of b) is added, too;
2837 * improves the global bounds of the variable and the vlb variable if possible
2838 *
2839 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2840 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2841 *
2842 * @pre This method can be called if @p scip is in one of the following stages:
2843 * - \ref SCIP_STAGE_PRESOLVING
2844 * - \ref SCIP_STAGE_PRESOLVED
2845 * - \ref SCIP_STAGE_SOLVING
2846 */
2847SCIP_EXPORT
2849 SCIP* scip, /**< SCIP data structure */
2850 SCIP_VAR* var, /**< problem variable */
2851 SCIP_VAR* vubvar, /**< variable z in x <= b*z + d */
2852 SCIP_Real vubcoef, /**< coefficient b in x <= b*z + d */
2853 SCIP_Real vubconstant, /**< constant d in x <= b*z + d */
2854 SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2855 int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2856 );
2857
2858/** informs binary variable x about a globally valid implication: x == 0 or x == 1 ==> y <= b or y >= b;
2859 * also adds the corresponding implication or variable bound to the implied variable;
2860 * if the implication is conflicting, the variable is fixed to the opposite value;
2861 * if the variable is already fixed to the given value, the implication is performed immediately;
2862 * if the implication is redundant with respect to the variables' global bounds, it is ignored
2863 *
2864 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2865 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2866 *
2867 * @pre This method can be called if @p scip is in one of the following stages:
2868 * - \ref SCIP_STAGE_TRANSFORMED
2869 * - \ref SCIP_STAGE_PRESOLVING
2870 * - \ref SCIP_STAGE_PRESOLVED
2871 * - \ref SCIP_STAGE_SOLVING
2872 */
2873SCIP_EXPORT
2875 SCIP* scip, /**< SCIP data structure */
2876 SCIP_VAR* var, /**< problem variable */
2877 SCIP_Bool varfixing, /**< FALSE if y should be added in implications for x == 0, TRUE for x == 1 */
2878 SCIP_VAR* implvar, /**< variable y in implication y <= b or y >= b */
2879 SCIP_BOUNDTYPE impltype, /**< type of implication y <= b (SCIP_BOUNDTYPE_UPPER)
2880 * or y >= b (SCIP_BOUNDTYPE_LOWER) */
2881 SCIP_Real implbound, /**< bound b in implication y <= b or y >= b */
2882 SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2883 int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2884 );
2885
2886/** adds a clique information to SCIP, stating that at most one of the given binary variables can be set to 1;
2887 * if a variable appears twice in the same clique, the corresponding implications are performed
2888 *
2889 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2890 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2891 *
2892 * @pre This method can be called if @p scip is in one of the following stages:
2893 * - \ref SCIP_STAGE_TRANSFORMED
2894 * - \ref SCIP_STAGE_PRESOLVING
2895 * - \ref SCIP_STAGE_PRESOLVED
2896 * - \ref SCIP_STAGE_SOLVING
2897 */
2898SCIP_EXPORT
2900 SCIP* scip, /**< SCIP data structure */
2901 SCIP_VAR** vars, /**< binary variables in the clique from which at most one can be set to 1 */
2902 SCIP_Bool* values, /**< values of the variables in the clique; NULL to use TRUE for all vars */
2903 int nvars, /**< number of variables in the clique */
2904 SCIP_Bool isequation, /**< is the clique an equation or an inequality? */
2905 SCIP_Bool* infeasible, /**< pointer to store whether an infeasibility was detected */
2906 int* nbdchgs /**< pointer to store the number of performed bound changes, or NULL */
2907 );
2908
2909/** calculates a partition of the given set of binary variables into cliques; takes into account independent clique components
2910 *
2911 * The algorithm performs the following steps:
2912 * - recomputes connected components of the clique table, if necessary
2913 * - computes a clique partition for every connected component greedily.
2914 * - relabels the resulting clique partition such that it satisfies the description below
2915 *
2916 * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2917 * were assigned to the same clique;
2918 * the first variable is always assigned to clique 0, and a variable can only be assigned to clique i if at least one of
2919 * the preceding variables was assigned to clique i-1;
2920 * for each clique at most 1 variables can be set to TRUE in a feasible solution;
2921 *
2922 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2923 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2924 *
2925 * @pre This method can be called if @p scip is in one of the following stages:
2926 * - \ref SCIP_STAGE_INITPRESOLVE
2927 * - \ref SCIP_STAGE_PRESOLVING
2928 * - \ref SCIP_STAGE_EXITPRESOLVE
2929 * - \ref SCIP_STAGE_PRESOLVED
2930 * - \ref SCIP_STAGE_SOLVING
2931 */
2932SCIP_EXPORT
2934 SCIP* scip, /**< SCIP data structure */
2935 SCIP_VAR** vars, /**< binary variables in the clique from which at most one can be set to 1 */
2936 int nvars, /**< number of variables in the clique */
2937 int** probtoidxmap, /**< cleared memory array with default values -1 */
2938 int* probtoidxmapsize, /**< returns size of probtoidxmap */
2939 int* cliquepartition, /**< array of length nvars to store the clique partition */
2940 int* ncliques /**< pointer to store the number of cliques actually contained in the partition */
2941 );
2942
2943/** calculates a partition of the given set of binary variables into negated cliques;
2944 * afterwards the output array contains one value for each variable, such that two variables got the same value iff they
2945 * were assigned to the same negated clique;
2946 * the first variable is always assigned to clique 0 and a variable can only be assigned to clique i if at least one of
2947 * the preceding variables was assigned to clique i-1;
2948 * for each clique with n_c variables at least n_c-1 variables can be set to TRUE in a feasible solution;
2949 *
2950 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
2951 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
2952 *
2953 * @pre This method can be called if @p scip is in one of the following stages:
2954 * - \ref SCIP_STAGE_INITPRESOLVE
2955 * - \ref SCIP_STAGE_PRESOLVING
2956 * - \ref SCIP_STAGE_EXITPRESOLVE
2957 * - \ref SCIP_STAGE_PRESOLVED
2958 * - \ref SCIP_STAGE_SOLVING
2959 */
2960SCIP_EXPORT
2962 SCIP* scip, /**< SCIP data structure */
2963 SCIP_VAR** vars, /**< binary variables in the clique from which at most one can be set to 1 */
2964 int nvars, /**< number of variables in the clique */
2965 int** probtoidxmap, /**< cleared memory array with default values -1 */
2966 int* probtoidxmapsize, /**< returns size of probtoidxmap */
2967 int* cliquepartition, /**< array of length nvars to store the clique partition */
2968 int* ncliques /**< pointer to store the number of cliques actually contained in the partition */
2969 );
2970
2971/** force SCIP to clean up all cliques; cliques do not get automatically cleaned up after presolving. Use
2972 * this method to prevent inactive variables in cliques when retrieved via SCIPgetCliques()
2973 *
2974 * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
2975 *
2976 * @pre This method can be called if @p scip is in one of the following stages:
2977 * - \ref SCIP_STAGE_TRANSFORMED
2978 * - \ref SCIP_STAGE_INITPRESOLVE
2979 * - \ref SCIP_STAGE_PRESOLVING
2980 * - \ref SCIP_STAGE_EXITPRESOLVE
2981 * - \ref SCIP_STAGE_PRESOLVED
2982 * - \ref SCIP_STAGE_INITSOLVE
2983 * - \ref SCIP_STAGE_SOLVING
2984 * - \ref SCIP_STAGE_SOLVED
2985 * - \ref SCIP_STAGE_EXITSOLVE
2986 */
2987SCIP_EXPORT
2989 SCIP* scip, /**< SCIP data structure */
2990 SCIP_Bool* infeasible /**< pointer to store if cleanup detected infeasibility */
2991 );
2992
2993/** gets the number of cliques in the clique table
2994 *
2995 * @return number of cliques in the clique table
2996 *
2997 * @pre This method can be called if @p scip is in one of the following stages:
2998 * - \ref SCIP_STAGE_TRANSFORMED
2999 * - \ref SCIP_STAGE_INITPRESOLVE
3000 * - \ref SCIP_STAGE_PRESOLVING
3001 * - \ref SCIP_STAGE_EXITPRESOLVE
3002 * - \ref SCIP_STAGE_PRESOLVED
3003 * - \ref SCIP_STAGE_INITSOLVE
3004 * - \ref SCIP_STAGE_SOLVING
3005 * - \ref SCIP_STAGE_SOLVED
3006 * - \ref SCIP_STAGE_EXITSOLVE
3007 */
3008SCIP_EXPORT
3009int SCIPgetNCliques(
3010 SCIP* scip /**< SCIP data structure */
3011 );
3012
3013/** gets the number of cliques created so far by the cliquetable
3014 *
3015 * @return number of cliques created so far by the cliquetable
3016 *
3017 * @pre This method can be called if @p scip is in one of the following stages:
3018 * - \ref SCIP_STAGE_TRANSFORMED
3019 * - \ref SCIP_STAGE_INITPRESOLVE
3020 * - \ref SCIP_STAGE_PRESOLVING
3021 * - \ref SCIP_STAGE_EXITPRESOLVE
3022 * - \ref SCIP_STAGE_PRESOLVED
3023 * - \ref SCIP_STAGE_INITSOLVE
3024 * - \ref SCIP_STAGE_SOLVING
3025 * - \ref SCIP_STAGE_SOLVED
3026 * - \ref SCIP_STAGE_EXITSOLVE
3027 */
3028SCIP_EXPORT
3030 SCIP* scip /**< SCIP data structure */
3031 );
3032
3033/** gets the array of cliques in the clique table
3034 *
3035 * @return array of cliques in the clique table
3036 *
3037 * @pre This method can be called if @p scip is in one of the following stages:
3038 * - \ref SCIP_STAGE_TRANSFORMED
3039 * - \ref SCIP_STAGE_INITPRESOLVE
3040 * - \ref SCIP_STAGE_PRESOLVING
3041 * - \ref SCIP_STAGE_EXITPRESOLVE
3042 * - \ref SCIP_STAGE_PRESOLVED
3043 * - \ref SCIP_STAGE_INITSOLVE
3044 * - \ref SCIP_STAGE_SOLVING
3045 * - \ref SCIP_STAGE_SOLVED
3046 * - \ref SCIP_STAGE_EXITSOLVE
3047 */
3048SCIP_EXPORT
3050 SCIP* scip /**< SCIP data structure */
3051 );
3052
3053/** returns whether there is a clique that contains both given variable/value pairs;
3054 * the variables must be active binary variables;
3055 * if regardimplics is FALSE, only the cliques in the clique table are looked at;
3056 * if regardimplics is TRUE, both the cliques and the implications of the implication graph are regarded
3057 *
3058 * @return TRUE, if there is a clique that contains both variable/clique pairs; FALSE, otherwise
3059 *
3060 * @pre This method can be called if @p scip is in one of the following stages:
3061 * - \ref SCIP_STAGE_TRANSFORMED
3062 * - \ref SCIP_STAGE_INITPRESOLVE
3063 * - \ref SCIP_STAGE_PRESOLVING
3064 * - \ref SCIP_STAGE_EXITPRESOLVE
3065 * - \ref SCIP_STAGE_PRESOLVED
3066 * - \ref SCIP_STAGE_INITSOLVE
3067 * - \ref SCIP_STAGE_SOLVING
3068 * - \ref SCIP_STAGE_SOLVED
3069 * - \ref SCIP_STAGE_EXITSOLVE
3070 *
3071 * @note a variable with it's negated variable are NOT! in a clique
3072 * @note a variable with itself are in a clique
3073 */
3074SCIP_EXPORT
3076 SCIP* scip, /**< SCIP data structure */
3077 SCIP_VAR* var1, /**< first variable */
3078 SCIP_Bool value1, /**< value of first variable */
3079 SCIP_VAR* var2, /**< second variable */
3080 SCIP_Bool value2, /**< value of second variable */
3081 SCIP_Bool regardimplics /**< should the implication graph also be searched for a clique? */
3082 );
3083
3084/** writes the clique graph to a gml file
3085 *
3086 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3087 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3088 *
3089 * @pre This method can be called if @p scip is in one of the following stages:
3090 * - \ref SCIP_STAGE_TRANSFORMED
3091 * - \ref SCIP_STAGE_INITPRESOLVE
3092 * - \ref SCIP_STAGE_PRESOLVING
3093 * - \ref SCIP_STAGE_EXITPRESOLVE
3094 * - \ref SCIP_STAGE_PRESOLVED
3095 * - \ref SCIP_STAGE_INITSOLVE
3096 * - \ref SCIP_STAGE_SOLVING
3097 * - \ref SCIP_STAGE_SOLVED
3098 * - \ref SCIP_STAGE_EXITSOLVE
3099 *
3100 * @note there can be duplicated arcs in the output file
3101 *
3102 * If @p writenodeweights is true, only nodes corresponding to variables that have a fractional value and only edges
3103 * between such nodes are written.
3104 */
3105SCIP_EXPORT
3107 SCIP* scip, /**< SCIP data structure */
3108 const char* fname, /**< name of file */
3109 SCIP_Bool writenodeweights /**< should we write weights of nodes? */
3110 );
3111
3112/** Removes (irrelevant) variable from all its global structures, i.e. cliques, implications and variable bounds.
3113 * This is an advanced method which should be used with care.
3114 *
3115 * @return SCIP_OKAY if everything worked, otherwise a suitable error code is passed
3116 *
3117 * @pre This method can be called if @p scip is in one of the following stages:
3118 * - \ref SCIP_STAGE_TRANSFORMED
3119 * - \ref SCIP_STAGE_INITPRESOLVE
3120 * - \ref SCIP_STAGE_PRESOLVING
3121 * - \ref SCIP_STAGE_EXITPRESOLVE
3122 * - \ref SCIP_STAGE_PRESOLVED
3123 * - \ref SCIP_STAGE_INITSOLVE
3124 * - \ref SCIP_STAGE_SOLVING
3125 * - \ref SCIP_STAGE_SOLVED
3126 * - \ref SCIP_STAGE_EXITSOLVE
3127 */
3128SCIP_EXPORT
3130 SCIP* scip, /**< SCIP data structure */
3131 SCIP_VAR* var /**< variable to remove from global structures */
3132 );
3133
3134/** sets the branch factor of the variable; this value can be used in the branching methods to scale the score
3135 * values of the variables; higher factor leads to a higher probability that this variable is chosen for branching
3136 *
3137 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3138 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3139 *
3140 * @pre This method can be called if @p scip is in one of the following stages:
3141 * - \ref SCIP_STAGE_PROBLEM
3142 * - \ref SCIP_STAGE_TRANSFORMING
3143 * - \ref SCIP_STAGE_TRANSFORMED
3144 * - \ref SCIP_STAGE_INITPRESOLVE
3145 * - \ref SCIP_STAGE_PRESOLVING
3146 * - \ref SCIP_STAGE_EXITPRESOLVE
3147 * - \ref SCIP_STAGE_PRESOLVED
3148 * - \ref SCIP_STAGE_SOLVING
3149 */
3150SCIP_EXPORT
3152 SCIP* scip, /**< SCIP data structure */
3153 SCIP_VAR* var, /**< problem variable */
3154 SCIP_Real branchfactor /**< factor to weigh variable's branching score with */
3155 );
3156
3157/** scales the branch factor of the variable with the given value
3158 *
3159 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3160 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3161 *
3162 * @pre This method can be called if @p scip is in one of the following stages:
3163 * - \ref SCIP_STAGE_PROBLEM
3164 * - \ref SCIP_STAGE_TRANSFORMING
3165 * - \ref SCIP_STAGE_TRANSFORMED
3166 * - \ref SCIP_STAGE_INITPRESOLVE
3167 * - \ref SCIP_STAGE_PRESOLVING
3168 * - \ref SCIP_STAGE_EXITPRESOLVE
3169 * - \ref SCIP_STAGE_PRESOLVED
3170 * - \ref SCIP_STAGE_SOLVING
3171 */
3172SCIP_EXPORT
3174 SCIP* scip, /**< SCIP data structure */
3175 SCIP_VAR* var, /**< problem variable */
3176 SCIP_Real scale /**< factor to scale variable's branching factor with */
3177 );
3178
3179/** adds the given value to the branch factor of the variable
3180 *
3181 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3182 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3183 *
3184 * @pre This method can be called if @p scip is in one of the following stages:
3185 * - \ref SCIP_STAGE_PROBLEM
3186 * - \ref SCIP_STAGE_TRANSFORMING
3187 * - \ref SCIP_STAGE_TRANSFORMED
3188 * - \ref SCIP_STAGE_INITPRESOLVE
3189 * - \ref SCIP_STAGE_PRESOLVING
3190 * - \ref SCIP_STAGE_EXITPRESOLVE
3191 * - \ref SCIP_STAGE_PRESOLVED
3192 * - \ref SCIP_STAGE_SOLVING
3193 */
3194SCIP_EXPORT
3196 SCIP* scip, /**< SCIP data structure */
3197 SCIP_VAR* var, /**< problem variable */
3198 SCIP_Real addfactor /**< value to add to the branch factor of the variable */
3199 );
3200
3201/** sets the branch priority of the variable; variables with higher branch priority are always preferred to variables
3202 * with lower priority in selection of branching variable
3203 *
3204 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3205 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3206 *
3207 * @pre This method can be called if @p scip is in one of the following stages:
3208 * - \ref SCIP_STAGE_PROBLEM
3209 * - \ref SCIP_STAGE_TRANSFORMING
3210 * - \ref SCIP_STAGE_TRANSFORMED
3211 * - \ref SCIP_STAGE_INITPRESOLVE
3212 * - \ref SCIP_STAGE_PRESOLVING
3213 * - \ref SCIP_STAGE_EXITPRESOLVE
3214 * - \ref SCIP_STAGE_PRESOLVED
3215 * - \ref SCIP_STAGE_SOLVING
3216 *
3217 * @note the default branching priority is 0
3218 */
3219SCIP_EXPORT
3221 SCIP* scip, /**< SCIP data structure */
3222 SCIP_VAR* var, /**< problem variable */
3223 int branchpriority /**< branch priority of the variable */
3224 );
3225
3226/** changes the branch priority of the variable to the given value, if it is larger than the current priority
3227 *
3228 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3229 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3230 *
3231 * @pre This method can be called if @p scip is in one of the following stages:
3232 * - \ref SCIP_STAGE_PROBLEM
3233 * - \ref SCIP_STAGE_TRANSFORMING
3234 * - \ref SCIP_STAGE_TRANSFORMED
3235 * - \ref SCIP_STAGE_INITPRESOLVE
3236 * - \ref SCIP_STAGE_PRESOLVING
3237 * - \ref SCIP_STAGE_EXITPRESOLVE
3238 * - \ref SCIP_STAGE_PRESOLVED
3239 * - \ref SCIP_STAGE_SOLVING
3240 */
3241SCIP_EXPORT
3243 SCIP* scip, /**< SCIP data structure */
3244 SCIP_VAR* var, /**< problem variable */
3245 int branchpriority /**< new branch priority of the variable, if it is larger than current priority */
3246 );
3247
3248/** adds the given value to the branch priority of the variable
3249 *
3250 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3251 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3252 *
3253 * @pre This method can be called if @p scip is in one of the following stages:
3254 * - \ref SCIP_STAGE_PROBLEM
3255 * - \ref SCIP_STAGE_TRANSFORMING
3256 * - \ref SCIP_STAGE_TRANSFORMED
3257 * - \ref SCIP_STAGE_INITPRESOLVE
3258 * - \ref SCIP_STAGE_PRESOLVING
3259 * - \ref SCIP_STAGE_EXITPRESOLVE
3260 * - \ref SCIP_STAGE_PRESOLVED
3261 * - \ref SCIP_STAGE_SOLVING
3262 */
3263SCIP_EXPORT
3265 SCIP* scip, /**< SCIP data structure */
3266 SCIP_VAR* var, /**< problem variable */
3267 int addpriority /**< value to add to the branch priority of the variable */
3268 );
3269
3270/** sets the branch direction of the variable (-1: prefer downwards branch, 0: automatic selection, +1: prefer upwards
3271 * branch)
3272 *
3273 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3274 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3275 *
3276 * @pre This method can be called if @p scip is in one of the following stages:
3277 * - \ref SCIP_STAGE_PROBLEM
3278 * - \ref SCIP_STAGE_TRANSFORMING
3279 * - \ref SCIP_STAGE_TRANSFORMED
3280 * - \ref SCIP_STAGE_INITPRESOLVE
3281 * - \ref SCIP_STAGE_PRESOLVING
3282 * - \ref SCIP_STAGE_EXITPRESOLVE
3283 * - \ref SCIP_STAGE_PRESOLVED
3284 * - \ref SCIP_STAGE_SOLVING
3285 */
3286SCIP_EXPORT
3288 SCIP* scip, /**< SCIP data structure */
3289 SCIP_VAR* var, /**< problem variable */
3290 SCIP_BRANCHDIR branchdirection /**< preferred branch direction of the variable (downwards, upwards, auto) */
3291 );
3292
3293/** changes type of variable in the problem;
3294 *
3295 * @warning This type change might change the variable array returned from SCIPgetVars() and SCIPgetVarsData();
3296 *
3297 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3298 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3299 *
3300 * @pre This method can be called if @p scip is in one of the following stages:
3301 * - \ref SCIP_STAGE_PROBLEM
3302 * - \ref SCIP_STAGE_TRANSFORMING
3303 * - \ref SCIP_STAGE_PRESOLVING
3304 *
3305 * @note If SCIP is already beyond the SCIP_STAGE_PROBLEM and a original variable is passed, the variable type of the
3306 * corresponding transformed variable is changed; the type of the original variable does not change
3307 *
3308 * @note If the type changes from a continuous variable to a non-continuous variable the bounds of the variable get
3309 * adjusted w.r.t. to integrality information
3310 */
3311SCIP_EXPORT
3313 SCIP* scip, /**< SCIP data structure */
3314 SCIP_VAR* var, /**< variable to change the type for */
3315 SCIP_VARTYPE vartype, /**< new type of variable */
3316 SCIP_Bool* infeasible /**< pointer to store whether an infeasibility was detected (, due to
3317 * integrality condition of the new variable type) */
3318 );
3319
3320/** changes implied integral type of variable in the problem
3321 *
3322 * @warning This type change might change the variable array returned from SCIPgetVars() and SCIPgetVarsData();
3323 *
3324 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3325 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3326 *
3327 * @pre This method can be called if @p scip is in one of the following stages:
3328 * - \ref SCIP_STAGE_PROBLEM
3329 * - \ref SCIP_STAGE_TRANSFORMING
3330 * - \ref SCIP_STAGE_PRESOLVING
3331 *
3332 * @note If SCIP is already beyond the SCIP_STAGE_PROBLEM and a original variable is passed, the implied integral type of the
3333 * corresponding transformed variable is changed; the type of the original variable does not change
3334 *
3335 * @note If the implied integral type is adjusted to weak or strong for a continuous variable, the bounds of the variable get
3336 * adjusted w.r.t. to integrality information
3337 */
3338SCIP_EXPORT
3340 SCIP* scip, /**< SCIP data structure */
3341 SCIP_VAR* var, /**< variable to change the type for */
3342 SCIP_IMPLINTTYPE impltype, /**< New implied integral type of the variable */
3343 SCIP_Bool* infeasible /**< pointer to store whether an infeasibility was detected (due to
3344 * integrality condition for the new variable type) */
3345 );
3346
3347/** in problem creation and solving stage, both bounds of the variable are set to the given value;
3348 * in presolving stage, the variable is converted into a fixed variable, and bounds are changed respectively;
3349 * conversion into a fixed variable changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
3350 * and also renders arrays returned from the SCIPvarGetImpl...() methods invalid
3351 *
3352 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3353 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3354 *
3355 * @pre This method can be called if @p scip is in one of the following stages:
3356 * - \ref SCIP_STAGE_PROBLEM
3357 * - \ref SCIP_STAGE_PRESOLVING
3358 * - \ref SCIP_STAGE_SOLVING
3359 */
3360SCIP_EXPORT
3362 SCIP* scip, /**< SCIP data structure */
3363 SCIP_VAR* var, /**< variable to fix */
3364 SCIP_Real fixedval, /**< value to fix variable to */
3365 SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
3366 SCIP_Bool* fixed /**< pointer to store whether the fixing was performed (variable was unfixed) */
3367 );
3368
3369/** in problem creation and solving stage, both bounds of the variable are set to the given value;
3370 * in presolving stage, the variable is converted into a fixed variable, and bounds are changed respectively;
3371 * conversion into a fixed variable changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
3372 * and also renders arrays returned from the SCIPvarGetImpl...() methods invalid
3373 *
3374 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3375 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3376 *
3377 * @pre This method can be called if @p scip is in one of the following stages:
3378 * - \ref SCIP_STAGE_PROBLEM
3379 * - \ref SCIP_STAGE_PRESOLVING
3380 * - \ref SCIP_STAGE_SOLVING
3381 */
3382SCIP_EXPORT
3384 SCIP* scip, /**< SCIP data structure */
3385 SCIP_VAR* var, /**< variable to fix */
3386 SCIP_RATIONAL* fixedval, /**< value to fix variable to */
3387 SCIP_Bool* infeasible, /**< pointer to store whether the fixing is infeasible */
3388 SCIP_Bool* fixed /**< pointer to store whether the fixing was performed (variable was unfixed) */
3389 );
3390
3391/** From a given equality a*x + b*y == c, aggregates one of the variables and removes it from the set of
3392 * active problem variables. This changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
3393 * and also renders the arrays returned from the SCIPvarGetImpl...() methods for the two variables invalid.
3394 * In the first step, the equality is transformed into an equality with active problem variables
3395 * a'*x' + b'*y' == c'. If x' == y', this leads to the detection of redundancy if a' == -b' and c' == 0,
3396 * of infeasibility, if a' == -b' and c' != 0, or to a variable fixing x' == c'/(a'+b') (and possible
3397 * infeasibility) otherwise.
3398 * In the second step, the variable to be aggregated is chosen among x' and y', prefering a less strict variable
3399 * type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers
3400 * over integers, and integers over binaries). If none of the variables is continuous, it is tried to find an integer
3401 * aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to
3402 * the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by
3403 * aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
3404 *
3405 * The output flags have the following meaning:
3406 * - infeasible: the problem is infeasible
3407 * - redundant: the equality can be deleted from the constraint set
3408 * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
3409 *
3410 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3411 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3412 *
3413 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
3414 */
3415SCIP_EXPORT
3417 SCIP* scip, /**< SCIP data structure */
3418 SCIP_VAR* varx, /**< variable x in equality a*x + b*y == c */
3419 SCIP_VAR* vary, /**< variable y in equality a*x + b*y == c */
3420 SCIP_Real scalarx, /**< multiplier a in equality a*x + b*y == c */
3421 SCIP_Real scalary, /**< multiplier b in equality a*x + b*y == c */
3422 SCIP_Real rhs, /**< right hand side c in equality a*x + b*y == c */
3423 SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
3424 SCIP_Bool* redundant, /**< pointer to store whether the equality is (now) redundant */
3425 SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
3426 );
3427
3428/** From a given equality a*x + b*y == c, aggregates one of the variables and removes it from the set of
3429 * active problem variables. This changes the vars array returned from SCIPgetVars() and SCIPgetVarsData(),
3430 * and also renders the arrays returned from the SCIPvarGetImpl...() methods for the two variables invalid.
3431 * In the first step, the equality is transformed into an equality with active problem variables
3432 * a'*x' + b'*y' == c'. If x' == y', this leads to the detection of redundancy if a' == -b' and c' == 0,
3433 * of infeasibility, if a' == -b' and c' != 0, or to a variable fixing x' == c'/(a'+b') (and possible
3434 * infeasibility) otherwise.
3435 * In the second step, the variable to be aggregated is chosen among x' and y', prefering a less strict variable
3436 * type as aggregation variable (i.e. continuous variables are preferred over implicit integers, implicit integers
3437 * over integers, and integers over binaries). If none of the variables is continuous, it is tried to find an integer
3438 * aggregation (i.e. integral coefficients a'' and b'', such that a''*x' + b''*y' == c''). This can lead to
3439 * the detection of infeasibility (e.g. if c'' is fractional), or to a rejection of the aggregation (denoted by
3440 * aggregated == FALSE), if the resulting integer coefficients are too large and thus numerically instable.
3441 *
3442 * The output flags have the following meaning:
3443 * - infeasible: the problem is infeasible
3444 * - redundant: the equality can be deleted from the constraint set
3445 * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
3446 *
3447 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3448 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3449 *
3450 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
3451 */
3452SCIP_EXPORT
3454 SCIP* scip, /**< SCIP data structure */
3455 SCIP_VAR* varx, /**< variable x in equality a*x + b*y == c */
3456 SCIP_VAR* vary, /**< variable y in equality a*x + b*y == c */
3457 SCIP_RATIONAL* scalarx, /**< multiplier a in equality a*x + b*y == c */
3458 SCIP_RATIONAL* scalary, /**< multiplier b in equality a*x + b*y == c */
3459 SCIP_RATIONAL* rhs, /**< right hand side c in equality a*x + b*y == c */
3460 SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
3461 SCIP_Bool* redundant, /**< pointer to store whether the equality is (now) redundant */
3462 SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
3463 );
3464
3465/** converts variable into multi-aggregated variable; this changes the variable array returned from
3466 * SCIPgetVars() and SCIPgetVarsData();
3467 *
3468 * @warning The integrality condition is not checked anymore on the multi-aggregated variable. You must not
3469 * multi-aggregate an integer variable without being sure, that integrality on the aggregation variables
3470 * implies integrality on the aggregated variable.
3471 *
3472 * The output flags have the following meaning:
3473 * - infeasible: the problem is infeasible
3474 * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
3475 *
3476 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3477 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3478 *
3479 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
3480 */
3481SCIP_EXPORT
3483 SCIP* scip, /**< SCIP data structure */
3484 SCIP_VAR* var, /**< variable x to aggregate */
3485 int naggvars, /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3486 SCIP_VAR** aggvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3487 SCIP_Real* scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3488 SCIP_Real constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3489 SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
3490 SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
3491 );
3492
3493/** converts variable into exact multi-aggregated variable; this changes the variable array returned from
3494 * SCIPgetVars() and SCIPgetVarsData();
3495 *
3496 * @warning The integrality condition is not checked anymore on the multi-aggregated variable. You must not
3497 * multi-aggregate an integer variable without being sure, that integrality on the aggregation variables
3498 * implies integrality on the aggregated variable.
3499 *
3500 * The output flags have the following meaning:
3501 * - infeasible: the problem is infeasible
3502 * - aggregated: the aggregation was successfully performed (the variables were not aggregated before)
3503 *
3504 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3505 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3506 *
3507 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
3508 */
3509SCIP_EXPORT
3511 SCIP* scip, /**< SCIP data structure */
3512 SCIP_VAR* var, /**< variable x to aggregate */
3513 int naggvars, /**< number n of variables in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3514 SCIP_VAR** aggvars, /**< variables y_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3515 SCIP_RATIONAL** scalars, /**< multipliers a_i in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3516 SCIP_RATIONAL* constant, /**< constant shift c in aggregation x = a_1*y_1 + ... + a_n*y_n + c */
3517 SCIP_Bool* infeasible, /**< pointer to store whether the aggregation is infeasible */
3518 SCIP_Bool* aggregated /**< pointer to store whether the aggregation was successful */
3519 );
3520
3521/** returns whether aggregation of variables is not allowed */
3522SCIP_EXPORT
3524 SCIP* scip /**< SCIP data structure */
3525 );
3526
3527/** returns whether multi-aggregation is disabled */
3528SCIP_EXPORT
3530 SCIP* scip /**< SCIP data structure */
3531 );
3532
3533/** returns whether variable is not allowed to be aggregated */
3534SCIP_EXPORT
3536 SCIP* scip, /**< SCIP data structure */
3537 SCIP_VAR* var /**< variable x to aggregate */
3538 );
3539
3540/** returns whether variable is not allowed to be multi-aggregated */
3541SCIP_EXPORT
3543 SCIP* scip, /**< SCIP data structure */
3544 SCIP_VAR* var /**< variable x to aggregate */
3545 );
3546
3547/** checks whether a loose variable can be used in a new aggregation with given coefficient
3548 *
3549 * Checks whether multiplying the bounds on the coefficient with which the variable appears in aggregations
3550 * (SCIPvarGetMinAggrCoef(), SCIPvarGetMaxAggrCoef()) by the given scalar would exceed acceptable values
3551 * (numerics/sumepsilon and 1.0 / numerics/sumepsilon).
3552 *
3553 * @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_PRESOLVING
3554 */
3555SCIP_EXPORT
3557 SCIP* scip, /**< SCIP data structure */
3558 SCIP_VAR* var, /**< problem variable */
3559 SCIP_Real scalar /**< aggregation scalar */
3560 );
3561
3562/** returns whether strong dual reductions are allowed during propagation and presolving
3563 *
3564 * @note A reduction is called strong dual, if it may discard feasible/optimal solutions, but leaves at least one
3565 * optimal solution intact. Often such reductions are based on analyzing the objective function and variable
3566 * locks.
3567 */
3568SCIP_EXPORT
3570 SCIP* scip /**< SCIP data structure */
3571 );
3572
3573/** returns whether weak dual reductions are allowed during propagation and presolving
3574 *
3575 * @note A reduction is called weak dual, if it may discard feasible solutions, but leaves at all optimal solutions
3576 * intact. Often such reductions are based on analyzing the objective function, reduced costs, and/or dual LPs.
3577 */
3578SCIP_EXPORT
3580 SCIP* scip /**< SCIP data structure */
3581 );
3582
3583/** marks the variable that it must not be aggregated
3584 *
3585 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3586 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3587 *
3588 * @pre This method can be called if @p scip is in one of the following stages:
3589 * - \ref SCIP_STAGE_INIT
3590 * - \ref SCIP_STAGE_PROBLEM
3591 * - \ref SCIP_STAGE_TRANSFORMING
3592 * - \ref SCIP_STAGE_TRANSFORMED
3593 * - \ref SCIP_STAGE_INITPRESOLVE
3594 * - \ref SCIP_STAGE_PRESOLVING
3595 * - \ref SCIP_STAGE_EXITPRESOLVE
3596 *
3597 * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3598 * aggregated that this is will be the case.
3599 */
3600SCIP_EXPORT
3602 SCIP* scip, /**< SCIP data structure */
3603 SCIP_VAR* var /**< variable to delete */
3604 );
3605
3606/** marks the variable that it must not be multi-aggregated
3607 *
3608 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3609 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3610 *
3611 * @pre This method can be called if @p scip is in one of the following stages:
3612 * - \ref SCIP_STAGE_INIT
3613 * - \ref SCIP_STAGE_PROBLEM
3614 * - \ref SCIP_STAGE_TRANSFORMING
3615 * - \ref SCIP_STAGE_TRANSFORMED
3616 * - \ref SCIP_STAGE_INITPRESOLVE
3617 * - \ref SCIP_STAGE_PRESOLVING
3618 * - \ref SCIP_STAGE_EXITPRESOLVE
3619 *
3620 * @note There exists no "unmark" method since it has to be ensured that if a plugin requires that a variable is not
3621 * multi-aggregated that this is will be the case.
3622 */
3623SCIP_EXPORT
3625 SCIP* scip, /**< SCIP data structure */
3626 SCIP_VAR* var /**< variable to delete */
3627 );
3628
3629/** enables the collection of statistics for a variable
3630 *
3631 * @pre This method can be called if @p scip is in one of the following stages:
3632 * - \ref SCIP_STAGE_PROBLEM
3633 * - \ref SCIP_STAGE_INITPRESOLVE
3634 * - \ref SCIP_STAGE_PRESOLVING
3635 * - \ref SCIP_STAGE_EXITPRESOLVE
3636 * - \ref SCIP_STAGE_SOLVING
3637 * - \ref SCIP_STAGE_SOLVED
3638 */
3639SCIP_EXPORT
3641 SCIP* scip /**< SCIP data structure */
3642 );
3643
3644/** disables the collection of any statistic for a variable
3645 *
3646 * @pre This method can be called if @p scip is in one of the following stages:
3647 * - \ref SCIP_STAGE_PROBLEM
3648 * - \ref SCIP_STAGE_INITPRESOLVE
3649 * - \ref SCIP_STAGE_PRESOLVING
3650 * - \ref SCIP_STAGE_EXITPRESOLVE
3651 * - \ref SCIP_STAGE_SOLVING
3652 * - \ref SCIP_STAGE_SOLVED
3653 */
3654SCIP_EXPORT
3656 SCIP* scip /**< SCIP data structure */
3657 );
3658
3659/** updates the pseudo costs of the given variable and the global pseudo costs after a change of "solvaldelta" in the
3660 * variable's solution value and resulting change of "objdelta" in the in the LP's objective value;
3661 * the update is ignored, if the objective value difference is infinite
3662 *
3663 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
3664 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
3665 *
3666 * @pre This method can be called if @p scip is in one of the following stages:
3667 * - \ref SCIP_STAGE_SOLVING
3668 * - \ref SCIP_STAGE_SOLVED
3669 */
3670SCIP_EXPORT
3672 SCIP* scip, /**< SCIP data structure */
3673 SCIP_VAR* var, /**< problem variable */
3674 SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
3675 SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
3676 SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
3677 );
3678
3679/** updates the ancestor pseudo costs of the given variable and the global ancestor pseudo costs after a change of "solvaldelta" in the
3680 * variable's solution value and resulting change of "objdelta" in the in the LP's objective value;
3681 * the update is ignored, if the objective value difference is infinite
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_SOLVING
3688 * - \ref SCIP_STAGE_SOLVED
3689 */
3690SCIP_EXPORT
3692 SCIP* scip, /**< SCIP data structure */
3693 SCIP_VAR* var, /**< problem variable */
3694 SCIP_Real solvaldelta, /**< difference of variable's new LP value - old LP value */
3695 SCIP_Real objdelta, /**< difference of new LP's objective value - old LP's objective value */
3696 SCIP_Real weight /**< weight in (0,1] of this update in pseudo cost sum */
3697 );
3698
3699/** gets the variable's pseudo cost value for the given change of the variable's LP value
3700 *
3701 * @return the variable's pseudo cost value for the given change of the variable's LP value
3702 *
3703 * @pre This method can be called if @p scip is in one of the following stages:
3704 * - \ref SCIP_STAGE_INITPRESOLVE
3705 * - \ref SCIP_STAGE_PRESOLVING
3706 * - \ref SCIP_STAGE_EXITPRESOLVE
3707 * - \ref SCIP_STAGE_PRESOLVED
3708 * - \ref SCIP_STAGE_INITSOLVE
3709 * - \ref SCIP_STAGE_SOLVING
3710 * - \ref SCIP_STAGE_SOLVED
3711 */
3712SCIP_EXPORT
3714 SCIP* scip, /**< SCIP data structure */
3715 SCIP_VAR* var, /**< problem variable */
3716 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3717 );
3718
3719/** gets the variable's ancestral pseudo cost value for the given change of the variable's LP value
3720 *
3721 * @return the variable's ancestral pseudo cost value for the given change of the variable's LP value
3722 *
3723 * @pre This method can be called if @p scip is in one of the following stages:
3724 * - \ref SCIP_STAGE_INITPRESOLVE
3725 * - \ref SCIP_STAGE_PRESOLVING
3726 * - \ref SCIP_STAGE_EXITPRESOLVE
3727 * - \ref SCIP_STAGE_PRESOLVED
3728 * - \ref SCIP_STAGE_INITSOLVE
3729 * - \ref SCIP_STAGE_SOLVING
3730 * - \ref SCIP_STAGE_SOLVED
3731 */
3732SCIP_EXPORT
3734 SCIP* scip, /**< SCIP data structure */
3735 SCIP_VAR* var, /**< problem variable */
3736 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3737 );
3738
3739/** gets the variable's pseudo cost value for the given change of the variable's LP value,
3740 * only using the pseudo cost information of the current run
3741 *
3742 * @return the variable's pseudo cost value for the given change of the variable's LP value,
3743 * only using the pseudo cost information of the current run
3744 *
3745 * @pre This method can be called if @p scip is in one of the following stages:
3746 * - \ref SCIP_STAGE_INITPRESOLVE
3747 * - \ref SCIP_STAGE_PRESOLVING
3748 * - \ref SCIP_STAGE_EXITPRESOLVE
3749 * - \ref SCIP_STAGE_PRESOLVED
3750 * - \ref SCIP_STAGE_INITSOLVE
3751 * - \ref SCIP_STAGE_SOLVING
3752 * - \ref SCIP_STAGE_SOLVED
3753 */
3754SCIP_EXPORT
3756 SCIP* scip, /**< SCIP data structure */
3757 SCIP_VAR* var, /**< problem variable */
3758 SCIP_Real solvaldelta /**< difference of variable's new LP value - old LP value */
3759 );
3760
3761/** gets the variable's pseudo cost value for the given direction
3762 *
3763 * @return the variable's pseudo cost value for the given direction
3764 *
3765 * @pre This method can be called if @p scip is in one of the following stages:
3766 * - \ref SCIP_STAGE_INITPRESOLVE
3767 * - \ref SCIP_STAGE_PRESOLVING
3768 * - \ref SCIP_STAGE_EXITPRESOLVE
3769 * - \ref SCIP_STAGE_PRESOLVED
3770 * - \ref SCIP_STAGE_INITSOLVE
3771 * - \ref SCIP_STAGE_SOLVING
3772 * - \ref SCIP_STAGE_SOLVED
3773 */
3774SCIP_EXPORT
3776 SCIP* scip, /**< SCIP data structure */
3777 SCIP_VAR* var, /**< problem variable */
3778 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3779 );
3780
3781/** gets the variable's pseudo cost value for the given direction,
3782 * only using the pseudo cost information of the current run
3783 *
3784 * @return the variable's pseudo cost value for the given direction,
3785 * only using the pseudo cost information of the current run
3786 *
3787 * @pre This method can be called if @p scip is in one of the following stages:
3788 * - \ref SCIP_STAGE_INITPRESOLVE
3789 * - \ref SCIP_STAGE_PRESOLVING
3790 * - \ref SCIP_STAGE_EXITPRESOLVE
3791 * - \ref SCIP_STAGE_PRESOLVED
3792 * - \ref SCIP_STAGE_INITSOLVE
3793 * - \ref SCIP_STAGE_SOLVING
3794 * - \ref SCIP_STAGE_SOLVED
3795 */
3796SCIP_EXPORT
3798 SCIP* scip, /**< SCIP data structure */
3799 SCIP_VAR* var, /**< problem variable */
3800 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3801 );
3802
3803/** gets the variable's (possible fractional) number of pseudo cost updates for the given direction
3804 *
3805 * @return the variable's (possible fractional) number of pseudo cost updates for the given direction
3806 *
3807 * @pre This method can be called if @p scip is in one of the following stages:
3808 * - \ref SCIP_STAGE_INITPRESOLVE
3809 * - \ref SCIP_STAGE_PRESOLVING
3810 * - \ref SCIP_STAGE_EXITPRESOLVE
3811 * - \ref SCIP_STAGE_PRESOLVED
3812 * - \ref SCIP_STAGE_INITSOLVE
3813 * - \ref SCIP_STAGE_SOLVING
3814 * - \ref SCIP_STAGE_SOLVED
3815 */
3816SCIP_EXPORT
3818 SCIP* scip, /**< SCIP data structure */
3819 SCIP_VAR* var, /**< problem variable */
3820 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3821 );
3822
3823/** gets the variable's (possible fractional) number of pseudo cost updates for the given direction,
3824 * only using the pseudo cost information of the current run
3825 *
3826 * @return the variable's (possible fractional) number of pseudo cost updates for the given direction,
3827 * only using the pseudo cost information of the current run
3828 *
3829 * @pre This method can be called if @p scip is in one of the following stages:
3830 * - \ref SCIP_STAGE_INITPRESOLVE
3831 * - \ref SCIP_STAGE_PRESOLVING
3832 * - \ref SCIP_STAGE_EXITPRESOLVE
3833 * - \ref SCIP_STAGE_PRESOLVED
3834 * - \ref SCIP_STAGE_INITSOLVE
3835 * - \ref SCIP_STAGE_SOLVING
3836 * - \ref SCIP_STAGE_SOLVED
3837 */
3838SCIP_EXPORT
3840 SCIP* scip, /**< SCIP data structure */
3841 SCIP_VAR* var, /**< problem variable */
3842 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3843 );
3844
3845/** gets the variable's (possible fractional) number of ancestor pseudo cost updates for the given direction,
3846 * only using the pseudo cost information of the current run
3847 *
3848 * @return the variable's (possible fractional) number of ancestor pseudo cost updates for the given direction,
3849 * only using the pseudo cost information of the current run
3850 *
3851 * @pre This method can be called if @p scip is in one of the following stages:
3852 * - \ref SCIP_STAGE_INITPRESOLVE
3853 * - \ref SCIP_STAGE_PRESOLVING
3854 * - \ref SCIP_STAGE_EXITPRESOLVE
3855 * - \ref SCIP_STAGE_PRESOLVED
3856 * - \ref SCIP_STAGE_INITSOLVE
3857 * - \ref SCIP_STAGE_SOLVING
3858 * - \ref SCIP_STAGE_SOLVED
3859 */
3860SCIP_EXPORT
3862 SCIP* scip, /**< SCIP data structure */
3863 SCIP_VAR* var, /**< problem variable */
3864 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
3865 );
3866
3867/** get pseudo cost variance of the variable, either for entire solve or only for current branch and bound run
3868 *
3869 * @return returns the (corrected) variance of pseudo code information collected so far.
3870 *
3871 * @pre This method can be called if @p scip is in one of the following stages:
3872 * - \ref SCIP_STAGE_INITPRESOLVE
3873 * - \ref SCIP_STAGE_PRESOLVING
3874 * - \ref SCIP_STAGE_EXITPRESOLVE
3875 * - \ref SCIP_STAGE_PRESOLVED
3876 * - \ref SCIP_STAGE_INITSOLVE
3877 * - \ref SCIP_STAGE_SOLVING
3878 * - \ref SCIP_STAGE_SOLVED
3879 */
3880SCIP_EXPORT
3882 SCIP* scip, /**< SCIP data structure */
3883 SCIP_VAR* var, /**< problem variable */
3884 SCIP_BRANCHDIR dir, /**< branching direction (downwards, or upwards) */
3885 SCIP_Bool onlycurrentrun /**< only for pseudo costs of current branch and bound run */
3886 );
3887
3888/** calculates a confidence bound for this variable under the assumption of normally distributed pseudo costs
3889 *
3890 * The confidence bound \f$ \theta \geq 0\f$ denotes the interval borders \f$ [X - \theta, \ X + \theta]\f$, which contains
3891 * the true pseudo costs of the variable, i.e., the expected value of the normal distribution, with a probability
3892 * of 2 * clevel - 1.
3893 *
3894 * @return value of confidence bound for this variable
3895 */
3896SCIP_EXPORT
3898 SCIP* scip, /**< SCIP data structure */
3899 SCIP_VAR* var, /**< variable in question */
3900 SCIP_BRANCHDIR dir, /**< the branching direction for the confidence bound */
3901 SCIP_Bool onlycurrentrun, /**< should only the current run be taken into account */
3902 SCIP_CONFIDENCELEVEL clevel /**< confidence level for the interval */
3903 );
3904
3905/** check if variable pseudo-costs have a significant difference in location. The significance depends on
3906 * the choice of \p clevel and on the kind of tested hypothesis. The one-sided hypothesis, which
3907 * should be rejected, is that fracy * mu_y >= fracx * mu_x, where mu_y and mu_x denote the
3908 * unknown location means of the underlying pseudo-cost distributions of x and y.
3909 *
3910 * This method is applied best if variable x has a better pseudo-cost score than y. The method hypothesizes that y were actually
3911 * better than x (despite the current information), meaning that y can be expected to yield branching
3912 * decisions as least as good as x in the long run. If the method returns TRUE, the current history information is
3913 * sufficient to safely rely on the alternative hypothesis that x yields indeed a better branching score (on average)
3914 * than y.
3915 *
3916 * @note The order of x and y matters for the one-sided hypothesis
3917 *
3918 * @note set \p onesided to FALSE if you are not sure which variable is better. The hypothesis tested then reads
3919 * fracy * mu_y == fracx * mu_x vs the alternative hypothesis fracy * mu_y != fracx * mu_x.
3920 *
3921 * @return TRUE if the hypothesis can be safely rejected at the given confidence level
3922 */
3923SCIP_EXPORT
3925 SCIP* scip, /**< SCIP data structure */
3926 SCIP_VAR* varx, /**< variable x */
3927 SCIP_Real fracx, /**< the fractionality of variable x */
3928 SCIP_VAR* vary, /**< variable y */
3929 SCIP_Real fracy, /**< the fractionality of variable y */
3930 SCIP_BRANCHDIR dir, /**< branching direction */
3931 SCIP_CONFIDENCELEVEL clevel, /**< confidence level for rejecting hypothesis */
3932 SCIP_Bool onesided /**< should a one-sided hypothesis y >= x be tested? */
3933 );
3934
3935/** tests at a given confidence level whether the variable pseudo-costs only have a small probability to
3936 * exceed a \p threshold. This is useful to determine if past observations provide enough evidence
3937 * to skip an expensive strong-branching step if there is already a candidate that has been proven to yield an improvement
3938 * of at least \p threshold.
3939 *
3940 * @note use \p clevel to adjust the level of confidence. For SCIP_CONFIDENCELEVEL_MIN, the method returns TRUE if
3941 * the estimated probability to exceed \p threshold is less than 25 %.
3942 *
3943 * @see SCIP_Confidencelevel for a list of available levels. The used probability limits refer to the one-sided levels
3944 * of confidence.
3945 *
3946 * @return TRUE if the variable pseudo-cost probabilistic model is likely to be smaller than \p threshold
3947 * at the given confidence level \p clevel.
3948 */
3949SCIP_EXPORT
3951 SCIP* scip, /**< SCIP data structure */
3952 SCIP_VAR* var, /**< variable x */
3953 SCIP_Real frac, /**< the fractionality of variable x */
3954 SCIP_Real threshold, /**< the threshold to test against */
3955 SCIP_BRANCHDIR dir, /**< branching direction */
3956 SCIP_CONFIDENCELEVEL clevel /**< confidence level for rejecting hypothesis */
3957 );
3958
3959/** check if the current pseudo cost relative error in a direction violates the given threshold. The Relative
3960 * Error is calculated at a specific confidence level
3961 *
3962 * @return TRUE if relative error in variable pseudo costs is smaller than \p threshold
3963 */
3964SCIP_EXPORT
3966 SCIP* scip, /**< SCIP data structure */
3967 SCIP_VAR* var, /**< variable in question */
3968 SCIP_Real threshold, /**< threshold for relative errors to be considered reliable (enough) */
3969 SCIP_CONFIDENCELEVEL clevel /**< a given confidence level */
3970 );
3971
3972/** gets the variable's pseudo cost score value for the given LP solution value
3973 *
3974 * @return the variable's pseudo cost score value for the given LP solution value
3975 *
3976 * @pre This method can be called if @p scip is in one of the following stages:
3977 * - \ref SCIP_STAGE_INITPRESOLVE
3978 * - \ref SCIP_STAGE_PRESOLVING
3979 * - \ref SCIP_STAGE_EXITPRESOLVE
3980 * - \ref SCIP_STAGE_PRESOLVED
3981 * - \ref SCIP_STAGE_INITSOLVE
3982 * - \ref SCIP_STAGE_SOLVING
3983 * - \ref SCIP_STAGE_SOLVED
3984 */
3985SCIP_EXPORT
3987 SCIP* scip, /**< SCIP data structure */
3988 SCIP_VAR* var, /**< problem variable */
3989 SCIP_Real solval /**< variable's LP solution value */
3990 );
3991
3992/** gets the variable's discounted pseudo cost score value for the given LP solution value.
3993 *
3994 * This combines both pscost and ancpscost fields.
3995 *
3996 * @return the variable's discounted pseudo cost score value for the given LP solution value,
3997 * combining both pscost and ancpscost fields.
3998 *
3999 * @pre This method can be called if @p scip is in one of the following stages:
4000 * - \ref SCIP_STAGE_INITPRESOLVE
4001 * - \ref SCIP_STAGE_PRESOLVING
4002 * - \ref SCIP_STAGE_EXITPRESOLVE
4003 * - \ref SCIP_STAGE_PRESOLVED
4004 * - \ref SCIP_STAGE_INITSOLVE
4005 * - \ref SCIP_STAGE_SOLVING
4006 * - \ref SCIP_STAGE_SOLVED
4007 */
4008SCIP_EXPORT
4010 SCIP* scip, /**< SCIP data structure */
4011 SCIP_VAR* var, /**< problem variable */
4012 SCIP_Real solval, /**< variable's LP solution value */
4013 SCIP_Real discountfac /**< discount factor for discounted pseudocost */
4014 );
4015
4016/** gets the variable's pseudo cost score value for the given LP solution value,
4017 * only using the pseudo cost information of the current run
4018 *
4019 * @return the variable's pseudo cost score value for the given LP solution value,
4020 * only using the pseudo cost information of the current run
4021 *
4022 * @pre This method can be called if @p scip is in one of the following stages:
4023 * - \ref SCIP_STAGE_INITPRESOLVE
4024 * - \ref SCIP_STAGE_PRESOLVING
4025 * - \ref SCIP_STAGE_EXITPRESOLVE
4026 * - \ref SCIP_STAGE_PRESOLVED
4027 * - \ref SCIP_STAGE_INITSOLVE
4028 * - \ref SCIP_STAGE_SOLVING
4029 * - \ref SCIP_STAGE_SOLVED
4030 */
4031SCIP_EXPORT
4033 SCIP* scip, /**< SCIP data structure */
4034 SCIP_VAR* var, /**< problem variable */
4035 SCIP_Real solval /**< variable's LP solution value */
4036 );
4037
4038/** returns the variable's VSIDS value
4039 *
4040 * @return the variable's VSIDS value
4041 *
4042 * @pre This method can be called if @p scip is in one of the following stages:
4043 * - \ref SCIP_STAGE_INITPRESOLVE
4044 * - \ref SCIP_STAGE_PRESOLVING
4045 * - \ref SCIP_STAGE_EXITPRESOLVE
4046 * - \ref SCIP_STAGE_PRESOLVED
4047 * - \ref SCIP_STAGE_INITSOLVE
4048 * - \ref SCIP_STAGE_SOLVING
4049 * - \ref SCIP_STAGE_SOLVED
4050 */
4051SCIP_EXPORT
4053 SCIP* scip, /**< SCIP data structure */
4054 SCIP_VAR* var, /**< problem variable */
4055 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4056 );
4057
4058/** returns the variable's VSIDS value only using conflicts of the current run
4059 *
4060 * @return the variable's VSIDS value only using conflicts of the current run
4061 *
4062 * @pre This method can be called if @p scip is in one of the following stages:
4063 * - \ref SCIP_STAGE_INITPRESOLVE
4064 * - \ref SCIP_STAGE_PRESOLVING
4065 * - \ref SCIP_STAGE_EXITPRESOLVE
4066 * - \ref SCIP_STAGE_PRESOLVED
4067 * - \ref SCIP_STAGE_INITSOLVE
4068 * - \ref SCIP_STAGE_SOLVING
4069 * - \ref SCIP_STAGE_SOLVED
4070 */
4071SCIP_EXPORT
4073 SCIP* scip, /**< SCIP data structure */
4074 SCIP_VAR* var, /**< problem variable */
4075 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4076 );
4077
4078/** returns the variable's conflict score value
4079 *
4080 * @return the variable's conflict score value
4081 *
4082 * @pre This method can be called if @p scip is in one of the following stages:
4083 * - \ref SCIP_STAGE_INITPRESOLVE
4084 * - \ref SCIP_STAGE_PRESOLVING
4085 * - \ref SCIP_STAGE_EXITPRESOLVE
4086 * - \ref SCIP_STAGE_PRESOLVED
4087 * - \ref SCIP_STAGE_INITSOLVE
4088 * - \ref SCIP_STAGE_SOLVING
4089 * - \ref SCIP_STAGE_SOLVED
4090 */
4091SCIP_EXPORT
4093 SCIP* scip, /**< SCIP data structure */
4094 SCIP_VAR* var /**< problem variable */
4095 );
4096
4097/** returns the variable's conflict score value only using conflicts of the current run
4098 *
4099 * @return the variable's conflict score value only using conflicts of the current run
4100 *
4101 * @pre This method can be called if @p scip is in one of the following stages:
4102 * - \ref SCIP_STAGE_INITPRESOLVE
4103 * - \ref SCIP_STAGE_PRESOLVING
4104 * - \ref SCIP_STAGE_EXITPRESOLVE
4105 * - \ref SCIP_STAGE_PRESOLVED
4106 * - \ref SCIP_STAGE_INITSOLVE
4107 * - \ref SCIP_STAGE_SOLVING
4108 * - \ref SCIP_STAGE_SOLVED
4109 */
4110SCIP_EXPORT
4112 SCIP* scip, /**< SCIP data structure */
4113 SCIP_VAR* var /**< problem variable */
4114 );
4115
4116/** returns the variable's conflict length score
4117 *
4118 * @return the variable's conflict length score
4119 *
4120 * @pre This method can be called if @p scip is in one of the following stages:
4121 * - \ref SCIP_STAGE_INITPRESOLVE
4122 * - \ref SCIP_STAGE_PRESOLVING
4123 * - \ref SCIP_STAGE_EXITPRESOLVE
4124 * - \ref SCIP_STAGE_PRESOLVED
4125 * - \ref SCIP_STAGE_INITSOLVE
4126 * - \ref SCIP_STAGE_SOLVING
4127 * - \ref SCIP_STAGE_SOLVED
4128 */
4129SCIP_EXPORT
4131 SCIP* scip, /**< SCIP data structure */
4132 SCIP_VAR* var /**< problem variable */
4133 );
4134
4135/** returns the variable's conflict length score only using conflicts of the current run
4136 *
4137 * @return the variable's conflict length score only using conflicts of the current run
4138 *
4139 * @pre This method can be called if @p scip is in one of the following stages:
4140 * - \ref SCIP_STAGE_INITPRESOLVE
4141 * - \ref SCIP_STAGE_PRESOLVING
4142 * - \ref SCIP_STAGE_EXITPRESOLVE
4143 * - \ref SCIP_STAGE_PRESOLVED
4144 * - \ref SCIP_STAGE_INITSOLVE
4145 * - \ref SCIP_STAGE_SOLVING
4146 * - \ref SCIP_STAGE_SOLVED
4147 */
4148SCIP_EXPORT
4150 SCIP* scip, /**< SCIP data structure */
4151 SCIP_VAR* var /**< problem variable */
4152 );
4153
4154/** returns the variable's average conflict length
4155 *
4156 * @return the variable's average conflict length
4157 *
4158 * @pre This method can be called if @p scip is in one of the following stages:
4159 * - \ref SCIP_STAGE_INITPRESOLVE
4160 * - \ref SCIP_STAGE_PRESOLVING
4161 * - \ref SCIP_STAGE_EXITPRESOLVE
4162 * - \ref SCIP_STAGE_PRESOLVED
4163 * - \ref SCIP_STAGE_INITSOLVE
4164 * - \ref SCIP_STAGE_SOLVING
4165 * - \ref SCIP_STAGE_SOLVED
4166 */
4167SCIP_EXPORT
4169 SCIP* scip, /**< SCIP data structure */
4170 SCIP_VAR* var, /**< problem variable */
4171 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4172 );
4173
4174/** returns the variable's average conflict length only using conflicts of the current run
4175 *
4176 * @return the variable's average conflict length only using conflicts of the current run
4177 *
4178 * @pre This method can be called if @p scip is in one of the following stages:
4179 * - \ref SCIP_STAGE_INITPRESOLVE
4180 * - \ref SCIP_STAGE_PRESOLVING
4181 * - \ref SCIP_STAGE_EXITPRESOLVE
4182 * - \ref SCIP_STAGE_PRESOLVED
4183 * - \ref SCIP_STAGE_INITSOLVE
4184 * - \ref SCIP_STAGE_SOLVING
4185 * - \ref SCIP_STAGE_SOLVED
4186 */
4187SCIP_EXPORT
4189 SCIP* scip, /**< SCIP data structure */
4190 SCIP_VAR* var, /**< problem variable */
4191 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4192 );
4193
4194/** returns the average number of inferences found after branching on the variable in given direction;
4195 * if branching on the variable in the given direction was yet evaluated, the average number of inferences
4196 * over all variables for branching in the given direction is returned
4197 *
4198 * @return the average number of inferences found after branching on the variable in given direction
4199 *
4200 * @pre This method can be called if @p scip is in one of the following stages:
4201 * - \ref SCIP_STAGE_INITPRESOLVE
4202 * - \ref SCIP_STAGE_PRESOLVING
4203 * - \ref SCIP_STAGE_EXITPRESOLVE
4204 * - \ref SCIP_STAGE_PRESOLVED
4205 * - \ref SCIP_STAGE_INITSOLVE
4206 * - \ref SCIP_STAGE_SOLVING
4207 * - \ref SCIP_STAGE_SOLVED
4208 */
4209SCIP_EXPORT
4211 SCIP* scip, /**< SCIP data structure */
4212 SCIP_VAR* var, /**< problem variable */
4213 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4214 );
4215
4216/** returns the average number of inferences found after branching on the variable in given direction in the current run;
4217 * if branching on the variable in the given direction was yet evaluated, the average number of inferences
4218 * over all variables for branching in the given direction is returned
4219 *
4220 * @return the average number of inferences found after branching on the variable in given direction in the current run
4221 *
4222 * @pre This method can be called if @p scip is in one of the following stages:
4223 * - \ref SCIP_STAGE_INITPRESOLVE
4224 * - \ref SCIP_STAGE_PRESOLVING
4225 * - \ref SCIP_STAGE_EXITPRESOLVE
4226 * - \ref SCIP_STAGE_PRESOLVED
4227 * - \ref SCIP_STAGE_INITSOLVE
4228 * - \ref SCIP_STAGE_SOLVING
4229 * - \ref SCIP_STAGE_SOLVED
4230 */
4231SCIP_EXPORT
4233 SCIP* scip, /**< SCIP data structure */
4234 SCIP_VAR* var, /**< problem variable */
4235 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4236 );
4237
4238/** returns the variable's average inference score value
4239 *
4240 * @return the variable's average inference score value
4241 *
4242 * @pre This method can be called if @p scip is in one of the following stages:
4243 * - \ref SCIP_STAGE_INITPRESOLVE
4244 * - \ref SCIP_STAGE_PRESOLVING
4245 * - \ref SCIP_STAGE_EXITPRESOLVE
4246 * - \ref SCIP_STAGE_PRESOLVED
4247 * - \ref SCIP_STAGE_INITSOLVE
4248 * - \ref SCIP_STAGE_SOLVING
4249 * - \ref SCIP_STAGE_SOLVED
4250 */
4251SCIP_EXPORT
4253 SCIP* scip, /**< SCIP data structure */
4254 SCIP_VAR* var /**< problem variable */
4255 );
4256
4257/** returns the variable's average inference score value only using inferences of the current run
4258 *
4259 * @return the variable's average inference score value only using inferences of the current run
4260 *
4261 * @pre This method can be called if @p scip is in one of the following stages:
4262 * - \ref SCIP_STAGE_INITPRESOLVE
4263 * - \ref SCIP_STAGE_PRESOLVING
4264 * - \ref SCIP_STAGE_EXITPRESOLVE
4265 * - \ref SCIP_STAGE_PRESOLVED
4266 * - \ref SCIP_STAGE_INITSOLVE
4267 * - \ref SCIP_STAGE_SOLVING
4268 * - \ref SCIP_STAGE_SOLVED
4269 */
4270SCIP_EXPORT
4272 SCIP* scip, /**< SCIP data structure */
4273 SCIP_VAR* var /**< problem variable */
4274 );
4275
4276/** initializes the upwards and downwards pseudocosts, conflict scores, conflict lengths, inference scores, cutoff scores
4277 * of a variable to the given values
4278 *
4279 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4280 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4281 *
4282 * @pre This method can be called if @p scip is in one of the following stages:
4283 * - \ref SCIP_STAGE_TRANSFORMED
4284 * - \ref SCIP_STAGE_INITPRESOLVE
4285 * - \ref SCIP_STAGE_PRESOLVING
4286 * - \ref SCIP_STAGE_EXITPRESOLVE
4287 * - \ref SCIP_STAGE_PRESOLVED
4288 * - \ref SCIP_STAGE_INITSOLVE
4289 * - \ref SCIP_STAGE_SOLVING
4290 */
4291SCIP_EXPORT
4293 SCIP* scip, /**< SCIP data structure */
4294 SCIP_VAR* var, /**< variable which should be initialized */
4295 SCIP_Real downpscost, /**< value to which pseudocosts for downwards branching should be initialized */
4296 SCIP_Real uppscost, /**< value to which pseudocosts for upwards branching should be initialized */
4297 SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
4298 SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
4299 SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
4300 SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
4301 SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
4302 SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
4303 SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
4304 SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
4305 );
4306
4307/** initializes the upwards and downwards conflict scores, conflict lengths, inference scores, cutoff scores of a
4308 * variable w.r.t. a value by the given values (SCIP_VALUEHISTORY)
4309 *
4310 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4311 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4312 *
4313 * @pre This method can be called if @p scip is in one of the following stages:
4314 * - \ref SCIP_STAGE_TRANSFORMED
4315 * - \ref SCIP_STAGE_INITPRESOLVE
4316 * - \ref SCIP_STAGE_PRESOLVING
4317 * - \ref SCIP_STAGE_EXITPRESOLVE
4318 * - \ref SCIP_STAGE_PRESOLVED
4319 * - \ref SCIP_STAGE_INITSOLVE
4320 * - \ref SCIP_STAGE_SOLVING
4321 */
4322SCIP_EXPORT
4324 SCIP* scip, /**< SCIP data structure */
4325 SCIP_VAR* var, /**< variable which should be initialized */
4326 SCIP_Real value, /**< domain value, or SCIP_UNKNOWN */
4327 SCIP_Real downvsids, /**< value to which VSIDS score for downwards branching should be initialized */
4328 SCIP_Real upvsids, /**< value to which VSIDS score for upwards branching should be initialized */
4329 SCIP_Real downconflen, /**< value to which conflict length score for downwards branching should be initialized */
4330 SCIP_Real upconflen, /**< value to which conflict length score for upwards branching should be initialized */
4331 SCIP_Real downinfer, /**< value to which inference counter for downwards branching should be initialized */
4332 SCIP_Real upinfer, /**< value to which inference counter for upwards branching should be initialized */
4333 SCIP_Real downcutoff, /**< value to which cutoff counter for downwards branching should be initialized */
4334 SCIP_Real upcutoff /**< value to which cutoff counter for upwards branching should be initialized */
4335 );
4336
4337/** returns the average number of cutoffs found after branching on the variable in given direction;
4338 * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
4339 * over all variables for branching in the given direction is returned
4340 *
4341 * @return the average number of cutoffs found after branching on the variable in given direction
4342 *
4343 * @pre This method can be called if @p scip is in one of the following stages:
4344 * - \ref SCIP_STAGE_INITPRESOLVE
4345 * - \ref SCIP_STAGE_PRESOLVING
4346 * - \ref SCIP_STAGE_EXITPRESOLVE
4347 * - \ref SCIP_STAGE_PRESOLVED
4348 * - \ref SCIP_STAGE_INITSOLVE
4349 * - \ref SCIP_STAGE_SOLVING
4350 * - \ref SCIP_STAGE_SOLVED
4351 */
4352SCIP_EXPORT
4354 SCIP* scip, /**< SCIP data structure */
4355 SCIP_VAR* var, /**< problem variable */
4356 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4357 );
4358
4359/** returns the average number of cutoffs found after branching on the variable in given direction in the current run;
4360 * if branching on the variable in the given direction was yet evaluated, the average number of cutoffs
4361 * over all variables for branching in the given direction is returned
4362 *
4363 * @return the average number of cutoffs found after branching on the variable in given direction in the current run
4364 *
4365 * @pre This method can be called if @p scip is in one of the following stages:
4366 * - \ref SCIP_STAGE_INITPRESOLVE
4367 * - \ref SCIP_STAGE_PRESOLVING
4368 * - \ref SCIP_STAGE_EXITPRESOLVE
4369 * - \ref SCIP_STAGE_PRESOLVED
4370 * - \ref SCIP_STAGE_INITSOLVE
4371 * - \ref SCIP_STAGE_SOLVING
4372 * - \ref SCIP_STAGE_SOLVED
4373 */
4374SCIP_EXPORT
4376 SCIP* scip, /**< SCIP data structure */
4377 SCIP_VAR* var, /**< problem variable */
4378 SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
4379 );
4380
4381/** returns the variable's average cutoff score value
4382 *
4383 * @return the variable's average cutoff score value
4384 *
4385 * @pre This method can be called if @p scip is in one of the following stages:
4386 * - \ref SCIP_STAGE_INITPRESOLVE
4387 * - \ref SCIP_STAGE_PRESOLVING
4388 * - \ref SCIP_STAGE_EXITPRESOLVE
4389 * - \ref SCIP_STAGE_PRESOLVED
4390 * - \ref SCIP_STAGE_INITSOLVE
4391 * - \ref SCIP_STAGE_SOLVING
4392 * - \ref SCIP_STAGE_SOLVED
4393 */
4394SCIP_EXPORT
4396 SCIP* scip, /**< SCIP data structure */
4397 SCIP_VAR* var /**< problem variable */
4398 );
4399
4400/** returns the variable's average cutoff score value, only using cutoffs of the current run
4401 *
4402 * @return the variable's average cutoff score value, only using cutoffs of the current run
4403 *
4404 * @pre This method can be called if @p scip is in one of the following stages:
4405 * - \ref SCIP_STAGE_INITPRESOLVE
4406 * - \ref SCIP_STAGE_PRESOLVING
4407 * - \ref SCIP_STAGE_EXITPRESOLVE
4408 * - \ref SCIP_STAGE_PRESOLVED
4409 * - \ref SCIP_STAGE_INITSOLVE
4410 * - \ref SCIP_STAGE_SOLVING
4411 * - \ref SCIP_STAGE_SOLVED
4412 */
4413SCIP_EXPORT
4415 SCIP* scip, /**< SCIP data structure */
4416 SCIP_VAR* var /**< problem variable */
4417 );
4418
4419/** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
4420 * factor
4421 *
4422 * @return the variable's average inference/cutoff score value
4423 *
4424 * @pre This method can be called if @p scip is in one of the following stages:
4425 * - \ref SCIP_STAGE_INITPRESOLVE
4426 * - \ref SCIP_STAGE_PRESOLVING
4427 * - \ref SCIP_STAGE_EXITPRESOLVE
4428 * - \ref SCIP_STAGE_PRESOLVED
4429 * - \ref SCIP_STAGE_INITSOLVE
4430 * - \ref SCIP_STAGE_SOLVING
4431 * - \ref SCIP_STAGE_SOLVED
4432 */
4433SCIP_EXPORT
4435 SCIP* scip, /**< SCIP data structure */
4436 SCIP_VAR* var, /**< problem variable */
4437 SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
4438 );
4439
4440/** returns the variable's average inference/cutoff score value, weighting the cutoffs of the variable with the given
4441 * factor, only using inferences and cutoffs of the current run
4442 *
4443 * @return the variable's average inference/cutoff score value, only using inferences and cutoffs of the current run
4444 *
4445 * @pre This method can be called if @p scip is in one of the following stages:
4446 * - \ref SCIP_STAGE_INITPRESOLVE
4447 * - \ref SCIP_STAGE_PRESOLVING
4448 * - \ref SCIP_STAGE_EXITPRESOLVE
4449 * - \ref SCIP_STAGE_PRESOLVED
4450 * - \ref SCIP_STAGE_INITSOLVE
4451 * - \ref SCIP_STAGE_SOLVING
4452 * - \ref SCIP_STAGE_SOLVED
4453 */
4454SCIP_EXPORT
4456 SCIP* scip, /**< SCIP data structure */
4457 SCIP_VAR* var, /**< problem variable */
4458 SCIP_Real cutoffweight /**< factor to weigh average number of cutoffs in branching score */
4459 );
4460
4461/** returns the variable's average GMI efficacy score value
4462 *
4463 * @return the variable's average GMI efficacy score value (for when it was fractional and basic in the LP)
4464 *
4465 * @pre This method can be called if @p scip is in one of the following stages:
4466 * - \ref SCIP_STAGE_INITPRESOLVE
4467 * - \ref SCIP_STAGE_PRESOLVING
4468 * - \ref SCIP_STAGE_EXITPRESOLVE
4469 * - \ref SCIP_STAGE_PRESOLVED
4470 * - \ref SCIP_STAGE_INITSOLVE
4471 * - \ref SCIP_STAGE_SOLVING
4472 * - \ref SCIP_STAGE_SOLVED
4473 */
4474SCIP_EXPORT
4476 SCIP* scip, /**< SCIP data structure */
4477 SCIP_VAR* var /**< problem variable */
4478 );
4479
4480/** sets the variable's avg GMI efficacy score value
4481 *
4482 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4483 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4484 *
4485 * @pre This method can be called if @p scip is in one of the following stages:
4486 * - \ref SCIP_STAGE_INITPRESOLVE
4487 * - \ref SCIP_STAGE_PRESOLVING
4488 * - \ref SCIP_STAGE_EXITPRESOLVE
4489 * - \ref SCIP_STAGE_PRESOLVED
4490 * - \ref SCIP_STAGE_INITSOLVE
4491 * - \ref SCIP_STAGE_SOLVING
4492 * - \ref SCIP_STAGE_SOLVED
4493 */
4494SCIP_EXPORT
4496 SCIP* scip, /**< SCIP data structure */
4497 SCIP_VAR* var, /**< problem variable */
4498 SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
4499 );
4500
4501/** returns the variable's last GMI efficacy score value
4502 *
4503 * @return the variable's last GMI efficacy score value (for when it was fractional and basic in the LP)
4504 *
4505 * @pre This method can be called if @p scip is in one of the following stages:
4506 * - \ref SCIP_STAGE_INITPRESOLVE
4507 * - \ref SCIP_STAGE_PRESOLVING
4508 * - \ref SCIP_STAGE_EXITPRESOLVE
4509 * - \ref SCIP_STAGE_PRESOLVED
4510 * - \ref SCIP_STAGE_INITSOLVE
4511 * - \ref SCIP_STAGE_SOLVING
4512 * - \ref SCIP_STAGE_SOLVED
4513 */
4514SCIP_EXPORT
4516 SCIP* scip, /**< SCIP data structure */
4517 SCIP_VAR* var /**< problem variable */
4518 );
4519
4520/** sets the variable's last GMI efficacy score value
4521 *
4522 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4523 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4524 *
4525 * @pre This method can be called if @p scip is in one of the following stages:
4526 * - \ref SCIP_STAGE_INITPRESOLVE
4527 * - \ref SCIP_STAGE_PRESOLVING
4528 * - \ref SCIP_STAGE_EXITPRESOLVE
4529 * - \ref SCIP_STAGE_PRESOLVED
4530 * - \ref SCIP_STAGE_INITSOLVE
4531 * - \ref SCIP_STAGE_SOLVING
4532 * - \ref SCIP_STAGE_SOLVED
4533 */
4534SCIP_EXPORT
4536 SCIP* scip, /**< SCIP data structure */
4537 SCIP_VAR* var, /**< problem variable */
4538 SCIP_Real gmieff /**< Efficacy of last GMI cut generated from when var was basic /frac */
4539 );
4540
4541/** outputs variable information to file stream via the message system
4542 *
4543 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4544 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4545 *
4546 * @pre This method can be called if @p scip is in one of the following stages:
4547 * - \ref SCIP_STAGE_PROBLEM
4548 * - \ref SCIP_STAGE_TRANSFORMING
4549 * - \ref SCIP_STAGE_TRANSFORMED
4550 * - \ref SCIP_STAGE_INITPRESOLVE
4551 * - \ref SCIP_STAGE_PRESOLVING
4552 * - \ref SCIP_STAGE_EXITPRESOLVE
4553 * - \ref SCIP_STAGE_PRESOLVED
4554 * - \ref SCIP_STAGE_INITSOLVE
4555 * - \ref SCIP_STAGE_SOLVING
4556 * - \ref SCIP_STAGE_SOLVED
4557 * - \ref SCIP_STAGE_EXITSOLVE
4558 * - \ref SCIP_STAGE_FREETRANS
4559 *
4560 * @note If the message handler is set to a NULL pointer nothing will be printed
4561 */
4562SCIP_EXPORT
4564 SCIP* scip, /**< SCIP data structure */
4565 SCIP_VAR* var, /**< problem variable */
4566 FILE* file /**< output file (or NULL for standard output) */
4567 );
4568
4569/** changes variable's exact objective value
4570 *
4571 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4572 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4573 *
4574 * @pre This method can be called if @p scip is in one of the following stages:
4575 * - \ref SCIP_STAGE_PROBLEM
4576 * - \ref SCIP_STAGE_TRANSFORMING
4577 * - \ref SCIP_STAGE_PRESOLVING
4578 * - \ref SCIP_STAGE_PRESOLVED
4579 */
4580SCIP_EXPORT
4582 SCIP* scip, /**< SCIP data structure */
4583 SCIP_VAR* var, /**< variable to change the objective value for */
4584 SCIP_RATIONAL* newobj /**< new objective value */
4585 );
4586
4587/** changes exact global upper bound of variable;
4588 *
4589 *
4590 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4591 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4592 *
4593 * @pre This method can be called if @p scip is in one of the following stages:
4594 * - \ref SCIP_STAGE_PROBLEM
4595 *
4596 */
4598 SCIP* scip, /**< SCIP data structure */
4599 SCIP_VAR* var, /**< variable to change the bound for */
4600 SCIP_RATIONAL* newbound /**< new value for bound */
4601 );
4602
4603/** changes exact global lower bound of variable;
4604 *
4605 *
4606 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4607 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4608 *
4609 * @pre This method can be called if @p scip is in one of the following stages:
4610 * - \ref SCIP_STAGE_PROBLEM
4611 *
4612 */
4614 SCIP* scip, /**< SCIP data structure */
4615 SCIP_VAR* var, /**< variable to change the bound for */
4616 SCIP_RATIONAL* newbound /**< new value for bound */
4617 );
4618
4619/** print the given variables and rational coefficients as linear sum in the following form
4620 * c1 <x1> + c2 <x2> ... + cn <xn>
4621 *
4622 * This string can be parsed by the method SCIPparseVarsLinearsum().
4623 *
4624 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4625 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4626 *
4627 * @pre This method can be called if @p scip is in one of the following stages:
4628 * - \ref SCIP_STAGE_PROBLEM
4629 * - \ref SCIP_STAGE_TRANSFORMING
4630 * - \ref SCIP_STAGE_TRANSFORMED
4631 * - \ref SCIP_STAGE_INITPRESOLVE
4632 * - \ref SCIP_STAGE_PRESOLVING
4633 * - \ref SCIP_STAGE_EXITPRESOLVE
4634 * - \ref SCIP_STAGE_PRESOLVED
4635 * - \ref SCIP_STAGE_INITSOLVE
4636 * - \ref SCIP_STAGE_SOLVING
4637 * - \ref SCIP_STAGE_SOLVED
4638 * - \ref SCIP_STAGE_EXITSOLVE
4639 * - \ref SCIP_STAGE_FREETRANS
4640 *
4641 * @note The printing process is done via the message handler system.
4642 */
4643SCIP_EXPORT
4645 SCIP* scip, /**< SCIP data structure */
4646 FILE* file, /**< output file, or NULL for stdout */
4647 SCIP_VAR** vars, /**< variable array to output */
4648 SCIP_RATIONAL** vals, /**< array of coefficients or NULL if all coefficients are 1.0 */
4649 int nvars, /**< number of variables */
4650 SCIP_Bool type /**< should the variable type be also posted */
4651 );
4652
4653/** Transforms a given linear sum of variables, that is a_1*x_1 + ... + a_n*x_n + c into a corresponding linear sum of
4654 * active variables, that is b_1*y_1 + ... + b_m*y_m + d.
4655 *
4656 * If the number of needed active variables is greater than the available slots in the variable array, nothing happens
4657 * except that the required size is stored in the corresponding variable (requiredsize). Otherwise, the active variable
4658 * representation is stored in the variable array, scalar array and constant.
4659 *
4660 * The reason for this approach is that we cannot reallocate memory, since we do not know how the memory has been
4661 * allocated (e.g., by a C++ 'new' or SCIP functions).
4662 *
4663 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
4664 * SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
4665 *
4666 * @pre This method can be called if @p scip is in one of the following stages:
4667 * - \ref SCIP_STAGE_TRANSFORMED
4668 * - \ref SCIP_STAGE_INITPRESOLVE
4669 * - \ref SCIP_STAGE_PRESOLVING
4670 * - \ref SCIP_STAGE_EXITPRESOLVE
4671 * - \ref SCIP_STAGE_PRESOLVED
4672 * - \ref SCIP_STAGE_INITSOLVE
4673 * - \ref SCIP_STAGE_SOLVING
4674 * - \ref SCIP_STAGE_SOLVED
4675 * - \ref SCIP_STAGE_EXITSOLVE
4676 * - \ref SCIP_STAGE_FREETRANS
4677 *
4678 * @note The resulting linear sum is stored into the given variable array, scalar array, and constant. That means the
4679 * given entries are overwritten.
4680 *
4681 * @note That method can be used to convert a single variables into variable space of active variables. Therefore call
4682 * the method with the linear sum 1.0*x + 0.0.
4683 */
4684SCIP_EXPORT
4686 SCIP* scip, /**< SCIP data structure */
4687 SCIP_VAR** vars, /**< variable array x_1, ..., x_n in the linear sum which will be
4688 * overwritten by the variable array y_1, ..., y_m in the linear sum
4689 * w.r.t. active variables */
4690 SCIP_RATIONAL** scalars, /**< scalars a_1, ..., a_n in linear sum which will be overwritten to the
4691 * scalars b_1, ..., b_m in the linear sum of the active variables */
4692 int* nvars, /**< pointer to number of variables in the linear sum which will be
4693 * overwritten by the number of variables in the linear sum corresponding
4694 * to the active variables */
4695 int varssize, /**< available slots in vars and scalars array which is needed to check if
4696 * the array are large enough for the linear sum w.r.t. active
4697 * variables */
4698 SCIP_RATIONAL* constant, /**< pointer to constant c in linear sum a_1*x_1 + ... + a_n*x_n + c which
4699 * will chnage to constant d in the linear sum b_1*y_1 + ... + b_m*y_m +
4700 * d w.r.t. the active variables */
4701 int* requiredsize, /**< pointer to store the required array size for the linear sum w.r.t. the
4702 * active variables */
4703 SCIP_Bool mergemultiples /**< should multiple occurrences of a var be replaced by a single coeff? */
4704 );
4705
4706/**@} */
4707
4708#ifdef __cplusplus
4709}
4710#endif
4711
4712#endif
common defines and data types used in all packages of SCIP
#define SCIP_Longint
Definition: def.h:141
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:156
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:3664
SCIP_Real SCIPgetRelaxSolObj(SCIP *scip)
Definition: scip_var.c:3376
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:12009
SCIP_Real SCIPgetVarAncPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11378
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6401
SCIP_Real SCIPgetVarBdAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:3008
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:12080
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
Definition: scip_var.c:5176
SCIP_Real SCIPgetVarMultaggrLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8506
SCIP_Bool SCIPpscostThresholdProbabilityTest(SCIP *scip, SCIP_VAR *var, SCIP_Real frac, SCIP_Real threshold, SCIP_BRANCHDIR dir, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:11487
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:5210
SCIP_RETCODE SCIPremoveVarFromGlobalStructures(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:9796
SCIP_RETCODE SCIPtightenVarUbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6768
SCIP_Bool SCIPdoNotAggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:10929
void SCIPdisableVarHistory(SCIP *scip)
Definition: scip_var.c:11102
SCIP_Bool SCIPgetVarWasFixedAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:3026
SCIP_RETCODE SCIPincVarGMISumScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:12375
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:7515
SCIP_RETCODE SCIPchgVarUbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound)
Definition: scip_var.c:5964
SCIP_Real SCIPgetVarMultaggrLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8536
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:7699
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:8882
SCIP_RETCODE SCIPsetRelaxSolVal(SCIP *scip, SCIP_RELAX *relax, SCIP_VAR *var, SCIP_Real val)
Definition: scip_var.c:3158
SCIP_RETCODE SCIPtightenVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:8257
SCIP_Real SCIPgetVarAvgInferenceScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11976
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:4478
SCIP_Real SCIPgetVarPseudocostCountCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11350
SCIP_Real SCIPgetVarAvgInferenceScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11945
SCIP_RETCODE SCIPscaleVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real scale)
Definition: scip_var.c:9858
SCIP_RETCODE SCIPendStrongbranch(SCIP *scip)
Definition: scip_var.c:3488
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:5697
SCIP_Real SCIPgetVarMultaggrUbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8521
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:2119
SCIP_Real SCIPgetVarPseudocostCount(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11322
SCIP_Real SCIPadjustedVarLbExactFloat(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:5602
SCIP_Real SCIPgetVarPseudocostCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11296
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
Definition: scip_var.c:9647
SCIP_RETCODE SCIPchgVarName(SCIP *scip, SCIP_VAR *var, const char *name)
Definition: scip_var.c:1938
SCIP_RETCODE SCIPcalcNegatedCliquePartition(SCIP *scip, SCIP_VAR **vars, int nvars, int **probtoidxmap, int *probtoidxmapsize, int *cliquepartition, int *ncliques)
Definition: scip_var.c:9410
SCIP_Bool SCIPdoNotAggr(SCIP *scip)
Definition: scip_var.c:10909
SCIP_Real SCIPgetVarMultaggrUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8551
SCIP_RETCODE SCIPaggregateVarsExact(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_RATIONAL *scalarx, SCIP_RATIONAL *scalary, SCIP_RATIONAL *rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
Definition: scip_var.c:10692
SCIP_RETCODE SCIPupdateVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip_var.c:9958
SCIP_Real SCIPgetVarAvgConflictlength(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11837
SCIP_Bool SCIPisVarPscostRelerrorReliable(SCIP *scip, SCIP_VAR *var, SCIP_Real threshold, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:11506
SCIP_RETCODE SCIPgetBinvarRepresentatives(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **repvars, SCIP_Bool *negated)
Definition: scip_var.c:2283
SCIP_Bool SCIPdoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:10942
SCIP_Real SCIPgetVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11268
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:805
SCIP_Real SCIPgetVarAvgCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:12230
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:10550
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:7069
SCIP_RETCODE SCIPparseVarsPolynomialExact(SCIP *scip, char *str, SCIP_VAR ****monomialvars, SCIP_RATIONAL ***monomialcoefs, int *nmonomials, char **endptr, SCIP_Bool *success)
Definition: scip_var.c:1453
SCIP_RETCODE SCIPaddVarExactData(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *lb, SCIP_RATIONAL *ub, SCIP_RATIONAL *obj)
Definition: scip_var.c:299
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:5875
SCIP_RETCODE SCIPchgVarUbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:6088
SCIP_Real SCIPgetVarAvgInferencesCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11919
SCIP_RETCODE SCIPchgVarImplType(SCIP *scip, SCIP_VAR *var, SCIP_IMPLINTTYPE impltype, SCIP_Bool *infeasible)
Definition: scip_var.c:10218
SCIP_CLIQUE ** SCIPgetCliques(SCIP *scip)
Definition: scip_var.c:9566
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6651
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
Definition: scip_var.c:728
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:669
SCIP_RETCODE SCIPgetProbvarSum(SCIP *scip, SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
Definition: scip_var.c:2499
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: scip_var.c:10022
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:8680
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
Definition: scip_var.c:5118
SCIP_RETCODE SCIPchgVarLbGlobalExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound)
Definition: scip_var.c:5492
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:8621
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip_var.c:9917
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
Definition: scip_var.c:5296
SCIP_RETCODE SCIPchgVarUbGlobalExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound)
Definition: scip_var.c:5467
SCIP_RETCODE SCIPinferVarLbConsExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:7296
SCIP_Real SCIPgetVarFarkasCoef(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2698
SCIP_RETCODE SCIPgetVarClosestVub(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvub, int *closestvubidx)
Definition: scip_var.c:8592
SCIP_Real SCIPgetVarAvgCutoffsCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:12173
SCIP_RETCODE SCIPcreateVarImpl(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_IMPLINTTYPE impltype, 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:225
SCIP_RETCODE SCIPchgVarLbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazylb)
Definition: scip_var.c:6321
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2872
SCIP_Longint SCIPgetVarStrongbranchNode(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:5019
SCIP_RETCODE SCIPtransformVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
Definition: scip_var.c:2028
SCIP_RETCODE SCIPcalcCliquePartition(SCIP *scip, SCIP_VAR **vars, int nvars, int **probtoidxmap, int *probtoidxmapsize, int *cliquepartition, int *ncliques)
Definition: scip_var.c:9330
SCIP_Real SCIPgetVarDPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval, SCIP_Real discountfac)
Definition: scip_var.c:11570
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:10834
void SCIPfreeParseVarsPolynomialData(SCIP *scip, SCIP_VAR ****monomialvars, SCIP_Real ***monomialexps, SCIP_Real **monomialcoefs, int **monomialnvars, int nmonomials)
Definition: scip_var.c:1755
SCIP_LPSOLSTAT SCIPgetLastStrongbranchLPSolStat(SCIP *scip, SCIP_BRANCHDIR branchdir)
Definition: scip_var.c:4847
SCIP_RETCODE SCIPaddVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real addfactor)
Definition: scip_var.c:9886
int SCIPgetNCliquesCreated(SCIP *scip)
Definition: scip_var.c:9539
SCIP_RETCODE SCIPcleanupCliques(SCIP *scip, SCIP_Bool *infeasible)
Definition: scip_var.c:9469
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
Definition: scip_var.c:1887
SCIP_Real SCIPadjustedVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:5634
SCIP_Longint SCIPgetVarStrongbranchLPAge(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:5053
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:6141
SCIP_RETCODE SCIPgetProbvarLinearSumExact(SCIP *scip, SCIP_VAR **vars, SCIP_RATIONAL **scalars, int *nvars, int varssize, SCIP_RATIONAL *constant, int *requiredsize, SCIP_Bool mergemultiples)
Definition: scip_var.c:2443
SCIP_RETCODE SCIPmarkRelaxSolValid(SCIP *scip, SCIP_RELAX *relax, SCIP_Bool includeslp)
Definition: scip_var.c:3301
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:4632
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:4903
SCIP_Bool SCIPdoNotMultaggr(SCIP *scip)
Definition: scip_var.c:10919
SCIP_Real SCIPgetVarPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:11188
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:899
SCIP_Real SCIPgetVarConflictlengthScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11775
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:11457
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize)
Definition: scip_var.c:2378
SCIP_Real SCIPgetRelaxSolVal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:3347
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:4138
SCIP_Real SCIPadjustedVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real lb)
Definition: scip_var.c:5570
SCIP_Real SCIPgetVarAvgCutoffs(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:12145
SCIP_Real SCIPgetVarAncPseudocostVal(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:11214
SCIP_Bool SCIPisRelaxSolValid(SCIP *scip)
Definition: scip_var.c:3281
SCIP_RETCODE SCIPgetVarClosestVlb(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvlb, int *closestvlbidx)
Definition: scip_var.c:8569
SCIP_RETCODE SCIPparseVarsLinearsumExact(SCIP *scip, char *str, SCIP_VAR **vars, SCIP_RATIONAL **vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
Definition: scip_var.c:1007
SCIP_RETCODE SCIPchgVarType(SCIP *scip, SCIP_VAR *var, SCIP_VARTYPE vartype, SCIP_Bool *infeasible)
Definition: scip_var.c:10113
SCIP_RETCODE SCIPflattenVarAggregationGraph(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2332
SCIP_Real SCIPcomputeVarLbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8375
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:3051
SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)
Definition: scip_var.c:2166
SCIP_Real SCIPgetVarPseudocostScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:11613
SCIP_RETCODE SCIPinferVarUbConsExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:7174
SCIP_Bool SCIPhaveVarsCommonClique(SCIP *scip, SCIP_VAR *var1, SCIP_Bool value1, SCIP_VAR *var2, SCIP_Bool value2, SCIP_Bool regardimplics)
Definition: scip_var.c:9596
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:8740
SCIP_RETCODE SCIPsetRelaxSolVals(SCIP *scip, SCIP_RELAX *relax, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Bool includeslp)
Definition: scip_var.c:3191
SCIP_Real SCIPcalculatePscostConfidenceBound(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun, SCIP_CONFIDENCELEVEL clevel)
Definition: scip_var.c:11426
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:6230
SCIP_Real SCIPcomputeVarLbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8417
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:599
SCIP_Real SCIPgetVarPseudocostValCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta)
Definition: scip_var.c:11242
SCIP_RETCODE SCIPupdateVarPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: scip_var.c:11122
int SCIPgetNCliques(SCIP *scip)
Definition: scip_var.c:9512
SCIP_Real SCIPgetVarAvgGMIScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:12349
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:120
SCIP_Real SCIPadjustedVarUbExactFloat(SCIP *scip, SCIP_VAR *var, SCIP_Real ub)
Definition: scip_var.c:5666
SCIP_RETCODE SCIPaddVarBranchPriority(SCIP *scip, SCIP_VAR *var, int addpriority)
Definition: scip_var.c:9991
SCIP_RETCODE SCIPtransformVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:1988
SCIP_Real SCIPgetVarRedcost(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:2608
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11057
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
Definition: scip_var.c:10318
SCIP_RETCODE SCIPmarkRelaxSolInvalid(SCIP *scip)
Definition: scip_var.c:3326
SCIP_Real SCIPgetVarAvgInferenceCutoffScoreCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:12306
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:6964
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:4743
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
Definition: scip_var.c:2736
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:1100
SCIP_Real SCIPgetVarLastGMIScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:12403
SCIP_Real SCIPgetVarConflictScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11713
SCIP_RETCODE SCIPprintVar(SCIP *scip, SCIP_VAR *var, FILE *file)
Definition: scip_var.c:12465
SCIP_Real SCIPgetVarAvgCutoffScore(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:12199
SCIP_RETCODE SCIPchgVarLbNode(SCIP *scip, SCIP_NODE *node, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip_var.c:6044
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:184
SCIP_RETCODE SCIPsetVarLastGMIScore(SCIP *scip, SCIP_VAR *var, SCIP_Real gmieff)
Definition: scip_var.c:12429
SCIP_RETCODE SCIPchgVarUbLazy(SCIP *scip, SCIP_VAR *var, SCIP_Real lazyub)
Definition: scip_var.c:6362
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:7412
SCIP_RETCODE SCIPtryStrongbranchLPSol(SCIP *scip, SCIP_Bool *foundsol, SCIP_Bool *cutoff)
Definition: scip_var.c:4938
SCIP_RETCODE SCIPchgVarObjExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newobj)
Definition: scip_var.c:5420
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
Definition: scip_var.c:361
SCIP_RETCODE SCIPgetVarSols(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
Definition: scip_var.c:3071
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
Definition: scip_var.c:5372
SCIP_RETCODE SCIPupdateVarAncPseudocost(SCIP *scip, SCIP_VAR *var, SCIP_Real solvaldelta, SCIP_Real objdelta, SCIP_Real weight)
Definition: scip_var.c:11154
SCIP_RETCODE SCIPchgVarLbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound)
Definition: scip_var.c:5786
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
Definition: scip_var.c:2236
SCIP_Real SCIPgetVarAvgInferenceCutoffScore(SCIP *scip, SCIP_VAR *var, SCIP_Real cutoffweight)
Definition: scip_var.c:12262
SCIP_RETCODE SCIPwriteVarsList(SCIP *scip, FILE *file, SCIP_VAR **vars, int nvars, SCIP_Bool type, char delimiter)
Definition: scip_var.c:423
SCIP_Real SCIPcomputeVarUbGlobal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8396
SCIP_Real SCIPcomputeVarUbLocal(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:8462
SCIP_RETCODE SCIPgetActiveVars(SCIP *scip, SCIP_VAR **vars, int *nvars, int varssize, int *requiredsize)
Definition: scip_var.c:2574
int SCIPgetVarNStrongbranchs(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:5085
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
Definition: scip_var.c:474
SCIP_RETCODE SCIPgetProbvarSumExact(SCIP *scip, SCIP_VAR **var, SCIP_RATIONAL *scalar, SCIP_RATIONAL *constant)
Definition: scip_var.c:2538
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:4869
SCIP_Real SCIPgetVarVSIDS(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11649
SCIP_Real SCIPgetVarConflictlengthScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11806
SCIP_Bool SCIPisVarAggrCoefAcceptable(SCIP *scip, SCIP_VAR *var, SCIP_Real scalar)
Definition: scip_var.c:10962
SCIP_Real SCIPgetVarVSIDSCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11681
SCIP_Bool SCIPisStrongbranchDownFirst(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:3399
void SCIPenableVarHistory(SCIP *scip)
Definition: scip_var.c:11083
SCIP_Real SCIPgetVarImplRedcost(SCIP *scip, SCIP_VAR *var, SCIP_Bool varfixing)
Definition: scip_var.c:2653
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
Definition: scip_var.c:10998
SCIP_Real SCIPgetVarPseudocostVariance(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Bool onlycurrentrun)
Definition: scip_var.c:11404
SCIP_RETCODE SCIPgetNegatedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **negvars)
Definition: scip_var.c:2199
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
Definition: scip_var.c:2078
SCIP_RETCODE SCIPmultiaggregateVarExact(SCIP *scip, SCIP_VAR *var, int naggvars, SCIP_VAR **aggvars, SCIP_RATIONAL **scalars, SCIP_RATIONAL *constant, SCIP_Bool *infeasible, SCIP_Bool *aggregated)
Definition: scip_var.c:10879
SCIP_Real SCIPgetVarConflictScoreCurrentRun(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11744
SCIP_RETCODE SCIPtightenVarLbExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *newbound, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:6518
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:1853
SCIP_Real SCIPgetVarPseudocostScore(SCIP *scip, SCIP_VAR *var, SCIP_Real solval)
Definition: scip_var.c:11531
SCIP_RETCODE SCIPstartStrongbranch(SCIP *scip, SCIP_Bool enablepropagation)
Definition: scip_var.c:3430
SCIP_RETCODE SCIPclearRelaxSolVals(SCIP *scip, SCIP_RELAX *relax)
Definition: scip_var.c:3108
SCIP_RETCODE SCIPmarkDoNotAggrVar(SCIP *scip, SCIP_VAR *var)
Definition: scip_var.c:11024
SCIP_Real SCIPgetVarAvgInferences(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11891
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
Definition: scip_var.c:10984
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:7809
SCIP_RETCODE SCIPwriteVarsLinearsumExact(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_RATIONAL **vals, int nvars, SCIP_Bool type)
Definition: scip_var.c:533
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:6895
SCIP_Real SCIPgetVarAvgConflictlengthCurrentRun(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir)
Definition: scip_var.c:11863
void SCIPfreeParseVarsPolynomialDataExact(SCIP *scip, SCIP_VAR ****monomialvars, SCIP_RATIONAL ***monomialcoefs, int nmonomials)
Definition: scip_var.c:1806
SCIP_RETCODE SCIPsetRelaxSolValsSol(SCIP *scip, SCIP_RELAX *relax, SCIP_SOL *sol, SCIP_Bool includeslp)
Definition: scip_var.c:3233
SCIP_RETCODE SCIPchgVarBranchFactor(SCIP *scip, SCIP_VAR *var, SCIP_Real branchfactor)
Definition: scip_var.c:9830
SCIP_RETCODE SCIPtightenVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
Definition: scip_var.c:8026
SCIP_RETCODE SCIPcomputeVarLbLocalExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *result)
Definition: scip_var.c:8438
SCIP_RETCODE SCIPfixVarExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
Definition: scip_var.c:10420
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:7584
SCIP_RETCODE SCIPaddVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real addobj)
Definition: scip_var.c:5519
SCIP_RETCODE SCIPcomputeVarUbLocalExact(SCIP *scip, SCIP_VAR *var, SCIP_RATIONAL *result)
Definition: scip_var.c:8483
static const SCIP_Real scalars[]
Definition: lp.c:5959
public methods for problem variables
type definitions for constraints and constraint handlers
type definitions for branching and inference history
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:48
type definitions for implications, variable bounds, and cliques
type definitions for LP management
enum SCIP_LPSolStat SCIP_LPSOLSTAT
Definition: type_lp.h:52
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:60
type definitions for miscellaneous datastructures
enum SCIP_Confidencelevel SCIP_CONFIDENCELEVEL
Definition: type_misc.h:53
type definitions for propagators
type definitions for relaxators
result codes for SCIP callback methods
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure
type definitions for storing primal CIP solutions
type definitions for branch and bound tree
type definitions for problem variables
struct SCIP_VarData SCIP_VARDATA
Definition: type_var.h:167
enum SCIP_ImplintType SCIP_IMPLINTTYPE
Definition: type_var.h:117
#define SCIP_DECL_VARDELORIG(x)
Definition: type_var.h:180
#define SCIP_DECL_VARTRANS(x)
Definition: type_var.h:200
#define SCIP_DECL_VARCOPY(x)
Definition: type_var.h:243
#define SCIP_DECL_VARDELTRANS(x)
Definition: type_var.h:213
enum SCIP_LockType SCIP_LOCKTYPE
Definition: type_var.h:144
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:73