Scippy

SCIP

Solving Constraint Integer Programs

set.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-2014 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file set.h
17  * @brief internal methods for global SCIP settings
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_SET_H__
25 #define __SCIP_SET_H__
26 
27 
28 #include "scip/def.h"
29 #include "blockmemshell/memory.h"
30 #include "scip/buffer.h"
31 #include "scip/type_set.h"
32 #include "scip/type_stat.h"
33 #include "scip/type_clock.h"
34 #include "scip/type_paramset.h"
35 #include "scip/type_event.h"
36 #include "scip/type_scip.h"
37 #include "scip/type_branch.h"
38 #include "scip/type_conflict.h"
39 #include "scip/type_cons.h"
40 #include "scip/type_disp.h"
41 #include "scip/type_heur.h"
42 #include "scip/type_nodesel.h"
43 #include "scip/type_presol.h"
44 #include "scip/type_pricer.h"
45 #include "scip/type_reader.h"
46 #include "scip/type_relax.h"
47 #include "scip/type_sepa.h"
48 #include "scip/type_prop.h"
49 #include "scip/struct_set.h"
50 
51 
52 #ifdef NDEBUG
53 #include "scip/pub_misc.h"
54 #endif
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 /** copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints
61  * cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the
62  * copied SCIP instance might not represent the same problem semantics as the original.
63  * Note that in this case dual reductions might be invalid. */
64 extern
66  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
67  SCIP_SET* targetset, /**< target SCIP_SET data structure */
68  SCIP_Bool copyreaders, /**< should the file readers be copied */
69  SCIP_Bool copypricers, /**< should the variable pricers be copied */
70  SCIP_Bool copyconshdlrs, /**< should the constraint handlers be copied */
71  SCIP_Bool copyconflicthdlrs, /**< should the conflict handlers be copied */
72  SCIP_Bool copypresolvers, /**< should the presolvers be copied */
73  SCIP_Bool copyrelaxators, /**< should the relaxators be copied */
74  SCIP_Bool copyseparators, /**< should the separators be copied */
75  SCIP_Bool copypropagators, /**< should the propagators be copied */
76  SCIP_Bool copyheuristics, /**< should the heuristics be copied */
77  SCIP_Bool copyeventhdlrs, /**< should the event handlers be copied */
78  SCIP_Bool copynodeselectors, /**< should the node selectors be copied */
79  SCIP_Bool copybranchrules, /**< should the branchrules be copied */
80  SCIP_Bool copydisplays, /**< should the display columns be copied */
81  SCIP_Bool copydialogs, /**< should the dialogs be copied */
82  SCIP_Bool copynlpis, /**< should the NLP interfaces be copied */
83  SCIP_Bool* allvalid /**< pointer to store whether all plugins were validly copied */
84  );
85 
86 /** copies parameters from sourcescip to targetscip */
87 extern
89  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
90  SCIP_SET* targetset, /**< target SCIP_SET data structure */
91  SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
92  );
93 
94 /** creates global SCIP settings */
95 extern
97  SCIP_SET** set, /**< pointer to SCIP settings */
98  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
99  BMS_BLKMEM* blkmem, /**< block memory */
100  SCIP* scip /**< SCIP data structure */
101  );
102 
103 /** frees global SCIP settings */
104 extern
106  SCIP_SET** set, /**< pointer to SCIP settings */
107  BMS_BLKMEM* blkmem /**< block memory */
108  );
109 
110 /** returns current stage of SCIP */
111 extern
113  SCIP_SET* set /**< pointer to SCIP settings */
114  );
115 
116 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */
117 extern
119  SCIP_SET* set, /**< global SCIP settings */
120  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
121  BMS_BLKMEM* blkmem, /**< block memory */
122  const char* name, /**< name of the parameter */
123  const char* desc, /**< description of the parameter */
124  SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */
125  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
126  SCIP_Bool defaultvalue, /**< default value of the parameter */
127  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
128  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
129  );
130 
131 /** creates a int parameter, sets it to its default value, and adds it to the parameter set */
132 extern
134  SCIP_SET* set, /**< global SCIP settings */
135  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
136  BMS_BLKMEM* blkmem, /**< block memory */
137  const char* name, /**< name of the parameter */
138  const char* desc, /**< description of the parameter */
139  int* valueptr, /**< pointer to store the current parameter value, or NULL */
140  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
141  int defaultvalue, /**< default value of the parameter */
142  int minvalue, /**< minimum value for parameter */
143  int maxvalue, /**< maximum value for parameter */
144  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
145  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
146  );
147 
148 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */
149 extern
151  SCIP_SET* set, /**< global SCIP settings */
152  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
153  BMS_BLKMEM* blkmem, /**< block memory */
154  const char* name, /**< name of the parameter */
155  const char* desc, /**< description of the parameter */
156  SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */
157  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
158  SCIP_Longint defaultvalue, /**< default value of the parameter */
159  SCIP_Longint minvalue, /**< minimum value for parameter */
160  SCIP_Longint maxvalue, /**< maximum value for parameter */
161  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
162  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
163  );
164 
165 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */
166 extern
168  SCIP_SET* set, /**< global SCIP settings */
169  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
170  BMS_BLKMEM* blkmem, /**< block memory */
171  const char* name, /**< name of the parameter */
172  const char* desc, /**< description of the parameter */
173  SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */
174  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
175  SCIP_Real defaultvalue, /**< default value of the parameter */
176  SCIP_Real minvalue, /**< minimum value for parameter */
177  SCIP_Real maxvalue, /**< maximum value for parameter */
178  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
179  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
180  );
181 
182 /** creates a char parameter, sets it to its default value, and adds it to the parameter set */
183 extern
185  SCIP_SET* set, /**< global SCIP settings */
186  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
187  BMS_BLKMEM* blkmem, /**< block memory */
188  const char* name, /**< name of the parameter */
189  const char* desc, /**< description of the parameter */
190  char* valueptr, /**< pointer to store the current parameter value, or NULL */
191  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
192  char defaultvalue, /**< default value of the parameter */
193  const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
194  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
195  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
196  );
197 
198 /** creates a string parameter, sets it to its default value, and adds it to the parameter set */
199 extern
201  SCIP_SET* set, /**< global SCIP settings */
202  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
203  BMS_BLKMEM* blkmem, /**< block memory */
204  const char* name, /**< name of the parameter */
205  const char* desc, /**< description of the parameter */
206  char** valueptr, /**< pointer to store the current parameter value, or NULL */
207  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
208  const char* defaultvalue, /**< default value of the parameter */
209  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
210  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
211  );
212 
213 /** gets the fixing status value of an existing parameter */
214 extern
216  SCIP_SET* set, /**< global SCIP settings */
217  const char* name /**< name of the parameter */
218  );
219 
220 /** returns the pointer to the SCIP parameter with the given name */
221 extern
223  SCIP_SET* set, /**< global SCIP settings */
224  const char* name /**< name of the parameter */
225  );
226 
227 /** gets the value of an existing SCIP_Bool parameter */
229  SCIP_SET* set, /**< global SCIP settings */
230  const char* name, /**< name of the parameter */
231  SCIP_Bool* value /**< pointer to store the parameter */
232  );
233 
234 /** gets the value of an existing Int parameter */
235 extern
237  SCIP_SET* set, /**< global SCIP settings */
238  const char* name, /**< name of the parameter */
239  int* value /**< pointer to store the parameter */
240  );
241 
242 /** gets the value of an existing SCIP_Longint parameter */
243 extern
245  SCIP_SET* set, /**< global SCIP settings */
246  const char* name, /**< name of the parameter */
247  SCIP_Longint* value /**< pointer to store the parameter */
248  );
249 
250 /** gets the value of an existing SCIP_Real parameter */
251 extern
253  SCIP_SET* set, /**< global SCIP settings */
254  const char* name, /**< name of the parameter */
255  SCIP_Real* value /**< pointer to store the parameter */
256  );
257 
258 /** gets the value of an existing Char parameter */
259 extern
261  SCIP_SET* set, /**< global SCIP settings */
262  const char* name, /**< name of the parameter */
263  char* value /**< pointer to store the parameter */
264  );
265 
266 /** gets the value of an existing String parameter */
267 extern
269  SCIP_SET* set, /**< global SCIP settings */
270  const char* name, /**< name of the parameter */
271  char** value /**< pointer to store the parameter */
272  );
273 
274 /** changes the fixing status of an existing parameter */
275 extern
277  SCIP_SET* set, /**< global SCIP settings */
278  const char* name, /**< name of the parameter */
279  SCIP_Bool fixed /**< new fixing status of the parameter */
280  );
281 
282 /** changes the value of an existing parameter */
283 extern
285  SCIP_SET* set, /**< global SCIP settings */
286  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
287  const char* name, /**< name of the parameter */
288  void* value /**< new value of the parameter */
289  );
290 
291 /** changes the value of an existing SCIP_Bool parameter */
292 extern
294  SCIP_SET* set, /**< global SCIP settings */
295  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
296  SCIP_PARAM* param, /**< parameter */
297  SCIP_Bool value /**< new value of the parameter */
298  );
299 
300 /** changes the value of an existing SCIP_Bool parameter */
301 extern
303  SCIP_SET* set, /**< global SCIP settings */
304  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
305  const char* name, /**< name of the parameter */
306  SCIP_Bool value /**< new value of the parameter */
307  );
308 
309 /** changes the default value of an existing SCIP_Bool parameter */
310 extern
312  SCIP_SET* set, /**< global SCIP settings */
313  const char* name, /**< name of the parameter */
314  SCIP_Bool defaultvalue /**< new default value of the parameter */
315  );
316 
317 /** changes the value of an existing Int parameter */
318 extern
320  SCIP_SET* set, /**< global SCIP settings */
321  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
322  SCIP_PARAM* param, /**< parameter */
323  int value /**< new value of the parameter */
324  );
325 
326 /** changes the value of an existing Int parameter */
327 extern
329  SCIP_SET* set, /**< global SCIP settings */
330  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
331  const char* name, /**< name of the parameter */
332  int value /**< new value of the parameter */
333  );
334 
335 /** changes the default value of an existing Int parameter */
336 extern
338  SCIP_SET* set, /**< global SCIP settings */
339  const char* name, /**< name of the parameter */
340  int defaultvalue /**< new default value of the parameter */
341  );
342 
343 /** changes the value of an existing SCIP_Longint parameter */
344 extern
346  SCIP_SET* set, /**< global SCIP settings */
347  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
348  SCIP_PARAM* param, /**< parameter */
349  SCIP_Longint value /**< new value of the parameter */
350  );
351 
352 /** changes the value of an existing SCIP_Longint parameter */
353 extern
355  SCIP_SET* set, /**< global SCIP settings */
356  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
357  const char* name, /**< name of the parameter */
358  SCIP_Longint value /**< new value of the parameter */
359  );
360 
361 /** changes the value of an existing SCIP_Real parameter */
362 extern
364  SCIP_SET* set, /**< global SCIP settings */
365  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
366  SCIP_PARAM* param, /**< parameter */
367  SCIP_Real value /**< new value of the parameter */
368  );
369 
370 /** changes the value of an existing SCIP_Real parameter */
371 extern
373  SCIP_SET* set, /**< global SCIP settings */
374  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
375  const char* name, /**< name of the parameter */
376  SCIP_Real value /**< new value of the parameter */
377  );
378 
379 /** changes the value of an existing Char parameter */
380 extern
382  SCIP_SET* set, /**< global SCIP settings */
383  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
384  SCIP_PARAM* param, /**< parameter */
385  char value /**< new value of the parameter */
386  );
387 
388 /** changes the value of an existing Char parameter */
389 extern
391  SCIP_SET* set, /**< global SCIP settings */
392  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
393  const char* name, /**< name of the parameter */
394  char value /**< new value of the parameter */
395  );
396 
397 /** changes the value of an existing String parameter */
398 extern
400  SCIP_SET* set, /**< global SCIP settings */
401  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
402  SCIP_PARAM* param, /**< parameter */
403  const char* value /**< new value of the parameter */
404  );
405 
406 /** changes the value of an existing String parameter */
407 extern
409  SCIP_SET* set, /**< global SCIP settings */
410  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
411  const char* name, /**< name of the parameter */
412  const char* value /**< new value of the parameter */
413  );
414 
415 /** reads parameters from a file */
416 extern
418  SCIP_SET* set, /**< global SCIP settings */
419  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
420  const char* filename /**< file name */
421  );
422 
423 /** writes all parameters in the parameter set to a file */
424 extern
426  SCIP_SET* set, /**< global SCIP settings */
427  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
428  const char* filename, /**< file name, or NULL for stdout */
429  SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
430  SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
431  );
432 
433 /** resets a single parameters to its default value */
434 extern
436  SCIP_SET* set, /**< global SCIP settings */
437  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
438  const char* name /**< name of the parameter */
439  );
440 
441 /** resets all parameters to their default values */
442 extern
444  SCIP_SET* set, /**< global SCIP settings */
445  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
446  );
447 
448 /** sets parameters to
449  * - SCIP_PARAMSETTING_DEFAULT to use default values (see also SCIPsetResetParams())
450  * - SCIP_PARAMSETTING_COUNTER to get feasible and "fast" counting process
451  * - SCIP_PARAMSETTING_CPSOLVER to get CP like search (e.g. no LP relaxation)
452  * - SCIP_PARAMSETTING_EASYCIP to solve easy problems fast
453  * - SCIP_PARAMSETTING_FEASIBILITY to detect feasibility fast
454  * - SCIP_PARAMSETTING_HARDLP to be capable to handle hard LPs
455  * - SCIP_PARAMSETTING_OPTIMALITY to prove optimality fast
456  */
457 extern
459  SCIP_SET* set, /**< global SCIP settings */
460  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
461  SCIP_PARAMEMPHASIS paramemphasis, /**< parameter settings */
462  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
463  );
464 
465 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for
466  * auxiliary SCIP instances to avoid recursion
467  */
468 extern
470  SCIP_SET* set, /**< global SCIP settings */
471  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
472  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
473  );
474 
475 /** sets heuristic parameters values to
476  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters
477  * - SCIP_PARAMSETTING_FAST such that the time spend for heuristic is decreased
478  * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristic are called more aggregative
479  * - SCIP_PARAMSETTING_OFF which turn off all heuristics
480  */
481 extern
483  SCIP_SET* set, /**< global SCIP settings */
484  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
485  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
486  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
487  );
488 
489 /** sets presolving parameters to
490  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters
491  * - SCIP_PARAMSETTING_FAST such that the time spend for presolving is decreased
492  * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggregative
493  * - SCIP_PARAMSETTING_OFF which turn off all presolving
494  */
495 extern
497  SCIP_SET* set, /**< global SCIP settings */
498  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
499  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
500  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
501  );
502 
503 /** sets separating parameters to
504  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters
505  * - SCIP_PARAMSETTING_FAST such that the time spend for separating is decreased
506  * - SCIP_PARAMSETTING_AGGRESSIVE such that the separating is done more aggregative
507  * - SCIP_PARAMSETTING_OFF which turn off all separating
508  */
509 extern
511  SCIP_SET* set, /**< global SCIP settings */
512  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
513  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
514  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
515  );
516 
517 /** returns the array of all available SCIP parameters */
518 extern
520  SCIP_SET* set /**< global SCIP settings */
521  );
522 
523 /** returns the total number of all available SCIP parameters */
524 extern
526  SCIP_SET* set /**< global SCIP settings */
527  );
528 
529 /** inserts file reader in file reader list */
530 extern
532  SCIP_SET* set, /**< global SCIP settings */
533  SCIP_READER* reader /**< file reader */
534  );
535 
536 /** returns the file reader of the given name, or NULL if not existing */
537 extern
539  SCIP_SET* set, /**< global SCIP settings */
540  const char* name /**< name of file reader */
541  );
542 
543 /** inserts variable pricer in variable pricer list */
544 extern
546  SCIP_SET* set, /**< global SCIP settings */
547  SCIP_PRICER* pricer /**< variable pricer */
548  );
549 
550 /** returns the variable pricer of the given name, or NULL if not existing */
551 extern
553  SCIP_SET* set, /**< global SCIP settings */
554  const char* name /**< name of variable pricer */
555  );
556 
557 /** sorts pricers by priorities */
558 extern
559 void SCIPsetSortPricers(
560  SCIP_SET* set /**< global SCIP settings */
561  );
562 
563 /** sorts pricers by name */
564 extern
566  SCIP_SET* set /**< global SCIP settings */
567  );
568 
569 /** inserts constraint handler in constraint handler list */
570 extern
572  SCIP_SET* set, /**< global SCIP settings */
573  SCIP_CONSHDLR* conshdlr /**< constraint handler */
574  );
575 
576 /** reinserts a constraint handler with modified sepa priority into the sepa priority sorted array */
577 extern
579  SCIP_SET* set, /**< global SCIP settings */
580  SCIP_CONSHDLR* conshdlr, /**< constraint handler to be reinserted */
581  int oldpriority /**< the old separation priority of constraint handler */
582  );
583 
584 /** returns the constraint handler of the given name, or NULL if not existing */
585 extern
587  SCIP_SET* set, /**< global SCIP settings */
588  const char* name /**< name of constraint handler */
589  );
590 
591 /** inserts conflict handler in conflict handler list */
592 extern
594  SCIP_SET* set, /**< global SCIP settings */
595  SCIP_CONFLICTHDLR* conflicthdlr /**< conflict handler */
596  );
597 
598 /** returns the conflict handler of the given name, or NULL if not existing */
599 extern
601  SCIP_SET* set, /**< global SCIP settings */
602  const char* name /**< name of conflict handler */
603  );
604 
605 /** sorts conflict handlers by priorities */
606 extern
608  SCIP_SET* set /**< global SCIP settings */
609  );
610 
611 /** sorts conflict handlers by name */
612 extern
614  SCIP_SET* set /**< global SCIP settings */
615  );
616 
617 /** inserts presolver in presolver list */
618 extern
620  SCIP_SET* set, /**< global SCIP settings */
621  SCIP_PRESOL* presol /**< presolver */
622  );
623 
624 /** returns the presolver of the given name, or NULL if not existing */
625 extern
627  SCIP_SET* set, /**< global SCIP settings */
628  const char* name /**< name of presolver */
629  );
630 
631 /** sorts presolvers by priorities */
632 extern
633 void SCIPsetSortPresols(
634  SCIP_SET* set /**< global SCIP settings */
635  );
636 
637 /** sorts presolvers by name */
638 extern
640  SCIP_SET* set /**< global SCIP settings */
641  );
642 
643 /** inserts relaxator in relaxator list */
644 extern
646  SCIP_SET* set, /**< global SCIP settings */
647  SCIP_RELAX* relax /**< relaxator */
648  );
649 
650 /** returns the relaxator of the given name, or NULL if not existing */
651 extern
653  SCIP_SET* set, /**< global SCIP settings */
654  const char* name /**< name of relaxator */
655  );
656 
657 /** sorts relaxators by priorities */
658 extern
659 void SCIPsetSortRelaxs(
660  SCIP_SET* set /**< global SCIP settings */
661  );
662 
663 /** sorts relaxators by name */
664 extern
666  SCIP_SET* set /**< global SCIP settings */
667  );
668 
669 /** inserts separator in separator list */
670 extern
672  SCIP_SET* set, /**< global SCIP settings */
673  SCIP_SEPA* sepa /**< separator */
674  );
675 
676 /** returns the separator of the given name, or NULL if not existing */
677 extern
679  SCIP_SET* set, /**< global SCIP settings */
680  const char* name /**< name of separator */
681  );
682 
683 /** sorts separators by priorities */
684 extern
685 void SCIPsetSortSepas(
686  SCIP_SET* set /**< global SCIP settings */
687  );
688 
689 /** sorts separators by name */
690 extern
692  SCIP_SET* set /**< global SCIP settings */
693  );
694 
695 /** inserts propagator in propagator list */
696 extern
698  SCIP_SET* set, /**< global SCIP settings */
699  SCIP_PROP* prop /**< propagator */
700  );
701 
702 /** returns the propagator of the given name, or NULL if not existing */
703 extern
705  SCIP_SET* set, /**< global SCIP settings */
706  const char* name /**< name of propagator */
707  );
708 
709 /** sorts propagators by priorities */
710 extern
711 void SCIPsetSortProps(
712  SCIP_SET* set /**< global SCIP settings */
713  );
714 
715 /** sorts propagators by priorities for presolving */
716 extern
718  SCIP_SET* set /**< global SCIP settings */
719  );
720 
721 /** sorts propagators w.r.t. names */
722 extern
724  SCIP_SET* set /**< global SCIP settings */
725  );
726 
727 /** inserts primal heuristic in primal heuristic list */
728 extern
730  SCIP_SET* set, /**< global SCIP settings */
731  SCIP_HEUR* heur /**< primal heuristic */
732  );
733 
734 /** returns the primal heuristic of the given name, or NULL if not existing */
735 extern
737  SCIP_SET* set, /**< global SCIP settings */
738  const char* name /**< name of primal heuristic */
739  );
740 
741 /** sorts heuristics by priorities */
742 extern
743 void SCIPsetSortHeurs(
744  SCIP_SET* set /**< global SCIP settings */
745  );
746 
747 /** sorts heuristics by name */
748 extern
750  SCIP_SET* set /**< global SCIP settings */
751  );
752 
753 /** inserts event handler in event handler list */
754 extern
756  SCIP_SET* set, /**< global SCIP settings */
757  SCIP_EVENTHDLR* eventhdlr /**< event handler */
758  );
759 
760 /** returns the event handler of the given name, or NULL if not existing */
761 extern
763  SCIP_SET* set, /**< global SCIP settings */
764  const char* name /**< name of event handler */
765  );
766 
767 /** inserts node selector in node selector list */
768 extern
770  SCIP_SET* set, /**< global SCIP settings */
771  SCIP_NODESEL* nodesel /**< node selector */
772  );
773 
774 /** returns the node selector of the given name, or NULL if not existing */
775 extern
777  SCIP_SET* set, /**< global SCIP settings */
778  const char* name /**< name of event handler */
779  );
780 
781 /** returns node selector with highest priority in the current mode */
782 extern
784  SCIP_SET* set, /**< global SCIP settings */
785  SCIP_STAT* stat /**< dynamic problem statistics */
786  );
787 
788 /** inserts branching rule in branching rule list */
789 extern
791  SCIP_SET* set, /**< global SCIP settings */
792  SCIP_BRANCHRULE* branchrule /**< branching rule */
793  );
794 
795 /** returns the branching rule of the given name, or NULL if not existing */
796 extern
798  SCIP_SET* set, /**< global SCIP settings */
799  const char* name /**< name of event handler */
800  );
801 
802 /** sorts branching rules by priorities */
803 extern
805  SCIP_SET* set /**< global SCIP settings */
806  );
807 
808 /** sorts branching rules by name */
809 extern
811  SCIP_SET* set /**< global SCIP settings */
812  );
813 
814 /** inserts display column in display column list */
815 extern
817  SCIP_SET* set, /**< global SCIP settings */
818  SCIP_DISP* disp /**< display column */
819  );
820 
821 /** returns the display column of the given name, or NULL if not existing */
822 extern
824  SCIP_SET* set, /**< global SCIP settings */
825  const char* name /**< name of event handler */
826  );
827 
828 /** inserts dialog in dialog list */
829 extern
831  SCIP_SET* set, /**< global SCIP settings */
832  SCIP_DIALOG* dialog /**< dialog */
833  );
834 
835 /** returns if the dialog already exists */
836 extern
838  SCIP_SET* set, /**< global SCIP settings */
839  SCIP_DIALOG* dialog /**< dialog */
840  );
841 
842 /** inserts NLPI in NLPI list */
843 extern
845  SCIP_SET* set, /**< global SCIP settings */
846  SCIP_NLPI* nlpi /**< NLPI */
847  );
848 
849 /** returns the NLPI of the given name, or NULL if not existing */
850 extern
852  SCIP_SET* set, /**< global SCIP settings */
853  const char* name /**< name of NLPI */
854  );
855 
856 /** sorts NLPIs by priorities */
857 extern
858 void SCIPsetSortNlpis(
859  SCIP_SET* set /**< global SCIP settings */
860  );
861 
862 /** set priority of an NLPI */
863 extern
865  SCIP_SET* set, /**< global SCIP settings */
866  SCIP_NLPI* nlpi, /**< NLPI */
867  int priority /**< new priority of NLPI */
868  );
869 
870 /** inserts information about an external code in external codes list */
871 extern
873  SCIP_SET* set, /**< global SCIP settings */
874  const char* name, /**< name of external code */
875  const char* description /**< description of external code, can be NULL */
876  );
877 
878 /** calls init methods of all plugins */
879 extern
881  SCIP_SET* set, /**< global SCIP settings */
882  BMS_BLKMEM* blkmem, /**< block memory */
883  SCIP_STAT* stat /**< dynamic problem statistics */
884  );
885 
886 /** calls exit methods of all plugins */
887 extern
889  SCIP_SET* set, /**< global SCIP settings */
890  BMS_BLKMEM* blkmem, /**< block memory */
891  SCIP_STAT* stat /**< dynamic problem statistics */
892  );
893 
894 /** calls initpre methods of all plugins */
895 extern
897  SCIP_SET* set, /**< global SCIP settings */
898  BMS_BLKMEM* blkmem, /**< block memory */
899  SCIP_STAT* stat /**< dynamic problem statistics */
900  );
901 
902 /** calls exitpre methods of all plugins */
903 extern
905  SCIP_SET* set, /**< global SCIP settings */
906  BMS_BLKMEM* blkmem, /**< block memory */
907  SCIP_STAT* stat /**< dynamic problem statistics */
908  );
909 
910 /** calls initsol methods of all plugins */
911 extern
913  SCIP_SET* set, /**< global SCIP settings */
914  BMS_BLKMEM* blkmem, /**< block memory */
915  SCIP_STAT* stat /**< dynamic problem statistics */
916  );
917 
918 /** calls exitsol methods of all plugins */
919 extern
921  SCIP_SET* set, /**< global SCIP settings */
922  BMS_BLKMEM* blkmem, /**< block memory */
923  SCIP_STAT* stat, /**< dynamic problem statistics */
924  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
925  );
926 
927 /** returns the estimated number of bytes used by external software, e.g., the LP solver */
928 extern
930  SCIP_SET* set /**< global SCIP settings */
931  );
932 
933 /** calculate memory size for dynamically allocated arrays */
934 extern
936  SCIP_SET* set, /**< global SCIP settings */
937  int num /**< minimum number of entries to store */
938  );
939 
940 /** calculate memory size for tree array */
941 extern
943  SCIP_SET* set, /**< global SCIP settings */
944  int num /**< minimum number of entries to store */
945  );
946 
947 /** calculate memory size for path array */
948 extern
950  SCIP_SET* set, /**< global SCIP settings */
951  int num /**< minimum number of entries to store */
952  );
953 
954 /** sets verbosity level for message output */
955 extern
957  SCIP_SET* set, /**< global SCIP settings */
958  SCIP_VERBLEVEL verblevel /**< verbosity level for message output */
959  );
960 
961 /** sets feasibility tolerance */
962 extern
964  SCIP_SET* set, /**< global SCIP settings */
965  SCIP_Real feastol /**< new feasibility tolerance */
966  );
967 
968 /** sets primal feasibility tolerance of LP solver */
969 extern
971  SCIP_SET* set, /**< global SCIP settings */
972  SCIP_Real lpfeastol, /**< new primal feasibility tolerance of LP solver */
973  SCIP_Bool printnewvalue /**< should "numerics/lpfeastol = ..." be printed? */
974  );
975 
976 /** sets feasibility tolerance for reduced costs in LP solution */
977 extern
979  SCIP_SET* set, /**< global SCIP settings */
980  SCIP_Real dualfeastol /**< new reduced costs feasibility tolerance */
981  );
982 
983 /** sets LP convergence tolerance used in barrier algorithm */
984 extern
986  SCIP_SET* set, /**< global SCIP settings */
987  SCIP_Real barrierconvtol /**< new convergence tolerance used in barrier algorithm */
988  );
989 
990 /** marks that some limit parameter was changed */
991 extern
993  SCIP_SET* set /**< global SCIP settings */
994  );
995 
996 /** returns the maximal number of variables priced into the LP per round */
997 extern
999  SCIP_SET* set, /**< global SCIP settings */
1000  SCIP_Bool root /**< are we at the root node? */
1001  );
1002 
1003 /** returns the maximal number of cuts separated per round */
1004 extern
1006  SCIP_SET* set, /**< global SCIP settings */
1007  SCIP_Bool root /**< are we at the root node? */
1008  );
1009 
1010 /** Checks, if an iterativly updated value is reliable or should be recomputed from scratch.
1011  * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high
1012  * absolute value during the optimization process which is later reduced significantly. In this case, the last digits
1013  * were cancelled out when increasing the value and are random after decreasing it.
1014  * We dot not consider the cancellations which can occur during increasing the absolute value because they just cannot
1015  * be expressed using fixed precision floating point arithmetic, anymore.
1016  * The idea to get more reliable values is to always store the last reliable value, where increasing the absolute of
1017  * the value is viewed as preserving reliability. Then, after each update, the new absolute value can be compared
1018  * against the last reliable one with this method, checking whether it was decreased by a factor of at least
1019  * "lp/recompfac" and should be recomputed.
1020  */
1021 extern
1023  SCIP_SET* set, /**< global SCIP settings */
1024  SCIP_Real newvalue, /**< new value after update */
1025  SCIP_Real oldvalue /**< old value, i.e., last reliable value */
1026  );
1027 
1028 /** returns value treated as infinity */
1029 extern
1031  SCIP_SET* set /**< global SCIP settings */
1032  );
1033 
1034 /** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity
1035  * computation)
1036  */
1037 extern
1039  SCIP_SET* set /**< global SCIP settings */
1040  );
1041 
1042 /** returns value treated as zero */
1043 extern
1045  SCIP_SET* set /**< global SCIP settings */
1046  );
1047 
1048 /** returns value treated as zero for sums of floating point values */
1049 extern
1051  SCIP_SET* set /**< global SCIP settings */
1052  );
1053 
1054 /** returns feasibility tolerance for constraints */
1055 extern
1057  SCIP_SET* set /**< global SCIP settings */
1058  );
1059 
1060 /** returns primal feasibility tolerance of LP solver given as minimum of lpfeastol option and tolerance specified by separation storage */
1061 extern
1063  SCIP_SET* set /**< global SCIP settings */
1064  );
1065 
1066 /** returns primal feasibility tolerance as specified by separation storage, or SCIP_INVALID */
1067 extern
1069  SCIP_SET* set /**< global SCIP settings */
1070  );
1071 
1072 /** returns feasibility tolerance for reduced costs */
1073 extern
1075  SCIP_SET* set /**< global SCIP settings */
1076  );
1077 
1078 /** returns convergence tolerance used in barrier algorithm */
1079 extern
1081  SCIP_SET* set /**< global SCIP settings */
1082  );
1083 
1084 /** returns minimal variable distance value to use for pseudo cost updates */
1085 extern
1087  SCIP_SET* set /**< global SCIP settings */
1088  );
1089 
1090 /** returns minimal minimal objective distance value to use for pseudo cost updates */
1091 extern
1093  SCIP_SET* set /**< global SCIP settings */
1094  );
1095 
1096 /** return the delta to use for computing the cutoff bound for integral objectives */
1097 extern
1099  SCIP_SET* set /**< global SCIP settings */
1100  );
1101 
1102 /** returns minimal decrease factor that causes the recomputation of a value
1103  * (e.g., pseudo objective) instead of an update */
1104 extern
1106  SCIP_SET* set /**< global SCIP settings */
1107  );
1108 
1109 /** checks, if values are in range of epsilon */
1110 extern
1112  SCIP_SET* set, /**< global SCIP settings */
1113  SCIP_Real val1, /**< first value to be compared */
1114  SCIP_Real val2 /**< second value to be compared */
1115  );
1116 
1117 /** checks, if val1 is (more than epsilon) lower than val2 */
1118 extern
1120  SCIP_SET* set, /**< global SCIP settings */
1121  SCIP_Real val1, /**< first value to be compared */
1122  SCIP_Real val2 /**< second value to be compared */
1123  );
1124 
1125 /** checks, if val1 is not (more than epsilon) greater than val2 */
1126 extern
1128  SCIP_SET* set, /**< global SCIP settings */
1129  SCIP_Real val1, /**< first value to be compared */
1130  SCIP_Real val2 /**< second value to be compared */
1131  );
1132 
1133 /** checks, if val1 is (more than epsilon) greater than val2 */
1134 extern
1136  SCIP_SET* set, /**< global SCIP settings */
1137  SCIP_Real val1, /**< first value to be compared */
1138  SCIP_Real val2 /**< second value to be compared */
1139  );
1140 
1141 /** checks, if val1 is not (more than epsilon) lower than val2 */
1142 extern
1144  SCIP_SET* set, /**< global SCIP settings */
1145  SCIP_Real val1, /**< first value to be compared */
1146  SCIP_Real val2 /**< second value to be compared */
1147  );
1148 
1149 /** checks, if value is (positive) infinite */
1150 extern
1152  SCIP_SET* set, /**< global SCIP settings */
1153  SCIP_Real val /**< value to be compared against infinity */
1154  );
1155 
1156 /** checks, if value is huge and should be handled separately (e.g., in activity computation) */
1157 extern
1159  SCIP_SET* set, /**< global SCIP settings */
1160  SCIP_Real val /**< value to be checked whether it is huge */
1161  );
1162 
1163 /** checks, if value is in range epsilon of 0.0 */
1164 extern
1166  SCIP_SET* set, /**< global SCIP settings */
1167  SCIP_Real val /**< value to be compared against zero */
1168  );
1169 
1170 /** checks, if value is greater than epsilon */
1171 extern
1173  SCIP_SET* set, /**< global SCIP settings */
1174  SCIP_Real val /**< value to be compared against zero */
1175  );
1176 
1177 /** checks, if value is lower than -epsilon */
1178 extern
1180  SCIP_SET* set, /**< global SCIP settings */
1181  SCIP_Real val /**< value to be compared against zero */
1182  );
1183 
1184 /** checks, if value is integral within epsilon */
1185 extern
1187  SCIP_SET* set, /**< global SCIP settings */
1188  SCIP_Real val /**< value to be compared against zero */
1189  );
1190 
1191 /** checks whether the product val * scalar is integral in epsilon scaled by scalar */
1192 extern
1194  SCIP_SET* set, /**< global SCIP settings */
1195  SCIP_Real val, /**< unscaled value to check for scaled integrality */
1196  SCIP_Real scalar /**< value to scale val with for checking for integrality */
1197  );
1198 
1199 /** checks, if given fractional part is smaller than epsilon */
1200 extern
1202  SCIP_SET* set, /**< global SCIP settings */
1203  SCIP_Real val /**< value to be compared against zero */
1204  );
1205 
1206 /** rounds value + feasibility tolerance down to the next integer in epsilon tolerance */
1207 extern
1209  SCIP_SET* set, /**< global SCIP settings */
1210  SCIP_Real val /**< value to be compared against zero */
1211  );
1212 
1213 /** rounds value - feasibility tolerance up to the next integer in epsilon tolerance */
1214 extern
1216  SCIP_SET* set, /**< global SCIP settings */
1217  SCIP_Real val /**< value to be compared against zero */
1218  );
1219 
1220 /** rounds value to the nearest integer in epsilon tolerance */
1221 extern
1223  SCIP_SET* set, /**< global SCIP settings */
1224  SCIP_Real val /**< value to be compared against zero */
1225  );
1226 
1227 /** returns fractional part of value, i.e. x - floor(x) in epsilon tolerance */
1228 extern
1230  SCIP_SET* set, /**< global SCIP settings */
1231  SCIP_Real val /**< value to return fractional part for */
1232  );
1233 
1234 /** checks, if values are in range of sumepsilon */
1235 extern
1237  SCIP_SET* set, /**< global SCIP settings */
1238  SCIP_Real val1, /**< first value to be compared */
1239  SCIP_Real val2 /**< second value to be compared */
1240  );
1241 
1242 /** checks, if val1 is (more than sumepsilon) lower than val2 */
1243 extern
1245  SCIP_SET* set, /**< global SCIP settings */
1246  SCIP_Real val1, /**< first value to be compared */
1247  SCIP_Real val2 /**< second value to be compared */
1248  );
1249 
1250 /** checks, if val1 is not (more than sumepsilon) greater than val2 */
1251 extern
1253  SCIP_SET* set, /**< global SCIP settings */
1254  SCIP_Real val1, /**< first value to be compared */
1255  SCIP_Real val2 /**< second value to be compared */
1256  );
1257 
1258 /** checks, if val1 is (more than sumepsilon) greater than val2 */
1259 extern
1261  SCIP_SET* set, /**< global SCIP settings */
1262  SCIP_Real val1, /**< first value to be compared */
1263  SCIP_Real val2 /**< second value to be compared */
1264  );
1265 
1266 /** checks, if val1 is not (more than sumepsilon) lower than val2 */
1267 extern
1269  SCIP_SET* set, /**< global SCIP settings */
1270  SCIP_Real val1, /**< first value to be compared */
1271  SCIP_Real val2 /**< second value to be compared */
1272  );
1273 
1274 /** checks, if value is in range sumepsilon of 0.0 */
1275 extern
1277  SCIP_SET* set, /**< global SCIP settings */
1278  SCIP_Real val /**< value to be compared against zero */
1279  );
1280 
1281 /** checks, if value is greater than sumepsilon */
1282 extern
1284  SCIP_SET* set, /**< global SCIP settings */
1285  SCIP_Real val /**< value to be compared against zero */
1286  );
1287 
1288 /** checks, if value is lower than -sumepsilon */
1289 extern
1291  SCIP_SET* set, /**< global SCIP settings */
1292  SCIP_Real val /**< value to be compared against zero */
1293  );
1294 
1295 /** rounds value + sumepsilon tolerance down to the next integer */
1296 extern
1298  SCIP_SET* set, /**< global SCIP settings */
1299  SCIP_Real val /**< value to process */
1300  );
1301 
1302 /** rounds value - sumepsilon tolerance up to the next integer */
1303 extern
1305  SCIP_SET* set, /**< global SCIP settings */
1306  SCIP_Real val /**< value to process */
1307  );
1308 
1309 /** rounds value to the nearest integer in sumepsilon tolerance */
1310 extern
1312  SCIP_SET* set, /**< global SCIP settings */
1313  SCIP_Real val /**< value to process */
1314  );
1315 
1316 /** returns fractional part of value, i.e. x - floor(x) in sumepsilon tolerance */
1317 extern
1319  SCIP_SET* set, /**< global SCIP settings */
1320  SCIP_Real val /**< value to process */
1321  );
1322 
1323 /** checks, if relative difference of values is in range of feastol */
1324 extern
1326  SCIP_SET* set, /**< global SCIP settings */
1327  SCIP_Real val1, /**< first value to be compared */
1328  SCIP_Real val2 /**< second value to be compared */
1329  );
1330 
1331 /** checks, if relative difference of val1 and val2 is lower than feastol */
1332 extern
1334  SCIP_SET* set, /**< global SCIP settings */
1335  SCIP_Real val1, /**< first value to be compared */
1336  SCIP_Real val2 /**< second value to be compared */
1337  );
1338 
1339 /** checks, if relative difference of val1 and val2 is not greater than feastol */
1340 extern
1342  SCIP_SET* set, /**< global SCIP settings */
1343  SCIP_Real val1, /**< first value to be compared */
1344  SCIP_Real val2 /**< second value to be compared */
1345  );
1346 
1347 /** checks, if relative difference of val1 and val2 is greater than feastol */
1348 extern
1350  SCIP_SET* set, /**< global SCIP settings */
1351  SCIP_Real val1, /**< first value to be compared */
1352  SCIP_Real val2 /**< second value to be compared */
1353  );
1354 
1355 /** checks, if relative difference of val1 and val2 is not lower than -feastol */
1356 extern
1358  SCIP_SET* set, /**< global SCIP settings */
1359  SCIP_Real val1, /**< first value to be compared */
1360  SCIP_Real val2 /**< second value to be compared */
1361  );
1362 
1363 /** checks, if value is in range feasibility tolerance of 0.0 */
1364 extern
1366  SCIP_SET* set, /**< global SCIP settings */
1367  SCIP_Real val /**< value to be compared against zero */
1368  );
1369 
1370 /** checks, if value is greater than feasibility tolerance */
1371 extern
1373  SCIP_SET* set, /**< global SCIP settings */
1374  SCIP_Real val /**< value to be compared against zero */
1375  );
1376 
1377 /** checks, if value is lower than -feasibility tolerance */
1378 extern
1380  SCIP_SET* set, /**< global SCIP settings */
1381  SCIP_Real val /**< value to be compared against zero */
1382  );
1383 
1384 /** checks, if value is integral within the feasibility bounds */
1385 extern
1387  SCIP_SET* set, /**< global SCIP settings */
1388  SCIP_Real val /**< value to be compared against zero */
1389  );
1390 
1391 /** checks, if given fractional part is smaller than feastol */
1392 extern
1394  SCIP_SET* set, /**< global SCIP settings */
1395  SCIP_Real val /**< value to be compared against zero */
1396  );
1397 
1398 /** rounds value + feasibility tolerance down to the next integer in feasibility tolerance */
1399 extern
1401  SCIP_SET* set, /**< global SCIP settings */
1402  SCIP_Real val /**< value to be compared against zero */
1403  );
1404 
1405 /** rounds value - feasibility tolerance up to the next integer in feasibility tolerance */
1406 extern
1408  SCIP_SET* set, /**< global SCIP settings */
1409  SCIP_Real val /**< value to be compared against zero */
1410  );
1411 
1412 /** rounds value to the nearest integer in feasibility tolerance */
1413 extern
1415  SCIP_SET* set, /**< global SCIP settings */
1416  SCIP_Real val /**< value to be compared against zero */
1417  );
1418 
1419 /** returns fractional part of value, i.e. x - floor(x) in feasibility tolerance */
1420 extern
1422  SCIP_SET* set, /**< global SCIP settings */
1423  SCIP_Real val /**< value to return fractional part for */
1424  );
1425 
1426 /** checks, if the given new lower bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
1427 extern
1429  SCIP_SET* set, /**< global SCIP settings */
1430  SCIP_Real newlb, /**< new lower bound */
1431  SCIP_Real oldlb, /**< old lower bound */
1432  SCIP_Real oldub /**< old upper bound */
1433  );
1434 
1435 /** checks, if the given new upper bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
1436 extern
1438  SCIP_SET* set, /**< global SCIP settings */
1439  SCIP_Real newub, /**< new upper bound */
1440  SCIP_Real oldlb, /**< old lower bound */
1441  SCIP_Real oldub /**< old upper bound */
1442  );
1443 
1444 /** checks, if the given cut's efficacy is larger than the minimal cut efficacy */
1445 extern
1447  SCIP_SET* set, /**< global SCIP settings */
1448  SCIP_Bool root, /**< should the root's minimal cut efficacy be used? */
1449  SCIP_Real efficacy /**< efficacy of the cut */
1450  );
1451 
1452 /** checks, if relative difference of values is in range of epsilon */
1453 extern
1455  SCIP_SET* set, /**< global SCIP settings */
1456  SCIP_Real val1, /**< first value to be compared */
1457  SCIP_Real val2 /**< second value to be compared */
1458  );
1459 
1460 /** checks, if relative difference of val1 and val2 is lower than epsilon */
1461 extern
1463  SCIP_SET* set, /**< global SCIP settings */
1464  SCIP_Real val1, /**< first value to be compared */
1465  SCIP_Real val2 /**< second value to be compared */
1466  );
1467 
1468 /** checks, if relative difference of val1 and val2 is not greater than epsilon */
1469 extern
1471  SCIP_SET* set, /**< global SCIP settings */
1472  SCIP_Real val1, /**< first value to be compared */
1473  SCIP_Real val2 /**< second value to be compared */
1474  );
1475 
1476 /** checks, if relative difference of val1 and val2 is greater than epsilon */
1477 extern
1479  SCIP_SET* set, /**< global SCIP settings */
1480  SCIP_Real val1, /**< first value to be compared */
1481  SCIP_Real val2 /**< second value to be compared */
1482  );
1483 
1484 /** checks, if relative difference of val1 and val2 is not lower than -epsilon */
1485 extern
1487  SCIP_SET* set, /**< global SCIP settings */
1488  SCIP_Real val1, /**< first value to be compared */
1489  SCIP_Real val2 /**< second value to be compared */
1490  );
1491 
1492 /** checks, if relative difference of values is in range of sumepsilon */
1493 extern
1495  SCIP_SET* set, /**< global SCIP settings */
1496  SCIP_Real val1, /**< first value to be compared */
1497  SCIP_Real val2 /**< second value to be compared */
1498  );
1499 
1500 /** checks, if relative difference of val1 and val2 is lower than sumepsilon */
1501 extern
1503  SCIP_SET* set, /**< global SCIP settings */
1504  SCIP_Real val1, /**< first value to be compared */
1505  SCIP_Real val2 /**< second value to be compared */
1506  );
1507 
1508 /** checks, if relative difference of val1 and val2 is not greater than sumepsilon */
1509 extern
1511  SCIP_SET* set, /**< global SCIP settings */
1512  SCIP_Real val1, /**< first value to be compared */
1513  SCIP_Real val2 /**< second value to be compared */
1514  );
1515 
1516 /** checks, if relative difference of val1 and val2 is greater than sumepsilon */
1517 extern
1519  SCIP_SET* set, /**< global SCIP settings */
1520  SCIP_Real val1, /**< first value to be compared */
1521  SCIP_Real val2 /**< second value to be compared */
1522  );
1523 
1524 /** checks, if relative difference of val1 and val2 is not lower than -sumepsilon */
1525 extern
1527  SCIP_SET* set, /**< global SCIP settings */
1528  SCIP_Real val1, /**< first value to be compared */
1529  SCIP_Real val2 /**< second value to be compared */
1530  );
1531 
1532 
1533 #ifdef NDEBUG
1534 
1535 /* In optimized mode, the function calls are overwritten by defines to reduce the number of function calls and
1536  * speed up the algorithms.
1537  */
1538 
1539 #define SCIPsetInfinity(set) ( (set)->num_infinity )
1540 #define SCIPsetGetHugeValue(set) ( (set)->num_hugeval )
1541 #define SCIPsetEpsilon(set) ( (set)->num_epsilon )
1542 #define SCIPsetSumepsilon(set) ( (set)->num_sumepsilon )
1543 #define SCIPsetFeastol(set) ( (set)->num_feastol )
1544 #define SCIPsetLpfeastol(set) ( (set)->sepa_primfeastol == SCIP_INVALID ? (set)->num_lpfeastol : MIN((set)->num_lpfeastol, (set)->sepa_primfeastol) )
1545 #define SCIPsetSepaprimfeastol(set) ( (set)->sepa_primfeastol )
1546 #define SCIPsetDualfeastol(set) ( (set)->num_dualfeastol )
1547 #define SCIPsetBarrierconvtol(set) ( (set)->num_barrierconvtol )
1548 #define SCIPsetPseudocosteps(set) ( (set)->num_pseudocosteps )
1549 #define SCIPsetPseudocostdelta(set) ( (set)->num_pseudocostdelta )
1550 #define SCIPsetCutoffbounddelta(set) ( MIN(100.0 * SCIPsetFeastol(set), 0.0001) )
1551 #define SCIPsetRecompfac(set) ( (set)->num_recompfac )
1552 #define SCIPsetIsEQ(set, val1, val2) ( EPSEQ(val1, val2, (set)->num_epsilon) )
1553 #define SCIPsetIsLT(set, val1, val2) ( EPSLT(val1, val2, (set)->num_epsilon) )
1554 #define SCIPsetIsLE(set, val1, val2) ( EPSLE(val1, val2, (set)->num_epsilon) )
1555 #define SCIPsetIsGT(set, val1, val2) ( EPSGT(val1, val2, (set)->num_epsilon) )
1556 #define SCIPsetIsGE(set, val1, val2) ( EPSGE(val1, val2, (set)->num_epsilon) )
1557 #define SCIPsetIsInfinity(set, val) ( (val) >= (set)->num_infinity )
1558 #define SCIPsetIsHugeValue(set, val) ( (val) >= (set)->num_hugeval )
1559 #define SCIPsetIsZero(set, val) ( EPSZ(val, (set)->num_epsilon) )
1560 #define SCIPsetIsPositive(set, val) ( EPSP(val, (set)->num_epsilon) )
1561 #define SCIPsetIsNegative(set, val) ( EPSN(val, (set)->num_epsilon) )
1562 #define SCIPsetIsIntegral(set, val) ( EPSISINT(val, (set)->num_epsilon) )
1563 #define SCIPsetIsScalingIntegral(set, val, scalar) \
1564  ( EPSISINT((scalar)*(val), MAX(REALABS(scalar), 1.0)*(set)->num_epsilon) )
1565 #define SCIPsetIsFracIntegral(set, val) ( !EPSP(val, (set)->num_epsilon) )
1566 #define SCIPsetFloor(set, val) ( EPSFLOOR(val, (set)->num_epsilon) )
1567 #define SCIPsetCeil(set, val) ( EPSCEIL(val, (set)->num_epsilon) )
1568 #define SCIPsetRound(set, val) ( EPSROUND(val, (set)->num_epsilon) )
1569 #define SCIPsetFrac(set, val) ( EPSFRAC(val, (set)->num_epsilon) )
1570 
1571 #define SCIPsetIsSumEQ(set, val1, val2) ( EPSEQ(val1, val2, (set)->num_sumepsilon) )
1572 #define SCIPsetIsSumLT(set, val1, val2) ( EPSLT(val1, val2, (set)->num_sumepsilon) )
1573 #define SCIPsetIsSumLE(set, val1, val2) ( EPSLE(val1, val2, (set)->num_sumepsilon) )
1574 #define SCIPsetIsSumGT(set, val1, val2) ( EPSGT(val1, val2, (set)->num_sumepsilon) )
1575 #define SCIPsetIsSumGE(set, val1, val2) ( EPSGE(val1, val2, (set)->num_sumepsilon) )
1576 #define SCIPsetIsSumZero(set, val) ( EPSZ(val, (set)->num_sumepsilon) )
1577 #define SCIPsetIsSumPositive(set, val) ( EPSP(val, (set)->num_sumepsilon) )
1578 #define SCIPsetIsSumNegative(set, val) ( EPSN(val, (set)->num_sumepsilon) )
1579 #define SCIPsetSumFloor(set, val) ( EPSFLOOR(val, (set)->num_sumepsilon) )
1580 #define SCIPsetSumCeil(set, val) ( EPSCEIL(val, (set)->num_sumepsilon) )
1581 #define SCIPsetSumRound(set, val) ( EPSROUND(val, (set)->num_sumepsilon) )
1582 #define SCIPsetSumFrac(set, val) ( EPSFRAC(val, (set)->num_sumepsilon) )
1583 
1584 #define SCIPsetIsFeasEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_feastol) )
1585 #define SCIPsetIsFeasLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_feastol) )
1586 #define SCIPsetIsFeasLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_feastol) )
1587 #define SCIPsetIsFeasGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_feastol) )
1588 #define SCIPsetIsFeasGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_feastol) )
1589 #define SCIPsetIsFeasZero(set, val) ( EPSZ(val, (set)->num_feastol) )
1590 #define SCIPsetIsFeasPositive(set, val) ( EPSP(val, (set)->num_feastol) )
1591 #define SCIPsetIsFeasNegative(set, val) ( EPSN(val, (set)->num_feastol) )
1592 #define SCIPsetIsFeasIntegral(set, val) ( EPSISINT(val, (set)->num_feastol) )
1593 #define SCIPsetIsFeasFracIntegral(set, val) ( !EPSP(val, (set)->num_feastol) )
1594 #define SCIPsetFeasFloor(set, val) ( EPSFLOOR(val, (set)->num_feastol) )
1595 #define SCIPsetFeasCeil(set, val) ( EPSCEIL(val, (set)->num_feastol) )
1596 #define SCIPsetFeasRound(set, val) ( EPSROUND(val, (set)->num_feastol) )
1597 #define SCIPsetFeasFrac(set, val) ( EPSFRAC(val, (set)->num_feastol) )
1598 
1599 #define SCIPsetIsLbBetter(set, newlb, oldlb, oldub) ( EPSGT(newlb, oldlb, \
1600  set->num_boundstreps * MAX(MIN((oldub) - (oldlb), REALABS(oldlb)), 1e-3)) )
1601 #define SCIPsetIsUbBetter(set, newub, oldlb, oldub) ( EPSLT(newub, oldub, \
1602  set->num_boundstreps * MAX(MIN((oldub) - (oldlb), REALABS(oldub)), 1e-3)) )
1603 #define SCIPsetIsEfficacious(set, root, efficacy) \
1604  ( root ? EPSP(efficacy, (set)->sepa_minefficacyroot) : EPSP(efficacy, (set)->sepa_minefficacy) )
1605 
1606 #define SCIPsetIsRelEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_epsilon) )
1607 #define SCIPsetIsRelLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_epsilon) )
1608 #define SCIPsetIsRelLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_epsilon) )
1609 #define SCIPsetIsRelGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_epsilon) )
1610 #define SCIPsetIsRelGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_epsilon) )
1611 
1612 #define SCIPsetIsSumRelEQ(set, val1, val2) ( EPSZ(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) )
1613 #define SCIPsetIsSumRelLT(set, val1, val2) ( EPSN(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) )
1614 #define SCIPsetIsSumRelLE(set, val1, val2) ( !EPSP(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) )
1615 #define SCIPsetIsSumRelGT(set, val1, val2) ( EPSP(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) )
1616 #define SCIPsetIsSumRelGE(set, val1, val2) ( !EPSN(SCIPrelDiff(val1, val2), (set)->num_sumepsilon) )
1617 #define SCIPsetIsUpdateUnreliable(set, newvalue, oldvalue) \
1618  ( (ABS(oldvalue) / MAX(ABS(newvalue), set->num_epsilon)) >= set->num_recompfac )
1619 
1620 #endif
1621 
1622 #ifdef NDEBUG
1623 #define SCIPsetAllocBufferArray(set,ptr,num) ( SCIPbufferAllocMem((set)->buffer, set, (void**)(ptr), \
1624  (int)((num)*sizeof(**(ptr)))) )
1625 #define SCIPsetDuplicateBufferArray(set,ptr,source,num) \
1626  ( SCIPbufferDuplicateMem((set)->buffer, set, (void**)(ptr), source, \
1627  (int)((num)*sizeof(**(ptr)))) )
1628 #define SCIPsetReallocBufferArray(set,ptr,num) ( SCIPbufferReallocMem((set)->buffer, set, (void**)(ptr), \
1629  (int)((num)*sizeof(**(ptr)))) )
1630 #else
1631 /* Check for integer overflow in allocation size */
1632 #define SCIPsetAllocBufferArray(set,ptr,num) ( SCIPbufferAllocMemSave(set, (void**)(ptr), num, sizeof(**(ptr))) )
1633 #define SCIPsetDuplicateBufferArray(set,ptr,source,num) ( SCIPbufferDuplicateMemSave(set, (void**)(ptr), source, num, sizeof(**(ptr))) )
1634 #define SCIPsetReallocBufferArray(set,ptr,num) ( SCIPbufferReallocMemSave(set, (void**)(ptr), num, sizeof(**(ptr))) )
1635 #endif
1636 #define SCIPsetFreeBufferArray(set,ptr) ( SCIPbufferFreeMem((set)->buffer, (void**)(ptr), 0) )
1637 #define SCIPsetAllocBuffer(set,ptr) ( SCIPbufferAllocMem((set)->buffer, set, (void**)(ptr), (int) sizeof(**(ptr))) )
1638 #define SCIPsetAllocBufferSize(set,ptr,size) ( SCIPbufferAllocMem((set)->buffer, set, (void**)(ptr), size) )
1639 #define SCIPsetDuplicateBufferSize(set,ptr,source,size) \
1640  ( SCIPbufferDuplicateMem((set)->buffer, set, (void**)(ptr), source, size) )
1641 #define SCIPsetReallocBufferSize(set,ptr,size) ( SCIPbufferReallocMem((set)->buffer, set, (void**)(ptr), size) )
1642 #define SCIPsetFreeBuffer(set,ptr) ( SCIPbufferFreeMem((set)->buffer, (void**)(ptr), 0) )
1643 #define SCIPsetFreeBufferSize(set,ptr) ( SCIPbufferFreeMem((set)->buffer, (void**)(ptr), 0) )
1644 
1645 #ifdef __cplusplus
1646 }
1647 #endif
1648 
1649 #endif
1650