1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /*                                                                           */
3 /*                  This file is part of the program and library             */
4 /*         SCIP --- Solving Constraint Integer Programs                      */
5 /*                                                                           */
6 /*    Copyright (C) 2002-2021 Konrad-Zuse-Zentrum                            */
7 /*                            fuer Informationstechnik Berlin                */
8 /*                                                                           */
9 /*  SCIP is distributed under the terms of the ZIB Academic License.         */
10 /*                                                                           */
11 /*  You should have received a copy of the ZIB Academic License              */
12 /*  along with SCIP; see the file COPYING. If not visit scipopt.org.         */
13 /*                                                                           */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file   scip_prob.h
17  * @ingroup PUBLICCOREAPI
18  * @brief  public methods for global and local (sub)problems
19  * @author Tobias Achterberg
20  * @author Timo Berthold
21  * @author Thorsten Koch
22  * @author Alexander Martin
23  * @author Marc Pfetsch
24  * @author Kati Wolter
25  * @author Gregor Hendel
26  * @author Leona Gottwald
27  */
28 
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
30 
31 #ifndef __SCIP_SCIP_PROB_H__
32 #define __SCIP_SCIP_PROB_H__
33 
34 
35 #include "scip/def.h"
36 #include "scip/type_conflict.h"
37 #include "scip/type_cons.h"
38 #include "scip/type_event.h"
39 #include "scip/type_misc.h"
40 #include "scip/type_prob.h"
41 #include "scip/type_result.h"
42 #include "scip/type_retcode.h"
43 #include "scip/type_scip.h"
44 #include "scip/type_sol.h"
45 #include "scip/type_tree.h"
46 #include "scip/type_var.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 /**@addtogroup GlobalProblemMethods
53  *
54  * @{
55  */
56 
57 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
58  *  If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
59  *  to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
60  *
61  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
62  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
63  *
64  *  @pre This method can be called if @p scip is in one of the following stages:
65  *       - \ref SCIP_STAGE_INIT
66  *       - \ref SCIP_STAGE_PROBLEM
67  *       - \ref SCIP_STAGE_TRANSFORMED
68  *       - \ref SCIP_STAGE_PRESOLVING
69  *       - \ref SCIP_STAGE_PRESOLVED
70  *       - \ref SCIP_STAGE_SOLVING
71  *       - \ref SCIP_STAGE_SOLVED
72  *       - \ref SCIP_STAGE_FREE
73  *
74  *  @post After calling this method, \SCIP reaches the following stage:
75  *        - \ref SCIP_STAGE_PROBLEM
76  */
77 SCIP_EXPORT
78 SCIP_RETCODE SCIPcreateProb(
79    SCIP*                 scip,               /**< SCIP data structure */
80    const char*           name,               /**< problem name */
81    SCIP_DECL_PROBDELORIG ((*probdelorig)),   /**< frees user data of original problem */
82    SCIP_DECL_PROBTRANS   ((*probtrans)),     /**< creates user data of transformed problem by transforming original user data */
83    SCIP_DECL_PROBDELTRANS((*probdeltrans)),  /**< frees user data of transformed problem */
84    SCIP_DECL_PROBINITSOL ((*probinitsol)),   /**< solving process initialization method of transformed data */
85    SCIP_DECL_PROBEXITSOL ((*probexitsol)),   /**< solving process deinitialization method of transformed data */
86    SCIP_DECL_PROBCOPY    ((*probcopy)),      /**< copies user data if you want to copy it to a subscip, or NULL */
87    SCIP_PROBDATA*        probdata            /**< user problem data set by the reader */
88    );
89 
90 /** creates empty problem and initializes all solving data structures (the objective sense is set to MINIMIZE)
91  *  all callback methods will be set to NULL and can be set afterwards, if needed, via SCIPsetProbDelorig(),
92  *  SCIPsetProbTrans(), SCIPsetProbDeltrans(), SCIPsetProbInitsol(), SCIPsetProbExitsol(), and
93  *  SCIPsetProbCopy()
94  *  If the problem type requires the use of variable pricers, these pricers should be added to the problem with calls
95  *  to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
96  *
97  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
98  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
99  *
100  *  @pre This method can be called if @p scip is in one of the following stages:
101  *       - \ref SCIP_STAGE_INIT
102  *       - \ref SCIP_STAGE_PROBLEM
103  *       - \ref SCIP_STAGE_TRANSFORMED
104  *       - \ref SCIP_STAGE_PRESOLVING
105  *       - \ref SCIP_STAGE_PRESOLVED
106  *       - \ref SCIP_STAGE_SOLVING
107  *       - \ref SCIP_STAGE_SOLVED
108  *       - \ref SCIP_STAGE_FREE
109  *
110  *  @post After calling this method, \SCIP reaches the following stage:
111  *        - \ref SCIP_STAGE_PROBLEM
112  */
113 SCIP_EXPORT
114 SCIP_RETCODE SCIPcreateProbBasic(
115    SCIP*                 scip,               /**< SCIP data structure */
116    const char*           name                /**< problem name */
117    );
118 
119 /** sets callback to free user data of original problem
120  *
121  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
122  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
123  *
124  *  @pre This method can be called if @p scip is in one of the following stages:
125  *       - \ref SCIP_STAGE_PROBLEM
126  */
127 SCIP_EXPORT
128 SCIP_RETCODE SCIPsetProbDelorig(
129    SCIP*                 scip,               /**< SCIP data structure */
130    SCIP_DECL_PROBDELORIG ((*probdelorig))    /**< frees user data of original problem */
131    );
132 
133 /** sets callback to create user data of transformed problem by transforming original user data
134  *
135  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
136  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
137  *
138  *  @pre This method can be called if @p scip is in one of the following stages:
139  *       - \ref SCIP_STAGE_PROBLEM
140  */
141 SCIP_EXPORT
142 SCIP_RETCODE SCIPsetProbTrans(
143    SCIP*                 scip,               /**< SCIP data structure */
144    SCIP_DECL_PROBTRANS   ((*probtrans))      /**< creates user data of transformed problem by transforming original user data */
145    );
146 
147 /** sets callback to free user data of transformed problem
148  *
149  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
150  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
151  *
152  *  @pre This method can be called if @p scip is in one of the following stages:
153  *       - \ref SCIP_STAGE_PROBLEM
154  */
155 SCIP_EXPORT
156 SCIP_RETCODE SCIPsetProbDeltrans(
157    SCIP*                 scip,               /**< SCIP data structure */
158    SCIP_DECL_PROBDELTRANS((*probdeltrans))   /**< frees user data of transformed problem */
159    );
160 
161 /** sets solving process initialization callback of transformed data
162  *
163  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
164  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
165  *
166  *  @pre This method can be called if @p scip is in one of the following stages:
167  *       - \ref SCIP_STAGE_PROBLEM
168  */
169 SCIP_EXPORT
170 SCIP_RETCODE SCIPsetProbInitsol(
171    SCIP*                 scip,               /**< SCIP data structure */
172    SCIP_DECL_PROBINITSOL ((*probinitsol))    /**< solving process initialization method of transformed data */
173    );
174 
175 /** sets solving process deinitialization callback of transformed data
176  *
177  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
178  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
179  *
180  *  @pre This method can be called if @p scip is in one of the following stages:
181  *       - \ref SCIP_STAGE_PROBLEM
182  */
183 SCIP_EXPORT
184 SCIP_RETCODE SCIPsetProbExitsol(
185    SCIP*                 scip,               /**< SCIP data structure */
186    SCIP_DECL_PROBEXITSOL ((*probexitsol))    /**< solving process deinitialization method of transformed data */
187    );
188 
189 /** sets callback to copy user data to a subscip
190  *
191  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
192  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
193  *
194  *  @pre This method can be called if @p scip is in one of the following stages:
195  *       - \ref SCIP_STAGE_PROBLEM
196  */
197 SCIP_EXPORT
198 SCIP_RETCODE SCIPsetProbCopy(
199    SCIP*                 scip,               /**< SCIP data structure */
200    SCIP_DECL_PROBCOPY    ((*probcopy))       /**< copies user data if you want to copy it to a subscip, or NULL */
201    );
202 
203 /** reads problem from file and initializes all solving data structures
204  *
205  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
206  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
207  *
208  *  @pre This method can be called if @p scip is in one of the following stages:
209  *       - \ref SCIP_STAGE_INIT
210  *       - \ref SCIP_STAGE_PROBLEM
211  *       - \ref SCIP_STAGE_TRANSFORMED
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  *       - \ref SCIP_STAGE_EXITSOLVE
218  *
219  *  @post After the method was called, \SCIP is in one of the following stages:
220  *       - \ref SCIP_STAGE_INIT if reading failed (usually, when a SCIP_READERROR occurs)
221  *       - \ref SCIP_STAGE_PROBLEM if the problem file was successfully read
222  */
223 SCIP_EXPORT
224 SCIP_RETCODE SCIPreadProb(
225    SCIP*                 scip,               /**< SCIP data structure */
226    const char*           filename,           /**< problem file name */
227    const char*           extension           /**< extension of the desired file reader,
228                                               *   or NULL if file extension should be used */
229    );
230 
231 /** writes original problem to file
232  *
233  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
234  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
235  *
236  *  @pre This method can be called if @p scip is in one of the following stages:
237  *       - \ref SCIP_STAGE_PROBLEM
238  *       - \ref SCIP_STAGE_TRANSFORMING
239  *       - \ref SCIP_STAGE_TRANSFORMED
240  *       - \ref SCIP_STAGE_INITPRESOLVE
241  *       - \ref SCIP_STAGE_PRESOLVING
242  *       - \ref SCIP_STAGE_EXITPRESOLVE
243  *       - \ref SCIP_STAGE_PRESOLVED
244  *       - \ref SCIP_STAGE_INITSOLVE
245  *       - \ref SCIP_STAGE_SOLVING
246  *       - \ref SCIP_STAGE_SOLVED
247  *       - \ref SCIP_STAGE_EXITSOLVE
248  *       - \ref SCIP_STAGE_FREETRANS
249  */
250 SCIP_EXPORT
251 SCIP_RETCODE SCIPwriteOrigProblem(
252    SCIP*                 scip,               /**< SCIP data structure */
253    const char*           filename,           /**< output file (or NULL for standard output) */
254    const char*           extension,          /**< extension of the desired file reader,
255                                               *   or NULL if file extension should be used */
256    SCIP_Bool             genericnames        /**< use generic variable and constraint names? */
257    );
258 
259 /** writes transformed problem which are valid in the current node to file
260  *
261  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
262  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
263  *
264  *  @pre This method can be called if @p scip is in one of the following stages:
265  *       - \ref SCIP_STAGE_TRANSFORMED
266  *       - \ref SCIP_STAGE_INITPRESOLVE
267  *       - \ref SCIP_STAGE_PRESOLVING
268  *       - \ref SCIP_STAGE_EXITPRESOLVE
269  *       - \ref SCIP_STAGE_PRESOLVED
270  *       - \ref SCIP_STAGE_INITSOLVE
271  *       - \ref SCIP_STAGE_SOLVING
272  *       - \ref SCIP_STAGE_SOLVED
273  *       - \ref SCIP_STAGE_EXITSOLVE
274  *
275  *  @note If you want the write all constraints (including the once which are redundant for example), you need to set
276  *        the parameter <write/allconss> to TRUE
277  */
278 SCIP_EXPORT
279 SCIP_RETCODE SCIPwriteTransProblem(
280    SCIP*                 scip,               /**< SCIP data structure */
281    const char*           filename,           /**< output file (or NULL for standard output) */
282    const char*           extension,          /**< extension of the desired file reader,
283                                               *   or NULL if file extension should be used */
284    SCIP_Bool             genericnames        /**< using generic variable and constraint names? */
285    );
286 
287 /** frees problem and solution process data
288  *
289  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
290  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
291  *
292  *  @pre This method can be called if @p scip is in one of the following stages:
293  *       - \ref SCIP_STAGE_INIT
294  *       - \ref SCIP_STAGE_PROBLEM
295  *       - \ref SCIP_STAGE_TRANSFORMED
296  *       - \ref SCIP_STAGE_PRESOLVING
297  *       - \ref SCIP_STAGE_PRESOLVED
298  *       - \ref SCIP_STAGE_SOLVING
299  *       - \ref SCIP_STAGE_SOLVED
300  *       - \ref SCIP_STAGE_FREE
301  *
302  *  @post After this method was called, SCIP is in the following stage:
303  *       - \ref SCIP_STAGE_INIT
304  */
305 SCIP_EXPORT
306 SCIP_RETCODE SCIPfreeProb(
307    SCIP*                 scip                /**< SCIP data structure */
308    );
309 
310 /** permutes parts of the problem data structure
311  *
312  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
313  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
314  *
315  *  @pre This method can be called if @p scip is in one of the following stages:
316  *       - \ref SCIP_STAGE_PROBLEM
317  *       - \ref SCIP_STAGE_TRANSFORMED
318  */
319 SCIP_EXPORT
320 SCIP_RETCODE SCIPpermuteProb(
321    SCIP*                 scip,               /**< SCIP data structure */
322    unsigned int          randseed,           /**< seed value for random generator */
323    SCIP_Bool             permuteconss,       /**< should the list of constraints in each constraint handler be permuted? */
324    SCIP_Bool             permutebinvars,     /**< should the list of binary variables be permuted? */
325    SCIP_Bool             permuteintvars,     /**< should the list of integer variables be permuted? */
326    SCIP_Bool             permuteimplvars,    /**< should the list of implicit integer variables be permuted? */
327    SCIP_Bool             permutecontvars     /**< should the list of continuous integer variables be permuted? */
328    );
329 
330 /** gets user problem data
331  *
332  *  @return a SCIP_PROBDATA pointer, or NULL if no problem data was allocated
333  *
334  *  @pre This method can be called if @p scip is in one of the following stages:
335  *       - \ref SCIP_STAGE_PROBLEM
336  *       - \ref SCIP_STAGE_TRANSFORMING
337  *       - \ref SCIP_STAGE_TRANSFORMED
338  *       - \ref SCIP_STAGE_INITPRESOLVE
339  *       - \ref SCIP_STAGE_PRESOLVING
340  *       - \ref SCIP_STAGE_EXITPRESOLVE
341  *       - \ref SCIP_STAGE_PRESOLVED
342  *       - \ref SCIP_STAGE_INITSOLVE
343  *       - \ref SCIP_STAGE_SOLVING
344  *       - \ref SCIP_STAGE_SOLVED
345  *       - \ref SCIP_STAGE_EXITSOLVE
346  *       - \ref SCIP_STAGE_FREETRANS
347  */
348 SCIP_EXPORT
349 SCIP_PROBDATA* SCIPgetProbData(
350    SCIP*                 scip                /**< SCIP data structure */
351    );
352 
353 /** sets user problem data
354  *
355  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
356  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
357  *
358  *  @pre This method can be called if @p scip is in one of the following stages:
359  *       - \ref SCIP_STAGE_PROBLEM
360  *       - \ref SCIP_STAGE_TRANSFORMING
361  *       - \ref SCIP_STAGE_TRANSFORMED
362  *       - \ref SCIP_STAGE_INITPRESOLVE
363  *       - \ref SCIP_STAGE_PRESOLVING
364  *       - \ref SCIP_STAGE_EXITPRESOLVE
365  *       - \ref SCIP_STAGE_PRESOLVED
366  *       - \ref SCIP_STAGE_INITSOLVE
367  *       - \ref SCIP_STAGE_SOLVING
368  *       - \ref SCIP_STAGE_SOLVED
369  *       - \ref SCIP_STAGE_EXITSOLVE
370  *       - \ref SCIP_STAGE_FREETRANS
371  */
372 SCIP_EXPORT
373 SCIP_RETCODE SCIPsetProbData(
374    SCIP*                 scip,               /**< SCIP data structure */
375    SCIP_PROBDATA*        probdata            /**< user problem data to use */
376    );
377 
378 /** returns name of the current problem instance
379  *
380  *  @return name of the current problem instance
381  *
382  *  @pre This method can be called if @p scip is in one of the following stages:
383  *       - \ref SCIP_STAGE_PROBLEM
384  *       - \ref SCIP_STAGE_TRANSFORMING
385  *       - \ref SCIP_STAGE_TRANSFORMED
386  *       - \ref SCIP_STAGE_INITPRESOLVE
387  *       - \ref SCIP_STAGE_PRESOLVING
388  *       - \ref SCIP_STAGE_EXITPRESOLVE
389  *       - \ref SCIP_STAGE_PRESOLVED
390  *       - \ref SCIP_STAGE_INITSOLVE
391  *       - \ref SCIP_STAGE_SOLVING
392  *       - \ref SCIP_STAGE_SOLVED
393  *       - \ref SCIP_STAGE_EXITSOLVE
394  *       - \ref SCIP_STAGE_FREETRANS
395  */
396 SCIP_EXPORT
397 const char* SCIPgetProbName(
398    SCIP*                 scip                /**< SCIP data structure */
399    );
400 
401 /** sets name of the current problem instance
402  *
403  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
404  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
405  *
406  *  @pre This method can be called if @p scip is in one of the following stages:
407  *       - \ref SCIP_STAGE_PROBLEM
408  *       - \ref SCIP_STAGE_TRANSFORMING
409  *       - \ref SCIP_STAGE_TRANSFORMED
410  *       - \ref SCIP_STAGE_INITPRESOLVE
411  *       - \ref SCIP_STAGE_PRESOLVING
412  *       - \ref SCIP_STAGE_EXITPRESOLVE
413  *       - \ref SCIP_STAGE_PRESOLVED
414  *       - \ref SCIP_STAGE_INITSOLVE
415  *       - \ref SCIP_STAGE_SOLVING
416  *       - \ref SCIP_STAGE_SOLVED
417  *       - \ref SCIP_STAGE_EXITSOLVE
418  *       - \ref SCIP_STAGE_FREETRANS
419  */
420 SCIP_EXPORT
421 SCIP_RETCODE SCIPsetProbName(
422    SCIP*                 scip,               /**< SCIP data structure */
423    const char*           name                /**< name to be set */
424    );
425 
426 /** changes the objective function
427  *
428  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
429  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
430  *
431  *  @pre This method can be called if @p scip is in one of the following stages:
432  *       - \ref SCIP_STAGE_PROBLEM
433  *       - \ref SCIP_STAGE_PRESOLVED
434  *
435  *  @note This method should be only used to change the objective function during two reoptimization runs and is only
436  *        recommended to an experienced user.
437  *
438  *  @note All variables not given in \p vars array are assumed to have an objective coefficient of zero.
439  */
440 SCIP_EXPORT
441 SCIP_RETCODE SCIPchgReoptObjective(
442    SCIP*                 scip,               /**< SCIP data structure */
443    SCIP_OBJSENSE         objsense,           /**< new objective function */
444    SCIP_VAR**            vars,               /**< problem variables */
445    SCIP_Real*            coefs,              /**< objective coefficients */
446    int                   nvars               /**< variables in vars array */
447    );
448 
449 /** returns objective sense of original problem
450  *
451  *  @return objective sense of original problem
452  *
453  *  @pre This method can be called if @p scip is in one of the following stages:
454  *       - \ref SCIP_STAGE_PROBLEM
455  *       - \ref SCIP_STAGE_TRANSFORMING
456  *       - \ref SCIP_STAGE_TRANSFORMED
457  *       - \ref SCIP_STAGE_INITPRESOLVE
458  *       - \ref SCIP_STAGE_PRESOLVING
459  *       - \ref SCIP_STAGE_EXITPRESOLVE
460  *       - \ref SCIP_STAGE_PRESOLVED
461  *       - \ref SCIP_STAGE_INITSOLVE
462  *       - \ref SCIP_STAGE_SOLVING
463  *       - \ref SCIP_STAGE_SOLVED
464  *       - \ref SCIP_STAGE_EXITSOLVE
465  *       - \ref SCIP_STAGE_FREETRANS
466  */
467 SCIP_EXPORT
468 SCIP_OBJSENSE SCIPgetObjsense(
469    SCIP*                 scip                /**< SCIP data structure */
470    );
471 
472 /** sets objective sense of problem
473  *
474  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
475  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
476  *
477  *  @pre This method can be called if @p scip is in one of the following stages:
478  *       - \ref SCIP_STAGE_PROBLEM
479  */
480 SCIP_EXPORT
481 SCIP_RETCODE SCIPsetObjsense(
482    SCIP*                 scip,               /**< SCIP data structure */
483    SCIP_OBJSENSE         objsense            /**< new objective sense */
484    );
485 
486 /** adds offset of objective function
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_PRESOLVING
493  */
494 SCIP_EXPORT
495 SCIP_RETCODE SCIPaddObjoffset(
496    SCIP*                 scip,               /**< SCIP data structure */
497    SCIP_Real             addval              /**< value to add to objective offset */
498    );
499 
500 /** adds offset of objective function to original problem and to all existing solution in original space
501  *
502  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
503  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
504  *
505  *  @pre This method can be called if @p scip is in one of the following stages:
506  *       - \ref SCIP_STAGE_PROBLEM
507  */
508 SCIP_EXPORT
509 SCIP_RETCODE SCIPaddOrigObjoffset(
510    SCIP*                 scip,               /**< SCIP data structure */
511    SCIP_Real             addval              /**< value to add to objective offset */
512    );
513 
514 /** returns the objective offset of the original problem
515  *
516  *  @return the objective offset of the original problem
517  *
518  *  @pre This method can be called if @p scip is in one of the following stages:
519  *       - \ref SCIP_STAGE_PROBLEM
520  *       - \ref SCIP_STAGE_TRANSFORMING
521  *       - \ref SCIP_STAGE_TRANSFORMED
522  *       - \ref SCIP_STAGE_INITPRESOLVE
523  *       - \ref SCIP_STAGE_PRESOLVING
524  *       - \ref SCIP_STAGE_EXITPRESOLVE
525  *       - \ref SCIP_STAGE_PRESOLVED
526  *       - \ref SCIP_STAGE_INITSOLVE
527  *       - \ref SCIP_STAGE_SOLVING
528  *       - \ref SCIP_STAGE_SOLVED
529  */
530 SCIP_EXPORT
531 SCIP_Real SCIPgetOrigObjoffset(
532    SCIP*                 scip                /**< SCIP data structure */
533    );
534 
535 /** returns the objective scale of the original problem
536  *
537  *  @return the objective scale of the original problem
538  *
539  *  @pre This method can be called if @p scip is in one of the following stages:
540  *       - \ref SCIP_STAGE_PROBLEM
541  *       - \ref SCIP_STAGE_TRANSFORMING
542  *       - \ref SCIP_STAGE_TRANSFORMED
543  *       - \ref SCIP_STAGE_INITPRESOLVE
544  *       - \ref SCIP_STAGE_PRESOLVING
545  *       - \ref SCIP_STAGE_EXITPRESOLVE
546  *       - \ref SCIP_STAGE_PRESOLVED
547  *       - \ref SCIP_STAGE_INITSOLVE
548  *       - \ref SCIP_STAGE_SOLVING
549  *       - \ref SCIP_STAGE_SOLVED
550  */
551 SCIP_EXPORT
552 SCIP_Real SCIPgetOrigObjscale(
553    SCIP*                 scip                /**< SCIP data structure */
554    );
555 
556 /** returns the objective offset of the transformed problem
557  *
558  *  @return the objective offset of the transformed problem
559  *
560  *  @pre This method can be called if @p scip is in one of the following stages:
561  *       - \ref SCIP_STAGE_TRANSFORMED
562  *       - \ref SCIP_STAGE_INITPRESOLVE
563  *       - \ref SCIP_STAGE_PRESOLVING
564  *       - \ref SCIP_STAGE_EXITPRESOLVE
565  *       - \ref SCIP_STAGE_PRESOLVED
566  *       - \ref SCIP_STAGE_INITSOLVE
567  *       - \ref SCIP_STAGE_SOLVING
568  *       - \ref SCIP_STAGE_SOLVED
569  */
570 SCIP_EXPORT
571 SCIP_Real SCIPgetTransObjoffset(
572    SCIP*                 scip                /**< SCIP data structure */
573    );
574 
575 /** returns the objective scale of the transformed problem
576  *
577  *  @return the objective scale of the transformed problem
578  *
579  *  @pre This method can be called if @p scip is in one of the following stages:
580  *       - \ref SCIP_STAGE_TRANSFORMED
581  *       - \ref SCIP_STAGE_INITPRESOLVE
582  *       - \ref SCIP_STAGE_PRESOLVING
583  *       - \ref SCIP_STAGE_EXITPRESOLVE
584  *       - \ref SCIP_STAGE_PRESOLVED
585  *       - \ref SCIP_STAGE_INITSOLVE
586  *       - \ref SCIP_STAGE_SOLVING
587  *       - \ref SCIP_STAGE_SOLVED
588  */
589 SCIP_EXPORT
590 SCIP_Real SCIPgetTransObjscale(
591    SCIP*                 scip                /**< SCIP data structure */
592    );
593 
594 /** sets limit on objective function, such that only solutions better than this limit are accepted
595  *
596  *  @note SCIP will only look for solutions with a strictly better objective value, thus, e.g., prune
597  *        all branch-and-bound nodes with dual bound equal or worse to the objective limit.
598  *        However, SCIP will also collect solutions with objective value worse than the objective limit and
599  *        use them to run improvement heuristics on them.
600  *  @note If SCIP can prove that there exists no solution with a strictly better objective value, the solving status
601  *        will normally be infeasible (the objective limit is interpreted as part of the problem).
602  *        The only exception is that by chance, SCIP found a solution with the same objective value and thus
603  *        proved the optimality of this solution, resulting in solution status optimal.
604  *
605  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
606  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
607  *
608  *  @pre This method can be called if @p scip is in one of the following stages:
609  *       - \ref SCIP_STAGE_PROBLEM
610  *       - \ref SCIP_STAGE_TRANSFORMED
611  *       - \ref SCIP_STAGE_INITPRESOLVE
612  *       - \ref SCIP_STAGE_PRESOLVING
613  *       - \ref SCIP_STAGE_EXITPRESOLVE
614  *       - \ref SCIP_STAGE_PRESOLVED
615  *       - \ref SCIP_STAGE_SOLVING
616  */
617 SCIP_EXPORT
618 SCIP_RETCODE SCIPsetObjlimit(
619    SCIP*                 scip,               /**< SCIP data structure */
620    SCIP_Real             objlimit            /**< new primal objective limit */
621    );
622 
623 /** returns current limit on objective function
624  *
625  *  @return the current objective limit of the original problem
626  *
627  *  @pre This method can be called if @p scip is in one of the following stages:
628  *       - \ref SCIP_STAGE_PROBLEM
629  *       - \ref SCIP_STAGE_TRANSFORMING
630  *       - \ref SCIP_STAGE_TRANSFORMED
631  *       - \ref SCIP_STAGE_INITPRESOLVE
632  *       - \ref SCIP_STAGE_PRESOLVING
633  *       - \ref SCIP_STAGE_EXITPRESOLVE
634  *       - \ref SCIP_STAGE_PRESOLVED
635  *       - \ref SCIP_STAGE_INITSOLVE
636  *       - \ref SCIP_STAGE_SOLVING
637  *       - \ref SCIP_STAGE_SOLVED
638  */
639 SCIP_EXPORT
640 SCIP_Real SCIPgetObjlimit(
641    SCIP*                 scip                /**< SCIP data structure */
642    );
643 
644 /** informs SCIP, that the objective value is always integral in every feasible solution
645  *
646  *  @return \ref SCIP_OKAY is returned if everything worked. otherwise a suitable error code is passed. see \ref
647  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
648  *
649  *  @pre This method can be called if @p scip is in one of the following stages:
650  *       - \ref SCIP_STAGE_PROBLEM
651  *       - \ref SCIP_STAGE_TRANSFORMING
652  *       - \ref SCIP_STAGE_INITPRESOLVE
653  *       - \ref SCIP_STAGE_EXITPRESOLVE
654  *       - \ref SCIP_STAGE_SOLVING
655  *
656  *  @note This function should be used to inform SCIP that the objective function is integral, helping to improve the
657  *        performance. This is useful when using column generation. If no column generation (pricing) is used, SCIP
658  *        automatically detects whether the objective function is integral or can be scaled to be integral. However, in
659  *        any case, the user has to make sure that no variable is added during the solving process that destroys this
660  *        property.
661  */
662 SCIP_EXPORT
663 SCIP_RETCODE SCIPsetObjIntegral(
664    SCIP*                 scip                /**< SCIP data structure */
665    );
666 
667 /** returns whether the objective value is known to be integral in every feasible solution
668  *
669  *  @return TRUE, if objective value is known to be always integral, otherwise FALSE
670  *
671  *  @pre This method can be called if @p scip is in one of the following stages:
672  *       - \ref SCIP_STAGE_PROBLEM
673  *       - \ref SCIP_STAGE_TRANSFORMING
674  *       - \ref SCIP_STAGE_INITPRESOLVE
675  *       - \ref SCIP_STAGE_PRESOLVING
676  *       - \ref SCIP_STAGE_EXITPRESOLVE
677  *       - \ref SCIP_STAGE_PRESOLVED
678  *       - \ref SCIP_STAGE_SOLVING
679  *
680  *  @note If no pricing is performed, SCIP automatically detects whether the objective function is integral or can be
681  *        scaled to be integral, helping to improve performance. This function returns the result. Otherwise
682  *        SCIPsetObjIntegral() can be used to inform SCIP. However, in any case, the user has to make sure that no
683  *        variable is added during the solving process that destroys this property.
684  */
685 SCIP_EXPORT
686 SCIP_Bool SCIPisObjIntegral(
687    SCIP*                 scip                /**< SCIP data structure */
688    );
689 
690 /** returns the Euclidean norm of the objective function vector (available only for transformed problem)
691  *
692  *  @return the Euclidean norm of the transformed objective function vector
693  *
694  *  @pre This method can be called if @p scip is in one of the following stages:
695  *       - \ref SCIP_STAGE_TRANSFORMED
696  *       - \ref SCIP_STAGE_INITPRESOLVE
697  *       - \ref SCIP_STAGE_PRESOLVING
698  *       - \ref SCIP_STAGE_EXITPRESOLVE
699  *       - \ref SCIP_STAGE_PRESOLVED
700  *       - \ref SCIP_STAGE_INITSOLVE
701  *       - \ref SCIP_STAGE_SOLVING
702  *       - \ref SCIP_STAGE_SOLVED
703  *       - \ref SCIP_STAGE_EXITSOLVE
704  */
705 SCIP_EXPORT
706 SCIP_Real SCIPgetObjNorm(
707    SCIP*                 scip                /**< SCIP data structure */
708    );
709 
710 /** adds variable to the problem
711  *
712  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
713  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
714  *
715  *  @pre This method can be called if @p scip is in one of the following stages:
716  *       - \ref SCIP_STAGE_PROBLEM
717  *       - \ref SCIP_STAGE_TRANSFORMING
718  *       - \ref SCIP_STAGE_INITPRESOLVE
719  *       - \ref SCIP_STAGE_PRESOLVING
720  *       - \ref SCIP_STAGE_EXITPRESOLVE
721  *       - \ref SCIP_STAGE_PRESOLVED
722  *       - \ref SCIP_STAGE_SOLVING
723  */
724 SCIP_EXPORT
725 SCIP_RETCODE SCIPaddVar(
726    SCIP*                 scip,               /**< SCIP data structure */
727    SCIP_VAR*             var                 /**< variable to add */
728    );
729 
730 /** adds variable to the problem and uses it as pricing candidate to enter the LP
731  *
732  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
733  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
734  *
735  *  @pre This method can only be called if @p scip is in stage \ref SCIP_STAGE_SOLVING
736  */
737 SCIP_EXPORT
738 SCIP_RETCODE SCIPaddPricedVar(
739    SCIP*                 scip,               /**< SCIP data structure */
740    SCIP_VAR*             var,                /**< variable to add */
741    SCIP_Real             score               /**< pricing score of variable (the larger, the better the variable) */
742    );
743 
744 /** removes variable from the problem
745  *
746  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
747  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
748  *
749  *  @pre This method can be called if @p scip is in one of the following stages:
750  *       - \ref SCIP_STAGE_PROBLEM
751  *       - \ref SCIP_STAGE_TRANSFORMING
752  *       - \ref SCIP_STAGE_TRANSFORMED
753  *       - \ref SCIP_STAGE_PRESOLVING
754  *       - \ref SCIP_STAGE_FREETRANS
755  */
756 SCIP_EXPORT
757 SCIP_RETCODE SCIPdelVar(
758    SCIP*                 scip,               /**< SCIP data structure */
759    SCIP_VAR*             var,                /**< variable to delete */
760    SCIP_Bool*            deleted             /**< pointer to store whether variable was successfully marked to be deleted */
761    );
762 
763 /** gets variables of the problem along with the numbers of different variable types; data may become invalid after
764  *  calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and SCIPmultiaggregateVar()
765  *
766  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
767  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
768  *
769  *  @pre This method can be called if @p scip is in one of the following stages:
770  *       - \ref SCIP_STAGE_PROBLEM
771  *       - \ref SCIP_STAGE_TRANSFORMED
772  *       - \ref SCIP_STAGE_INITPRESOLVE
773  *       - \ref SCIP_STAGE_PRESOLVING
774  *       - \ref SCIP_STAGE_EXITPRESOLVE
775  *       - \ref SCIP_STAGE_PRESOLVED
776  *       - \ref SCIP_STAGE_INITSOLVE
777  *       - \ref SCIP_STAGE_SOLVING
778  *       - \ref SCIP_STAGE_SOLVED
779  *       - \ref SCIP_STAGE_EXITSOLVE
780  *
781  *  @note Variables in the vars array are ordered: binaries first, then integers, implicit integers and continuous last.
782  */
783 SCIP_EXPORT
784 SCIP_RETCODE SCIPgetVarsData(
785    SCIP*                 scip,               /**< SCIP data structure */
786    SCIP_VAR***           vars,               /**< pointer to store variables array or NULL if not needed */
787    int*                  nvars,              /**< pointer to store number of variables or NULL if not needed */
788    int*                  nbinvars,           /**< pointer to store number of binary variables or NULL if not needed */
789    int*                  nintvars,           /**< pointer to store number of integer variables or NULL if not needed */
790    int*                  nimplvars,          /**< pointer to store number of implicit integral vars or NULL if not needed */
791    int*                  ncontvars           /**< pointer to store number of continuous variables or NULL if not needed */
792    );
793 
794 /** gets array with active problem variables
795  *
796  *  @return array with active problem variables
797  *
798  *  @pre This method can be called if @p scip is in one of the following stages:
799  *       - \ref SCIP_STAGE_PROBLEM
800  *       - \ref SCIP_STAGE_TRANSFORMED
801  *       - \ref SCIP_STAGE_INITPRESOLVE
802  *       - \ref SCIP_STAGE_PRESOLVING
803  *       - \ref SCIP_STAGE_EXITPRESOLVE
804  *       - \ref SCIP_STAGE_PRESOLVED
805  *       - \ref SCIP_STAGE_INITSOLVE
806  *       - \ref SCIP_STAGE_SOLVING
807  *       - \ref SCIP_STAGE_SOLVED
808  *       - \ref SCIP_STAGE_EXITSOLVE
809  *
810  *  @warning If your are using the methods which add or change bound of variables (e.g., SCIPchgVarType(), SCIPfixVar(),
811  *           SCIPaggregateVars(), and SCIPmultiaggregateVar()), it can happen that the internal variable array (which is
812  *           accessed via this method) gets resized and/or resorted. This can invalid the data pointer which is returned
813  *           by this method.
814  *
815  *  @note Variables in the array are ordered: binaries first, then integers, implicit integers and continuous last.
816  */
817 SCIP_EXPORT
818 SCIP_VAR** SCIPgetVars(
819    SCIP*                 scip                /**< SCIP data structure */
820    );
821 
822 /** gets number of active problem variables
823  *
824  *  @return the number of active problem variables
825  *
826  *  @pre This method can be called if @p scip is in one of the following stages:
827  *       - \ref SCIP_STAGE_PROBLEM
828  *       - \ref SCIP_STAGE_TRANSFORMED
829  *       - \ref SCIP_STAGE_INITPRESOLVE
830  *       - \ref SCIP_STAGE_PRESOLVING
831  *       - \ref SCIP_STAGE_EXITPRESOLVE
832  *       - \ref SCIP_STAGE_PRESOLVED
833  *       - \ref SCIP_STAGE_INITSOLVE
834  *       - \ref SCIP_STAGE_SOLVING
835  *       - \ref SCIP_STAGE_SOLVED
836  *       - \ref SCIP_STAGE_EXITSOLVE
837  */
838 SCIP_EXPORT
839 int SCIPgetNVars(
840    SCIP*                 scip                /**< SCIP data structure */
841    );
842 
843 /** gets number of binary active problem variables
844  *
845  *  @return the number of binary active problem variables
846  *
847  *  @pre This method can be called if @p scip is in one of the following stages:
848  *       - \ref SCIP_STAGE_PROBLEM
849  *       - \ref SCIP_STAGE_TRANSFORMED
850  *       - \ref SCIP_STAGE_INITPRESOLVE
851  *       - \ref SCIP_STAGE_PRESOLVING
852  *       - \ref SCIP_STAGE_EXITPRESOLVE
853  *       - \ref SCIP_STAGE_PRESOLVED
854  *       - \ref SCIP_STAGE_INITSOLVE
855  *       - \ref SCIP_STAGE_SOLVING
856  *       - \ref SCIP_STAGE_SOLVED
857  *       - \ref SCIP_STAGE_EXITSOLVE
858  */
859 SCIP_EXPORT
860 int SCIPgetNBinVars(
861    SCIP*                 scip                /**< SCIP data structure */
862    );
863 
864 /** gets number of integer active problem variables
865  *
866  *  @return the number of integer active problem variables
867  *
868  *  @pre This method can be called if @p scip is in one of the following stages:
869  *       - \ref SCIP_STAGE_PROBLEM
870  *       - \ref SCIP_STAGE_TRANSFORMED
871  *       - \ref SCIP_STAGE_INITPRESOLVE
872  *       - \ref SCIP_STAGE_PRESOLVING
873  *       - \ref SCIP_STAGE_EXITPRESOLVE
874  *       - \ref SCIP_STAGE_PRESOLVED
875  *       - \ref SCIP_STAGE_INITSOLVE
876  *       - \ref SCIP_STAGE_SOLVING
877  *       - \ref SCIP_STAGE_SOLVED
878  *       - \ref SCIP_STAGE_EXITSOLVE
879  */
880 SCIP_EXPORT
881 int SCIPgetNIntVars(
882    SCIP*                 scip                /**< SCIP data structure */
883    );
884 
885 /** gets number of implicit integer active problem variables
886  *
887  *  @return the number of implicit integer active problem variables
888  *
889  *  @pre This method can be called if @p scip is in one of the following stages:
890  *       - \ref SCIP_STAGE_PROBLEM
891  *       - \ref SCIP_STAGE_TRANSFORMED
892  *       - \ref SCIP_STAGE_INITPRESOLVE
893  *       - \ref SCIP_STAGE_PRESOLVING
894  *       - \ref SCIP_STAGE_EXITPRESOLVE
895  *       - \ref SCIP_STAGE_PRESOLVED
896  *       - \ref SCIP_STAGE_INITSOLVE
897  *       - \ref SCIP_STAGE_SOLVING
898  *       - \ref SCIP_STAGE_SOLVED
899  *       - \ref SCIP_STAGE_EXITSOLVE
900  */
901 SCIP_EXPORT
902 int SCIPgetNImplVars(
903    SCIP*                 scip                /**< SCIP data structure */
904    );
905 
906 /** gets number of continuous active problem variables
907  *
908  *  @return the number of continuous active problem variables
909  *
910  *  @pre This method can be called if @p scip is in one of the following stages:
911  *       - \ref SCIP_STAGE_PROBLEM
912  *       - \ref SCIP_STAGE_TRANSFORMED
913  *       - \ref SCIP_STAGE_INITPRESOLVE
914  *       - \ref SCIP_STAGE_PRESOLVING
915  *       - \ref SCIP_STAGE_EXITPRESOLVE
916  *       - \ref SCIP_STAGE_PRESOLVED
917  *       - \ref SCIP_STAGE_INITSOLVE
918  *       - \ref SCIP_STAGE_SOLVING
919  *       - \ref SCIP_STAGE_SOLVED
920  *       - \ref SCIP_STAGE_EXITSOLVE
921  */
922 SCIP_EXPORT
923 int SCIPgetNContVars(
924    SCIP*                 scip                /**< SCIP data structure */
925    );
926 
927 /** gets number of active problem variables with a non-zero objective coefficient
928  *
929  *  @note In case of the original problem the number of variables is counted. In case of the transformed problem the
930  *        number of variables is just returned since it is stored internally
931  *
932  *  @return the number of active problem variables with a non-zero objective coefficient
933  *
934  *  @pre This method can be called if @p scip is in one of the following stages:
935  *       - \ref SCIP_STAGE_PROBLEM
936  *       - \ref SCIP_STAGE_TRANSFORMED
937  *       - \ref SCIP_STAGE_INITPRESOLVE
938  *       - \ref SCIP_STAGE_PRESOLVING
939  *       - \ref SCIP_STAGE_EXITPRESOLVE
940  *       - \ref SCIP_STAGE_PRESOLVED
941  *       - \ref SCIP_STAGE_INITSOLVE
942  *       - \ref SCIP_STAGE_SOLVING
943  *       - \ref SCIP_STAGE_SOLVED
944  */
945 SCIP_EXPORT
946 int SCIPgetNObjVars(
947    SCIP*                 scip                /**< SCIP data structure */
948    );
949 
950 /** gets array with fixed and aggregated problem variables; data may become invalid after
951  *  calls to SCIPfixVar(), SCIPaggregateVars(), and SCIPmultiaggregateVar()
952  *
953  *  @return an array with fixed and aggregated problem variables; data may become invalid after
954  *          calls to SCIPfixVar(), SCIPaggregateVars(), and SCIPmultiaggregateVar()
955  *
956  *  @pre This method can be called if @p scip is in one of the following stages:
957  *       - \ref SCIP_STAGE_PROBLEM
958  *       - \ref SCIP_STAGE_TRANSFORMED
959  *       - \ref SCIP_STAGE_INITPRESOLVE
960  *       - \ref SCIP_STAGE_PRESOLVING
961  *       - \ref SCIP_STAGE_EXITPRESOLVE
962  *       - \ref SCIP_STAGE_PRESOLVED
963  *       - \ref SCIP_STAGE_INITSOLVE
964  *       - \ref SCIP_STAGE_SOLVING
965  *       - \ref SCIP_STAGE_SOLVED
966  */
967 SCIP_EXPORT
968 SCIP_VAR** SCIPgetFixedVars(
969    SCIP*                 scip                /**< SCIP data structure */
970    );
971 
972 /** gets number of fixed or aggregated problem variables
973  *
974  *  @return the number of fixed or aggregated problem variables
975  *
976  *  @pre This method can be called if @p scip is in one of the following stages:
977  *       - \ref SCIP_STAGE_PROBLEM
978  *       - \ref SCIP_STAGE_TRANSFORMED
979  *       - \ref SCIP_STAGE_INITPRESOLVE
980  *       - \ref SCIP_STAGE_PRESOLVING
981  *       - \ref SCIP_STAGE_EXITPRESOLVE
982  *       - \ref SCIP_STAGE_PRESOLVED
983  *       - \ref SCIP_STAGE_INITSOLVE
984  *       - \ref SCIP_STAGE_SOLVING
985  *       - \ref SCIP_STAGE_SOLVED
986  */
987 SCIP_EXPORT
988 int SCIPgetNFixedVars(
989    SCIP*                 scip                /**< SCIP data structure */
990    );
991 
992 /** gets variables of the original problem along with the numbers of different variable types; data may become invalid
993  *  after a call to SCIPchgVarType()
994  *
995  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
996  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
997  *
998  *  @pre This method can be called if @p scip is in one of the following stages:
999  *       - \ref SCIP_STAGE_PROBLEM
1000  *       - \ref SCIP_STAGE_TRANSFORMING
1001  *       - \ref SCIP_STAGE_TRANSFORMED
1002  *       - \ref SCIP_STAGE_INITPRESOLVE
1003  *       - \ref SCIP_STAGE_PRESOLVING
1004  *       - \ref SCIP_STAGE_EXITPRESOLVE
1005  *       - \ref SCIP_STAGE_PRESOLVED
1006  *       - \ref SCIP_STAGE_INITSOLVE
1007  *       - \ref SCIP_STAGE_SOLVING
1008  *       - \ref SCIP_STAGE_SOLVED
1009  *       - \ref SCIP_STAGE_EXITSOLVE
1010  *       - \ref SCIP_STAGE_FREETRANS
1011  */
1012 SCIP_EXPORT
1013 SCIP_RETCODE SCIPgetOrigVarsData(
1014    SCIP*                 scip,               /**< SCIP data structure */
1015    SCIP_VAR***           vars,               /**< pointer to store variables array or NULL if not needed */
1016    int*                  nvars,              /**< pointer to store number of variables or NULL if not needed */
1017    int*                  nbinvars,           /**< pointer to store number of binary variables or NULL if not needed */
1018    int*                  nintvars,           /**< pointer to store number of integer variables or NULL if not needed */
1019    int*                  nimplvars,          /**< pointer to store number of implicit integral vars or NULL if not needed */
1020    int*                  ncontvars           /**< pointer to store number of continuous variables or NULL if not needed */
1021    );
1022 
1023 /** gets array with original problem variables; data may become invalid after
1024  *  a call to SCIPchgVarType()
1025  *
1026  *  @return an array with original problem variables; data may become invalid after
1027  *          a call to SCIPchgVarType()
1028  *
1029  *  @pre This method can be called if @p scip is in one of the following stages:
1030  *       - \ref SCIP_STAGE_PROBLEM
1031  *       - \ref SCIP_STAGE_TRANSFORMING
1032  *       - \ref SCIP_STAGE_TRANSFORMED
1033  *       - \ref SCIP_STAGE_INITPRESOLVE
1034  *       - \ref SCIP_STAGE_PRESOLVING
1035  *       - \ref SCIP_STAGE_EXITPRESOLVE
1036  *       - \ref SCIP_STAGE_PRESOLVED
1037  *       - \ref SCIP_STAGE_INITSOLVE
1038  *       - \ref SCIP_STAGE_SOLVING
1039  *       - \ref SCIP_STAGE_SOLVED
1040  *       - \ref SCIP_STAGE_EXITSOLVE
1041  *       - \ref SCIP_STAGE_FREETRANS
1042  */
1043 SCIP_EXPORT
1044 SCIP_VAR** SCIPgetOrigVars(
1045    SCIP*                 scip                /**< SCIP data structure */
1046    );
1047 
1048 /** gets number of original problem variables
1049  *
1050  *  @return the number of original problem variables
1051  *
1052  *  @pre This method can be called if @p scip is in one of the following stages:
1053  *       - \ref SCIP_STAGE_PROBLEM
1054  *       - \ref SCIP_STAGE_TRANSFORMING
1055  *       - \ref SCIP_STAGE_TRANSFORMED
1056  *       - \ref SCIP_STAGE_INITPRESOLVE
1057  *       - \ref SCIP_STAGE_PRESOLVING
1058  *       - \ref SCIP_STAGE_EXITPRESOLVE
1059  *       - \ref SCIP_STAGE_PRESOLVED
1060  *       - \ref SCIP_STAGE_INITSOLVE
1061  *       - \ref SCIP_STAGE_SOLVING
1062  *       - \ref SCIP_STAGE_SOLVED
1063  *       - \ref SCIP_STAGE_EXITSOLVE
1064  *       - \ref SCIP_STAGE_FREETRANS
1065  */
1066 SCIP_EXPORT
1067 int SCIPgetNOrigVars(
1068    SCIP*                 scip                /**< SCIP data structure */
1069    );
1070 
1071 /** gets number of binary variables in the original problem
1072  *
1073  *  @return the number of binary variables in the original problem
1074  *
1075  *  @pre This method can be called if @p scip is in one of the following stages:
1076  *       - \ref SCIP_STAGE_PROBLEM
1077  *       - \ref SCIP_STAGE_TRANSFORMING
1078  *       - \ref SCIP_STAGE_TRANSFORMED
1079  *       - \ref SCIP_STAGE_INITPRESOLVE
1080  *       - \ref SCIP_STAGE_PRESOLVING
1081  *       - \ref SCIP_STAGE_EXITPRESOLVE
1082  *       - \ref SCIP_STAGE_PRESOLVED
1083  *       - \ref SCIP_STAGE_INITSOLVE
1084  *       - \ref SCIP_STAGE_SOLVING
1085  *       - \ref SCIP_STAGE_SOLVED
1086  *       - \ref SCIP_STAGE_EXITSOLVE
1087  *       - \ref SCIP_STAGE_FREETRANS
1088  */
1089 SCIP_EXPORT
1090 int SCIPgetNOrigBinVars(
1091    SCIP*                 scip                /**< SCIP data structure */
1092    );
1093 
1094 /** gets the number of integer variables in the original problem
1095  *
1096  *  @return the number of integer variables in the original problem
1097  *
1098  *  @pre This method can be called if @p scip is in one of the following stages:
1099  *       - \ref SCIP_STAGE_PROBLEM
1100  *       - \ref SCIP_STAGE_TRANSFORMING
1101  *       - \ref SCIP_STAGE_TRANSFORMED
1102  *       - \ref SCIP_STAGE_INITPRESOLVE
1103  *       - \ref SCIP_STAGE_PRESOLVING
1104  *       - \ref SCIP_STAGE_EXITPRESOLVE
1105  *       - \ref SCIP_STAGE_PRESOLVED
1106  *       - \ref SCIP_STAGE_INITSOLVE
1107  *       - \ref SCIP_STAGE_SOLVING
1108  *       - \ref SCIP_STAGE_SOLVED
1109  *       - \ref SCIP_STAGE_EXITSOLVE
1110  *       - \ref SCIP_STAGE_FREETRANS
1111  */
1112 SCIP_EXPORT
1113 int SCIPgetNOrigIntVars(
1114    SCIP*                 scip                /**< SCIP data structure */
1115    );
1116 
1117 /** gets number of implicit integer variables in the original problem
1118  *
1119  *  @return the number of implicit integer variables in the original problem
1120  *
1121  *  @pre This method can be called if @p scip is in one of the following stages:
1122  *       - \ref SCIP_STAGE_PROBLEM
1123  *       - \ref SCIP_STAGE_TRANSFORMING
1124  *       - \ref SCIP_STAGE_TRANSFORMED
1125  *       - \ref SCIP_STAGE_INITPRESOLVE
1126  *       - \ref SCIP_STAGE_PRESOLVING
1127  *       - \ref SCIP_STAGE_EXITPRESOLVE
1128  *       - \ref SCIP_STAGE_PRESOLVED
1129  *       - \ref SCIP_STAGE_INITSOLVE
1130  *       - \ref SCIP_STAGE_SOLVING
1131  *       - \ref SCIP_STAGE_SOLVED
1132  *       - \ref SCIP_STAGE_EXITSOLVE
1133  *       - \ref SCIP_STAGE_FREETRANS
1134  */
1135 SCIP_EXPORT
1136 int SCIPgetNOrigImplVars(
1137    SCIP*                 scip                /**< SCIP data structure */
1138    );
1139 
1140 /** gets number of continuous variables in the original problem
1141  *
1142  *  @return the number of continuous variables in the original problem
1143  *
1144  *  @pre This method can be called if @p scip is in one of the following stages:
1145  *       - \ref SCIP_STAGE_PROBLEM
1146  *       - \ref SCIP_STAGE_TRANSFORMING
1147  *       - \ref SCIP_STAGE_TRANSFORMED
1148  *       - \ref SCIP_STAGE_INITPRESOLVE
1149  *       - \ref SCIP_STAGE_PRESOLVING
1150  *       - \ref SCIP_STAGE_EXITPRESOLVE
1151  *       - \ref SCIP_STAGE_PRESOLVED
1152  *       - \ref SCIP_STAGE_INITSOLVE
1153  *       - \ref SCIP_STAGE_SOLVING
1154  *       - \ref SCIP_STAGE_SOLVED
1155  *       - \ref SCIP_STAGE_EXITSOLVE
1156  *       - \ref SCIP_STAGE_FREETRANS
1157  */
1158 SCIP_EXPORT
1159 int SCIPgetNOrigContVars(
1160    SCIP*                 scip                /**< SCIP data structure */
1161    );
1162 
1163 /** gets number of all problem variables created during creation and solving of problem;
1164  *  this includes also variables that were deleted in the meantime
1165  *
1166  *  @return the number of all problem variables created during creation and solving of problem;
1167  *          this includes also variables that were deleted in the meantime
1168  *
1169  *  @pre This method can be called if @p scip is in one of the following stages:
1170  *       - \ref SCIP_STAGE_PROBLEM
1171  *       - \ref SCIP_STAGE_TRANSFORMING
1172  *       - \ref SCIP_STAGE_TRANSFORMED
1173  *       - \ref SCIP_STAGE_INITPRESOLVE
1174  *       - \ref SCIP_STAGE_PRESOLVING
1175  *       - \ref SCIP_STAGE_EXITPRESOLVE
1176  *       - \ref SCIP_STAGE_PRESOLVED
1177  *       - \ref SCIP_STAGE_INITSOLVE
1178  *       - \ref SCIP_STAGE_SOLVING
1179  *       - \ref SCIP_STAGE_SOLVED
1180  *       - \ref SCIP_STAGE_EXITSOLVE
1181  *       - \ref SCIP_STAGE_FREETRANS
1182  */
1183 SCIP_EXPORT
1184 int SCIPgetNTotalVars(
1185    SCIP*                 scip                /**< SCIP data structure */
1186    );
1187 
1188 /** gets variables of the original or transformed problem along with the numbers of different variable types;
1189  *  the returned problem space (original or transformed) corresponds to the given solution;
1190  *  data may become invalid after calls to SCIPchgVarType(), SCIPfixVar(), SCIPaggregateVars(), and
1191  *  SCIPmultiaggregateVar()
1192  *
1193  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1194  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1195  *
1196  *  @pre This method can be called if @p scip is in one of the following stages:
1197  *       - \ref SCIP_STAGE_PROBLEM
1198  *       - \ref SCIP_STAGE_TRANSFORMED
1199  *       - \ref SCIP_STAGE_INITPRESOLVE
1200  *       - \ref SCIP_STAGE_PRESOLVING
1201  *       - \ref SCIP_STAGE_EXITPRESOLVE
1202  *       - \ref SCIP_STAGE_PRESOLVED
1203  *       - \ref SCIP_STAGE_INITSOLVE
1204  *       - \ref SCIP_STAGE_SOLVING
1205  *       - \ref SCIP_STAGE_SOLVED
1206  */
1207 SCIP_EXPORT
1208 SCIP_RETCODE SCIPgetSolVarsData(
1209    SCIP*                 scip,               /**< SCIP data structure */
1210    SCIP_SOL*             sol,                /**< primal solution that selects the problem space, NULL for current solution */
1211    SCIP_VAR***           vars,               /**< pointer to store variables array or NULL if not needed */
1212    int*                  nvars,              /**< pointer to store number of variables or NULL if not needed */
1213    int*                  nbinvars,           /**< pointer to store number of binary variables or NULL if not needed */
1214    int*                  nintvars,           /**< pointer to store number of integer variables or NULL if not needed */
1215    int*                  nimplvars,          /**< pointer to store number of implicit integral vars or NULL if not needed */
1216    int*                  ncontvars           /**< pointer to store number of continuous variables or NULL if not needed */
1217    );
1218 
1219 /** returns variable of given name in the problem, or NULL if not existing
1220  *
1221  *  @return variable of given name in the problem, or NULL if not existing
1222  *
1223  *  @pre This method can be called if @p scip is in one of the following stages:
1224  *       - \ref SCIP_STAGE_PROBLEM
1225  *       - \ref SCIP_STAGE_TRANSFORMING
1226  *       - \ref SCIP_STAGE_TRANSFORMED
1227  *       - \ref SCIP_STAGE_INITPRESOLVE
1228  *       - \ref SCIP_STAGE_PRESOLVING
1229  *       - \ref SCIP_STAGE_EXITPRESOLVE
1230  *       - \ref SCIP_STAGE_PRESOLVED
1231  *       - \ref SCIP_STAGE_INITSOLVE
1232  *       - \ref SCIP_STAGE_SOLVING
1233  *       - \ref SCIP_STAGE_SOLVED
1234  *       - \ref SCIP_STAGE_EXITSOLVE
1235  *       - \ref SCIP_STAGE_FREETRANS
1236  */
1237 SCIP_EXPORT
1238 SCIP_VAR* SCIPfindVar(
1239    SCIP*                 scip,               /**< SCIP data structure */
1240    const char*           name                /**< name of variable to find */
1241    );
1242 
1243 /** returns TRUE iff all potential variables exist in the problem, and FALSE, if there may be additional variables,
1244  *  that will be added in pricing and improve the objective value
1245  *
1246  *  @return TRUE, if all potential variables exist in the problem; FALSE, otherwise
1247  *
1248  *  @pre This method can be called if @p scip is in one of the following stages:
1249  *       - \ref SCIP_STAGE_TRANSFORMING
1250  *       - \ref SCIP_STAGE_TRANSFORMED
1251  *       - \ref SCIP_STAGE_INITPRESOLVE
1252  *       - \ref SCIP_STAGE_PRESOLVING
1253  *       - \ref SCIP_STAGE_EXITPRESOLVE
1254  *       - \ref SCIP_STAGE_PRESOLVED
1255  *       - \ref SCIP_STAGE_INITSOLVE
1256  *       - \ref SCIP_STAGE_SOLVING
1257  *       - \ref SCIP_STAGE_SOLVED
1258  *       - \ref SCIP_STAGE_EXITSOLVE
1259  *       - \ref SCIP_STAGE_FREETRANS
1260  */
1261 SCIP_EXPORT
1262 SCIP_Bool SCIPallVarsInProb(
1263    SCIP*                 scip                /**< SCIP data structure */
1264    );
1265 
1266 /** adds constraint to the problem; if constraint is only valid locally, it is added to the local subproblem of the
1267  *  current node (and all of its subnodes); otherwise it is added to the global problem;
1268  *  if a local constraint is added at the root node, it is automatically upgraded into a global constraint
1269  *
1270  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1271  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1272  *
1273  *  @pre This method can be called if @p scip is in one of the following stages:
1274  *       - \ref SCIP_STAGE_PROBLEM
1275  *       - \ref SCIP_STAGE_INITPRESOLVE
1276  *       - \ref SCIP_STAGE_PRESOLVING
1277  *       - \ref SCIP_STAGE_EXITPRESOLVE
1278  *       - \ref SCIP_STAGE_PRESOLVED
1279  *       - \ref SCIP_STAGE_INITSOLVE
1280  *       - \ref SCIP_STAGE_SOLVING
1281  *       - \ref SCIP_STAGE_EXITSOLVE
1282  */
1283 SCIP_EXPORT
1284 SCIP_RETCODE SCIPaddCons(
1285    SCIP*                 scip,               /**< SCIP data structure */
1286    SCIP_CONS*            cons                /**< constraint to add */
1287    );
1288 
1289 /** globally removes constraint from all subproblems; removes constraint from the constraint set change data of the
1290  *  node, where it was added, or from the problem, if it was a problem constraint
1291  *
1292  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1293  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1294  *
1295  *  @pre This method can be called if @p scip is in one of the following stages:
1296  *       - \ref SCIP_STAGE_PROBLEM
1297  *       - \ref SCIP_STAGE_INITPRESOLVE
1298  *       - \ref SCIP_STAGE_PRESOLVING
1299  *       - \ref SCIP_STAGE_EXITPRESOLVE
1300  *       - \ref SCIP_STAGE_INITSOLVE
1301  *       - \ref SCIP_STAGE_SOLVING
1302  *       - \ref SCIP_STAGE_EXITSOLVE
1303  */
1304 SCIP_EXPORT
1305 SCIP_RETCODE SCIPdelCons(
1306    SCIP*                 scip,               /**< SCIP data structure */
1307    SCIP_CONS*            cons                /**< constraint to delete */
1308    );
1309 
1310 /** returns original constraint of given name in the problem, or NULL if not existing
1311  *
1312  *  @return original constraint of given name in the problem, or NULL if not existing
1313  *
1314  *  @pre This method can be called if @p scip is in one of the following stages:
1315  *       - \ref SCIP_STAGE_PROBLEM
1316  *       - \ref SCIP_STAGE_TRANSFORMING
1317  *       - \ref SCIP_STAGE_TRANSFORMED
1318  *       - \ref SCIP_STAGE_INITPRESOLVE
1319  *       - \ref SCIP_STAGE_PRESOLVING
1320  *       - \ref SCIP_STAGE_EXITPRESOLVE
1321  *       - \ref SCIP_STAGE_INITSOLVE
1322  *       - \ref SCIP_STAGE_SOLVING
1323  *       - \ref SCIP_STAGE_SOLVED
1324  *       - \ref SCIP_STAGE_EXITSOLVE
1325  *       - \ref SCIP_STAGE_FREETRANS */
1326 SCIP_EXPORT
1327 SCIP_CONS* SCIPfindOrigCons(
1328    SCIP*                 scip,               /**< SCIP data structure */
1329    const char*           name                /**< name of constraint to find */
1330    );
1331 
1332 /** returns constraint of given name in the problem, or NULL if not existing
1333  *
1334  *  @return constraint of given name in the problem, or NULL if not existing
1335  *
1336  *  @pre This method can be called if @p scip is in one of the following stages:
1337  *       - \ref SCIP_STAGE_PROBLEM
1338  *       - \ref SCIP_STAGE_TRANSFORMING
1339  *       - \ref SCIP_STAGE_TRANSFORMED
1340  *       - \ref SCIP_STAGE_INITPRESOLVE
1341  *       - \ref SCIP_STAGE_PRESOLVING
1342  *       - \ref SCIP_STAGE_EXITPRESOLVE
1343  *       - \ref SCIP_STAGE_PRESOLVED
1344  *       - \ref SCIP_STAGE_INITSOLVE
1345  *       - \ref SCIP_STAGE_SOLVING
1346  *       - \ref SCIP_STAGE_SOLVED
1347  *       - \ref SCIP_STAGE_EXITSOLVE
1348  *       - \ref SCIP_STAGE_FREETRANS
1349  */
1350 SCIP_EXPORT
1351 SCIP_CONS* SCIPfindCons(
1352    SCIP*                 scip,               /**< SCIP data structure */
1353    const char*           name                /**< name of constraint to find */
1354    );
1355 
1356 /** gets number of upgraded constraints
1357  *
1358  *  @return number of upgraded constraints
1359  *
1360  *  @pre This method can be called if @p scip is in one of the following stages:
1361  *       - \ref SCIP_STAGE_PROBLEM
1362  *       - \ref SCIP_STAGE_TRANSFORMED
1363  *       - \ref SCIP_STAGE_INITPRESOLVE
1364  *       - \ref SCIP_STAGE_PRESOLVING
1365  *       - \ref SCIP_STAGE_PRESOLVED
1366  *       - \ref SCIP_STAGE_EXITPRESOLVE
1367  *       - \ref SCIP_STAGE_SOLVING
1368  *       - \ref SCIP_STAGE_SOLVED
1369  */
1370 SCIP_EXPORT
1371 int SCIPgetNUpgrConss(
1372    SCIP*                 scip                /**< SCIP data structure */
1373    );
1374 
1375 /** gets total number of globally valid constraints currently in the problem
1376  *
1377  *  @return total number of globally valid constraints currently in the problem
1378  *
1379  *  @pre This method can be called if @p scip is in one of the following stages:
1380  *       - \ref SCIP_STAGE_PROBLEM
1381  *       - \ref SCIP_STAGE_TRANSFORMED
1382  *       - \ref SCIP_STAGE_INITPRESOLVE
1383  *       - \ref SCIP_STAGE_PRESOLVING
1384  *       - \ref SCIP_STAGE_EXITPRESOLVE
1385  *       - \ref SCIP_STAGE_PRESOLVED
1386  *       - \ref SCIP_STAGE_INITSOLVE
1387  *       - \ref SCIP_STAGE_SOLVING
1388  *       - \ref SCIP_STAGE_SOLVED
1389  */
1390 SCIP_EXPORT
1391 int SCIPgetNConss(
1392    SCIP*                 scip                /**< SCIP data structure */
1393    );
1394 
1395 /** gets array of globally valid constraints currently in the problem
1396  *
1397  *  @return array of globally valid constraints currently in the problem
1398  *
1399  *  @pre This method can be called if @p scip is in one of the following stages:
1400  *       - \ref SCIP_STAGE_PROBLEM
1401  *       - \ref SCIP_STAGE_TRANSFORMED
1402  *       - \ref SCIP_STAGE_INITPRESOLVE
1403  *       - \ref SCIP_STAGE_PRESOLVING
1404  *       - \ref SCIP_STAGE_EXITPRESOLVE
1405  *       - \ref SCIP_STAGE_PRESOLVED
1406  *       - \ref SCIP_STAGE_INITSOLVE
1407  *       - \ref SCIP_STAGE_SOLVING
1408  *       - \ref SCIP_STAGE_SOLVED
1409  *
1410  *  @warning If your are using the method SCIPaddCons(), it can happen that the internal constraint array (which is
1411  *           accessed via this method) gets resized. This can invalid the pointer which is returned by this method.
1412  */
1413 SCIP_EXPORT
1414 SCIP_CONS** SCIPgetConss(
1415    SCIP*                 scip                /**< SCIP data structure */
1416    );
1417 
1418 /** gets total number of constraints in the original problem
1419  *
1420  *  @return total number of constraints in the original problem
1421  *
1422  *  @pre This method can be called if @p scip is in one of the following stages:
1423  *       - \ref SCIP_STAGE_PROBLEM
1424  *       - \ref SCIP_STAGE_TRANSFORMING
1425  *       - \ref SCIP_STAGE_TRANSFORMED
1426  *       - \ref SCIP_STAGE_INITPRESOLVE
1427  *       - \ref SCIP_STAGE_PRESOLVING
1428  *       - \ref SCIP_STAGE_EXITPRESOLVE
1429  *       - \ref SCIP_STAGE_PRESOLVED
1430  *       - \ref SCIP_STAGE_INITSOLVE
1431  *       - \ref SCIP_STAGE_SOLVING
1432  *       - \ref SCIP_STAGE_SOLVED
1433  *       - \ref SCIP_STAGE_EXITSOLVE
1434  *       - \ref SCIP_STAGE_FREETRANS
1435  */
1436 SCIP_EXPORT
1437 int SCIPgetNOrigConss(
1438    SCIP*                 scip                /**< SCIP data structure */
1439    );
1440 
1441 /** gets array of constraints in the original problem
1442  *
1443  *  @return array of constraints in the original problem
1444  *
1445  *  @pre This method can be called if @p scip is in one of the following stages:
1446  *       - \ref SCIP_STAGE_PROBLEM
1447  *       - \ref SCIP_STAGE_TRANSFORMING
1448  *       - \ref SCIP_STAGE_TRANSFORMED
1449  *       - \ref SCIP_STAGE_INITPRESOLVE
1450  *       - \ref SCIP_STAGE_PRESOLVING
1451  *       - \ref SCIP_STAGE_EXITPRESOLVE
1452  *       - \ref SCIP_STAGE_PRESOLVED
1453  *       - \ref SCIP_STAGE_INITSOLVE
1454  *       - \ref SCIP_STAGE_SOLVING
1455  *       - \ref SCIP_STAGE_SOLVED
1456  *       - \ref SCIP_STAGE_EXITSOLVE
1457  *       - \ref SCIP_STAGE_FREETRANS
1458  */
1459 SCIP_EXPORT
1460 SCIP_CONS** SCIPgetOrigConss(
1461    SCIP*                 scip                /**< SCIP data structure */
1462    );
1463 
1464 /** computes the number of check constraint in the current node (loop over all constraint handler and cumulates the
1465  *  number of check constraints)
1466  *
1467  *  @return returns the number of check constraints
1468  *
1469  *  @pre This method can be called if @p scip is in one of the following stages:
1470  *       - \ref SCIP_STAGE_TRANSFORMED
1471  *       - \ref SCIP_STAGE_INITPRESOLVE
1472  *       - \ref SCIP_STAGE_PRESOLVING
1473  *       - \ref SCIP_STAGE_EXITPRESOLVE
1474  *       - \ref SCIP_STAGE_PRESOLVED
1475  *       - \ref SCIP_STAGE_INITSOLVE
1476  *       - \ref SCIP_STAGE_SOLVING
1477  */
1478 SCIP_EXPORT
1479 int SCIPgetNCheckConss(
1480    SCIP*                 scip                /**< SCIP data structure */
1481    );
1482 
1483 /**@} */
1484 
1485 /**@addtogroup LocalSubproblemMethods
1486  *
1487  * @{
1488  */
1489 
1490 /** adds a conflict to a given node or globally to the problem if @p node == NULL.
1491  *
1492  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1493  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1494  *
1495  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1496  *       - \ref SCIP_STAGE_INITPRESOLVE
1497  *       - \ref SCIP_STAGE_PRESOLVING
1498  *       - \ref SCIP_STAGE_EXITPRESOLVE
1499  *       - \ref SCIP_STAGE_SOLVING
1500  *
1501  *  @note this method will release the constraint
1502  */
1503 SCIP_EXPORT
1504 SCIP_RETCODE SCIPaddConflict(
1505    SCIP*                 scip,               /**< SCIP data structure */
1506    SCIP_NODE*            node,               /**< node to add conflict (or NULL if global) */
1507    SCIP_CONS*            cons,               /**< constraint representing the conflict */
1508    SCIP_NODE*            validnode,          /**< node at which the constraint is valid (or NULL) */
1509    SCIP_CONFTYPE         conftype,           /**< type of the conflict */
1510    SCIP_Bool             iscutoffinvolved    /**< is a cutoff bound involved in this conflict */
1511    );
1512 
1513 /** removes all conflicts depending on an old cutoff bound if the improvement of the incumbent is good enough
1514  *
1515  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1516  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1517  *
1518  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1519  *       - \ref SCIP_STAGE_PRESOLVING
1520  *       - \ref SCIP_STAGE_SOLVING
1521  */
1522 SCIP_EXPORT
1523 SCIP_RETCODE SCIPclearConflictStore(
1524    SCIP*                 scip,               /**< SCIP data structure */
1525    SCIP_EVENT*           event               /**< event data */
1526    );
1527 
1528 /** adds constraint to the given node (and all of its subnodes), even if it is a global constraint;
1529  *  It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1530  *  the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1531  *  only active in a small part of the tree although it is valid in a larger part.
1532  *  In this case, one should pass the more global node where the constraint is valid as "validnode".
1533  *  Note that the same constraint cannot be added twice to the branching tree with different "validnode" parameters.
1534  *  If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1535  *  If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1536  *  the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1537  *
1538  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1539  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1540  *
1541  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1542  *       - \ref SCIP_STAGE_INITPRESOLVE
1543  *       - \ref SCIP_STAGE_PRESOLVING
1544  *       - \ref SCIP_STAGE_EXITPRESOLVE
1545  *       - \ref SCIP_STAGE_SOLVING
1546  */
1547 SCIP_EXPORT
1548 SCIP_RETCODE SCIPaddConsNode(
1549    SCIP*                 scip,               /**< SCIP data structure */
1550    SCIP_NODE*            node,               /**< node to add constraint to */
1551    SCIP_CONS*            cons,               /**< constraint to add */
1552    SCIP_NODE*            validnode           /**< node at which the constraint is valid, or NULL */
1553    );
1554 
1555 /** adds constraint locally to the current node (and all of its subnodes), even if it is a global constraint;
1556  *  It is sometimes desirable to add the constraint to a more local node (i.e., a node of larger depth) even if
1557  *  the constraint is also valid higher in the tree, for example, if one wants to produce a constraint which is
1558  *  only active in a small part of the tree although it is valid in a larger part.
1559  *
1560  *  If the constraint is valid at the same node as it is inserted (the usual case), one should pass NULL as "validnode".
1561  *  If the "validnode" is the root node, it is automatically upgraded into a global constraint, but still only added to
1562  *  the given node. If a local constraint is added to the root node, it is added to the global problem instead.
1563  *
1564  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1565  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1566  *
1567  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1568  *       - \ref SCIP_STAGE_INITPRESOLVE
1569  *       - \ref SCIP_STAGE_PRESOLVING
1570  *       - \ref SCIP_STAGE_EXITPRESOLVE
1571  *       - \ref SCIP_STAGE_SOLVING
1572  *
1573  *  @note The same constraint cannot be added twice to the branching tree with different "validnode" parameters. This is
1574  *        the case due internal data structures and performance issues. In such a case you should try to realize your
1575  *        issue using the method SCIPdisableCons() and SCIPenableCons() and control these via the event system of SCIP.
1576  */
1577 SCIP_EXPORT
1578 SCIP_RETCODE SCIPaddConsLocal(
1579    SCIP*                 scip,               /**< SCIP data structure */
1580    SCIP_CONS*            cons,               /**< constraint to add */
1581    SCIP_NODE*            validnode           /**< node at which the constraint is valid, or NULL */
1582    );
1583 
1584 /** disables constraint's separation, enforcing, and propagation capabilities at the given node (and all subnodes);
1585  *  if the method is called at the root node, the constraint is globally deleted from the problem;
1586  *  the constraint deletion is being remembered at the given node, s.t. after leaving the node's subtree, the constraint
1587  *  is automatically enabled again, and after entering the node's subtree, it is automatically disabled;
1588  *  this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1589  *  alternatively, use SCIPdisableCons()
1590  *
1591  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1592  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1593  *
1594  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1595  *       - \ref SCIP_STAGE_INITPRESOLVE
1596  *       - \ref SCIP_STAGE_PRESOLVING
1597  *       - \ref SCIP_STAGE_EXITPRESOLVE
1598  *       - \ref SCIP_STAGE_SOLVING
1599  */
1600 SCIP_EXPORT
1601 SCIP_RETCODE SCIPdelConsNode(
1602    SCIP*                 scip,               /**< SCIP data structure */
1603    SCIP_NODE*            node,               /**< node to disable constraint in */
1604    SCIP_CONS*            cons                /**< constraint to locally delete */
1605    );
1606 
1607 /** disables constraint's separation, enforcing, and propagation capabilities at the current node (and all subnodes);
1608  *  if the method is called during problem modification or at the root node, the constraint is globally deleted from
1609  *  the problem;
1610  *  the constraint deletion is being remembered at the current node, s.t. after leaving the current subtree, the
1611  *  constraint is automatically enabled again, and after reentering the current node's subtree, it is automatically
1612  *  disabled again;
1613  *  this may improve performance because redundant checks on this constraint are avoided, but it consumes memory;
1614  *  alternatively, use SCIPdisableCons()
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 in one of the following stages of the SCIP solving process:
1620  *       - \ref SCIP_STAGE_PROBLEM
1621  *       - \ref SCIP_STAGE_INITPRESOLVE
1622  *       - \ref SCIP_STAGE_PRESOLVING
1623  *       - \ref SCIP_STAGE_EXITPRESOLVE
1624  *       - \ref SCIP_STAGE_SOLVING
1625  */
1626 SCIP_EXPORT
1627 SCIP_RETCODE SCIPdelConsLocal(
1628    SCIP*                 scip,               /**< SCIP data structure */
1629    SCIP_CONS*            cons                /**< constraint to locally delete */
1630    );
1631 
1632 /** gets estimate of best primal solution w.r.t. original problem contained in current subtree
1633  *
1634  *  @return estimate of best primal solution w.r.t. original problem contained in current subtree
1635  *
1636  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1637  *       - \ref SCIP_STAGE_SOLVING
1638  */
1639 SCIP_EXPORT
1640 SCIP_Real SCIPgetLocalOrigEstimate(
1641    SCIP*                 scip                /**< SCIP data structure */
1642    );
1643 
1644 /** gets estimate of best primal solution w.r.t. transformed problem contained in current subtree
1645  *
1646  *  @return estimate of best primal solution w.r.t. transformed problem contained in current subtree
1647  *
1648  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1649  *       - \ref SCIP_STAGE_SOLVING
1650  */
1651 SCIP_EXPORT
1652 SCIP_Real SCIPgetLocalTransEstimate(
1653    SCIP*                 scip                /**< SCIP data structure */
1654    );
1655 
1656 /** gets dual bound of current node
1657  *
1658  *  @return dual bound of current node
1659  *
1660  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1661  *       - \ref SCIP_STAGE_SOLVING
1662  */
1663 SCIP_EXPORT
1664 SCIP_Real SCIPgetLocalDualbound(
1665    SCIP*                 scip                /**< SCIP data structure */
1666    );
1667 
1668 /** gets lower bound of current node in transformed problem
1669  *
1670  *  @return lower bound  of current node in transformed problem
1671  *
1672  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1673  *       - \ref SCIP_STAGE_SOLVING
1674  */
1675 SCIP_EXPORT
1676 SCIP_Real SCIPgetLocalLowerbound(
1677    SCIP*                 scip                /**< SCIP data structure */
1678    );
1679 
1680 /** gets dual bound of given node
1681  *
1682  *  @return dual bound of a given node
1683  *
1684  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1685  *       - \ref SCIP_STAGE_SOLVING
1686  */
1687 SCIP_EXPORT
1688 SCIP_Real SCIPgetNodeDualbound(
1689    SCIP*                 scip,               /**< SCIP data structure */
1690    SCIP_NODE*            node                /**< node to get dual bound for */
1691    );
1692 
1693 /** gets lower bound of given node in transformed problem
1694  *
1695  *  @return lower bound  of given node in transformed problem
1696  *
1697  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1698  *       - \ref SCIP_STAGE_SOLVING
1699  */
1700 SCIP_EXPORT
1701 SCIP_Real SCIPgetNodeLowerbound(
1702    SCIP*                 scip,               /**< SCIP data structure */
1703    SCIP_NODE*            node                /**< node to get dual bound for */
1704    );
1705 
1706 /** if given value is tighter (larger for minimization, smaller for maximization) than the current node's dual bound (in
1707  *  original problem space), sets the current node's dual bound to the new value
1708  *
1709  *  @note the given new bound has to be a dual bound, i.e., it has to be valid for the original problem.
1710  *
1711  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1712  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1713  *
1714  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1715  *       - \ref SCIP_STAGE_PROBLEM
1716  *       - \ref SCIP_STAGE_PRESOLVING
1717  *       - \ref SCIP_STAGE_PRESOLVED
1718  *       - \ref SCIP_STAGE_SOLVING
1719  */
1720 SCIP_EXPORT
1721 SCIP_RETCODE SCIPupdateLocalDualbound(
1722    SCIP*                 scip,               /**< SCIP data structure */
1723    SCIP_Real             newbound            /**< new dual bound for the node (if it's tighter than the old one) */
1724    );
1725 
1726 /** if given value is larger than the current node's lower bound (in transformed problem), sets the current node's
1727  *  lower bound to the new value
1728  *
1729  *  @note the given new bound has to be a lower bound, i.e., it has to be valid for the transformed problem.
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 in one of the following stages of the SCIP solving process:
1735  *       - \ref SCIP_STAGE_PRESOLVING
1736  *       - \ref SCIP_STAGE_PRESOLVED
1737  *       - \ref SCIP_STAGE_SOLVING
1738  */
1739 SCIP_EXPORT
1740 SCIP_RETCODE SCIPupdateLocalLowerbound(
1741    SCIP*                 scip,               /**< SCIP data structure */
1742    SCIP_Real             newbound            /**< new lower bound for the node (if it's larger than the old one) */
1743    );
1744 
1745 /** if given value is tighter (larger for minimization, smaller for maximization) than the node's dual bound,
1746  *  sets the node's dual bound to the new value
1747  *
1748  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1749  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1750  *
1751  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1752  *       - \ref SCIP_STAGE_SOLVING
1753  */
1754 SCIP_EXPORT
1755 SCIP_RETCODE SCIPupdateNodeDualbound(
1756    SCIP*                 scip,               /**< SCIP data structure */
1757    SCIP_NODE*            node,               /**< node to update dual bound for */
1758    SCIP_Real             newbound            /**< new dual bound for the node (if it's tighter than the old one) */
1759    );
1760 
1761 /** if given value is larger than the node's lower bound (in transformed problem), sets the node's lower bound
1762  *  to the new value
1763  *
1764  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1765  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1766  *
1767  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1768  *       - \ref SCIP_STAGE_SOLVING
1769  */
1770 SCIP_EXPORT
1771 SCIP_RETCODE SCIPupdateNodeLowerbound(
1772    SCIP*                 scip,               /**< SCIP data structure */
1773    SCIP_NODE*            node,               /**< node to update lower bound for */
1774    SCIP_Real             newbound            /**< new lower bound for the node (if it's larger than the old one) */
1775    );
1776 
1777 /** change the node selection priority of the given child
1778  *
1779  *  @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
1780  *          SCIP_Retcode "SCIP_RETCODE" for a complete list of error codes.
1781  *
1782  *  @pre this method can be called in one of the following stages of the SCIP solving process:
1783  *       - \ref SCIP_STAGE_SOLVING
1784  */
1785 SCIP_EXPORT
1786 SCIP_RETCODE SCIPchgChildPrio(
1787    SCIP*                 scip,               /**< SCIP data structure */
1788    SCIP_NODE*            child,              /**< child to update the node selection priority */
1789    SCIP_Real             priority            /**< node selection priority value */
1790    );
1791 
1792 /**@} */
1793 
1794 #ifdef __cplusplus
1795 }
1796 #endif
1797 
1798 #endif
1799