Scippy

SCIP

Solving Constraint Integer Programs

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