Scippy

SCIP

Solving Constraint Integer Programs

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-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file prob.h
26 * @ingroup INTERNALAPI
27 * @brief internal methods for storing and manipulating the main problem
28 * @author Tobias Achterberg
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_PROB_H__
34#define __SCIP_PROB_H__
35
36
37#include "scip/def.h"
39#include "scip/type_retcode.h"
40#include "scip/type_set.h"
41#include "scip/type_stat.h"
42#include "scip/type_event.h"
43#include "scip/type_lp.h"
44#include "scip/type_var.h"
45#include "scip/type_implics.h"
46#include "scip/type_prob.h"
47#include "scip/type_primal.h"
48#include "scip/type_tree.h"
49#include "scip/type_reopt.h"
50#include "scip/type_branch.h"
51#include "scip/type_cons.h"
53#include "scip/type_message.h"
54#include "scip/type_misc.h"
55
56#ifdef NDEBUG
57#include "scip/struct_prob.h"
58#endif
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/*
65 * problem creation
66 */
67
68/** creates problem data structure by copying the source problem;
69 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
70 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
71 */
73 SCIP_PROB** prob, /**< pointer to problem data structure */
74 BMS_BLKMEM* blkmem, /**< block memory */
75 SCIP_SET* set, /**< global SCIP settings */
76 const char* name, /**< problem name */
77 SCIP* sourcescip, /**< source SCIP data structure */
78 SCIP_PROB* sourceprob, /**< source problem structure */
79 SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
80 * target variables, or NULL */
81 SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
82 * target constraints, or NULL */
83 SCIP_Bool original, /**< copy original or transformed problem? */
84 SCIP_Bool global /**< create a global or a local copy? */
85 );
86
87/** creates problem data structure
88 * If the problem type requires the use of variable pricers, these pricers should be activated with calls
89 * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
90 */
92 SCIP_PROB** prob, /**< pointer to problem data structure */
93 BMS_BLKMEM* blkmem, /**< block memory */
94 SCIP_SET* set, /**< global SCIP settings */
95 const char* name, /**< problem name */
96 SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
97 SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
98 SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
99 SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
100 SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
101 SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
102 SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
103 SCIP_Bool transformed /**< is this the transformed problem? */
104 );
105
106/** sets callback to free user data of original problem */
108 SCIP_PROB* prob, /**< problem */
109 SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
110 );
111
112/** sets callback to create user data of transformed problem by transforming original user data */
114 SCIP_PROB* prob, /**< problem */
115 SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
116 );
117
118/** sets callback to free user data of transformed problem */
120 SCIP_PROB* prob, /**< problem */
121 SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
122 );
123
124/** sets solving process initialization callback of transformed data */
126 SCIP_PROB* prob, /**< problem */
127 SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
128 );
129
130/** sets solving process deinitialization callback of transformed data */
132 SCIP_PROB* prob, /**< problem */
133 SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
134 );
135
136/** sets callback to copy user data to copy it to a subscip, or NULL */
137void SCIPprobSetCopy(
138 SCIP_PROB* prob, /**< problem */
139 SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
140 );
141
142/** frees problem data structure */
144 SCIP_PROB** prob, /**< pointer to problem data structure */
145 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
146 BMS_BLKMEM* blkmem, /**< block memory buffer */
147 SCIP_SET* set, /**< global SCIP settings */
148 SCIP_STAT* stat, /**< dynamic problem statistics */
149 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
150 SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
151 );
152
153/** transform problem data into normalized form */
155 SCIP_PROB* source, /**< problem to transform */
156 BMS_BLKMEM* blkmem, /**< block memory buffer */
157 SCIP_SET* set, /**< global SCIP settings */
158 SCIP_STAT* stat, /**< problem statistics */
159 SCIP_PRIMAL* primal, /**< primal data */
160 SCIP_TREE* tree, /**< branch and bound tree */
161 SCIP_REOPT* reopt, /**< reoptimization data structure */
162 SCIP_LP* lp, /**< current LP data */
163 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
164 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
165 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
166 SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
167 SCIP_PROB** target /**< pointer to target problem data structure */
168 );
169
170/** resets the global and local bounds of original variables in original problem to their original values */
172 SCIP_PROB* prob, /**< original problem data */
173 BMS_BLKMEM* blkmem, /**< block memory */
174 SCIP_SET* set, /**< global SCIP settings */
175 SCIP_STAT* stat /**< problem statistics */
176 );
177
178/** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
179 * with respect to their original index (within their categories). Adjust the problem index afterwards which is
180 * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
181 * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
182 * model)
183 */
185 SCIP_PROB* prob /**< problem data */
186 );
187
188/** possibly create and sort the constraints according to check priorties */
190 SCIP_PROB* prob /**< problem data */
191 );
192
193/*
194 * problem modification
195 */
196
197/** sets user problem data */
198void SCIPprobSetData(
199 SCIP_PROB* prob, /**< problem */
200 SCIP_PROBDATA* probdata /**< user problem data to use */
201 );
202
203/** adds variable's name to the namespace */
205 SCIP_PROB* prob, /**< problem data */
206 SCIP_VAR* var /**< variable */
207 );
208
209/** removes variable's name from the namespace */
211 SCIP_PROB* prob, /**< problem data */
212 SCIP_VAR* var /**< variable */
213 );
214
215/** adds variable to the problem and captures it */
217 SCIP_PROB* prob, /**< problem data */
218 BMS_BLKMEM* blkmem, /**< block memory buffers */
219 SCIP_SET* set, /**< global SCIP settings */
220 SCIP_LP* lp, /**< current LP data */
221 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
222 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
223 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
224 SCIP_VAR* var /**< variable to add */
225 );
226
227/** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
229 SCIP_PROB* prob, /**< problem data */
230 BMS_BLKMEM* blkmem, /**< block memory */
231 SCIP_SET* set, /**< global SCIP settings */
232 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
233 SCIP_VAR* var, /**< problem variable */
234 SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
235 );
236
237/** actually removes the deleted variables from the problem and releases them */
239 SCIP_PROB* prob, /**< problem data */
240 BMS_BLKMEM* blkmem, /**< block memory */
241 SCIP_SET* set, /**< global SCIP settings */
242 SCIP_STAT* stat, /**< dynamic problem statistics */
243 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
244 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
245 SCIP_LP* lp, /**< current LP data (may be NULL) */
246 SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
247 );
248
249/** changes the type of a variable in the problem */
251 SCIP_PROB* prob, /**< problem data */
252 BMS_BLKMEM* blkmem, /**< block memory */
253 SCIP_SET* set, /**< global SCIP settings */
254 SCIP_PRIMAL* primal, /**< primal data */
255 SCIP_LP* lp, /**< current LP data */
256 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
257 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
258 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
259 SCIP_VAR* var, /**< variable to add */
260 SCIP_VARTYPE vartype /**< new type of variable */
261 );
262
263/** informs problem, that the given loose problem variable changed its status */
265 SCIP_PROB* prob, /**< problem data */
266 BMS_BLKMEM* blkmem, /**< block memory */
267 SCIP_SET* set, /**< global SCIP settings */
268 SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
269 SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
270 SCIP_VAR* var /**< problem variable */
271 );
272
273/** adds constraint's name to the namespace */
275 SCIP_PROB* prob, /**< problem data */
276 SCIP_CONS* cons /**< constraint */
277 );
278
279/** remove constraint's name from the namespace */
281 SCIP_PROB* prob, /**< problem data */
282 SCIP_CONS* cons /**< constraint */
283 );
284
285/** adds constraint to the problem and captures it;
286 * a local constraint is automatically upgraded into a global constraint
287 */
289 SCIP_PROB* prob, /**< problem data */
290 SCIP_SET* set, /**< global SCIP settings */
291 SCIP_STAT* stat, /**< dynamic problem statistics */
292 SCIP_CONS* cons /**< constraint to add */
293 );
294
295/** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
296 * constraint may be invalid after the call
297 */
299 SCIP_PROB* prob, /**< problem data */
300 BMS_BLKMEM* blkmem, /**< block memory */
301 SCIP_SET* set, /**< global SCIP settings */
302 SCIP_STAT* stat, /**< dynamic problem statistics */
303 SCIP_CONS* cons /**< constraint to remove */
304 );
305
306/** remembers the current number of constraints in the problem's internal data structure
307 * - resets maximum number of constraints to current number of constraints
308 * - remembers current number of constraints as starting number of constraints
309 */
311 SCIP_PROB* prob /**< problem data */
312 );
313
314/** sets objective sense: minimization or maximization */
316 SCIP_PROB* prob, /**< problem data */
317 SCIP_OBJSENSE objsense /**< new objective sense */
318 );
319
320/** adds value to objective offset */
322 SCIP_PROB* prob, /**< problem data */
323 SCIP_Real addval /**< value to add to objective offset */
324 );
325
326/** sets the dual bound on objective function */
328 SCIP_PROB* prob, /**< problem data */
329 SCIP_Real dualbound /**< external dual bound */
330 );
331
332/** sets limit on objective function, such that only solutions better than this limit are accepted */
334 SCIP_PROB* prob, /**< problem data */
335 SCIP_Real objlim /**< external objective limit */
336 );
337
338/** informs the problem, that its objective value is always integral in every feasible solution */
340 SCIP_PROB* prob /**< problem data */
341 );
342
343/** sets integral objective value flag, if all variables with non-zero objective values are integral and have
344 * integral objective value and also updates the cutoff bound if primal solution is already known
345 */
347 SCIP_PROB* transprob, /**< tranformed problem data */
348 SCIP_PROB* origprob, /**< original problem data */
349 BMS_BLKMEM* blkmem, /**< block memory */
350 SCIP_SET* set, /**< global SCIP settings */
351 SCIP_STAT* stat, /**< problem statistics data */
352 SCIP_PRIMAL* primal, /**< primal data */
353 SCIP_TREE* tree, /**< branch and bound tree */
354 SCIP_REOPT* reopt, /**< reoptimization data structure */
355 SCIP_LP* lp, /**< current LP data */
356 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
357 SCIP_EVENTQUEUE* eventqueue /**< event queue */
358 );
359
360/** if possible, scales objective function such that it is integral with gcd = 1 */
362 SCIP_PROB* transprob, /**< tranformed problem data */
363 SCIP_PROB* origprob, /**< original problem data */
364 BMS_BLKMEM* blkmem, /**< block memory */
365 SCIP_SET* set, /**< global SCIP settings */
366 SCIP_STAT* stat, /**< problem statistics data */
367 SCIP_PRIMAL* primal, /**< primal data */
368 SCIP_TREE* tree, /**< branch and bound tree */
369 SCIP_REOPT* reopt, /**< reoptimization data structure */
370 SCIP_LP* lp, /**< current LP data */
371 SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
372 SCIP_EVENTQUEUE* eventqueue /**< event queue */
373 );
374
375/** remembers the current solution as root solution in the problem variables */
377 SCIP_PROB* prob, /**< problem data */
378 SCIP_SET* set, /**< global SCIP settings */
379 SCIP_STAT* stat, /**< SCIP statistics */
380 SCIP_LP* lp, /**< current LP data */
381 SCIP_Bool roothaslp /**< is the root solution from LP? */
382 );
383
384/** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
386 SCIP_PROB* prob, /**< problem data */
387 SCIP_SET* set, /**< global SCIP settings */
388 SCIP_STAT* stat, /**< problem statistics */
389 SCIP_LP* lp /**< current LP data */
390 );
391
392/** informs problem, that the presolving process was finished, and updates all internal data structures */
394 SCIP_PROB* prob, /**< problem data */
395 SCIP_SET* set /**< global SCIP settings */
396 );
397
398/** initializes problem for branch and bound process */
400 SCIP_PROB* prob, /**< problem data */
401 SCIP_SET* set /**< global SCIP settings */
402 );
403
404/** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
406 SCIP_PROB* prob, /**< problem data */
407 BMS_BLKMEM* blkmem, /**< block memory */
408 SCIP_SET* set, /**< global SCIP settings */
409 SCIP_EVENTQUEUE* eventqueue, /**< event queue */
410 SCIP_LP* lp, /**< current LP data */
411 SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
412 );
413
414
415
416
417/*
418 * problem information
419 */
420
421/** sets problem name */
423 SCIP_PROB* prob, /**< problem data */
424 const char* name /**< name to be set */
425 );
426
427/** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
428 * SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
429 *
430 * @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
431 * variables, each time the variable type changes(, we would need to update this counter each time a global bound
432 * changes), even at the end of presolving this cannot be computed, because some variable can change to an
433 * implicit binary status
434 */
436 SCIP_PROB* prob /**< problem data */
437 );
438
439/** returns the number of variables with non-zero objective coefficient */
441 SCIP_PROB* prob, /**< problem data */
442 SCIP_SET* set /**< global SCIP settings */
443 );
444
445/** returns the minimal absolute non-zero objective coefficient
446 *
447 * @note currently, this is only used for statistics and printed after the solving process. if this information is
448 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
449 * absolute non-zero coefficient every time an objective coefficient has changed.
450 */
452 SCIP_PROB* prob, /**< problem data */
453 SCIP_SET* set /**< global SCIP settings */
454 );
455
456/** returns the maximal absolute non-zero objective coefficient
457 *
458 * @note currently, this is only used for statistics and printed after the solving process. if this information is
459 * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
460 * absolute non-zero coefficient every time an objective coefficient has changed.
461 */
463 SCIP_PROB* prob, /**< problem data */
464 SCIP_SET* set /**< global SCIP settings */
465 );
466
467/** update the number of variables with non-zero objective coefficient */
469 SCIP_PROB* prob, /**< problem data */
470 SCIP_SET* set, /**< global SCIP settings */
471 SCIP_Real oldobj, /**< old objective value for variable */
472 SCIP_Real newobj /**< new objective value for variable */
473 );
474
475/** update the dual bound if its better as the current one */
477 SCIP_PROB* prob, /**< problem data */
478 SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
479 );
480
481/** invalidates the dual bound */
483 SCIP_PROB* prob /**< problem data */
484 );
485
486/** returns the external value of the given internal objective value */
488 SCIP_PROB* transprob, /**< tranformed problem data */
489 SCIP_PROB* origprob, /**< original problem data */
490 SCIP_SET* set, /**< global SCIP settings */
491 SCIP_Real objval /**< internal objective value */
492 );
493
494/** returns the internal value of the given external objective value */
496 SCIP_PROB* transprob, /**< tranformed problem data */
497 SCIP_PROB* origprob, /**< original problem data */
498 SCIP_SET* set, /**< global SCIP settings */
499 SCIP_Real objval /**< external objective value */
500 );
501
502/** returns variable of the problem with given name */
504 SCIP_PROB* prob, /**< problem data */
505 const char* name /**< name of variable to find */
506 );
507
508/** returns constraint of the problem with given name */
510 SCIP_PROB* prob, /**< problem data */
511 const char* name /**< name of variable to find */
512 );
513
514/** displays current pseudo solution */
516 SCIP_PROB* prob, /**< problem data */
517 SCIP_SET* set, /**< global SCIP settings */
518 SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
519 );
520
521/** outputs problem statistics */
523 SCIP_PROB* prob, /**< problem data */
524 SCIP_SET* set, /**< global SCIP settings */
525 SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
526 FILE* file /**< output file (or NULL for standard output) */
527 );
528
529
530#ifndef NDEBUG
531
532/* In debug mode, the following methods are implemented as function calls to ensure
533 * type validity.
534 */
535
536/** is the problem permuted */
538 SCIP_PROB* prob
539 );
540
541/** mark the problem as permuted */
543 SCIP_PROB* prob
544 );
545
546/** is the problem data transformed */
548 SCIP_PROB* prob /**< problem data */
549 );
550
551/** returns whether the objective value is known to be integral in every feasible solution */
553 SCIP_PROB* prob /**< problem data */
554 );
555
556/** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
557 * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
558 */
560 SCIP_PROB* prob, /**< problem data */
561 SCIP_SET* set, /**< global SCIP settings */
562 SCIP_LP* lp /**< current LP data */
563 );
564
565/** gets limit on objective function in external space */
567 SCIP_PROB* prob, /**< problem data */
568 SCIP_SET* set /**< global SCIP settings */
569 );
570
571/** gets user problem data */
573 SCIP_PROB* prob /**< problem */
574 );
575
576/** gets problem name */
577const char* SCIPprobGetName(
578 SCIP_PROB* prob /**< problem data */
579 );
580
581/** gets number of problem variables */
583 SCIP_PROB* prob /**< problem data */
584 );
585
586/** gets number of binary problem variables */
588 SCIP_PROB* prob /**< problem data */
589 );
590
591/** gets number of integer problem variables */
593 SCIP_PROB* prob /**< problem data */
594 );
595
596/** gets number of implicit integer problem variables */
598 SCIP_PROB* prob /**< problem data */
599 );
600
601/** gets number of continuous problem variables */
603 SCIP_PROB* prob /**< problem data */
604 );
605
606/** gets problem variables */
608 SCIP_PROB* prob /**< problem data */
609 );
610
611/** gets number of fixed variables */
613 SCIP_PROB* prob /**< problem data */
614 );
615
616/** gets fixed variables */
618 SCIP_PROB* prob /**< problem data */
619 );
620
621/** gets number of variables existing when problem solving started */
623 SCIP_PROB* prob /**< problem data */
624 );
625
626/** gets number of problem constraints */
628 SCIP_PROB* prob /**< problem data */
629 );
630
631/** gets problem constraints */
633 SCIP_PROB* prob /**< problem data */
634 );
635
636/** gets maximum number of constraints existing at the same time */
638 SCIP_PROB* prob /**< problem data */
639 );
640
641/** gets number of constraints existing when problem solving started */
643 SCIP_PROB* prob /**< problem data */
644 );
645
646/** gets the objective sense */
648 SCIP_PROB* prob /**< problem data */
649 );
650
651/** gets the objective offset */
653 SCIP_PROB* prob /**< problem data */
654 );
655
656/** gets the objective scalar */
658 SCIP_PROB* prob /**< problem data */
659 );
660
661/** is constraint compression enabled for this problem? */
663 SCIP_PROB* prob /**< problem data */
664 );
665
666/** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
668 SCIP_PROB* prob /**< problem data */
669 );
670
671#else
672
673/* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
674 * speed up the algorithms.
675 */
676
677#define SCIPprobIsPermuted(prob) ((prob)->permuted)
678#define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
679#define SCIPprobIsTransformed(prob) ((prob)->transformed)
680#define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
681#define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
682#define SCIPprobGetObjlim(prob,set) \
683 ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
684#define SCIPprobGetData(prob) ((prob)->probdata)
685#define SCIPprobGetName(prob) ((prob)->name)
686#define SCIPprobGetName(prob) ((prob)->name)
687#define SCIPprobGetNVars(prob) ((prob)->nvars)
688#define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
689#define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
690#define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
691#define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
692#define SCIPprobGetVars(prob) ((prob)->vars)
693#define SCIPprobGetNFixedVars(prob) ((prob)->nfixedvars)
694#define SCIPprobGetFixedVars(prob) ((prob)->fixedvars)
695#define SCIPprobGetStartNVars(prob) ((prob)->startnvars)
696#define SCIPprobGetNConss(prob) ((prob)->nconss)
697#define SCIPprobGetConss(prob) ((prob)->conss)
698#define SCIPprobGetMaxNConss(prob) ((prob)->maxnconss)
699#define SCIPprobGetStartNConss(prob) ((prob)->startnconss)
700#define SCIPprobGetObjsense(prob) ((prob)->objsense)
701#define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
702#define SCIPprobGetObjscale(prob) ((prob)->objscale)
703#define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
704#define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
705#endif
706
707
708#ifdef __cplusplus
709}
710#endif
711
712#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:172
memory allocation routines
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:437
SCIP_RETCODE SCIPprobScaleObj(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue)
Definition: prob.c:1646
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: prob.c:2261
SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
Definition: prob.c:2316
SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1903
void SCIPprobSetTrans(SCIP_PROB *prob, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: prob.c:362
void SCIPprobUpdateNObjVars(SCIP_PROB *prob, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
Definition: prob.c:1592
int SCIPprobGetNContVars(SCIP_PROB *prob)
Definition: prob.c:2437
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1282
void SCIPprobSetInitsol(SCIP_PROB *prob, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: prob.c:384
SCIP_CONS ** SCIPprobGetConss(SCIP_PROB *prob)
Definition: prob.c:2491
int SCIPprobGetNFixedVars(SCIP_PROB *prob)
Definition: prob.c:2455
void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
Definition: prob.c:1636
SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:939
void SCIPprobSetObjIntegral(SCIP_PROB *prob)
Definition: prob.c:1516
SCIP_RETCODE SCIPprobAddVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var)
Definition: prob.c:970
SCIP_RETCODE SCIPprobVarChangedStatus(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
Definition: prob.c:1224
const char * SCIPprobGetName(SCIP_PROB *prob)
Definition: prob.c:2392
SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
Definition: prob.c:2527
int SCIPprobGetNConss(SCIP_PROB *prob)
Definition: prob.c:2482
int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2060
SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2107
SCIP_RETCODE SCIPprobPerformVarDeletions(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand)
Definition: prob.c:1104
void SCIPprobSetExitsol(SCIP_PROB *prob, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: prob.c:395
SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2134
SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:955
int SCIPprobGetNImplBinVars(SCIP_PROB *prob)
Definition: prob.c:2043
int SCIPprobGetStartNConss(SCIP_PROB *prob)
Definition: prob.c:2509
SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2370
void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
Definition: prob.c:1609
SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1912
void SCIPprobMarkNConss(SCIP_PROB *prob)
Definition: prob.c:1455
SCIP_OBJSENSE SCIPprobGetObjsense(SCIP_PROB *prob)
Definition: prob.c:2518
SCIP_RETCODE SCIPprobTransform(SCIP_PROB *source, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue, SCIP_CONFLICTSTORE *conflictstore, SCIP_PROB **target)
Definition: prob.c:536
void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: prob.c:2239
int SCIPprobGetStartNVars(SCIP_PROB *prob)
Definition: prob.c:2473
SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
Definition: prob.c:2022
void SCIPprobSetDeltrans(SCIP_PROB *prob, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: prob.c:373
void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
Definition: prob.c:745
SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
Definition: prob.c:2536
void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
Definition: prob.c:1481
SCIP_RETCODE SCIPprobCheckObjIntegral(SCIP_PROB *transprob, SCIP_PROB *origprob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_PRIMAL *primal, SCIP_TREE *tree, SCIP_REOPT *reopt, SCIP_LP *lp, SCIP_EVENTFILTER *eventfilter, SCIP_EVENTQUEUE *eventqueue)
Definition: prob.c:1528
void SCIPprobSetCopy(SCIP_PROB *prob, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: prob.c:406
SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
Definition: prob.c:2201
int SCIPprobGetNImplVars(SCIP_PROB *prob)
Definition: prob.c:2428
SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
Definition: prob.c:1947
SCIP_RETCODE SCIPprobCreate(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, 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, SCIP_Bool transformed)
Definition: prob.c:270
void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
Definition: prob.c:1505
SCIP_VAR ** SCIPprobGetFixedVars(SCIP_PROB *prob)
Definition: prob.c:2464
SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: prob.c:1043
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition: prob.c:2346
void SCIPprobEnableConsCompression(SCIP_PROB *prob)
Definition: prob.c:2555
SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
Definition: prob.c:2220
void SCIPprobMarkPermuted(SCIP_PROB *prob)
Definition: prob.c:2326
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1297
int SCIPprobGetNIntVars(SCIP_PROB *prob)
Definition: prob.c:2419
SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1390
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition: prob.c:2401
SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
Definition: prob.c:2382
SCIP_RETCODE SCIPprobChgVarType(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_PRIMAL *primal, SCIP_LP *lp, SCIP_BRANCHCAND *branchcand, SCIP_EVENTQUEUE *eventqueue, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var, SCIP_VARTYPE vartype)
Definition: prob.c:1175
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2157
void SCIPprobResortVars(SCIP_PROB *prob)
Definition: prob.c:663
SCIP_RETCODE SCIPprobFree(SCIP_PROB **prob, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp)
Definition: prob.c:417
SCIP_RETCODE SCIPprobCopy(SCIP_PROB **prob, BMS_BLKMEM *blkmem, SCIP_SET *set, const char *name, SCIP *sourcescip, SCIP_PROB *sourceprob, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool original, SCIP_Bool global)
Definition: prob.c:206
SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1319
int SCIPprobGetMaxNConss(SCIP_PROB *prob)
Definition: prob.c:2500
SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: prob.c:637
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition: prob.c:1494
void SCIPprobStoreRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool roothaslp)
Definition: prob.c:1778
int SCIPprobGetNBinVars(SCIP_PROB *prob)
Definition: prob.c:2410
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition: prob.c:2446
void SCIPprobSetDelorig(SCIP_PROB *prob, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: prob.c:351
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2358
void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: prob.c:1805
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
Definition: prob.c:2336
SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
Definition: prob.c:2545
void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
Definition: prob.c:1468
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2179
SCIP_RETCODE SCIPprobSortConssCheck(SCIP_PROB *prob)
Definition: prob.c:715
datastructures for storing and manipulating the main problem
Definition: heur_padm.c:135
type definitions for branching rules
type definitions for conflict store
type definitions for constraints and constraint handlers
type definitions for managing events
type definitions for implications, variable bounds, and cliques
type definitions for LP management
type definitions for message output methods
type definitions for miscellaneous datastructures
type definitions for collecting primal CIP solutions and primal informations
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
type definitions for collecting reoptimization information
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for global SCIP settings
type definitions for problem statistics
type definitions for branch and bound tree
type definitions for problem variables
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:73