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