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-2023 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"
38 #include "blockmemshell/memory.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 
54 #include "scip/struct_prob.h"
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /*
61  * problem creation
62  */
63 
64 /** creates problem data structure by copying the source problem;
65  * If the problem type requires the use of variable pricers, these pricers should be activated with calls
66  * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
67  */
69  SCIP_PROB** prob, /**< pointer to problem data structure */
70  BMS_BLKMEM* blkmem, /**< block memory */
71  SCIP_SET* set, /**< global SCIP settings */
72  const char* name, /**< problem name */
73  SCIP* sourcescip, /**< source SCIP data structure */
74  SCIP_PROB* sourceprob, /**< source problem structure */
75  SCIP_HASHMAP* varmap, /**< a hashmap to store the mapping of source variables corresponding
76  * target variables, or NULL */
77  SCIP_HASHMAP* consmap, /**< a hashmap to store the mapping of source constraints to the corresponding
78  * target constraints, or NULL */
79  SCIP_Bool global /**< create a global or a local copy? */
80  );
81 
82 /** creates problem data structure
83  * If the problem type requires the use of variable pricers, these pricers should be activated with calls
84  * to SCIPactivatePricer(). These pricers are automatically deactivated, when the problem is freed.
85  */
87  SCIP_PROB** prob, /**< pointer to problem data structure */
88  BMS_BLKMEM* blkmem, /**< block memory */
89  SCIP_SET* set, /**< global SCIP settings */
90  const char* name, /**< problem name */
91  SCIP_DECL_PROBDELORIG ((*probdelorig)), /**< frees user data of original problem */
92  SCIP_DECL_PROBTRANS ((*probtrans)), /**< creates user data of transformed problem by transforming original user data */
93  SCIP_DECL_PROBDELTRANS((*probdeltrans)), /**< frees user data of transformed problem */
94  SCIP_DECL_PROBINITSOL ((*probinitsol)), /**< solving process initialization method of transformed data */
95  SCIP_DECL_PROBEXITSOL ((*probexitsol)), /**< solving process deinitialization method of transformed data */
96  SCIP_DECL_PROBCOPY ((*probcopy)), /**< copies user data if you want to copy it to a subscip, or NULL */
97  SCIP_PROBDATA* probdata, /**< user problem data set by the reader */
98  SCIP_Bool transformed /**< is this the transformed problem? */
99  );
100 
101 /** sets callback to free user data of original problem */
102 void SCIPprobSetDelorig(
103  SCIP_PROB* prob, /**< problem */
104  SCIP_DECL_PROBDELORIG ((*probdelorig)) /**< frees user data of original problem */
105  );
106 
107 /** sets callback to create user data of transformed problem by transforming original user data */
108 void SCIPprobSetTrans(
109  SCIP_PROB* prob, /**< problem */
110  SCIP_DECL_PROBTRANS ((*probtrans)) /**< creates user data of transformed problem by transforming original user data */
111  );
112 
113 /** sets callback to free user data of transformed problem */
115  SCIP_PROB* prob, /**< problem */
116  SCIP_DECL_PROBDELTRANS((*probdeltrans)) /**< frees user data of transformed problem */
117  );
118 
119 /** sets solving process initialization callback of transformed data */
120 void SCIPprobSetInitsol(
121  SCIP_PROB* prob, /**< problem */
122  SCIP_DECL_PROBINITSOL ((*probinitsol)) /**< solving process initialization callback of transformed data */
123  );
124 
125 /** sets solving process deinitialization callback of transformed data */
126 void SCIPprobSetExitsol(
127  SCIP_PROB* prob, /**< problem */
128  SCIP_DECL_PROBEXITSOL ((*probexitsol)) /**< solving process deinitialization callback of transformed data */
129  );
130 
131 /** sets callback to copy user data to copy it to a subscip, or NULL */
132 void SCIPprobSetCopy(
133  SCIP_PROB* prob, /**< problem */
134  SCIP_DECL_PROBCOPY ((*probcopy)) /**< copies user data if you want to copy it to a subscip, or NULL */
135  );
136 
137 /** frees problem data structure */
139  SCIP_PROB** prob, /**< pointer to problem data structure */
140  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
141  BMS_BLKMEM* blkmem, /**< block memory buffer */
142  SCIP_SET* set, /**< global SCIP settings */
143  SCIP_STAT* stat, /**< dynamic problem statistics */
144  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
145  SCIP_LP* lp /**< current LP data (or NULL, if it's the original problem) */
146  );
147 
148 /** transform problem data into normalized form */
150  SCIP_PROB* source, /**< problem to transform */
151  BMS_BLKMEM* blkmem, /**< block memory buffer */
152  SCIP_SET* set, /**< global SCIP settings */
153  SCIP_STAT* stat, /**< problem statistics */
154  SCIP_PRIMAL* primal, /**< primal data */
155  SCIP_TREE* tree, /**< branch and bound tree */
156  SCIP_REOPT* reopt, /**< reoptimization data structure */
157  SCIP_LP* lp, /**< current LP data */
158  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
159  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
160  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
161  SCIP_CONFLICTSTORE* conflictstore, /**< conflict store */
162  SCIP_PROB** target /**< pointer to target problem data structure */
163  );
164 
165 /** resets the global and local bounds of original variables in original problem to their original values */
167  SCIP_PROB* prob, /**< original problem data */
168  BMS_BLKMEM* blkmem, /**< block memory */
169  SCIP_SET* set, /**< global SCIP settings */
170  SCIP_STAT* stat /**< problem statistics */
171  );
172 
173 /** (Re)Sort the variables, which appear in the four categories (binary, integer, implicit, continuous) after presolve
174  * with respect to their original index (within their categories). Adjust the problem index afterwards which is
175  * supposed to reflect the position in the variable array. This additional (re)sorting is supposed to get more robust
176  * against the order presolving fixed variables. (We also reobtain a possible block structure induced by the user
177  * model)
178  */
179 void SCIPprobResortVars(
180  SCIP_PROB* prob /**< problem data */
181  );
182 
183 
184 /*
185  * problem modification
186  */
187 
188 /** sets user problem data */
189 void SCIPprobSetData(
190  SCIP_PROB* prob, /**< problem */
191  SCIP_PROBDATA* probdata /**< user problem data to use */
192  );
193 
194 /** adds variable's name to the namespace */
196  SCIP_PROB* prob, /**< problem data */
197  SCIP_VAR* var /**< variable */
198  );
199 
200 /** removes variable's name from the namespace */
202  SCIP_PROB* prob, /**< problem data */
203  SCIP_VAR* var /**< variable */
204  );
205 
206 /** adds variable to the problem and captures it */
208  SCIP_PROB* prob, /**< problem data */
209  BMS_BLKMEM* blkmem, /**< block memory buffers */
210  SCIP_SET* set, /**< global SCIP settings */
211  SCIP_LP* lp, /**< current LP data */
212  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
213  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
214  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
215  SCIP_VAR* var /**< variable to add */
216  );
217 
218 /** marks variable to be removed from the problem; however, the variable is NOT removed from the constraints */
220  SCIP_PROB* prob, /**< problem data */
221  BMS_BLKMEM* blkmem, /**< block memory */
222  SCIP_SET* set, /**< global SCIP settings */
223  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
224  SCIP_VAR* var, /**< problem variable */
225  SCIP_Bool* deleted /**< pointer to store whether marking variable to be deleted was successful */
226  );
227 
228 /** actually removes the deleted variables from the problem and releases them */
230  SCIP_PROB* prob, /**< problem data */
231  BMS_BLKMEM* blkmem, /**< block memory */
232  SCIP_SET* set, /**< global SCIP settings */
233  SCIP_STAT* stat, /**< dynamic problem statistics */
234  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
235  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
236  SCIP_LP* lp, /**< current LP data (may be NULL) */
237  SCIP_BRANCHCAND* branchcand /**< branching candidate storage */
238  );
239 
240 /** changes the type of a variable in the problem */
242  SCIP_PROB* prob, /**< problem data */
243  BMS_BLKMEM* blkmem, /**< block memory */
244  SCIP_SET* set, /**< global SCIP settings */
245  SCIP_PRIMAL* primal, /**< primal data */
246  SCIP_LP* lp, /**< current LP data */
247  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
248  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
249  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
250  SCIP_VAR* var, /**< variable to add */
251  SCIP_VARTYPE vartype /**< new type of variable */
252  );
253 
254 /** informs problem, that the given loose problem variable changed its status */
256  SCIP_PROB* prob, /**< problem data */
257  BMS_BLKMEM* blkmem, /**< block memory */
258  SCIP_SET* set, /**< global SCIP settings */
259  SCIP_BRANCHCAND* branchcand, /**< branching candidate storage */
260  SCIP_CLIQUETABLE* cliquetable, /**< clique table data structure */
261  SCIP_VAR* var /**< problem variable */
262  );
263 
264 /** adds constraint's name to the namespace */
266  SCIP_PROB* prob, /**< problem data */
267  SCIP_CONS* cons /**< constraint */
268  );
269 
270 /** remove constraint's name from the namespace */
272  SCIP_PROB* prob, /**< problem data */
273  SCIP_CONS* cons /**< constraint */
274  );
275 
276 /** adds constraint to the problem and captures it;
277  * a local constraint is automatically upgraded into a global constraint
278  */
280  SCIP_PROB* prob, /**< problem data */
281  SCIP_SET* set, /**< global SCIP settings */
282  SCIP_STAT* stat, /**< dynamic problem statistics */
283  SCIP_CONS* cons /**< constraint to add */
284  );
285 
286 /** releases and removes constraint from the problem; if the user has not captured the constraint for his own use, the
287  * constraint may be invalid after the call
288  */
290  SCIP_PROB* prob, /**< problem data */
291  BMS_BLKMEM* blkmem, /**< block memory */
292  SCIP_SET* set, /**< global SCIP settings */
293  SCIP_STAT* stat, /**< dynamic problem statistics */
294  SCIP_CONS* cons /**< constraint to remove */
295  );
296 
297 /** remembers the current number of constraints in the problem's internal data structure
298  * - resets maximum number of constraints to current number of constraints
299  * - remembers current number of constraints as starting number of constraints
300  */
301 void SCIPprobMarkNConss(
302  SCIP_PROB* prob /**< problem data */
303  );
304 
305 /** sets objective sense: minimization or maximization */
307  SCIP_PROB* prob, /**< problem data */
308  SCIP_OBJSENSE objsense /**< new objective sense */
309  );
310 
311 /** adds value to objective offset */
313  SCIP_PROB* prob, /**< problem data */
314  SCIP_Real addval /**< value to add to objective offset */
315  );
316 
317 /** sets the dual bound on objective function */
319  SCIP_PROB* prob, /**< problem data */
320  SCIP_Real dualbound /**< external dual bound */
321  );
322 
323 /** sets limit on objective function, such that only solutions better than this limit are accepted */
324 void SCIPprobSetObjlim(
325  SCIP_PROB* prob, /**< problem data */
326  SCIP_Real objlim /**< external objective limit */
327  );
328 
329 /** informs the problem, that its objective value is always integral in every feasible solution */
331  SCIP_PROB* prob /**< problem data */
332  );
333 
334 /** sets integral objective value flag, if all variables with non-zero objective values are integral and have
335  * integral objective value and also updates the cutoff bound if primal solution is already known
336  */
338  SCIP_PROB* transprob, /**< tranformed problem data */
339  SCIP_PROB* origprob, /**< original problem data */
340  BMS_BLKMEM* blkmem, /**< block memory */
341  SCIP_SET* set, /**< global SCIP settings */
342  SCIP_STAT* stat, /**< problem statistics data */
343  SCIP_PRIMAL* primal, /**< primal data */
344  SCIP_TREE* tree, /**< branch and bound tree */
345  SCIP_REOPT* reopt, /**< reoptimization data structure */
346  SCIP_LP* lp, /**< current LP data */
347  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
348  SCIP_EVENTQUEUE* eventqueue /**< event queue */
349  );
350 
351 /** if possible, scales objective function such that it is integral with gcd = 1 */
353  SCIP_PROB* transprob, /**< tranformed problem data */
354  SCIP_PROB* origprob, /**< original problem data */
355  BMS_BLKMEM* blkmem, /**< block memory */
356  SCIP_SET* set, /**< global SCIP settings */
357  SCIP_STAT* stat, /**< problem statistics data */
358  SCIP_PRIMAL* primal, /**< primal data */
359  SCIP_TREE* tree, /**< branch and bound tree */
360  SCIP_REOPT* reopt, /**< reoptimization data structure */
361  SCIP_LP* lp, /**< current LP data */
362  SCIP_EVENTFILTER* eventfilter, /**< event filter for global (not variable dependent) events */
363  SCIP_EVENTQUEUE* eventqueue /**< event queue */
364  );
365 
366 /** remembers the current solution as root solution in the problem variables */
368  SCIP_PROB* prob, /**< problem data */
369  SCIP_SET* set, /**< global SCIP settings */
370  SCIP_STAT* stat, /**< SCIP statistics */
371  SCIP_LP* lp, /**< current LP data */
372  SCIP_Bool roothaslp /**< is the root solution from LP? */
373  );
374 
375 /** remembers the best solution w.r.t. root reduced cost propagation as root solution in the problem variables */
377  SCIP_PROB* prob, /**< problem data */
378  SCIP_SET* set, /**< global SCIP settings */
379  SCIP_STAT* stat, /**< problem statistics */
380  SCIP_LP* lp /**< current LP data */
381  );
382 
383 /** informs problem, that the presolving process was finished, and updates all internal data structures */
385  SCIP_PROB* prob, /**< problem data */
386  SCIP_SET* set /**< global SCIP settings */
387  );
388 
389 /** initializes problem for branch and bound process */
391  SCIP_PROB* prob, /**< problem data */
392  SCIP_SET* set /**< global SCIP settings */
393  );
394 
395 /** deinitializes problem after branch and bound process, and converts all COLUMN variables back into LOOSE variables */
397  SCIP_PROB* prob, /**< problem data */
398  BMS_BLKMEM* blkmem, /**< block memory */
399  SCIP_SET* set, /**< global SCIP settings */
400  SCIP_EVENTQUEUE* eventqueue, /**< event queue */
401  SCIP_LP* lp, /**< current LP data */
402  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
403  );
404 
405 
406 
407 
408 /*
409  * problem information
410  */
411 
412 /** sets problem name */
414  SCIP_PROB* prob, /**< problem data */
415  const char* name /**< name to be set */
416  );
417 
418 /** returns the number of implicit binary variables, meaning variable of vartype != SCIP_VARTYPE_BINARY and !=
419  * SCIP_VARTYPE_CONTINUOUS but with global bounds [0,1]
420  *
421  * @note this number needs to be computed, because it cannot be update like the othe counters for binary and interger
422  * variables, each time the variable type changes(, we would need to update this counter each time a global bound
423  * changes), even at the end of presolving this cannot be computed, because some variable can change to an
424  * implicit binary status
425  */
427  SCIP_PROB* prob /**< problem data */
428  );
429 
430 /** returns the number of variables with non-zero objective coefficient */
432  SCIP_PROB* prob, /**< problem data */
433  SCIP_SET* set /**< global SCIP settings */
434  );
435 
436 /** returns the minimal absolute non-zero objective coefficient
437  *
438  * @note currently, this is only used for statistics and printed after the solving process. if this information is
439  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the minimal
440  * absolute non-zero coefficient every time an objective coefficient has changed.
441  */
443  SCIP_PROB* prob, /**< problem data */
444  SCIP_SET* set /**< global SCIP settings */
445  );
446 
447 /** returns the maximal absolute non-zero objective coefficient
448  *
449  * @note currently, this is only used for statistics and printed after the solving process. if this information is
450  * needed during the (pre)solving process this should be implemented more efficiently, e.g., updating the maximal
451  * absolute non-zero coefficient every time an objective coefficient has changed.
452  */
454  SCIP_PROB* prob, /**< problem data */
455  SCIP_SET* set /**< global SCIP settings */
456  );
457 
458 /** update the number of variables with non-zero objective coefficient */
460  SCIP_PROB* prob, /**< problem data */
461  SCIP_SET* set, /**< global SCIP settings */
462  SCIP_Real oldobj, /**< old objective value for variable */
463  SCIP_Real newobj /**< new objective value for variable */
464  );
465 
466 /** update the dual bound if its better as the current one */
468  SCIP_PROB* prob, /**< problem data */
469  SCIP_Real newbound /**< new dual bound for the node (if it's tighter than the old one) */
470  );
471 
472 /** invalidates the dual bound */
474  SCIP_PROB* prob /**< problem data */
475  );
476 
477 /** returns the external value of the given internal objective value */
479  SCIP_PROB* transprob, /**< tranformed problem data */
480  SCIP_PROB* origprob, /**< original problem data */
481  SCIP_SET* set, /**< global SCIP settings */
482  SCIP_Real objval /**< internal objective value */
483  );
484 
485 /** returns the internal value of the given external objective value */
487  SCIP_PROB* transprob, /**< tranformed problem data */
488  SCIP_PROB* origprob, /**< original problem data */
489  SCIP_SET* set, /**< global SCIP settings */
490  SCIP_Real objval /**< external objective value */
491  );
492 
493 /** returns variable of the problem with given name */
495  SCIP_PROB* prob, /**< problem data */
496  const char* name /**< name of variable to find */
497  );
498 
499 /** returns constraint of the problem with given name */
501  SCIP_PROB* prob, /**< problem data */
502  const char* name /**< name of variable to find */
503  );
504 
505 /** displays current pseudo solution */
507  SCIP_PROB* prob, /**< problem data */
508  SCIP_SET* set, /**< global SCIP settings */
509  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
510  );
511 
512 /** outputs problem statistics */
514  SCIP_PROB* prob, /**< problem data */
515  SCIP_SET* set, /**< global SCIP settings */
516  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
517  FILE* file /**< output file (or NULL for standard output) */
518  );
519 
520 
521 #ifndef NDEBUG
522 
523 /* In debug mode, the following methods are implemented as function calls to ensure
524  * type validity.
525  */
526 
527 /** is the problem permuted */
529  SCIP_PROB* prob
530  );
531 
532 /** mark the problem as permuted */
534  SCIP_PROB* prob
535  );
536 
537 /** is the problem data transformed */
539  SCIP_PROB* prob /**< problem data */
540  );
541 
542 /** returns whether the objective value is known to be integral in every feasible solution */
544  SCIP_PROB* prob /**< problem data */
545  );
546 
547 /** returns TRUE iff all columns, i.e. every variable with non-empty column w.r.t. all ever created rows, are present
548  * in the LP, and FALSE, if there are additional already existing columns, that may be added to the LP in pricing
549  */
551  SCIP_PROB* prob, /**< problem data */
552  SCIP_SET* set, /**< global SCIP settings */
553  SCIP_LP* lp /**< current LP data */
554  );
555 
556 /** gets limit on objective function in external space */
558  SCIP_PROB* prob, /**< problem data */
559  SCIP_SET* set /**< global SCIP settings */
560  );
561 
562 /** gets user problem data */
564  SCIP_PROB* prob /**< problem */
565  );
566 
567 /** gets problem name */
568 const char* SCIPprobGetName(
569  SCIP_PROB* prob /**< problem data */
570  );
571 
572 /** gets number of problem variables */
573 int SCIPprobGetNVars(
574  SCIP_PROB* prob /**< problem data */
575  );
576 
577 /** gets number of binary problem variables */
579  SCIP_PROB* prob /**< problem data */
580  );
581 
582 /** gets number of integer problem variables */
584  SCIP_PROB* prob /**< problem data */
585  );
586 
587 /** gets number of implicit integer problem variables */
589  SCIP_PROB* prob /**< problem data */
590  );
591 
592 /** gets number of continuous problem variables */
594  SCIP_PROB* prob /**< problem data */
595  );
596 
597 /** gets problem variables */
599  SCIP_PROB* prob /**< problem data */
600  );
601 
602 /** gets number of problem constraints */
604  SCIP_PROB* prob /**< problem data */
605  );
606 
607 /** gets the objective offset */
609  SCIP_PROB* prob /**< problem data */
610  );
611 
612 /** gets the objective scalar */
614  SCIP_PROB* prob /**< problem data */
615  );
616 
617 /** is constraint compression enabled for this problem? */
619  SCIP_PROB* prob /**< problem data */
620  );
621 
622 /** enable problem compression, i.e., constraints can reduce memory size by removing fixed variables during creation */
624  SCIP_PROB* prob /**< problem data */
625  );
626 
627 #else
628 
629 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
630  * speed up the algorithms.
631  */
632 
633 #define SCIPprobIsPermuted(prob) ((prob)->permuted)
634 #define SCIPprobMarkPermuted(prob) ((prob)->permuted = TRUE)
635 #define SCIPprobIsTransformed(prob) ((prob)->transformed)
636 #define SCIPprobIsObjIntegral(prob) ((prob)->objisintegral)
637 #define SCIPprobAllColsInLP(prob,set,lp) (SCIPlpGetNCols(lp) == (prob)->ncolvars && (set)->nactivepricers == 0)
638 #define SCIPprobGetObjlim(prob,set) \
639  ((prob)->objlim >= SCIP_INVALID ? (SCIP_Real)((prob)->objsense) * SCIPsetInfinity(set) : (prob)->objlim)
640 #define SCIPprobGetData(prob) ((prob)->probdata)
641 #define SCIPprobGetName(prob) ((prob)->name)
642 #define SCIPprobGetName(prob) ((prob)->name)
643 #define SCIPprobGetNVars(prob) ((prob)->nvars)
644 #define SCIPprobGetNBinVars(prob) ((prob)->nbinvars)
645 #define SCIPprobGetNIntVars(prob) ((prob)->nintvars)
646 #define SCIPprobGetNImplVars(prob) ((prob)->nimplvars)
647 #define SCIPprobGetNContVars(prob) ((prob)->ncontvars)
648 #define SCIPprobGetVars(prob) ((prob)->vars)
649 #define SCIPprobGetNConss(prob) ((prob)->nconss)
650 #define SCIPprobGetObjoffset(prob) ((prob)->objoffset)
651 #define SCIPprobGetObjscale(prob) ((prob)->objscale)
652 #define SCIPprobIsConsCompressionEnabled(prob) ((prob)->conscompression)
653 #define SCIPprobEnableConsCompression(prob) ((prob)->conscompression = TRUE)
654 #endif
655 
656 
657 #ifdef __cplusplus
658 }
659 #endif
660 
661 #endif
SCIP_Bool SCIPprobIsObjIntegral(SCIP_PROB *prob)
Definition: prob.c:2297
SCIP_Real SCIPprobGetObjoffset(SCIP_PROB *prob)
Definition: prob.c:2415
SCIP_PROBDATA * SCIPprobGetData(SCIP_PROB *prob)
Definition: prob.c:2333
SCIP_RETCODE SCIPprobRemoveVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:922
int SCIPprobGetNVars(SCIP_PROB *prob)
Definition: prob.c:2352
type definitions for implications, variable bounds, and cliques
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:264
int SCIPprobGetNObjVars(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2019
#define SCIP_DECL_PROBINITSOL(x)
Definition: type_prob.h:106
#define SCIP_DECL_PROBDELORIG(x)
Definition: type_prob.h:64
type definitions for conflict store
void SCIPprobSetExitsol(SCIP_PROB *prob, SCIP_DECL_PROBEXITSOL((*probexitsol)))
Definition: prob.c:387
int SCIPprobGetNContVars(SCIP_PROB *prob)
Definition: prob.c:2388
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:527
void SCIPprobSetInitsol(SCIP_PROB *prob, SCIP_DECL_PROBINITSOL((*probinitsol)))
Definition: prob.c:376
void SCIPprobSetTrans(SCIP_PROB *prob, SCIP_DECL_PROBTRANS((*probtrans)))
Definition: prob.c:354
SCIP_Bool SCIPprobIsConsCompressionEnabled(SCIP_PROB *prob)
Definition: prob.c:2433
SCIP_Bool SCIPprobIsTransformed(SCIP_PROB *prob)
Definition: prob.c:2287
#define SCIP_DECL_PROBDELTRANS(x)
Definition: type_prob.h:95
void SCIPprobResortVars(SCIP_PROB *prob)
Definition: prob.c:654
SCIP_RETCODE SCIPprobAddConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1249
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
int SCIPprobGetNImplVars(SCIP_PROB *prob)
Definition: prob.c:2379
type definitions for global SCIP settings
type definitions for return codes for SCIP methods
void SCIPprobUpdateNObjVars(SCIP_PROB *prob, SCIP_SET *set, SCIP_Real oldobj, SCIP_Real newobj)
Definition: prob.c:1551
#define SCIP_DECL_PROBCOPY(x)
Definition: type_prob.h:149
type definitions for collecting reoptimization information
void SCIPprobSetDelorig(SCIP_PROB *prob, SCIP_DECL_PROBDELORIG((*probdelorig)))
Definition: prob.c:343
void SCIPprobPrintPseudoSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr)
Definition: prob.c:2198
type definitions for branching rules
type definitions for problem statistics
void SCIPprobSetCopy(SCIP_PROB *prob, SCIP_DECL_PROBCOPY((*probcopy)))
Definition: prob.c:398
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 global)
Definition: prob.c:201
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:1142
void SCIPprobSetObjlim(SCIP_PROB *prob, SCIP_Real objlim)
Definition: prob.c:1464
type definitions for LP management
void SCIPprobPrintStatistics(SCIP_PROB *prob, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
Definition: prob.c:2220
SCIP_Real SCIPprobExternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2116
int SCIPprobGetNConss(SCIP_PROB *prob)
Definition: prob.c:2406
SCIP_CONS * SCIPprobFindCons(SCIP_PROB *prob, const char *name)
Definition: prob.c:2179
SCIP_RETCODE SCIPprobSetName(SCIP_PROB *prob, const char *name)
Definition: prob.c:1981
SCIP_RETCODE SCIPprobDelVar(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_VAR *var, SCIP_Bool *deleted)
Definition: prob.c:1010
void SCIPprobSetDeltrans(SCIP_PROB *prob, SCIP_DECL_PROBDELTRANS((*probdeltrans)))
Definition: prob.c:365
void SCIPprobEnableConsCompression(SCIP_PROB *prob)
Definition: prob.c:2443
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:937
void SCIPprobSetDualbound(SCIP_PROB *prob, SCIP_Real dualbound)
Definition: prob.c:1453
SCIP_RETCODE SCIPprobResetBounds(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat)
Definition: prob.c:628
void SCIPprobMarkPermuted(SCIP_PROB *prob)
Definition: prob.c:2277
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:1487
SCIP_VAR * SCIPprobFindVar(SCIP_PROB *prob, const char *name)
Definition: prob.c:2160
int SCIPprobGetNIntVars(SCIP_PROB *prob)
Definition: prob.c:2370
type definitions for problem variables
void SCIPprobUpdateBestRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp)
Definition: prob.c:1764
SCIP_RETCODE SCIPprobRemoveConsName(SCIP_PROB *prob, SCIP_CONS *cons)
Definition: prob.c:1264
type definitions for managing events
int SCIPprobGetNBinVars(SCIP_PROB *prob)
Definition: prob.c:2361
void SCIPprobSetObjIntegral(SCIP_PROB *prob)
Definition: prob.c:1475
#define SCIP_DECL_PROBTRANS(x)
Definition: type_prob.h:83
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:409
#define SCIP_Bool
Definition: def.h:93
#define SCIP_DECL_PROBEXITSOL(x)
Definition: type_prob.h:119
SCIP_RETCODE SCIPprobVarChangedStatus(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_BRANCHCAND *branchcand, SCIP_CLIQUETABLE *cliquetable, SCIP_VAR *var)
Definition: prob.c:1191
enum SCIP_Objsense SCIP_OBJSENSE
Definition: type_prob.h:50
SCIP_Bool SCIPprobIsPermuted(SCIP_PROB *prob)
Definition: prob.c:2267
SCIP_RETCODE SCIPprobInitSolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1871
type definitions for branch and bound tree
SCIP_RETCODE SCIPprobExitPresolve(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:1862
SCIP_Bool SCIPprobAllColsInLP(SCIP_PROB *prob, SCIP_SET *set, SCIP_LP *lp)
Definition: prob.c:2309
type definitions for storing and manipulating the main problem
SCIP_RETCODE SCIPprobAddCons(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1286
SCIP_Real SCIPprobGetObjlim(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2321
datastructures for storing and manipulating the main problem
SCIP_Real SCIPprobGetObjscale(SCIP_PROB *prob)
Definition: prob.c:2424
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:1071
void SCIPprobAddObjoffset(SCIP_PROB *prob, SCIP_Real addval)
Definition: prob.c:1440
SCIP_RETCODE SCIPprobAddVarName(SCIP_PROB *prob, SCIP_VAR *var)
Definition: prob.c:906
void SCIPprobUpdateDualbound(SCIP_PROB *prob, SCIP_Real newbound)
Definition: prob.c:1568
struct SCIP_ProbData SCIP_PROBDATA
Definition: type_prob.h:53
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:1605
SCIP_RETCODE SCIPprobExitSolve(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_EVENTQUEUE *eventqueue, SCIP_LP *lp, SCIP_Bool restart)
Definition: prob.c:1906
void SCIPprobMarkNConss(SCIP_PROB *prob)
Definition: prob.c:1414
SCIP_Real SCIPprobGetAbsMaxObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2093
void SCIPprobInvalidateDualbound(SCIP_PROB *prob)
Definition: prob.c:1595
#define SCIP_Real
Definition: def.h:186
SCIP_RETCODE SCIPprobDelCons(SCIP_PROB *prob, BMS_BLKMEM *blkmem, SCIP_SET *set, SCIP_STAT *stat, SCIP_CONS *cons)
Definition: prob.c:1354
SCIP_Real SCIPprobGetAbsMinObjCoef(SCIP_PROB *prob, SCIP_SET *set)
Definition: prob.c:2066
void SCIPprobSetData(SCIP_PROB *prob, SCIP_PROBDATA *probdata)
Definition: prob.c:712
int SCIPprobGetNImplBinVars(SCIP_PROB *prob)
Definition: prob.c:2002
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:69
SCIP_VAR ** SCIPprobGetVars(SCIP_PROB *prob)
Definition: prob.c:2397
void SCIPprobSetObjsense(SCIP_PROB *prob, SCIP_OBJSENSE objsense)
Definition: prob.c:1427
type definitions for collecting primal CIP solutions and primal informations
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:439
const char * SCIPprobGetName(SCIP_PROB *prob)
Definition: prob.c:2343
SCIP_Real SCIPprobInternObjval(SCIP_PROB *transprob, SCIP_PROB *origprob, SCIP_SET *set, SCIP_Real objval)
Definition: prob.c:2138
type definitions for constraints and constraint handlers
void SCIPprobStoreRootSol(SCIP_PROB *prob, SCIP_SET *set, SCIP_STAT *stat, SCIP_LP *lp, SCIP_Bool roothaslp)
Definition: prob.c:1737
memory allocation routines