Scippy

SCIP

Solving Constraint Integer Programs

set.c
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.c
17  * @brief methods for global SCIP settings
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  *
21  * @todo Functions like SCIPsetFeastol() are misleading (it seems that the feasibility tolerance can be set).
22  * Rename all functions starting with SCIPsetXXX, e.g., SCIPsetGetFeastol() and SCIPsetSetFeastol().
23  */
24 
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
26 
27 #include <assert.h>
28 #include <string.h>
29 #include <math.h>
30 
31 #include "scip/def.h"
32 #include "scip/set.h"
33 #include "scip/stat.h"
34 #include "scip/clock.h"
35 #include "scip/event.h"
36 #include "scip/lp.h"
37 #include "scip/paramset.h"
38 #include "scip/scip.h"
39 #include "scip/branch.h"
40 #include "scip/conflict.h"
41 #include "scip/cons.h"
42 #include "scip/disp.h"
43 #include "scip/dialog.h"
44 #include "scip/heur.h"
45 #include "scip/nodesel.h"
46 #include "scip/presol.h"
47 #include "scip/pricer.h"
48 #include "scip/reader.h"
49 #include "scip/relax.h"
50 #include "scip/sepa.h"
51 #include "scip/prop.h"
52 #include "nlpi/nlpi.h"
53 
54 /*
55  * Default settings
56  */
57 
58 
59 /* Branching */
60 
61 #define SCIP_DEFAULT_BRANCH_SCOREFUNC 'p' /**< branching score function ('s'um, 'p'roduct) */
62 #define SCIP_DEFAULT_BRANCH_SCOREFAC 0.167 /**< branching score factor to weigh downward and upward gain prediction
63  * in sum score function */
64 #define SCIP_DEFAULT_BRANCH_PREFERBINARY FALSE /**< should branching on binary variables be preferred? */
65 #define SCIP_DEFAULT_BRANCH_CLAMP 0.2 /**< minimal fractional distance of branching point to a continuous variable'
66  * bounds; a value of 0.5 leads to branching always in the middle of a bounded domain */
67 #define SCIP_DEFAULT_BRANCH_LPGAINNORMALIZE 's' /**< strategy for normalizing LP gain when updating pseudo costs of continuous variables */
68 #define SCIP_DEFAULT_BRANCH_DELAYPSCOST TRUE /**< should updating pseudo costs of continuous variables be delayed to after separation */
69 #define SCIP_DEFAULT_BRANCH_FORCEALL FALSE /**< should all strong branching children be regarded even if
70  * one is detected to be infeasible? (only with propagation) */
71 #define SCIP_DEFAULT_BRANCH_FIRSTSBCHILD 'a' /**< child node to be regarded first during strong branching (only with propagation): 'u'p child, 'd'own child, or 'a'utomatic */
72 #define SCIP_DEFAULT_BRANCH_CHECKSBSOL TRUE /**< should LP solutions during strong branching with propagation be checked for feasibility? */
73 #define SCIP_DEFAULT_BRANCH_ROUNDSBSOL TRUE /**< should LP solutions during strong branching with propagation be rounded? (only when checksbsol=TRUE) */
74 
75 /* Conflict Analysis */
76 
77 #define SCIP_DEFAULT_CONF_MAXVARSFAC 0.10 /**< maximal fraction of variables involved in a conflict constraint */
78 #define SCIP_DEFAULT_CONF_MINMAXVARS 30 /**< minimal absolute maximum of variables involved in a conflict constraint */
79 #define SCIP_DEFAULT_CONF_MAXLPLOOPS 2 /**< maximal number of LP resolving loops during conflict analysis
80  * (-1: no limit) */
81 #define SCIP_DEFAULT_CONF_LPITERATIONS 10 /**< maximal number of LP iterations in each LP resolving loop
82  * (-1: no limit) */
83 #define SCIP_DEFAULT_CONF_FUIPLEVELS -1 /**< number of depth levels up to which first UIP's are used in conflict
84  * analysis (-1: use All-FirstUIP rule) */
85 #define SCIP_DEFAULT_CONF_INTERCONSS -1 /**< maximal number of intermediate conflict constraints generated in
86  * conflict graph (-1: use every intermediate constraint) */
87 #define SCIP_DEFAULT_CONF_MAXCONSS 10 /**< maximal number of conflict constraints accepted at an infeasible node
88  * (-1: use all generated conflict constraints) */
89 #define SCIP_DEFAULT_CONF_RECONVLEVELS -1 /**< number of depth levels up to which UIP reconvergence constraints are
90  * generated (-1: generate reconvergence constraints in all depth levels) */
91 #define SCIP_DEFAULT_CONF_ENABLE TRUE /**< conflict analysis be enabled? */
92 #define SCIP_DEFAULT_CONF_USEPROP TRUE /**< should propagation conflict analysis be used? */
93 #define SCIP_DEFAULT_CONF_USEINFLP TRUE /**< should infeasible LP conflict analysis be used? */
94 #define SCIP_DEFAULT_CONF_USEBOUNDLP FALSE /**< should bound exceeding LP conflict analysis be used? */
95 #define SCIP_DEFAULT_CONF_USESB FALSE /**< should infeasible/bound exceeding strong branching conflict analysis
96  * be used? */
97 #define SCIP_DEFAULT_CONF_USEPSEUDO TRUE /**< should pseudo solution conflict analysis be used? */
98 #define SCIP_DEFAULT_CONF_PREFERBINARY FALSE /**< should binary conflicts be preferred? */
99 #define SCIP_DEFAULT_CONF_ALLOWLOCAL TRUE /**< should conflict constraints be generated that are only valid locally? */
100 #define SCIP_DEFAULT_CONF_SETTLELOCAL FALSE /**< should conflict constraints be attached only to the local subtree
101  * where they can be useful? */
102 #define SCIP_DEFAULT_CONF_REPROPAGATE TRUE /**< should earlier nodes be repropagated in order to replace branching
103  * decisions by deductions? */
104 #define SCIP_DEFAULT_CONF_KEEPREPROP TRUE /**< should constraints be kept for repropagation even if they are too long? */
105 #define SCIP_DEFAULT_CONF_SEPARATE TRUE /**< should the conflict constraints be separated? */
106 #define SCIP_DEFAULT_CONF_DYNAMIC TRUE /**< should the conflict constraints be subject to aging? */
107 #define SCIP_DEFAULT_CONF_REMOVEABLE TRUE /**< should the conflict's relaxations be subject to LP aging and cleanup? */
108 #define SCIP_DEFAULT_CONF_DEPTHSCOREFAC 1.0 /**< score factor for depth level in bound relaxation heuristic of LP analysis */
109 #define SCIP_DEFAULT_CONF_SCOREFAC 0.98 /**< factor to decrease importance of variables' earlier conflict scores */
110 #define SCIP_DEFAULT_CONF_RESTARTNUM 0 /**< number of successful conflict analysis calls that trigger a restart
111  * (0: disable conflict restarts) */
112 #define SCIP_DEFAULT_CONF_RESTARTFAC 1.5 /**< factor to increase restartnum with after each restart */
113 #define SCIP_DEFAULT_CONF_IGNORERELAXEDBD FALSE /**< should relaxed bounds be ignored? */
114 #define SCIP_DEFAULT_CONF_MAXVARSDETECTIMPLIEDBOUNDS 250 /**< maximal number of variables to try to detect global bound implications and shorten the whole conflict set (0: disabled) */
115 #define SCIP_DEFAULT_CONF_FULLSHORTENCONFLICT TRUE /**< try to shorten the whole conflict set or terminate early (depending on the 'maxvarsdetectimpliedbounds' parameter) */
116 #define SCIP_DEFAULT_CONF_CONFLITWEIGHT 0.0 /**< the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict */
117 #define SCIP_DEFAULT_CONF_CONFLITGRAPHWEIGHT 1.0/**< the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict graph */
118 
119 
120 /* Constraints */
121 
122 #define SCIP_DEFAULT_CONS_AGELIMIT 0 /**< maximum age an unnecessary constraint can reach before it is deleted
123  * (0: dynamic adjustment, -1: constraints are never deleted) */
124 #define SCIP_DEFAULT_CONS_OBSOLETEAGE -1 /**< age of a constraint after which it is marked obsolete
125  * (0: dynamic adjustment, -1: constraints are never marked obsolete) */
126 #define SCIP_DEFAULT_CONS_DISABLEENFOPS FALSE /**< should enforcement of pseudo solution be disabled? */
127 
128 
129 /* Display */
130 
131 #define SCIP_DEFAULT_DISP_VERBLEVEL SCIP_VERBLEVEL_HIGH /**< verbosity level of output */
132 #define SCIP_DEFAULT_DISP_WIDTH 139 /**< maximal number of characters in a node information line */
133 #define SCIP_DEFAULT_DISP_FREQ 100 /**< frequency for displaying node information lines */
134 #define SCIP_DEFAULT_DISP_HEADERFREQ 15 /**< frequency for displaying header lines (every n'th node info line) */
135 #define SCIP_DEFAULT_DISP_LPINFO FALSE /**< should the LP solver display status messages? */
136 
137 
138 /* History */
139 
140 #define SCIP_DEFAULT_HISTORY_VALUEBASED FALSE /**< should statistics be collected for variable domain value pairs */
141 
142 /* Limits */
143 
144 #define SCIP_DEFAULT_LIMIT_TIME 1e+20 /**< maximal time in seconds to run */
145 #define SCIP_DEFAULT_LIMIT_MEMORY 1e+20 /**< maximal memory usage in MB */
146 #define SCIP_DEFAULT_LIMIT_GAP 0.0 /**< solving stops, if the gap is below the given value */
147 #define SCIP_DEFAULT_LIMIT_ABSGAP 0.0 /**< solving stops, if the absolute difference between primal and dual
148  * bound reaches this value */
149 #define SCIP_DEFAULT_LIMIT_NODES -1LL /**< maximal number of nodes to process (-1: no limit) */
150 #define SCIP_DEFAULT_LIMIT_STALLNODES -1LL /**< solving stops, if the given number of nodes was processed since the
151  * last improvement of the primal solution value (-1: no limit) */
152 #define SCIP_DEFAULT_LIMIT_SOLUTIONS -1 /**< solving stops, if given number of sols were found (-1: no limit) */
153 #define SCIP_DEFAULT_LIMIT_BESTSOL -1 /**< solving stops, if given number of solution improvements were found
154  * (-1: no limit) */
155 #define SCIP_DEFAULT_LIMIT_MAXSOL 100 /**< maximal number of solutions to store in the solution storage */
156 #define SCIP_DEFAULT_LIMIT_MAXORIGSOL 10 /**< maximal number of solutions candidates to store in the solution storage of the original problem */
157 #define SCIP_DEFAULT_LIMIT_RESTARTS -1 /**< solving stops, if the given number of restarts was triggered (-1: no limit) */
158 
159 
160 /* LP */
161 
162 #define SCIP_DEFAULT_LP_SOLVEFREQ 1 /**< frequency for solving LP at the nodes; -1: never; 0: only root LP */
163 #define SCIP_DEFAULT_LP_ITERLIM -1LL /**< iteration limit for each single LP solve; -1: no limit */
164 #define SCIP_DEFAULT_LP_ROOTITERLIM -1LL /**< iteration limit for initial root LP solve; -1: no limit */
165 #define SCIP_DEFAULT_LP_SOLVEDEPTH -1 /**< maximal depth for solving LPs (-1: no depth limit) */
166 #define SCIP_DEFAULT_LP_INITALGORITHM 's' /**< LP algorithm for solving initial LP relaxations ('s'implex, 'b'arrier,
167  * barrier with 'c'rossover) */
168 #define SCIP_DEFAULT_LP_RESOLVEALGORITHM 's' /**< LP algorithm for resolving LP relaxations if a starting basis exists
169  * ('s'implex, 'b'arrier, barrier with 'c'rossover) */
170 #define SCIP_DEFAULT_LP_PRICING 'l' /**< LP pricing strategy ('l'pi default, 'a'uto, 'f'ull pricing, 'p'artial,
171  * 's'teepest edge pricing, 'q'uickstart steepest edge pricing,
172  * 'd'evex pricing) */
173 #define SCIP_DEFAULT_LP_CLEARINITIALPROBINGLP TRUE/**< should lp state be cleared at the end of probing mode when lp
174  * was initially unsolved, e.g., when called right after presolving? */
175 #define SCIP_DEFAULT_LP_RESOLVERESTORE FALSE /**< should the LP be resolved to restore the state at start of diving (if FALSE we buffer the solution values)? */
176 #define SCIP_DEFAULT_LP_FREESOLVALBUFFERS FALSE /**< should the buffers for storing LP solution values during diving be freed at end of diving? */
177 #define SCIP_DEFAULT_LP_COLAGELIMIT 10 /**< maximum age a dynamic column can reach before it is deleted from SCIP_LP
178  * (-1: don't delete columns due to aging) */
179 #define SCIP_DEFAULT_LP_ROWAGELIMIT 10 /**< maximum age a dynamic row can reach before it is deleted from SCIP_LP
180  * (-1: don't delete rows due to aging) */
181 #define SCIP_DEFAULT_LP_CLEANUPCOLS FALSE /**< should new non-basic columns be removed after LP solving? */
182 #define SCIP_DEFAULT_LP_CLEANUPCOLSROOT FALSE /**< should new non-basic columns be removed after root LP solving? */
183 #define SCIP_DEFAULT_LP_CLEANUPROWS TRUE /**< should new basic rows be removed after LP solving? */
184 #define SCIP_DEFAULT_LP_CLEANUPROWSROOT TRUE /**< should new basic rows be removed after root LP solving? */
185 #define SCIP_DEFAULT_LP_CHECKSTABILITY TRUE /**< should LP solver's return status be checked for stability? */
186 #define SCIP_DEFAULT_LP_CONDITIONLIMIT -1.0 /**< maximum condition number of LP basis counted as stable (-1.0: no limit) */
187 #define SCIP_DEFAULT_LP_CHECKPRIMFEAS TRUE /**< should LP solutions be checked for primal feasibility to resolve LP at numerical troubles? */
188 #define SCIP_DEFAULT_LP_CHECKDUALFEAS TRUE /**< should LP solutions be checked for dual feasibility to resolve LP at numerical troubles? */
189 #define SCIP_DEFAULT_LP_FASTMIP 1 /**< should FASTMIP setting of LP solver be used? */
190 #define SCIP_DEFAULT_LP_SCALING TRUE /**< should scaling of LP solver be used? */
191 #define SCIP_DEFAULT_LP_PRESOLVING TRUE /**< should presolving of LP solver be used? */
192 #define SCIP_DEFAULT_LP_LEXDUALALGO FALSE /**< should the dual lexicographic algorithm be used? */
193 #define SCIP_DEFAULT_LP_LEXDUALROOTONLY TRUE /**< should the lexicographic dual algorithm be applied only at the root node */
194 #define SCIP_DEFAULT_LP_LEXDUALMAXROUNDS 2 /**< maximum number of rounds in the dual lexicographic algorithm */
195 #define SCIP_DEFAULT_LP_LEXDUALBASIC FALSE /**< choose fractional basic variables in lexicographic dual algorithm */
196 #define SCIP_DEFAULT_LP_LEXDUALSTALLING TRUE /**< turn on the lex dual algorithm only when stalling? */
197 #define SCIP_DEFAULT_LP_DISABLECUTOFF 2 /**< disable the cutoff bound in the LP solver? (0: enabled, 1: disabled, 2: auto) */
198 #define SCIP_DEFAULT_LP_ROWREPSWITCH -1.0 /**< simplex algorithm shall use row representation of the basis
199  * if number of rows divided by number of columns exceeds this value */
200 #define SCIP_DEFAULT_LP_THREADS 0 /**< number of threads used for solving the LP (0: automatic) */
201 #define SCIP_DEFAULT_LP_RESOLVEITERFAC -1.0 /**< factor of average LP iterations that is used as LP iteration limit
202  * for LP resolve (-1.0: unlimited) */
203 #define SCIP_DEFAULT_LP_RESOLVEITERMIN 1000 /**< minimum number of iterations that are allowed for LP resolve */
204 
205 /* NLP */
206 
207 #define SCIP_DEFAULT_NLP_SOLVER "" /**< name of NLP solver to use, or "" if solver should be chosen by priority */
208 #define SCIP_DEFAULT_NLP_DISABLE FALSE /**< should the NLP be always disabled? */
209 
210 /* Memory */
211 
212 #define SCIP_DEFAULT_MEM_SAVEFAC 0.8 /**< fraction of maximal mem usage when switching to memory saving mode */
213 #define SCIP_DEFAULT_MEM_ARRAYGROWFAC 1.2 /**< memory growing factor for dynamically allocated arrays */
214 #define SCIP_DEFAULT_MEM_TREEGROWFAC 2.0 /**< memory growing factor for tree array */
215 #define SCIP_DEFAULT_MEM_PATHGROWFAC 2.0 /**< memory growing factor for path array */
216 #define SCIP_DEFAULT_MEM_ARRAYGROWINIT 4 /**< initial size of dynamically allocated arrays */
217 #define SCIP_DEFAULT_MEM_TREEGROWINIT 65536 /**< initial size of tree array */
218 #define SCIP_DEFAULT_MEM_PATHGROWINIT 256 /**< initial size of path array */
219 
220 
221 /* Miscellaneous */
222 
223 #define SCIP_DEFAULT_MISC_CATCHCTRLC TRUE /**< should the CTRL-C interrupt be caught by SCIP? */
224 #define SCIP_DEFAULT_MISC_USEVARTABLE TRUE /**< should a hashtable be used to map from variable names to variables? */
225 #define SCIP_DEFAULT_MISC_USECONSTABLE TRUE /**< should a hashtable be used to map from constraint names to constraints? */
226 #define SCIP_DEFAULT_MISC_USESMALLTABLES FALSE /**< should smaller hashtables be used? yields better performance for small problems with about 100 variables */
227 #define SCIP_DEFAULT_MISC_PERMUTATIONSEED -1 /**< seed value for permuting the problem after the problem was transformed (-1: no permutation) */
228 #define SCIP_DEFAULT_MISC_PERMUTECONSS TRUE /**< should order of constraints be permuted (depends on permutationseed)? */
229 #define SCIP_DEFAULT_MISC_PERMUTEVARS FALSE /**< should order of variables be permuted (depends on permutationseed)? */
230 #define SCIP_DEFAULT_MISC_EXACTSOLVE FALSE /**< should the problem be solved exactly (with proven dual bounds)? */
231 #define SCIP_DEFAULT_MISC_RESETSTAT TRUE /**< should the statistics be reset if the transformed problem is
232  * freed otherwise the statistics get reset after original problem is
233  * freed (in case of bender decomposition this parameter should be set
234  * to FALSE and therefore can be used to collect statistics over all
235  * runs) */
236 #define SCIP_DEFAULT_MISC_IMPROVINGSOLS FALSE /**< should only solutions be checked which improve the primal bound */
237 #define SCIP_DEFAULT_MISC_PRINTREASON TRUE /**< should the reason be printed if a given start solution is infeasible? */
238 #define SCIP_DEFAULT_MISC_ESTIMEXTERNMEM TRUE /**< should the usage of external memory be estimated? */
239 #define SCIP_DEFAULT_MISC_TRANSORIGSOLS TRUE /**< should SCIP try to transfer original solutions to the extended space (after presolving)? */
240 #define SCIP_DEFAULT_MISC_CALCINTEGRAL TRUE /**< should SCIP calculate the primal dual integral? */
241 #define SCIP_DEFAULT_MISC_FINITESOLSTORE FALSE /**< should SCIP try to remove infinite fixings from solutions copied to the solution store? */
242 
243 
244 /* Node Selection */
245 #define SCIP_DEFAULT_NODESEL_CHILDSEL 'h' /**< child selection rule ('d'own, 'u'p, 'p'seudo costs, 'i'nference, 'l'p value,
246  * 'r'oot LP value difference, 'h'brid inference/root LP value difference) */
247 
248 /* Presolving */
249 
250 #define SCIP_DEFAULT_PRESOL_ABORTFAC 1e-04 /**< abort presolve, if at most this fraction of the problem was changed
251  * in last presolve round */
252 #define SCIP_DEFAULT_PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds (-1: unlimited, 0: off) */
253 #define SCIP_DEFAULT_PRESOL_MAXRESTARTS -1 /**< maximal number of restarts (-1: unlimited) */
254 #define SCIP_DEFAULT_PRESOL_RESTARTFAC 0.05 /**< fraction of integer variables that were fixed in the root node
255  * triggering a restart with preprocessing after root node evaluation */
256 #define SCIP_DEFAULT_PRESOL_IMMRESTARTFAC 0.20 /**< fraction of integer variables that were fixed in the root node triggering an
257  * immediate restart with preprocessing */
258 #define SCIP_DEFAULT_PRESOL_SUBRESTARTFAC 1.00 /**< fraction of integer variables that were globally fixed during the
259  * solving process triggering a restart with preprocessing */
260 #define SCIP_DEFAULT_PRESOL_RESTARTMINRED 0.10 /**< minimal fraction of integer variables removed after restart to allow
261  * for an additional restart */
262 #define SCIP_DEFAULT_PRESOL_DONOTMULTAGGR FALSE /**< should multi-aggregation of variables be forbidden? */
263 #define SCIP_DEFAULT_PRESOL_DONOTAGGR FALSE /**< should aggregation of variables be forbidden? */
264 
265 /* Pricing */
266 
267 #define SCIP_DEFAULT_PRICE_ABORTFAC 2.0 /**< pricing is aborted, if fac * price_maxvars pricing candidates were
268  * found */
269 #define SCIP_DEFAULT_PRICE_MAXVARS 100 /**< maximal number of variables priced in per pricing round */
270 #define SCIP_DEFAULT_PRICE_MAXVARSROOT 2000 /**< maximal number of priced variables at the root node */
271 #define SCIP_DEFAULT_PRICE_DELVARS FALSE /**< should variables created at the current node be deleted when the node is solved
272  * in case they are not present in the LP anymore? */
273 #define SCIP_DEFAULT_PRICE_DELVARSROOT FALSE /**< should variables created at the root node be deleted when the root is solved
274  * in case they are not present in the LP anymore? */
275 
276 
277 /* Propagating */
278 
279 #define SCIP_DEFAULT_PROP_MAXROUNDS 100 /**< maximal number of propagation rounds per node (-1: unlimited) */
280 #define SCIP_DEFAULT_PROP_MAXROUNDSROOT 1000 /**< maximal number of propagation rounds in root node (-1: unlimited) */
281 #define SCIP_DEFAULT_PROP_ABORTONCUTOFF TRUE /**< should propagation be aborted immediately? setting this to FALSE could
282  * help conflict analysis to produce more conflict constraints */
283 
284 
285 /* Separation */
286 
287 #define SCIP_DEFAULT_SEPA_MAXBOUNDDIST 1.0 /**< maximal relative distance from current node's dual bound to primal
288  * bound compared to best node's dual bound for applying separation
289  * (0.0: only on current best node, 1.0: on all nodes) */
290 #define SCIP_DEFAULT_SEPA_MINEFFICACY 0.05 /**< minimal efficacy for a cut to enter the LP */
291 #define SCIP_DEFAULT_SEPA_MINEFFICACYROOT 0.001 /**< minimal efficacy for a cut to enter the LP in the root node */
292 #define SCIP_DEFAULT_SEPA_MINORTHO 0.50 /**< minimal orthogonality for a cut to enter the LP */
293 #define SCIP_DEFAULT_SEPA_MINORTHOROOT 0.50 /**< minimal orthogonality for a cut to enter the LP in the root node */
294 #define SCIP_DEFAULT_SEPA_OBJPARALFAC 0.0001 /**< factor to scale objective parallelism of cut in score calculation */
295 #define SCIP_DEFAULT_SEPA_ORTHOFAC 1.00 /**< factor to scale orthogonality of cut in score calculation */
296 #define SCIP_DEFAULT_SEPA_ORTHOFUNC 'e' /**< function used for calc. scalar prod. in orthogonality test ('e'uclidean, 'd'iscrete) */
297 #define SCIP_DEFAULT_SEPA_EFFICACYNORM 'e' /**< row norm to use for efficacy calculation ('e'uclidean, 'm'aximum,
298  * 's'um, 'd'iscrete) */
299 #define SCIP_DEFAULT_SEPA_MAXRUNS -1 /**< maximal number of runs for which separation is enabled (-1: unlimited) */
300 #define SCIP_DEFAULT_SEPA_MAXROUNDS 5 /**< maximal number of separation rounds per node (-1: unlimited) */
301 #define SCIP_DEFAULT_SEPA_MAXROUNDSROOT -1 /**< maximal number of separation rounds in the root node (-1: unlimited) */
302 #define SCIP_DEFAULT_SEPA_MAXROUNDSROOTSUBRUN 1 /**< maximal number of separation rounds in the root node of a subsequent run (-1: unlimited) */
303 #define SCIP_DEFAULT_SEPA_MAXADDROUNDS 1 /**< maximal additional number of separation rounds in subsequent
304  * price-and-cut loops (-1: no additional restriction) */
305 #define SCIP_DEFAULT_SEPA_MAXSTALLROUNDS 5 /**< maximal number of consecutive separation rounds without objective
306  * or integrality improvement (-1: no additional restriction) */
307 #define SCIP_DEFAULT_SEPA_MAXCUTS 100 /**< maximal number of cuts separated per separation round */
308 #define SCIP_DEFAULT_SEPA_MAXCUTSROOT 2000 /**< maximal separated cuts at the root node */
309 #define SCIP_DEFAULT_SEPA_CUTAGELIMIT 100 /**< maximum age a cut can reach before it is deleted from global cut pool
310  * (-1: cuts are never deleted from the global cut pool) */
311 #define SCIP_DEFAULT_SEPA_POOLFREQ 0 /**< separation frequency for the global cut pool */
312 #define SCIP_DEFAULT_SEPA_FEASTOLFAC -1.00 /**< factor on cut infeasibility to limit feasibility tolerance for relaxation solver (-1: off) */
313 
314 
315 /* Timing */
316 
317 #define SCIP_DEFAULT_TIME_CLOCKTYPE SCIP_CLOCKTYPE_CPU /**< default clock type for timing */
318 #define SCIP_DEFAULT_TIME_ENABLED TRUE /**< is timing enabled? */
319 #define SCIP_DEFAULT_TIME_READING FALSE /**< belongs reading time to solving time? */
320 
321 
322 /* VBC Tool output */
323 #define SCIP_DEFAULT_VBC_FILENAME "-" /**< name of the VBC Tool output file, or "-" if no output should be
324  * created */
325 #define SCIP_DEFAULT_VBC_REALTIME TRUE /**< should the real solving time be used instead of a time step counter
326  * in VBC output? */
327 #define SCIP_DEFAULT_VBC_DISPSOLS FALSE /**< should the node where solutions are found be visualized? */
328 
329 /* Reading */
330 #define SCIP_DEFAULT_READ_INITIALCONSS TRUE /**< should model constraints be marked as initial? */
331 #define SCIP_DEFAULT_READ_DYNAMICCONSS TRUE /**< should model constraints be subject to aging? */
332 #define SCIP_DEFAULT_READ_DYNAMICCOLS FALSE /**< should columns be added and removed dynamically to the LP? */
333 #define SCIP_DEFAULT_READ_DYNAMICROWS FALSE /**< should rows be added and removed dynamically to the LP? */
334 #define SCIP_DEFAULT_WRITE_GENNAMES_OFFSET 0 /**< when writing the problem with generic names, we start with index
335  * 0; using this parameter we can change the starting index to be
336  * different */
337 
338 /* Writing */
339 #define SCIP_DEFAULT_WRITE_ALLCONSS FALSE /**< should all constraints be written (including the redundant constraints)? */
340 
341 
342 
343 
344 /** calculate memory size for dynamically allocated arrays */
345 static
347  int initsize, /**< initial size of array */
348  SCIP_Real growfac, /**< growing factor of array */
349  int num /**< minimum number of entries to store */
350  )
351 {
352  int size;
353 
354  assert(initsize >= 0);
355  assert(growfac >= 1.0);
356  assert(num >= 0);
357 
358  if( growfac == 1.0 )
359  size = MAX(initsize, num);
360  else
361  {
362  int oldsize;
363 
364  /* calculate the size with this loop, such that the resulting numbers are always the same (-> block memory) */
365  initsize = MAX(initsize, 4);
366  size = initsize;
367  oldsize = size - 1;
368 
369  /* second condition checks against overflow */
370  while( size < num && size > oldsize )
371  {
372  oldsize = size;
373  size = (int)(growfac * size + initsize);
374  }
375 
376  /* if an overflow happened, set the correct value */
377  if( size <= oldsize )
378  size = num;
379  }
380 
381  assert(size >= initsize);
382  assert(size >= num);
383 
384  return size;
385 }
386 
387 
388 /** information method for a parameter change of feastol */
389 static
390 SCIP_DECL_PARAMCHGD(paramChgdFeastol)
391 { /*lint --e{715}*/
392  SCIP_Real newfeastol;
393 
394  newfeastol = SCIPparamGetReal(param);
395 
396  /* change the feastol through the SCIP call in order to adjust lpfeastol if necessary */
397  SCIP_CALL( SCIPchgFeastol(scip, newfeastol) );
398 
399  return SCIP_OKAY;
400 }
401 
402 /** information method for a parameter change of lpfeastol */
403 static
404 SCIP_DECL_PARAMCHGD(paramChgdLpfeastol)
405 { /*lint --e{715}*/
406  SCIP_Real newlpfeastol;
407 
408  newlpfeastol = SCIPparamGetReal(param);
409 
410  /* change the lpfeastol through the SCIP call in order to mark the LP unsolved and control that it does not exceed
411  * SCIP's feastol
412  */
413  SCIP_CALL( SCIPchgLpfeastol(scip, newlpfeastol, FALSE) );
414 
415  return SCIP_OKAY;
416 }
417 
418 /** information method for a parameter change of dualfeastol */
419 static
420 SCIP_DECL_PARAMCHGD(paramChgdDualfeastol)
421 { /*lint --e{715}*/
422  SCIP_Real newdualfeastol;
423 
424  newdualfeastol = SCIPparamGetReal(param);
425 
426  /* change the dualfeastol through the SCIP call in order to mark the LP unsolved */
427  SCIP_CALL( SCIPchgDualfeastol(scip, newdualfeastol) );
428 
429  return SCIP_OKAY;
430 }
431 
432 /** information method for a parameter change of barrierconvtol */
433 static
434 SCIP_DECL_PARAMCHGD(paramChgdBarrierconvtol)
435 { /*lint --e{715}*/
436  SCIP_Real newbarrierconvtol;
437 
438  newbarrierconvtol = SCIPparamGetReal(param);
439 
440  /* change the barrierconvtol through the SCIP call in order to mark the LP unsolved */
441  SCIP_CALL( SCIPchgBarrierconvtol(scip, newbarrierconvtol) );
442 
443  return SCIP_OKAY;
444 }
445 
446 /** parameter change information method to autoselect display columns again */
447 static
448 SCIP_DECL_PARAMCHGD(SCIPparamChgdDispWidth)
449 { /*lint --e{715}*/
450  /* automatically select the new active display columns */
452 
453  return SCIP_OKAY;
454 }
455 
456 /** parameter change information method that node limit was changed */
457 static
458 SCIP_DECL_PARAMCHGD(SCIPparamChgdLimit)
459 { /*lint --e{715}*/
460 
461  SCIPmarkLimitChanged(scip);
462  return SCIP_OKAY;
463 }
464 
465 /** copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints
466  * cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the
467  * copied SCIP instance might not represent the same problem semantics as the original.
468  * Note that in this case dual reductions might be invalid. */
470  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
471  SCIP_SET* targetset, /**< target SCIP_SET data structure */
472  SCIP_Bool copyreaders, /**< should the file readers be copied */
473  SCIP_Bool copypricers, /**< should the variable pricers be copied */
474  SCIP_Bool copyconshdlrs, /**< should the constraint handlers be copied */
475  SCIP_Bool copyconflicthdlrs, /**< should the conflict handlers be copied */
476  SCIP_Bool copypresolvers, /**< should the presolvers be copied */
477  SCIP_Bool copyrelaxators, /**< should the relaxators be copied */
478  SCIP_Bool copyseparators, /**< should the separators be copied */
479  SCIP_Bool copypropagators, /**< should the propagators be copied */
480  SCIP_Bool copyheuristics, /**< should the heuristics be copied */
481  SCIP_Bool copyeventhdlrs, /**< should the event handlers be copied */
482  SCIP_Bool copynodeselectors, /**< should the node selectors be copied */
483  SCIP_Bool copybranchrules, /**< should the branchrules be copied */
484  SCIP_Bool copydisplays, /**< should the display columns be copied */
485  SCIP_Bool copydialogs, /**< should the dialogs be copied */
486  SCIP_Bool copynlpis, /**< should the NLP interfaces be copied */
487  SCIP_Bool* allvalid /**< pointer to store whether all plugins were validly copied */
488  )
489 {
490  int p;
491  SCIP_Bool valid;
492 
493  assert(sourceset != NULL);
494  assert(targetset != NULL);
495  assert(sourceset != targetset);
496  assert(allvalid != NULL);
497 
498  *allvalid = TRUE;
499 
500  /* copy all reader plugins */
501  if( copyreaders && sourceset->readers != NULL )
502  {
503  for( p = sourceset->nreaders - 1; p >= 0; --p )
504  {
505  SCIP_CALL( SCIPreaderCopyInclude(sourceset->readers[p], targetset) );
506  }
507  }
508 
509  /* copy all variable pricer plugins */
510  if( copypricers && sourceset->pricers != NULL )
511  {
512  for( p = sourceset->npricers - 1; p >= 0; --p )
513  {
514  valid = FALSE;
515  SCIP_CALL( SCIPpricerCopyInclude(sourceset->pricers[p], targetset, &valid) );
516  *allvalid = *allvalid && valid;
517  if( SCIPpricerIsActive(sourceset->pricers[p]) )
518  {
519  SCIP_CALL( SCIPactivatePricer(targetset->scip, targetset->pricers[p]) );
520  }
521  }
522  }
523 
524  /* copy all constraint handler plugins */
525  if( copyconshdlrs && sourceset->conshdlrs_include != NULL )
526  {
527  /* copy them in order they were added to the sourcescip
528  *
529  * @note we only have to set the valid pointer to FALSE in case that a constraint handler, which does not need
530  * constraints, does not copy; in the case that a constraint handler does not copy and it needs constraint
531  * we will detect later that the problem is not valid if a constraint of that type exits
532  */
533  for( p = 0; p < sourceset->nconshdlrs; ++p )
534  {
535  if( SCIPconshdlrIsClonable(sourceset->conshdlrs_include[p]) )
536  {
537  valid = FALSE;
538  SCIP_CALL( SCIPconshdlrCopyInclude(sourceset->conshdlrs_include[p], targetset, &valid) );
539  *allvalid = *allvalid && valid;
540  SCIPdebugMessage("Copying conshdlr <%s> was%s valid.\n", SCIPconshdlrGetName(sourceset->conshdlrs_include[p]), valid ? "" : " not");
541  }
542  else if( !SCIPconshdlrNeedsCons(sourceset->conshdlrs_include[p]) )
543  {
544  SCIPdebugMessage("Copying Conshdlr <%s> without constraints not valid.\n", SCIPconshdlrGetName(sourceset->conshdlrs_include[p]));
545  *allvalid = FALSE;
546  }
547  }
548  }
549 
550  /* copy all conflict handler plugins */
551  if( copyconflicthdlrs && sourceset->conflicthdlrs != NULL )
552  {
553  for( p = sourceset->nconflicthdlrs - 1; p >= 0; --p )
554  {
555  SCIP_CALL( SCIPconflicthdlrCopyInclude(sourceset->conflicthdlrs[p], targetset) );
556  }
557  }
558 
559  /* copy all presolver plugins */
560  if( copypresolvers && sourceset->presols != NULL )
561  {
562  for( p = sourceset->npresols - 1; p >= 0; --p )
563  {
564  SCIP_CALL( SCIPpresolCopyInclude(sourceset->presols[p], targetset) );
565  }
566  }
567 
568 
569  /* copy all relaxator plugins */
570  if( copyrelaxators && sourceset->relaxs != NULL )
571  {
572  for( p = sourceset->nrelaxs - 1; p >= 0; --p )
573  {
574  SCIP_CALL( SCIPrelaxCopyInclude(sourceset->relaxs[p], targetset) );
575  }
576  }
577 
578 
579  /* copy all separator plugins */
580  if( copyseparators && sourceset->sepas != NULL )
581  {
582  for( p = sourceset->nsepas - 1; p >= 0; --p )
583  {
584  SCIP_CALL( SCIPsepaCopyInclude(sourceset->sepas[p], targetset) );
585  }
586  }
587 
588  /* copy all propagators plugins */
589  if( copypropagators && sourceset->props != NULL )
590  {
591  for( p = sourceset->nprops - 1; p >= 0; --p )
592  {
593  SCIP_CALL( SCIPpropCopyInclude(sourceset->props[p], targetset) );
594  }
595  }
596 
597  /* copy all primal heuristics plugins */
598  if( copyheuristics && sourceset->heurs != NULL )
599  {
600  for( p = sourceset->nheurs - 1; p >= 0; --p )
601  {
602  SCIP_CALL( SCIPheurCopyInclude(sourceset->heurs[p], targetset) );
603  }
604  }
605 
606 
607  /* copy all event handler plugins */
608  if( copyeventhdlrs && sourceset->eventhdlrs != NULL )
609  {
610  for( p = sourceset->neventhdlrs - 1; p >= 0; --p )
611  {
612  /* @todo: the copying process of event handlers is currently not checked for consistency */
613  SCIP_CALL( SCIPeventhdlrCopyInclude(sourceset->eventhdlrs[p], targetset) );
614  }
615  }
616 
617 
618  /* copy all node selector plugins */
619  if( copynodeselectors && sourceset->nodesels != NULL )
620  {
621  for( p = sourceset->nnodesels - 1; p >= 0; --p )
622  {
623  SCIP_CALL( SCIPnodeselCopyInclude(sourceset->nodesels[p], targetset) );
624  }
625  }
626 
627  /* copy all branchrule plugins */
628  if( copybranchrules && sourceset->branchrules != NULL )
629  {
630  for( p = sourceset->nbranchrules - 1; p >= 0; --p )
631  {
632  SCIP_CALL( SCIPbranchruleCopyInclude(sourceset->branchrules[p], targetset) );
633  }
634  }
635 
636 
637  /* copy all display plugins */
638  if( copydisplays && sourceset->disps != NULL )
639  {
640  for( p = sourceset->ndisps - 1; p >= 0; --p )
641  {
642  SCIP_CALL( SCIPdispCopyInclude(sourceset->disps[p], targetset) );
643  }
644  }
645 
646 
647  /* copy all dialog plugins */
648  if( copydialogs && sourceset->dialogs != NULL )
649  {
650  for( p = sourceset->ndialogs - 1; p >= 0; --p )
651  {
652  /* @todo: the copying process of dialog handlers is currently not checked for consistency */
653  SCIP_CALL( SCIPdialogCopyInclude(sourceset->dialogs[p], targetset) );
654  }
655  }
656 
657  /* copy all NLP interfaces */
658  if( copynlpis && sourceset->nlpis != NULL )
659  {
660  for( p = sourceset->nnlpis - 1; p >= 0; --p )
661  {
662  SCIP_NLPI* nlpicopy;
663 
664  SCIP_CALL( SCIPnlpiCopy(SCIPblkmem(targetset->scip), sourceset->nlpis[p], &nlpicopy) );
665  SCIP_CALL( SCIPincludeNlpi(targetset->scip, nlpicopy) );
666  }
667  }
668 
669  return SCIP_OKAY;
670 }
671 
672 /** copies parameters from sourcescip to targetscip */
674  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
675  SCIP_SET* targetset, /**< target SCIP_SET data structure */
676  SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
677  )
678 {
679  assert(sourceset != NULL);
680  assert(targetset != NULL);
681  assert(sourceset != targetset);
682  assert(targetset->scip != NULL);
683 
684  SCIP_CALL( SCIPparamsetCopyParams(sourceset->paramset, targetset->paramset, targetset, messagehdlr) );
685 
686  return SCIP_OKAY;
687 }
688 
689 /** creates global SCIP settings */
691  SCIP_SET** set, /**< pointer to SCIP settings */
692  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
693  BMS_BLKMEM* blkmem, /**< block memory */
694  SCIP* scip /**< SCIP data structure */
695  )
696 {
697  assert(set != NULL);
698  assert(scip != NULL);
699 
700  SCIP_ALLOC( BMSallocMemory(set) );
701 
702  (*set)->stage = SCIP_STAGE_INIT;
703  (*set)->scip = scip;
704 
705  SCIP_CALL( SCIPparamsetCreate(&(*set)->paramset, blkmem) );
706  SCIP_CALL( SCIPbufferCreate(&(*set)->buffer) );
707 
708  (*set)->readers = NULL;
709  (*set)->nreaders = 0;
710  (*set)->readerssize = 0;
711  (*set)->pricers = NULL;
712  (*set)->npricers = 0;
713  (*set)->nactivepricers = 0;
714  (*set)->pricerssize = 0;
715  (*set)->pricerssorted = FALSE;
716  (*set)->pricersnamesorted = FALSE;
717  (*set)->conshdlrs = NULL;
718  (*set)->conshdlrs_sepa = NULL;
719  (*set)->conshdlrs_enfo = NULL;
720  (*set)->conshdlrs_include = NULL;
721  (*set)->nconshdlrs = 0;
722  (*set)->conshdlrssize = 0;
723  (*set)->conflicthdlrs = NULL;
724  (*set)->nconflicthdlrs = 0;
725  (*set)->conflicthdlrssize = 0;
726  (*set)->conflicthdlrssorted = FALSE;
727  (*set)->conflicthdlrsnamesorted = FALSE;
728  (*set)->presols = NULL;
729  (*set)->npresols = 0;
730  (*set)->presolssize = 0;
731  (*set)->presolssorted = FALSE;
732  (*set)->presolsnamesorted = FALSE;
733  (*set)->relaxs = NULL;
734  (*set)->nrelaxs = 0;
735  (*set)->relaxssize = 0;
736  (*set)->relaxssorted = FALSE;
737  (*set)->relaxsnamesorted = FALSE;
738  (*set)->sepas = NULL;
739  (*set)->nsepas = 0;
740  (*set)->sepassize = 0;
741  (*set)->sepassorted = FALSE;
742  (*set)->sepasnamesorted = FALSE;
743  (*set)->props = NULL;
744  (*set)->nprops = 0;
745  (*set)->propssize = 0;
746  (*set)->propssorted = FALSE;
747  (*set)->propspresolsorted = FALSE;
748  (*set)->propsnamesorted = FALSE;
749  (*set)->heurs = NULL;
750  (*set)->nheurs = 0;
751  (*set)->heurssize = 0;
752  (*set)->heurssorted = FALSE;
753  (*set)->heursnamesorted = FALSE;
754  (*set)->eventhdlrs = NULL;
755  (*set)->neventhdlrs = 0;
756  (*set)->eventhdlrssize = 0;
757  (*set)->nodesels = NULL;
758  (*set)->nnodesels = 0;
759  (*set)->nodeselssize = 0;
760  (*set)->nodesel = NULL;
761  (*set)->branchrules = NULL;
762  (*set)->nbranchrules = 0;
763  (*set)->branchrulessize = 0;
764  (*set)->branchrulessorted = FALSE;
765  (*set)->branchrulesnamesorted = FALSE;
766  (*set)->disps = NULL;
767  (*set)->ndisps = 0;
768  (*set)->dispssize = 0;
769  (*set)->dialogs = NULL;
770  (*set)->ndialogs = 0;
771  (*set)->dialogssize = 0;
772  (*set)->nlpis = NULL;
773  (*set)->nnlpis = 0;
774  (*set)->nlpissize = 0;
775  (*set)->nlpissorted = FALSE;
776  (*set)->limitchanged = FALSE;
777  (*set)->nlpenabled = FALSE;
778  (*set)->extcodenames = NULL;
779  (*set)->extcodedescs = NULL;
780  (*set)->nextcodes = 0;
781  (*set)->extcodessize = 0;
782  (*set)->vbc_filename = NULL;
783  (*set)->nlp_solver = NULL;
784  (*set)->nlp_disable = FALSE;
785  (*set)->mem_externestim = 0;
786  (*set)->sepa_primfeastol = SCIP_INVALID;
787 
788  /* branching parameters */
789  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
790  "branching/scorefunc",
791  "branching score function ('s'um, 'p'roduct, 'q'uotient)",
792  &(*set)->branch_scorefunc, TRUE, SCIP_DEFAULT_BRANCH_SCOREFUNC, "spq",
793  NULL, NULL) );
794  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
795  "branching/scorefac",
796  "branching score factor to weigh downward and upward gain prediction in sum score function",
797  &(*set)->branch_scorefac, TRUE, SCIP_DEFAULT_BRANCH_SCOREFAC, 0.0, 1.0,
798  NULL, NULL) );
799  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
800  "branching/preferbinary",
801  "should branching on binary variables be preferred?",
802  &(*set)->branch_preferbinary, FALSE, SCIP_DEFAULT_BRANCH_PREFERBINARY,
803  NULL, NULL) );
804  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
805  "branching/clamp",
806  "minimal relative distance of branching point to bounds when branching on a continuous variable",
807  &(*set)->branch_clamp, FALSE, SCIP_DEFAULT_BRANCH_CLAMP, 0.0, 0.5,
808  NULL, NULL) );
809  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
810  "branching/lpgainnormalize",
811  "strategy for normalization of LP gain when updating pseudocosts of continuous variables (divide by movement of 'l'p value, reduction in 'd'omain width, or reduction in domain width of 's'ibling)",
812  &(*set)->branch_lpgainnorm, FALSE, SCIP_DEFAULT_BRANCH_LPGAINNORMALIZE, "dls",
813  NULL, NULL) );
814  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
815  "branching/delaypscostupdate",
816  "should updating pseudo costs for continuous variables be delayed to the time after separation?",
817  &(*set)->branch_delaypscost, FALSE, SCIP_DEFAULT_BRANCH_DELAYPSCOST,
818  NULL, NULL) );
819  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
820  "branching/forceallchildren",
821  "should all strong branching children be regarded even if one is detected to be infeasible? (only with propagation)",
822  &(*set)->branch_forceall, TRUE, SCIP_DEFAULT_BRANCH_FORCEALL,
823  NULL, NULL) );
824  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
825  "branching/firstsbchild",
826  "child node to be regarded first during strong branching (only with propagation): 'u'p child, 'd'own child, or 'a'utomatic",
827  &(*set)->branch_firstsbchild, TRUE, SCIP_DEFAULT_BRANCH_FIRSTSBCHILD, "adu",
828  NULL, NULL) );
829  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
830  "branching/checksol",
831  "should LP solutions during strong branching with propagation be checked for feasibility?",
832  &(*set)->branch_checksbsol, TRUE, SCIP_DEFAULT_BRANCH_CHECKSBSOL,
833  NULL, NULL) );
834  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
835  "branching/roundsbsol",
836  "should LP solutions during strong branching with propagation be rounded? (only when checksbsol=TRUE)",
837  &(*set)->branch_roundsbsol, TRUE, SCIP_DEFAULT_BRANCH_ROUNDSBSOL,
838  NULL, NULL) );
839 
840  /* conflict analysis parameters */
841  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
842  "conflict/enable",
843  "should conflict analysis be enabled?",
844  &(*set)->conf_enable, FALSE, SCIP_DEFAULT_CONF_ENABLE,
845  NULL, NULL) );
846  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
847  "conflict/useprop",
848  "should propagation conflict analysis be used?",
849  &(*set)->conf_useprop, FALSE, SCIP_DEFAULT_CONF_USEPROP,
850  NULL, NULL) );
851  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
852  "conflict/useinflp",
853  "should infeasible LP conflict analysis be used?",
854  &(*set)->conf_useinflp, FALSE, SCIP_DEFAULT_CONF_USEINFLP,
855  NULL, NULL) );
856  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
857  "conflict/useboundlp",
858  "should bound exceeding LP conflict analysis be used?",
859  &(*set)->conf_useboundlp, FALSE, SCIP_DEFAULT_CONF_USEBOUNDLP,
860  NULL, NULL) );
861  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
862  "conflict/usesb",
863  "should infeasible/bound exceeding strong branching conflict analysis be used?",
864  &(*set)->conf_usesb, FALSE, SCIP_DEFAULT_CONF_USESB,
865  NULL, NULL) );
866  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
867  "conflict/usepseudo",
868  "should pseudo solution conflict analysis be used?",
869  &(*set)->conf_usepseudo, FALSE, SCIP_DEFAULT_CONF_USEPSEUDO,
870  NULL, NULL) );
871  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
872  "conflict/maxvarsfac",
873  "maximal fraction of variables involved in a conflict constraint",
874  &(*set)->conf_maxvarsfac, TRUE, SCIP_DEFAULT_CONF_MAXVARSFAC, 0.0, SCIP_REAL_MAX,
875  NULL, NULL) );
876  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
877  "conflict/minmaxvars",
878  "minimal absolute maximum of variables involved in a conflict constraint",
879  &(*set)->conf_minmaxvars, TRUE, SCIP_DEFAULT_CONF_MINMAXVARS, 0, INT_MAX,
880  NULL, NULL) );
881  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
882  "conflict/maxlploops",
883  "maximal number of LP resolving loops during conflict analysis (-1: no limit)",
884  &(*set)->conf_maxlploops, TRUE, SCIP_DEFAULT_CONF_MAXLPLOOPS, -1, INT_MAX,
885  NULL, NULL) );
886  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
887  "conflict/lpiterations",
888  "maximal number of LP iterations in each LP resolving loop (-1: no limit)",
889  &(*set)->conf_lpiterations, TRUE, SCIP_DEFAULT_CONF_LPITERATIONS, -1, INT_MAX,
890  NULL, NULL) );
891  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
892  "conflict/fuiplevels",
893  "number of depth levels up to which first UIP's are used in conflict analysis (-1: use All-FirstUIP rule)",
894  &(*set)->conf_fuiplevels, TRUE, SCIP_DEFAULT_CONF_FUIPLEVELS, -1, INT_MAX,
895  NULL, NULL) );
896  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
897  "conflict/interconss",
898  "maximal number of intermediate conflict constraints generated in conflict graph (-1: use every intermediate constraint)",
899  &(*set)->conf_interconss, TRUE, SCIP_DEFAULT_CONF_INTERCONSS, -1, INT_MAX,
900  NULL, NULL) );
901  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
902  "conflict/reconvlevels",
903  "number of depth levels up to which UIP reconvergence constraints are generated (-1: generate reconvergence constraints in all depth levels)",
904  &(*set)->conf_reconvlevels, TRUE, SCIP_DEFAULT_CONF_RECONVLEVELS, -1, INT_MAX,
905  NULL, NULL) );
906  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
907  "conflict/maxconss",
908  "maximal number of conflict constraints accepted at an infeasible node (-1: use all generated conflict constraints)",
909  &(*set)->conf_maxconss, TRUE, SCIP_DEFAULT_CONF_MAXCONSS, -1, INT_MAX,
910  NULL, NULL) );
911  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
912  "conflict/preferbinary",
913  "should binary conflicts be preferred?",
914  &(*set)->conf_preferbinary, FALSE, SCIP_DEFAULT_CONF_PREFERBINARY,
915  NULL, NULL) );
916  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
917  "conflict/allowlocal",
918  "should conflict constraints be generated that are only valid locally?",
919  &(*set)->conf_allowlocal, TRUE, SCIP_DEFAULT_CONF_ALLOWLOCAL,
920  NULL, NULL) );
921  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
922  "conflict/settlelocal",
923  "should conflict constraints be attached only to the local subtree where they can be useful?",
924  &(*set)->conf_settlelocal, TRUE, SCIP_DEFAULT_CONF_SETTLELOCAL,
925  NULL, NULL) );
926  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
927  "conflict/repropagate",
928  "should earlier nodes be repropagated in order to replace branching decisions by deductions?",
929  &(*set)->conf_repropagate, TRUE, SCIP_DEFAULT_CONF_REPROPAGATE,
930  NULL, NULL) );
931  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
932  "conflict/keepreprop",
933  "should constraints be kept for repropagation even if they are too long?",
934  &(*set)->conf_keepreprop, TRUE, SCIP_DEFAULT_CONF_KEEPREPROP,
935  NULL, NULL) );
936  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
937  "conflict/separate",
938  "should the conflict constraints be separated?",
939  &(*set)->conf_seperate, TRUE, SCIP_DEFAULT_CONF_SEPARATE,
940  NULL, NULL) );
941  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
942  "conflict/dynamic",
943  "should the conflict constraints be subject to aging?",
944  &(*set)->conf_dynamic, TRUE, SCIP_DEFAULT_CONF_DYNAMIC,
945  NULL, NULL) );
946  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
947  "conflict/removable",
948  "should the conflict's relaxations be subject to LP aging and cleanup?",
949  &(*set)->conf_removable, TRUE, SCIP_DEFAULT_CONF_REMOVEABLE,
950  NULL, NULL) );
951  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
952  "conflict/depthscorefac",
953  "score factor for depth level in bound relaxation heuristic of LP analysis",
954  &(*set)->conf_depthscorefac, TRUE, SCIP_DEFAULT_CONF_DEPTHSCOREFAC, SCIP_REAL_MIN, SCIP_REAL_MAX,
955  NULL, NULL) );
956  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
957  "conflict/scorefac",
958  "factor to decrease importance of variables' earlier conflict scores",
959  &(*set)->conf_scorefac, TRUE, SCIP_DEFAULT_CONF_SCOREFAC, 1e-6, 1.0,
960  NULL, NULL) );
961  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
962  "conflict/restartnum",
963  "number of successful conflict analysis calls that trigger a restart (0: disable conflict restarts)",
964  &(*set)->conf_restartnum, FALSE, SCIP_DEFAULT_CONF_RESTARTNUM, 0, INT_MAX,
965  NULL, NULL) );
966  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
967  "conflict/restartfac",
968  "factor to increase restartnum with after each restart",
969  &(*set)->conf_restartfac, FALSE, SCIP_DEFAULT_CONF_RESTARTFAC, 0.0, SCIP_REAL_MAX,
970  NULL, NULL) );
971  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
972  "conflict/ignorerelaxedbd",
973  "should relaxed bounds be ignored?",
974  &(*set)->conf_ignorerelaxedbd, TRUE, SCIP_DEFAULT_CONF_IGNORERELAXEDBD,
975  NULL, NULL) );
976  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
977  "conflict/maxvarsdetectimpliedbounds",
978  "maximal number of variables to try to detect global bound implications and shorten the whole conflict set (0: disabled)",
979  &(*set)->conf_maxvarsdetectimpliedbounds, TRUE, SCIP_DEFAULT_CONF_MAXVARSDETECTIMPLIEDBOUNDS, 0, INT_MAX,
980  NULL, NULL) );
981  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
982  "conflict/fullshortenconflict",
983  "try to shorten the whole conflict set or terminate early (depending on the 'maxvarsdetectimpliedbounds' parameter)",
984  &(*set)->conf_fullshortenconflict, TRUE, SCIP_DEFAULT_CONF_FULLSHORTENCONFLICT,
985  NULL, NULL) );
986  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
987  "conflict/conflictweight",
988  "the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict",
989  &(*set)->conf_conflictweight, FALSE, SCIP_DEFAULT_CONF_CONFLITWEIGHT, 0.0, 1.0,
990  NULL, NULL) );
991  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
992  "conflict/conflictgraphweight",
993  "the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict graph",
994  &(*set)->conf_conflictgraphweight, FALSE, SCIP_DEFAULT_CONF_CONFLITGRAPHWEIGHT, 0.0, 1.0,
995  NULL, NULL) );
996 
997  /* constraint parameters */
998  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
999  "constraints/agelimit",
1000  "maximum age an unnecessary constraint can reach before it is deleted (0: dynamic, -1: keep all constraints)",
1001  &(*set)->cons_agelimit, TRUE, SCIP_DEFAULT_CONS_AGELIMIT, -1, INT_MAX,
1002  NULL, NULL) );
1003  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1004  "constraints/obsoleteage",
1005  "age of a constraint after which it is marked obsolete (0: dynamic, -1 do not mark constraints obsolete)",
1006  &(*set)->cons_obsoleteage, TRUE, SCIP_DEFAULT_CONS_OBSOLETEAGE, -1, INT_MAX,
1007  NULL, NULL) );
1008  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1009  "constraints/disableenfops",
1010  "should enforcement of pseudo solution be disabled?",
1011  &(*set)->cons_disableenfops, TRUE, SCIP_DEFAULT_CONS_DISABLEENFOPS,
1012  NULL, NULL) );
1013 
1014  /* display parameters */
1015  assert(sizeof(int) == sizeof(SCIP_VERBLEVEL));
1016  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1017  "display/verblevel",
1018  "verbosity level of output",
1019  (int*)&(*set)->disp_verblevel, FALSE, (int)SCIP_DEFAULT_DISP_VERBLEVEL,
1021  NULL, NULL) );
1022  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1023  "display/width",
1024  "maximal number of characters in a node information line",
1025  &(*set)->disp_width, FALSE, SCIP_DEFAULT_DISP_WIDTH, 0, INT_MAX,
1026  SCIPparamChgdDispWidth, NULL) );
1027  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1028  "display/freq",
1029  "frequency for displaying node information lines",
1030  &(*set)->disp_freq, FALSE, SCIP_DEFAULT_DISP_FREQ, -1, INT_MAX,
1031  NULL, NULL) );
1032  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1033  "display/headerfreq",
1034  "frequency for displaying header lines (every n'th node information line)",
1035  &(*set)->disp_headerfreq, FALSE, SCIP_DEFAULT_DISP_HEADERFREQ, -1, INT_MAX,
1036  NULL, NULL) );
1037  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1038  "display/lpinfo",
1039  "should the LP solver display status messages?",
1040  &(*set)->disp_lpinfo, FALSE, SCIP_DEFAULT_DISP_LPINFO,
1041  NULL, NULL) );
1042 
1043  /* history parameters */
1044  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1045  "history/valuebased",
1046  "should statistics be collected for variable domain value pairs?",
1047  &(*set)->history_valuebased, FALSE, SCIP_DEFAULT_HISTORY_VALUEBASED,
1048  NULL, NULL) );
1049 
1050  /* limit parameters */
1051  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1052  "limits/time",
1053  "maximal time in seconds to run",
1054  &(*set)->limit_time, FALSE, SCIP_DEFAULT_LIMIT_TIME, 0.0, SCIP_REAL_MAX,
1055  SCIPparamChgdLimit, NULL) );
1056  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1057  "limits/nodes",
1058  "maximal number of nodes to process (-1: no limit)",
1059  &(*set)->limit_nodes, FALSE, SCIP_DEFAULT_LIMIT_NODES, -1LL, SCIP_LONGINT_MAX,
1060  SCIPparamChgdLimit, NULL) );
1061  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1062  "limits/totalnodes",
1063  "maximal number of total nodes (incl. restarts) to process (-1: no limit)",
1064  &(*set)->limit_totalnodes, FALSE, SCIP_DEFAULT_LIMIT_NODES, -1LL, SCIP_LONGINT_MAX,
1065  SCIPparamChgdLimit, NULL) );
1066  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1067  "limits/stallnodes",
1068  "solving stops, if the given number of nodes was processed since the last improvement of the primal solution value (-1: no limit)",
1069  &(*set)->limit_stallnodes, FALSE, SCIP_DEFAULT_LIMIT_STALLNODES, -1LL, SCIP_LONGINT_MAX,
1070  SCIPparamChgdLimit, NULL) );
1071  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1072  "limits/memory",
1073  "maximal memory usage in MB; reported memory usage is lower than real memory usage!",
1074  &(*set)->limit_memory, FALSE, SCIP_DEFAULT_LIMIT_MEMORY, 0.0, SCIP_REAL_MAX,
1075  SCIPparamChgdLimit, NULL) );
1076  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1077  "limits/gap",
1078  "solving stops, if the relative gap = |primal - dual|/MIN(|dual|,|primal|) is below the given value",
1079  &(*set)->limit_gap, FALSE, SCIP_DEFAULT_LIMIT_GAP, 0.0, SCIP_REAL_MAX,
1080  SCIPparamChgdLimit, NULL) );
1081  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1082  "limits/absgap",
1083  "solving stops, if the absolute gap = |primalbound - dualbound| is below the given value",
1084  &(*set)->limit_absgap, FALSE, SCIP_DEFAULT_LIMIT_ABSGAP, 0.0, SCIP_REAL_MAX,
1085  SCIPparamChgdLimit, NULL) );
1086  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1087  "limits/solutions",
1088  "solving stops, if the given number of solutions were found (-1: no limit)",
1089  &(*set)->limit_solutions, FALSE, SCIP_DEFAULT_LIMIT_SOLUTIONS, -1, INT_MAX,
1090  SCIPparamChgdLimit, NULL) );
1091  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1092  "limits/bestsol",
1093  "solving stops, if the given number of solution improvements were found (-1: no limit)",
1094  &(*set)->limit_bestsol, FALSE, SCIP_DEFAULT_LIMIT_BESTSOL, -1, INT_MAX,
1095  SCIPparamChgdLimit, NULL) );
1096  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1097  "limits/maxsol",
1098  "maximal number of solutions to store in the solution storage",
1099  &(*set)->limit_maxsol, FALSE, SCIP_DEFAULT_LIMIT_MAXSOL, 1, INT_MAX,
1100  SCIPparamChgdLimit, NULL) );
1101  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1102  "limits/maxorigsol",
1103  "maximal number of solutions candidates to store in the solution storage of the original problem",
1104  &(*set)->limit_maxorigsol, FALSE, SCIP_DEFAULT_LIMIT_MAXORIGSOL, 0, INT_MAX,
1105  SCIPparamChgdLimit, NULL) );
1106  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1107  "limits/restarts",
1108  "solving stops, if the given number of restarts was triggered (-1: no limit)",
1109  &(*set)->limit_restarts, FALSE, SCIP_DEFAULT_LIMIT_RESTARTS, -1, INT_MAX,
1110  SCIPparamChgdLimit, NULL) );
1111 
1112  /* LP parameters */
1113  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1114  "lp/solvefreq",
1115  "frequency for solving LP at the nodes (-1: never; 0: only root LP)",
1116  &(*set)->lp_solvefreq, FALSE, SCIP_DEFAULT_LP_SOLVEFREQ, -1, INT_MAX,
1117  NULL, NULL) );
1118  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1119  "lp/iterlim",
1120  "iteration limit for each single LP solve (-1: no limit)",
1121  &(*set)->lp_iterlim, TRUE, SCIP_DEFAULT_LP_ITERLIM, -1LL, SCIP_LONGINT_MAX,
1122  NULL, NULL) );
1123  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1124  "lp/rootiterlim",
1125  "iteration limit for initial root LP solve (-1: no limit)",
1126  &(*set)->lp_rootiterlim, TRUE, SCIP_DEFAULT_LP_ROOTITERLIM, -1LL, SCIP_LONGINT_MAX,
1127  NULL, NULL) );
1128  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1129  "lp/solvedepth",
1130  "maximal depth for solving LP at the nodes (-1: no depth limit)",
1131  &(*set)->lp_solvedepth, FALSE, SCIP_DEFAULT_LP_SOLVEDEPTH, -1, INT_MAX,
1132  NULL, NULL) );
1133  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1134  "lp/initalgorithm",
1135  "LP algorithm for solving initial LP relaxations (automatic 's'implex, 'p'rimal simplex, 'd'ual simplex, 'b'arrier, barrier with 'c'rossover)",
1136  &(*set)->lp_initalgorithm, FALSE, SCIP_DEFAULT_LP_INITALGORITHM, "spdbc",
1137  NULL, NULL) );
1138  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1139  "lp/resolvealgorithm",
1140  "LP algorithm for resolving LP relaxations if a starting basis exists (automatic 's'implex, 'p'rimal simplex, 'd'ual simplex, 'b'arrier, barrier with 'c'rossover)",
1141  &(*set)->lp_resolvealgorithm, FALSE, SCIP_DEFAULT_LP_RESOLVEALGORITHM, "spdbc",
1142  NULL, NULL) );
1143  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1144  "lp/pricing",
1145  "LP pricing strategy ('l'pi default, 'a'uto, 'f'ull pricing, 'p'artial, 's'teepest edge pricing, 'q'uickstart steepest edge pricing, 'd'evex pricing)",
1146  &(*set)->lp_pricing, FALSE, SCIP_DEFAULT_LP_PRICING, "lafpsqd",
1147  NULL, NULL) );
1148  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1149  "lp/clearinitialprobinglp",
1150  "should lp state be cleared at the end of probing mode when lp was initially unsolved, e.g., when called right after presolving?",
1151  &(*set)->lp_clearinitialprobinglp, TRUE, SCIP_DEFAULT_LP_CLEARINITIALPROBINGLP,
1152  NULL, NULL) );
1153  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1154  "lp/resolverestore",
1155  "should the LP be resolved to restore the state at start of diving (if FALSE we buffer the solution values)?",
1156  &(*set)->lp_resolverestore, TRUE, SCIP_DEFAULT_LP_RESOLVERESTORE,
1157  NULL, NULL) );
1158  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1159  "lp/freesolvalbuffers",
1160  "should the buffers for storing LP solution values during diving be freed at end of diving?",
1161  &(*set)->lp_freesolvalbuffers, TRUE, SCIP_DEFAULT_LP_FREESOLVALBUFFERS,
1162  NULL, NULL) );
1163  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1164  "lp/colagelimit",
1165  "maximum age a dynamic column can reach before it is deleted from the LP (-1: don't delete columns due to aging)",
1166  &(*set)->lp_colagelimit, TRUE, SCIP_DEFAULT_LP_COLAGELIMIT, -1, INT_MAX,
1167  NULL, NULL) );
1168  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1169  "lp/rowagelimit",
1170  "maximum age a dynamic row can reach before it is deleted from the LP (-1: don't delete rows due to aging)",
1171  &(*set)->lp_rowagelimit, TRUE, SCIP_DEFAULT_LP_ROWAGELIMIT, -1, INT_MAX,
1172  NULL, NULL) );
1173  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1174  "lp/cleanupcols",
1175  "should new non-basic columns be removed after LP solving?",
1176  &(*set)->lp_cleanupcols, TRUE, SCIP_DEFAULT_LP_CLEANUPCOLS,
1177  NULL, NULL) );
1178  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1179  "lp/cleanupcolsroot",
1180  "should new non-basic columns be removed after root LP solving?",
1181  &(*set)->lp_cleanupcolsroot, TRUE, SCIP_DEFAULT_LP_CLEANUPCOLSROOT,
1182  NULL, NULL) );
1183  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1184  "lp/cleanuprows",
1185  "should new basic rows be removed after LP solving?",
1186  &(*set)->lp_cleanuprows, TRUE, SCIP_DEFAULT_LP_CLEANUPROWS,
1187  NULL, NULL) );
1188  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1189  "lp/cleanuprowsroot",
1190  "should new basic rows be removed after root LP solving?",
1191  &(*set)->lp_cleanuprowsroot, TRUE, SCIP_DEFAULT_LP_CLEANUPROWSROOT,
1192  NULL, NULL) );
1193  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1194  "lp/checkstability",
1195  "should LP solver's return status be checked for stability?",
1196  &(*set)->lp_checkstability, TRUE, SCIP_DEFAULT_LP_CHECKSTABILITY,
1197  NULL, NULL) );
1198  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1199  "lp/conditionlimit",
1200  "maximum condition number of LP basis counted as stable (-1.0: no limit)",
1201  &(*set)->lp_conditionlimit, TRUE, SCIP_DEFAULT_LP_CONDITIONLIMIT, -1.0, SCIP_REAL_MAX,
1202  NULL, NULL) );
1203  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1204  "lp/checkprimfeas",
1205  "should LP solutions be checked for primal feasibility, resolving LP when numerical troubles occur?",
1206  &(*set)->lp_checkprimfeas, TRUE, SCIP_DEFAULT_LP_CHECKPRIMFEAS,
1207  NULL, NULL) );
1208  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1209  "lp/checkdualfeas",
1210  "should LP solutions be checked for dual feasibility, resolving LP when numerical troubles occur?",
1211  &(*set)->lp_checkdualfeas, TRUE, SCIP_DEFAULT_LP_CHECKDUALFEAS,
1212  NULL, NULL) );
1213  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1214  "lp/fastmip",
1215  "which FASTMIP setting of LP solver should be used? 0: off, 1: low",
1216  &(*set)->lp_fastmip, TRUE, SCIP_DEFAULT_LP_FASTMIP, 0, 1,
1217  NULL, NULL) );
1218  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1219  "lp/scaling",
1220  "should scaling of LP solver be used?",
1221  &(*set)->lp_scaling, TRUE, SCIP_DEFAULT_LP_SCALING,
1222  NULL, NULL) );
1223  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1224  "lp/presolving",
1225  "should presolving of LP solver be used?",
1226  &(*set)->lp_presolving, TRUE, SCIP_DEFAULT_LP_PRESOLVING,
1227  NULL, NULL) );
1228  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1229  "lp/lexdualalgo",
1230  "should the lexicographic dual alogrithm be used?",
1231  &(*set)->lp_lexdualalgo, TRUE, SCIP_DEFAULT_LP_LEXDUALALGO,
1232  NULL, NULL) );
1233  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1234  "lp/lexdualrootonly",
1235  "should the lexicographic dual algorithm be applied only at the root node",
1236  &(*set)->lp_lexdualrootonly, TRUE, SCIP_DEFAULT_LP_LEXDUALROOTONLY,
1237  NULL, NULL) );
1238  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1239  "lp/lexdualmaxrounds",
1240  "maximum number of rounds in the lexicographic dual algorithm (-1: unbounded)",
1241  &(*set)->lp_lexdualmaxrounds, TRUE, SCIP_DEFAULT_LP_LEXDUALMAXROUNDS, -1, INT_MAX,
1242  NULL, NULL) );
1243  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1244  "lp/lexdualbasic",
1245  "choose fractional basic variables in lexicographic dual algorithm?",
1246  &(*set)->lp_lexdualbasic, TRUE, SCIP_DEFAULT_LP_LEXDUALBASIC,
1247  NULL, NULL) );
1248  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1249  "lp/lexdualstalling",
1250  "turn on the lex dual algorithm only when stalling?",
1251  &(*set)->lp_lexdualstalling, TRUE, SCIP_DEFAULT_LP_LEXDUALSTALLING,
1252  NULL, NULL) );
1253  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1254  "lp/disablecutoff",
1255  "disable the cutoff bound in the LP solver? (0: enabled, 1: disabled, 2: auto)",
1256  &(*set)->lp_disablecutoff, TRUE, SCIP_DEFAULT_LP_DISABLECUTOFF,
1257  0, 2, NULL, NULL) );
1258  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1259  "lp/rowrepswitch",
1260  "simplex algorithm shall use row representation of the basis if number of rows divided by number of columns exceeds this value (-1.0 to disable row representation)",
1261  &(*set)->lp_rowrepswitch, TRUE, SCIP_DEFAULT_LP_ROWREPSWITCH, -1.0, SCIP_REAL_MAX,
1262  NULL, NULL) );
1263  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1264  "lp/threads",
1265  "number of threads used for solving the LP (0: automatic)",
1266  &(*set)->lp_threads, TRUE, SCIP_DEFAULT_LP_THREADS, 0, 64,
1267  NULL, NULL) );
1268  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1269  "lp/resolveiterfac",
1270  "factor of average LP iterations that is used as LP iteration limit for LP resolve (-1: unlimited)",
1271  &(*set)->lp_resolveiterfac, TRUE, SCIP_DEFAULT_LP_RESOLVEITERFAC, -1.0, SCIP_REAL_MAX,
1272  NULL, NULL) );
1273  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1274  "lp/resolveitermin",
1275  "minimum number of iterations that are allowed for LP resolve",
1276  &(*set)->lp_resolveitermin, TRUE, SCIP_DEFAULT_LP_RESOLVEITERMIN, 1, INT_MAX,
1277  NULL, NULL) );
1278 
1279  /* NLP parameters */
1280  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
1281  "nlp/solver",
1282  "solver to use for solving NLPs; leave empty to select NLPI with highest priority",
1283  &(*set)->nlp_solver, FALSE, SCIP_DEFAULT_NLP_SOLVER,
1284  NULL, NULL) );
1285  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1286  "nlp/disable",
1287  "should the NLP relaxation be always disabled (also for NLPs/MINLPs)?",
1288  &(*set)->nlp_disable, FALSE, SCIP_DEFAULT_NLP_DISABLE,
1289  NULL, NULL) );
1290 
1291  /* memory parameters */
1292  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1293  "memory/savefac",
1294  "fraction of maximal memory usage resulting in switch to memory saving mode",
1295  &(*set)->mem_savefac, FALSE, SCIP_DEFAULT_MEM_SAVEFAC, 0.0, 1.0,
1296  NULL, NULL) );
1297  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1298  "memory/arraygrowfac",
1299  "memory growing factor for dynamically allocated arrays",
1300  &(*set)->mem_arraygrowfac, TRUE, SCIP_DEFAULT_MEM_ARRAYGROWFAC, 1.0, 10.0,
1301  NULL, NULL) );
1302  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1303  "memory/arraygrowinit",
1304  "initial size of dynamically allocated arrays",
1305  &(*set)->mem_arraygrowinit, TRUE, SCIP_DEFAULT_MEM_ARRAYGROWINIT, 0, INT_MAX,
1306  NULL, NULL) );
1307  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1308  "memory/treegrowfac",
1309  "memory growing factor for tree array",
1310  &(*set)->mem_treegrowfac, TRUE, SCIP_DEFAULT_MEM_TREEGROWFAC, 1.0, 10.0,
1311  NULL, NULL) );
1312  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1313  "memory/treegrowinit",
1314  "initial size of tree array",
1315  &(*set)->mem_treegrowinit, TRUE, SCIP_DEFAULT_MEM_TREEGROWINIT, 0, INT_MAX,
1316  NULL, NULL) );
1317  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1318  "memory/pathgrowfac",
1319  "memory growing factor for path array",
1320  &(*set)->mem_pathgrowfac, TRUE, SCIP_DEFAULT_MEM_PATHGROWFAC, 1.0, 10.0,
1321  NULL, NULL) );
1322  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1323  "memory/pathgrowinit",
1324  "initial size of path array",
1325  &(*set)->mem_pathgrowinit, TRUE, SCIP_DEFAULT_MEM_PATHGROWINIT, 0, INT_MAX,
1326  NULL, NULL) );
1327 
1328  /* miscellaneous parameters */
1329  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1330  "misc/catchctrlc",
1331  "should the CTRL-C interrupt be caught by SCIP?",
1332  &(*set)->misc_catchctrlc, FALSE, SCIP_DEFAULT_MISC_CATCHCTRLC,
1333  NULL, NULL) );
1334  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1335  "misc/usevartable",
1336  "should a hashtable be used to map from variable names to variables?",
1337  &(*set)->misc_usevartable, FALSE, SCIP_DEFAULT_MISC_USEVARTABLE,
1338  NULL, NULL) );
1339  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1340  "misc/useconstable",
1341  "should a hashtable be used to map from constraint names to constraints?",
1342  &(*set)->misc_useconstable, FALSE, SCIP_DEFAULT_MISC_USECONSTABLE,
1343  NULL, NULL) );
1344  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1345  "misc/usesmalltables",
1346  "should smaller hashtables be used? yields better performance for small problems with about 100 variables",
1347  &(*set)->misc_usesmalltables, FALSE, SCIP_DEFAULT_MISC_USESMALLTABLES,
1348  NULL, NULL) );
1349  /**@todo activate exactsolve parameter and finish implementation of solving MIPs exactly */
1350 #if 0
1351  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1352  "misc/exactsolve",
1353  "should the problem be solved exactly (with proven dual bounds)?",
1354  &(*set)->misc_exactsolve, FALSE, SCIP_DEFAULT_MISC_EXACTSOLVE,
1355  NULL, NULL) );
1356 #else
1357  (*set)->misc_exactsolve = SCIP_DEFAULT_MISC_EXACTSOLVE;
1358 #endif
1359  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1360  "misc/permutationseed",
1361  "seed value for permuting the problem after the problem was transformed (-1: no permutation)",
1362  &(*set)->misc_permutationseed, FALSE, SCIP_DEFAULT_MISC_PERMUTATIONSEED, -1, INT_MAX,
1363  NULL, NULL) );
1364 
1365  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1366  "misc/permuteconss",
1367  "should order of constraints be permuted (depends on permutationseed)?",
1368  &(*set)->misc_permuteconss, TRUE, SCIP_DEFAULT_MISC_PERMUTECONSS,
1369  NULL, NULL) );
1370 
1371  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1372  "misc/permutevars",
1373  "should order of variables be permuted (depends on permutationseed)?",
1374  &(*set)->misc_permutevars, TRUE, SCIP_DEFAULT_MISC_PERMUTEVARS,
1375  NULL, NULL) );
1376 
1377  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1378  "misc/resetstat",
1379  "should the statistics be reset if the transformed problem is freed (in case of a benders decomposition this parameter should be set to FALSE)",
1380  &(*set)->misc_resetstat, FALSE, SCIP_DEFAULT_MISC_RESETSTAT,
1381  NULL, NULL) );
1382 
1383  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1384  "misc/improvingsols",
1385  "should only solutions be checked which improve the primal bound",
1386  &(*set)->misc_improvingsols, FALSE, SCIP_DEFAULT_MISC_IMPROVINGSOLS,
1387  NULL, NULL) );
1388  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1389  "misc/printreason",
1390  "should the reason be printed if a given start solution is infeasible",
1391  &(*set)->misc_printreason, FALSE, SCIP_DEFAULT_MISC_PRINTREASON,
1392  NULL, NULL) );
1393  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1394  "misc/estimexternmem",
1395  "should the usage of external memory be estimated?",
1396  &(*set)->misc_estimexternmem, FALSE, SCIP_DEFAULT_MISC_ESTIMEXTERNMEM,
1397  NULL, NULL) );
1398  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1399  "misc/transorigsols",
1400  "should SCIP try to transfer original solutions to the extended space (after presolving)?",
1401  &(*set)->misc_transorigsols, FALSE, SCIP_DEFAULT_MISC_TRANSORIGSOLS,
1402  NULL, NULL) );
1403  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1404  "misc/calcintegral",
1405  "should SCIP calculate the primal dual integral value?",
1406  &(*set)->misc_calcintegral, FALSE, SCIP_DEFAULT_MISC_CALCINTEGRAL,
1407  NULL, NULL) );
1408  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1409  "misc/finitesolutionstore",
1410  "should SCIP try to remove infinite fixings from solutions copied to the solution store?",
1411  &(*set)->misc_finitesolstore, FALSE, SCIP_DEFAULT_MISC_FINITESOLSTORE,
1412  NULL, NULL) );
1413 
1414  /* node selection */
1415  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1416  "nodeselection/childsel",
1417  "child selection rule ('d'own, 'u'p, 'p'seudo costs, 'i'nference, 'l'p value, 'r'oot LP value difference, 'h'ybrid inference/root LP value difference)",
1418  &(*set)->nodesel_childsel, FALSE, SCIP_DEFAULT_NODESEL_CHILDSEL, "dupilrh",
1419  NULL, NULL) );
1420 
1421  /* numerical parameters */
1422  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1423  "numerics/infinity",
1424  "values larger than this are considered infinity",
1425  &(*set)->num_infinity, FALSE, SCIP_DEFAULT_INFINITY, 1e+10, SCIP_INVALID/10.0,
1426  NULL, NULL) );
1427  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1428  "numerics/epsilon",
1429  "absolute values smaller than this are considered zero",
1430  &(*set)->num_epsilon, FALSE, SCIP_DEFAULT_EPSILON, SCIP_MINEPSILON, SCIP_MAXEPSILON,
1431  NULL, NULL) );
1432  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1433  "numerics/sumepsilon",
1434  "absolute values of sums smaller than this are considered zero",
1435  &(*set)->num_sumepsilon, FALSE, SCIP_DEFAULT_SUMEPSILON, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
1436  NULL, NULL) );
1437  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1438  "numerics/feastol",
1439  "feasibility tolerance for constraints",
1440  &(*set)->num_feastol, FALSE, SCIP_DEFAULT_FEASTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
1441  paramChgdFeastol, NULL) );
1442  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1443  "numerics/lpfeastol",
1444  "primal feasibility tolerance of LP solver",
1445  &(*set)->num_lpfeastol, FALSE, SCIP_DEFAULT_LPFEASTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
1446  paramChgdLpfeastol, NULL) );
1447  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1448  "numerics/dualfeastol",
1449  "feasibility tolerance for reduced costs in LP solution",
1450  &(*set)->num_dualfeastol, FALSE, SCIP_DEFAULT_DUALFEASTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
1451  paramChgdDualfeastol, NULL) );
1452  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1453  "numerics/barrierconvtol",
1454  "LP convergence tolerance used in barrier algorithm",
1455  &(*set)->num_barrierconvtol, TRUE, SCIP_DEFAULT_BARRIERCONVTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
1456  paramChgdBarrierconvtol, NULL) );
1457  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1458  "numerics/boundstreps",
1459  "minimal relative improve for strengthening bounds",
1460  &(*set)->num_boundstreps, TRUE, SCIP_DEFAULT_BOUNDSTREPS, SCIP_MINEPSILON*1e+03, SCIP_INVALID/10.0,
1461  NULL, NULL) );
1462  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1463  "numerics/pseudocosteps",
1464  "minimal variable distance value to use for branching pseudo cost updates",
1465  &(*set)->num_pseudocosteps, TRUE, SCIP_DEFAULT_PSEUDOCOSTEPS, SCIP_MINEPSILON*1e+03, 1.0,
1466  NULL, NULL) );
1467  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1468  "numerics/pseudocostdelta",
1469  "minimal objective distance value to use for branching pseudo cost updates",
1470  &(*set)->num_pseudocostdelta, TRUE, SCIP_DEFAULT_PSEUDOCOSTDELTA, 0.0, SCIP_REAL_MAX,
1471  NULL, NULL) );
1472  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1473  "numerics/recomputefac",
1474  "minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update",
1475  &(*set)->num_recompfac, TRUE, SCIP_DEFAULT_RECOMPFAC, 0.0, SCIP_REAL_MAX,
1476  NULL, NULL) );
1477  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1478  "numerics/hugeval",
1479  "values larger than this are considered huge and should be handled separately (e.g., in activity computation)",
1480  &(*set)->num_hugeval, TRUE, SCIP_DEFAULT_HUGEVAL, 0.0, SCIP_INVALID/10.0,
1481  NULL, NULL) );
1482 
1483  /* presolving parameters */
1484  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1485  "presolving/maxrounds",
1486  "maximal number of presolving rounds (-1: unlimited, 0: off)",
1487  &(*set)->presol_maxrounds, FALSE, SCIP_DEFAULT_PRESOL_MAXROUNDS, -1, INT_MAX,
1488  NULL, NULL) );
1489  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1490  "presolving/abortfac",
1491  "abort presolve, if at most this fraction of the problem was changed in last presolve round",
1492  &(*set)->presol_abortfac, TRUE, SCIP_DEFAULT_PRESOL_ABORTFAC, 0.0, 1.0,
1493  NULL, NULL) );
1494  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1495  "presolving/maxrestarts",
1496  "maximal number of restarts (-1: unlimited)",
1497  &(*set)->presol_maxrestarts, FALSE, SCIP_DEFAULT_PRESOL_MAXRESTARTS, -1, INT_MAX,
1498  NULL, NULL) );
1499  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1500  "presolving/restartfac",
1501  "fraction of integer variables that were fixed in the root node triggering a restart with preprocessing after root node evaluation",
1502  &(*set)->presol_restartfac, TRUE, SCIP_DEFAULT_PRESOL_RESTARTFAC, 0.0, 1.0,
1503  NULL, NULL) );
1504  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1505  "presolving/immrestartfac",
1506  "fraction of integer variables that were fixed in the root node triggering an immediate restart with preprocessing",
1507  &(*set)->presol_immrestartfac, TRUE, SCIP_DEFAULT_PRESOL_IMMRESTARTFAC, 0.0, 1.0,
1508  NULL, NULL) );
1509  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1510  "presolving/subrestartfac",
1511  "fraction of integer variables that were globally fixed during the solving process triggering a restart with preprocessing",
1512  &(*set)->presol_subrestartfac, TRUE, SCIP_DEFAULT_PRESOL_SUBRESTARTFAC, 0.0, 1.0,
1513  NULL, NULL) );
1514  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1515  "presolving/restartminred",
1516  "minimal fraction of integer variables removed after restart to allow for an additional restart",
1517  &(*set)->presol_restartminred, TRUE, SCIP_DEFAULT_PRESOL_RESTARTMINRED, 0.0, 1.0,
1518  NULL, NULL) );
1519  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1520  "presolving/donotmultaggr",
1521  "should multi-aggregation of variables be forbidden?",
1522  &(*set)->presol_donotmultaggr, TRUE, SCIP_DEFAULT_PRESOL_DONOTMULTAGGR,
1523  NULL, NULL) );
1524  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1525  "presolving/donotaggr",
1526  "should aggregation of variables be forbidden?",
1527  &(*set)->presol_donotaggr, TRUE, SCIP_DEFAULT_PRESOL_DONOTAGGR,
1528  NULL, NULL) );
1529 
1530 
1531  /* pricing parameters */
1532  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1533  "pricing/maxvars",
1534  "maximal number of variables priced in per pricing round",
1535  &(*set)->price_maxvars, FALSE, SCIP_DEFAULT_PRICE_MAXVARS, 1, INT_MAX,
1536  NULL, NULL) );
1537  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1538  "pricing/maxvarsroot",
1539  "maximal number of priced variables at the root node",
1540  &(*set)->price_maxvarsroot, FALSE, SCIP_DEFAULT_PRICE_MAXVARSROOT, 1, INT_MAX,
1541  NULL, NULL) );
1542  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1543  "pricing/abortfac",
1544  "pricing is aborted, if fac * pricing/maxvars pricing candidates were found",
1545  &(*set)->price_abortfac, FALSE, SCIP_DEFAULT_PRICE_ABORTFAC, 1.0, SCIP_REAL_MAX,
1546  NULL, NULL) );
1547  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1548  "pricing/delvars",
1549  "should variables created at the current node be deleted when the node is solved in case they are not present in the LP anymore?",
1550  &(*set)->price_delvars, FALSE, SCIP_DEFAULT_PRICE_DELVARS,
1551  NULL, NULL) );
1552  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1553  "pricing/delvarsroot",
1554  "should variables created at the root node be deleted when the root is solved in case they are not present in the LP anymore?",
1555  &(*set)->price_delvarsroot, FALSE, SCIP_DEFAULT_PRICE_DELVARSROOT,
1556  NULL, NULL) );
1557 
1558  /* propagation parameters */
1559  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1560  "propagating/maxrounds",
1561  "maximal number of propagation rounds per node (-1: unlimited)",
1562  &(*set)->prop_maxrounds, FALSE, SCIP_DEFAULT_PROP_MAXROUNDS, -1, INT_MAX,
1563  NULL, NULL) );
1564  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1565  "propagating/maxroundsroot",
1566  "maximal number of propagation rounds in the root node (-1: unlimited)",
1567  &(*set)->prop_maxroundsroot, FALSE, SCIP_DEFAULT_PROP_MAXROUNDSROOT, -1, INT_MAX,
1568  NULL, NULL) );
1569  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1570  "propagating/abortoncutoff",
1571  "should propagation be aborted immediately? setting this to FALSE could help conflict analysis to produce more conflict constraints",
1572  &(*set)->prop_abortoncutoff, FALSE, SCIP_DEFAULT_PROP_ABORTONCUTOFF,
1573  NULL, NULL) );
1574 
1575  /* separation parameters */
1576  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1577  "separating/maxbounddist",
1578  "maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying separation (0.0: only on current best node, 1.0: on all nodes)",
1579  &(*set)->sepa_maxbounddist, FALSE, SCIP_DEFAULT_SEPA_MAXBOUNDDIST, 0.0, 1.0,
1580  NULL, NULL) );
1581  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1582  "separating/minefficacy",
1583  "minimal efficacy for a cut to enter the LP",
1584  &(*set)->sepa_minefficacy, FALSE, SCIP_DEFAULT_SEPA_MINEFFICACY, 0.0, SCIP_INVALID/10.0,
1585  NULL, NULL) );
1586  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1587  "separating/minefficacyroot",
1588  "minimal efficacy for a cut to enter the LP in the root node",
1589  &(*set)->sepa_minefficacyroot, FALSE, SCIP_DEFAULT_SEPA_MINEFFICACYROOT, 0.0, SCIP_INVALID/10.0,
1590  NULL, NULL) );
1591  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1592  "separating/minortho",
1593  "minimal orthogonality for a cut to enter the LP",
1594  &(*set)->sepa_minortho, FALSE, SCIP_DEFAULT_SEPA_MINORTHO, 0.0, 1.0,
1595  NULL, NULL) );
1596  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1597  "separating/minorthoroot",
1598  "minimal orthogonality for a cut to enter the LP in the root node",
1599  &(*set)->sepa_minorthoroot, FALSE, SCIP_DEFAULT_SEPA_MINORTHOROOT, 0.0, 1.0,
1600  NULL, NULL) );
1601  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1602  "separating/objparalfac",
1603  "factor to scale objective parallelism of cut in separation score calculation",
1604  &(*set)->sepa_objparalfac, TRUE, SCIP_DEFAULT_SEPA_OBJPARALFAC, 0.0, SCIP_INVALID/10.0,
1605  NULL, NULL) );
1606  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1607  "separating/orthofac",
1608  "factor to scale orthogonality of cut in separation score calculation (0.0 to disable orthogonality calculation)",
1609  &(*set)->sepa_orthofac, TRUE, SCIP_DEFAULT_SEPA_ORTHOFAC, 0.0, SCIP_INVALID/10.0,
1610  NULL, NULL) );
1611  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1612  "separating/orthofunc",
1613  "function used for calc. scalar prod. in orthogonality test ('e'uclidean, 'd'iscrete)",
1614  &(*set)->sepa_orthofunc, TRUE, SCIP_DEFAULT_SEPA_ORTHOFUNC, "ed",
1615  NULL, NULL) );
1616  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1617  "separating/efficacynorm",
1618  "row norm to use for efficacy calculation ('e'uclidean, 'm'aximum, 's'um, 'd'iscrete)",
1619  &(*set)->sepa_efficacynorm, TRUE, SCIP_DEFAULT_SEPA_EFFICACYNORM, "emsd",
1620  NULL, NULL) );
1621  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1622  "separating/maxruns",
1623  "maximal number of runs for which separation is enabled (-1: unlimited)",
1624  &(*set)->sepa_maxruns, TRUE, SCIP_DEFAULT_SEPA_MAXRUNS, -1, INT_MAX,
1625  NULL, NULL) );
1626  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1627  "separating/maxrounds",
1628  "maximal number of separation rounds per node (-1: unlimited)",
1629  &(*set)->sepa_maxrounds, FALSE, SCIP_DEFAULT_SEPA_MAXROUNDS, -1, INT_MAX,
1630  NULL, NULL) );
1631  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1632  "separating/maxroundsroot",
1633  "maximal number of separation rounds in the root node (-1: unlimited)",
1634  &(*set)->sepa_maxroundsroot, FALSE, SCIP_DEFAULT_SEPA_MAXROUNDSROOT, -1, INT_MAX,
1635  NULL, NULL) );
1636  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1637  "separating/maxroundsrootsubrun",
1638  "maximal number of separation rounds in the root node of a subsequent run (-1: unlimited)",
1639  &(*set)->sepa_maxroundsrootsubrun, TRUE, SCIP_DEFAULT_SEPA_MAXROUNDSROOTSUBRUN, -1, INT_MAX,
1640  NULL, NULL) );
1641  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1642  "separating/maxaddrounds",
1643  "maximal additional number of separation rounds in subsequent price-and-cut loops (-1: no additional restriction)",
1644  &(*set)->sepa_maxaddrounds, TRUE, SCIP_DEFAULT_SEPA_MAXADDROUNDS, -1, INT_MAX,
1645  NULL, NULL) );
1646  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1647  "separating/maxstallrounds",
1648  "maximal number of consecutive separation rounds without objective or integrality improvement (-1: no additional restriction)",
1649  &(*set)->sepa_maxstallrounds, FALSE, SCIP_DEFAULT_SEPA_MAXSTALLROUNDS, -1, INT_MAX,
1650  NULL, NULL) );
1651  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1652  "separating/maxcuts",
1653  "maximal number of cuts separated per separation round (0: disable local separation)",
1654  &(*set)->sepa_maxcuts, FALSE, SCIP_DEFAULT_SEPA_MAXCUTS, 0, INT_MAX,
1655  NULL, NULL) );
1656  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1657  "separating/maxcutsroot",
1658  "maximal number of separated cuts at the root node (0: disable root node separation)",
1659  &(*set)->sepa_maxcutsroot, FALSE, SCIP_DEFAULT_SEPA_MAXCUTSROOT, 0, INT_MAX,
1660  NULL, NULL) );
1661  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1662  "separating/cutagelimit",
1663  "maximum age a cut can reach before it is deleted from the global cut pool, or -1 to keep all cuts",
1664  &(*set)->sepa_cutagelimit, TRUE, SCIP_DEFAULT_SEPA_CUTAGELIMIT, -1, INT_MAX,
1665  NULL, NULL) );
1666  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1667  "separating/poolfreq",
1668  "separation frequency for the global cut pool (-1: disable global cut pool, 0: only separate pool at the root)",
1669  &(*set)->sepa_poolfreq, FALSE, SCIP_DEFAULT_SEPA_POOLFREQ, -1, INT_MAX,
1670  NULL, NULL) );
1671  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1672  "separating/feastolfac",
1673  "factor on cut infeasibility to limit feasibility tolerance for relaxation solver (-1: off)",
1674  &(*set)->sepa_feastolfac, TRUE, SCIP_DEFAULT_SEPA_FEASTOLFAC, -1.0, 1.0,
1675  NULL, NULL) );
1676 
1677  /* timing parameters */
1678  assert(sizeof(int) == sizeof(SCIP_CLOCKTYPE));
1679  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1680  "timing/clocktype",
1681  "default clock type (1: CPU user seconds, 2: wall clock time)",
1682  (int*)&(*set)->time_clocktype, FALSE, (int)SCIP_DEFAULT_TIME_CLOCKTYPE, 1, 2,
1683  NULL, NULL) );
1684  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1685  "timing/enabled",
1686  "is timing enabled?",
1687  &(*set)->time_enabled, FALSE, SCIP_DEFAULT_TIME_ENABLED,
1688  NULL, NULL) );
1689  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1690  "timing/reading",
1691  "belongs reading time to solving time?",
1692  &(*set)->time_reading, FALSE, SCIP_DEFAULT_TIME_READING,
1693  NULL, NULL) );
1694 
1695  /* VBC tool parameters */
1696  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
1697  "vbc/filename",
1698  "name of the VBC Tool output file, or - if no VBC Tool output should be created",
1699  &(*set)->vbc_filename, FALSE, SCIP_DEFAULT_VBC_FILENAME,
1700  NULL, NULL) );
1701  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1702  "vbc/realtime",
1703  "should the real solving time be used instead of a time step counter in VBC output?",
1704  &(*set)->vbc_realtime, FALSE, SCIP_DEFAULT_VBC_REALTIME,
1705  NULL, NULL) );
1706  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1707  "vbc/dispsols",
1708  "should the node where solutions are found be visualized?",
1709  &(*set)->vbc_dispsols, FALSE, SCIP_DEFAULT_VBC_DISPSOLS,
1710  NULL, NULL) );
1711 
1712  /* Reading parameters */
1713  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1714  "reading/initialconss",
1715  "should model constraints be marked as initial?",
1716  &(*set)->read_initialconss, FALSE, SCIP_DEFAULT_READ_INITIALCONSS,
1717  NULL, NULL) );
1718  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1719  "reading/dynamicconss",
1720  "should model constraints be subject to aging?",
1721  &(*set)->read_dynamicconss, FALSE, SCIP_DEFAULT_READ_DYNAMICCONSS,
1722  NULL, NULL) );
1723  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1724  "reading/dynamiccols",
1725  "should columns be added and removed dynamically to the LP?",
1726  &(*set)->read_dynamiccols, FALSE, SCIP_DEFAULT_READ_DYNAMICCOLS,
1727  NULL, NULL) );
1728  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1729  "reading/dynamicrows",
1730  "should rows be added and removed dynamically to the LP?",
1731  &(*set)->read_dynamicrows, FALSE, SCIP_DEFAULT_READ_DYNAMICROWS,
1732  NULL, NULL) );
1733 
1734  /* Writing parameters */
1735  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1736  "write/allconss",
1737  "should all constraints be written (including the redundant constraints)?",
1738  &(*set)->write_allconss, FALSE, SCIP_DEFAULT_WRITE_ALLCONSS,
1739  NULL, NULL) );
1740  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1741  "write/genericnamesoffset",
1742  "when writing a generic problem the index for the first variable should start with?",
1743  &(*set)->write_genoffset, FALSE, SCIP_DEFAULT_WRITE_GENNAMES_OFFSET, 0, INT_MAX/2,
1744  NULL, NULL) );
1745 
1746  return SCIP_OKAY;
1747 }
1748 
1749 /** frees global SCIP settings */
1751  SCIP_SET** set, /**< pointer to SCIP settings */
1752  BMS_BLKMEM* blkmem /**< block memory */
1753  )
1754 {
1755  int i;
1756 
1757  assert(set != NULL);
1758 
1759  /* free parameter set */
1760  SCIPparamsetFree(&(*set)->paramset, blkmem);
1761 
1762  /* free memory buffers */
1763  SCIPbufferFree(&(*set)->buffer);
1764 
1765  /* free file readers */
1766  for( i = 0; i < (*set)->nreaders; ++i )
1767  {
1768  SCIP_CALL( SCIPreaderFree(&(*set)->readers[i], *set) );
1769  }
1770  BMSfreeMemoryArrayNull(&(*set)->readers);
1771 
1772  /* free variable pricers */
1773  for( i = 0; i < (*set)->npricers; ++i )
1774  {
1775  SCIP_CALL( SCIPpricerFree(&(*set)->pricers[i], *set) );
1776  }
1777  BMSfreeMemoryArrayNull(&(*set)->pricers);
1778 
1779  /* free constraint handlers */
1780  for( i = 0; i < (*set)->nconshdlrs; ++i )
1781  {
1782  SCIP_CALL( SCIPconshdlrFree(&(*set)->conshdlrs[i], *set) );
1783  }
1784  BMSfreeMemoryArrayNull(&(*set)->conshdlrs);
1785  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_sepa);
1786  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_enfo);
1787  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_include);
1788 
1789  /* free conflict handlers */
1790  for( i = 0; i < (*set)->nconflicthdlrs; ++i )
1791  {
1792  SCIP_CALL( SCIPconflicthdlrFree(&(*set)->conflicthdlrs[i], *set) );
1793  }
1794  BMSfreeMemoryArrayNull(&(*set)->conflicthdlrs);
1795 
1796  /* free presolvers */
1797  for( i = 0; i < (*set)->npresols; ++i )
1798  {
1799  SCIP_CALL( SCIPpresolFree(&(*set)->presols[i], *set) );
1800  }
1801  BMSfreeMemoryArrayNull(&(*set)->presols);
1802 
1803  /* free relaxators */
1804  for( i = 0; i < (*set)->nrelaxs; ++i )
1805  {
1806  SCIP_CALL( SCIPrelaxFree(&(*set)->relaxs[i], *set) );
1807  }
1808  BMSfreeMemoryArrayNull(&(*set)->relaxs);
1809 
1810  /* free separators */
1811  for( i = 0; i < (*set)->nsepas; ++i )
1812  {
1813  SCIP_CALL( SCIPsepaFree(&(*set)->sepas[i], *set) );
1814  }
1815  BMSfreeMemoryArrayNull(&(*set)->sepas);
1816 
1817  /* free propagators */
1818  for( i = 0; i < (*set)->nprops; ++i )
1819  {
1820  SCIP_CALL( SCIPpropFree(&(*set)->props[i], *set) );
1821  }
1822  BMSfreeMemoryArrayNull(&(*set)->props);
1823 
1824  /* free primal heuristics */
1825  for( i = 0; i < (*set)->nheurs; ++i )
1826  {
1827  SCIP_CALL( SCIPheurFree(&(*set)->heurs[i], *set) );
1828  }
1829  BMSfreeMemoryArrayNull(&(*set)->heurs);
1830 
1831  /* free event handlers */
1832  for( i = 0; i < (*set)->neventhdlrs; ++i )
1833  {
1834  SCIP_CALL( SCIPeventhdlrFree(&(*set)->eventhdlrs[i], *set) );
1835  }
1836  BMSfreeMemoryArrayNull(&(*set)->eventhdlrs);
1837 
1838  /* free node selectors */
1839  for( i = 0; i < (*set)->nnodesels; ++i )
1840  {
1841  SCIP_CALL( SCIPnodeselFree(&(*set)->nodesels[i], *set) );
1842  }
1843  BMSfreeMemoryArrayNull(&(*set)->nodesels);
1844 
1845  /* free branching methods */
1846  for( i = 0; i < (*set)->nbranchrules; ++i )
1847  {
1848  SCIP_CALL( SCIPbranchruleFree(&(*set)->branchrules[i], *set) );
1849  }
1850  BMSfreeMemoryArrayNull(&(*set)->branchrules);
1851 
1852  /* free display columns */
1853  for( i = 0; i < (*set)->ndisps; ++i )
1854  {
1855  SCIP_CALL( SCIPdispFree(&(*set)->disps[i], *set) );
1856  }
1857  BMSfreeMemoryArrayNull(&(*set)->disps);
1858 
1859  /* free dialogs */
1860  BMSfreeMemoryArrayNull(&(*set)->dialogs);
1861 
1862  /* free NLPIs */
1863  for( i = 0; i < (*set)->nnlpis; ++i )
1864  {
1865  SCIP_CALL( SCIPnlpiFree(&(*set)->nlpis[i]) );
1866  }
1867  BMSfreeMemoryArrayNull(&(*set)->nlpis);
1868 
1869  /* free information on external codes */
1870  for( i = 0; i < (*set)->nextcodes; ++i )
1871  {
1872  BMSfreeMemoryArrayNull(&(*set)->extcodenames[i]);
1873  BMSfreeMemoryArrayNull(&(*set)->extcodedescs[i]);
1874  }
1875  BMSfreeMemoryArrayNull(&(*set)->extcodenames);
1876  BMSfreeMemoryArrayNull(&(*set)->extcodedescs);
1877 
1878  BMSfreeMemory(set);
1879 
1880  return SCIP_OKAY;
1881 }
1882 
1883 /** returns current stage of SCIP */
1885  SCIP_SET* set /**< global SCIP settings */
1886  )
1887 {
1888  assert(set != NULL);
1889 
1890  return set->stage;
1891 }
1892 
1893 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */
1895  SCIP_SET* set, /**< global SCIP settings */
1896  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1897  BMS_BLKMEM* blkmem, /**< block memory */
1898  const char* name, /**< name of the parameter */
1899  const char* desc, /**< description of the parameter */
1900  SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */
1901  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
1902  SCIP_Bool defaultvalue, /**< default value of the parameter */
1903  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
1904  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
1905  )
1906 {
1907  assert(set != NULL);
1908 
1909  SCIP_CALL( SCIPparamsetAddBool(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
1910  defaultvalue, paramchgd, paramdata) );
1911 
1912  return SCIP_OKAY;
1913 }
1914 
1915 /** creates an int parameter, sets it to its default value, and adds it to the parameter set */
1917  SCIP_SET* set, /**< global SCIP settings */
1918  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1919  BMS_BLKMEM* blkmem, /**< block memory */
1920  const char* name, /**< name of the parameter */
1921  const char* desc, /**< description of the parameter */
1922  int* valueptr, /**< pointer to store the current parameter value, or NULL */
1923  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
1924  int defaultvalue, /**< default value of the parameter */
1925  int minvalue, /**< minimum value for parameter */
1926  int maxvalue, /**< maximum value for parameter */
1927  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
1928  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
1929  )
1930 {
1931  assert(set != NULL);
1932 
1933  SCIP_CALL( SCIPparamsetAddInt(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
1934  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
1935 
1936  return SCIP_OKAY;
1937 }
1938 
1939 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */
1941  SCIP_SET* set, /**< global SCIP settings */
1942  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1943  BMS_BLKMEM* blkmem, /**< block memory */
1944  const char* name, /**< name of the parameter */
1945  const char* desc, /**< description of the parameter */
1946  SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */
1947  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
1948  SCIP_Longint defaultvalue, /**< default value of the parameter */
1949  SCIP_Longint minvalue, /**< minimum value for parameter */
1950  SCIP_Longint maxvalue, /**< maximum value for parameter */
1951  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
1952  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
1953  )
1954 {
1955  assert(set != NULL);
1956 
1957  SCIP_CALL( SCIPparamsetAddLongint(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
1958  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
1959 
1960  return SCIP_OKAY;
1961 }
1962 
1963 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */
1965  SCIP_SET* set, /**< global SCIP settings */
1966  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1967  BMS_BLKMEM* blkmem, /**< block memory */
1968  const char* name, /**< name of the parameter */
1969  const char* desc, /**< description of the parameter */
1970  SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */
1971  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
1972  SCIP_Real defaultvalue, /**< default value of the parameter */
1973  SCIP_Real minvalue, /**< minimum value for parameter */
1974  SCIP_Real maxvalue, /**< maximum value for parameter */
1975  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
1976  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
1977  )
1978 {
1979  assert(set != NULL);
1980 
1981  SCIP_CALL( SCIPparamsetAddReal(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
1982  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
1983 
1984  return SCIP_OKAY;
1985 }
1986 
1987 /** creates a char parameter, sets it to its default value, and adds it to the parameter set */
1989  SCIP_SET* set, /**< global SCIP settings */
1990  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1991  BMS_BLKMEM* blkmem, /**< block memory */
1992  const char* name, /**< name of the parameter */
1993  const char* desc, /**< description of the parameter */
1994  char* valueptr, /**< pointer to store the current parameter value, or NULL */
1995  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
1996  char defaultvalue, /**< default value of the parameter */
1997  const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
1998  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
1999  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
2000  )
2001 {
2002  assert(set != NULL);
2003 
2004  SCIP_CALL( SCIPparamsetAddChar(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
2005  defaultvalue, allowedvalues, paramchgd, paramdata) );
2006 
2007  return SCIP_OKAY;
2008 }
2009 
2010 /** creates a string parameter, sets it to its default value, and adds it to the parameter set */
2012  SCIP_SET* set, /**< global SCIP settings */
2013  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2014  BMS_BLKMEM* blkmem, /**< block memory */
2015  const char* name, /**< name of the parameter */
2016  const char* desc, /**< description of the parameter */
2017  char** valueptr, /**< pointer to store the current parameter value, or NULL */
2018  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
2019  const char* defaultvalue, /**< default value of the parameter */
2020  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
2021  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
2022  )
2023 {
2024  assert(set != NULL);
2025 
2026  SCIP_CALL( SCIPparamsetAddString(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
2027  defaultvalue, paramchgd, paramdata) );
2028 
2029  return SCIP_OKAY;
2030 }
2031 
2032 /** gets the fixing status value of an existing parameter */
2034  SCIP_SET* set, /**< global SCIP settings */
2035  const char* name /**< name of the parameter */
2036  )
2037 {
2038  assert(set != NULL);
2039 
2040  return SCIPparamsetIsFixed(set->paramset, name);
2041 }
2042 
2043 /** returns the pointer to the SCIP parameter with the given name */
2045  SCIP_SET* set, /**< global SCIP settings */
2046  const char* name /**< name of the parameter */
2047  )
2048 {
2049  assert(set != NULL);
2050 
2051  return SCIPparamsetGetParam(set->paramset, name);
2052 }
2053 
2054 /** gets the value of an existing SCIP_Bool parameter */
2056  SCIP_SET* set, /**< global SCIP settings */
2057  const char* name, /**< name of the parameter */
2058  SCIP_Bool* value /**< pointer to store the parameter */
2059  )
2060 {
2061  assert(set != NULL);
2062 
2063  SCIP_CALL( SCIPparamsetGetBool(set->paramset, name, value) );
2064 
2065  return SCIP_OKAY;
2066 }
2067 
2068 /** gets the value of an existing Int parameter */
2070  SCIP_SET* set, /**< global SCIP settings */
2071  const char* name, /**< name of the parameter */
2072  int* value /**< pointer to store the value of the parameter */
2073  )
2074 {
2075  assert(set != NULL);
2076 
2077  SCIP_CALL( SCIPparamsetGetInt(set->paramset, name, value) );
2078 
2079  return SCIP_OKAY;
2080 }
2081 
2082 /** gets the value of an existing SCIP_Longint parameter */
2084  SCIP_SET* set, /**< global SCIP settings */
2085  const char* name, /**< name of the parameter */
2086  SCIP_Longint* value /**< pointer to store the value of the parameter */
2087  )
2088 {
2089  assert(set != NULL);
2090 
2091  SCIP_CALL( SCIPparamsetGetLongint(set->paramset, name, value) );
2092 
2093  return SCIP_OKAY;
2094 }
2095 
2096 /** gets the value of an existing SCIP_Real parameter */
2098  SCIP_SET* set, /**< global SCIP settings */
2099  const char* name, /**< name of the parameter */
2100  SCIP_Real* value /**< pointer to store the value of the parameter */
2101  )
2102 {
2103  assert(set != NULL);
2104 
2105  SCIP_CALL( SCIPparamsetGetReal(set->paramset, name, value) );
2106 
2107  return SCIP_OKAY;
2108 }
2109 
2110 /** gets the value of an existing Char parameter */
2112  SCIP_SET* set, /**< global SCIP settings */
2113  const char* name, /**< name of the parameter */
2114  char* value /**< pointer to store the value of the parameter */
2115  )
2116 {
2117  assert(set != NULL);
2118 
2119  SCIP_CALL( SCIPparamsetGetChar(set->paramset, name, value) );
2120 
2121  return SCIP_OKAY;
2122 }
2123 
2124 /** gets the value of an existing String parameter */
2126  SCIP_SET* set, /**< global SCIP settings */
2127  const char* name, /**< name of the parameter */
2128  char** value /**< pointer to store the value of the parameter */
2129  )
2130 {
2131  assert(set != NULL);
2132 
2133  SCIP_CALL( SCIPparamsetGetString(set->paramset, name, value) );
2134 
2135  return SCIP_OKAY;
2136 }
2137 
2138 /** changes the fixing status of an existing parameter */
2140  SCIP_SET* set, /**< global SCIP settings */
2141  const char* name, /**< name of the parameter */
2142  SCIP_Bool fixed /**< new fixing status of the parameter */
2143  )
2144 {
2145  assert(set != NULL);
2146 
2147  SCIP_CALL( SCIPparamsetFix(set->paramset, name, fixed) );
2148 
2149  return SCIP_OKAY;
2150 }
2151 
2152 /** changes the value of an existing parameter */
2154  SCIP_SET* set, /**< global SCIP settings */
2155  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2156  const char* name, /**< name of the parameter */
2157  void* value /**< new value of the parameter */
2158  )
2159 {
2160  assert(set != NULL);
2161 
2162  SCIP_CALL( SCIPparamsetSet(set->paramset, set, messagehdlr, name, value) );
2163 
2164  return SCIP_OKAY;
2165 }
2166 
2167 /** changes the value of an existing SCIP_Bool parameter */
2169  SCIP_SET* set, /**< global SCIP settings */
2170  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2171  SCIP_PARAM* param, /**< parameter */
2172  SCIP_Bool value /**< new value of the parameter */
2173  )
2174 {
2175  SCIP_RETCODE retcode;
2176 
2177  assert(set != NULL);
2178 
2179  retcode = SCIPparamSetBool(param, set, messagehdlr, value, TRUE);
2180 
2181  if( retcode != SCIP_PARAMETERWRONGVAL )
2182  {
2183  SCIP_CALL( retcode );
2184  }
2185 
2186  return retcode;
2187 }
2188 
2189 /** changes the value of an existing SCIP_Bool parameter */
2191  SCIP_SET* set, /**< global SCIP settings */
2192  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2193  const char* name, /**< name of the parameter */
2194  SCIP_Bool value /**< new value of the parameter */
2195  )
2196 {
2197  assert(set != NULL);
2198 
2199  SCIP_CALL( SCIPparamsetSetBool(set->paramset, set, messagehdlr, name, value) );
2200 
2201  return SCIP_OKAY;
2202 }
2203 
2204 /** sets the default value of an existing SCIP_Bool parameter */
2206  SCIP_SET* set, /**< global SCIP settings */
2207  const char* name, /**< name of the parameter */
2208  SCIP_Bool defaultvalue /**< new default value of the parameter */
2209  )
2210 {
2211  assert(set != NULL);
2212 
2213  SCIP_CALL( SCIPparamsetSetDefaultBool(set->paramset, name, defaultvalue) );
2214 
2215  return SCIP_OKAY;
2216 }
2217 
2218 
2219 /** changes the value of an existing Int parameter */
2221  SCIP_SET* set, /**< global SCIP settings */
2222  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2223  SCIP_PARAM* param, /**< parameter */
2224  int value /**< new value of the parameter */
2225  )
2226 {
2227  SCIP_RETCODE retcode;
2228 
2229  assert(set != NULL);
2230  assert(param != NULL);
2231 
2232  retcode = SCIPparamSetInt(param, set, messagehdlr, value, TRUE);
2233 
2234  if( retcode != SCIP_PARAMETERWRONGVAL )
2235  {
2236  SCIP_CALL( retcode );
2237  }
2238 
2239  return retcode;
2240 }
2241 
2242 /** changes the value of an existing Int parameter */
2244  SCIP_SET* set, /**< global SCIP settings */
2245  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2246  const char* name, /**< name of the parameter */
2247  int value /**< new value of the parameter */
2248  )
2249 {
2250  assert(set != NULL);
2251 
2252  SCIP_CALL( SCIPparamsetSetInt(set->paramset, set, messagehdlr, name, value) );
2253 
2254  return SCIP_OKAY;
2255 }
2256 
2257 /** changes the default value of an existing Int parameter */
2259  SCIP_SET* set, /**< global SCIP settings */
2260  const char* name, /**< name of the parameter */
2261  int defaultvalue /**< new default value of the parameter */
2262  )
2263 {
2264  assert(set != NULL);
2265 
2266  SCIP_CALL( SCIPparamsetSetDefaultInt(set->paramset, name, defaultvalue) );
2267 
2268  return SCIP_OKAY;
2269 }
2270 
2271 /** changes the value of an existing SCIP_Longint parameter */
2273  SCIP_SET* set, /**< global SCIP settings */
2274  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2275  SCIP_PARAM* param, /**< parameter */
2276  SCIP_Longint value /**< new value of the parameter */
2277  )
2278 {
2279  SCIP_RETCODE retcode;
2280 
2281  assert(set != NULL);
2282  assert(param != NULL);
2283 
2284  retcode = SCIPparamSetLongint(param, set, messagehdlr, value, TRUE);
2285 
2286  if( retcode != SCIP_PARAMETERWRONGVAL )
2287  {
2288  SCIP_CALL( retcode );
2289  }
2290 
2291  return retcode;
2292 }
2293 
2294 /** changes the value of an existing SCIP_Longint parameter */
2296  SCIP_SET* set, /**< global SCIP settings */
2297  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2298  const char* name, /**< name of the parameter */
2299  SCIP_Longint value /**< new value of the parameter */
2300  )
2301 {
2302  assert(set != NULL);
2303 
2304  SCIP_CALL( SCIPparamsetSetLongint(set->paramset, set, messagehdlr, name, value) );
2305 
2306  return SCIP_OKAY;
2307 }
2308 
2309 /** changes the value of an existing SCIP_Real parameter */
2311  SCIP_SET* set, /**< global SCIP settings */
2312  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2313  SCIP_PARAM* param, /**< parameter */
2314  SCIP_Real value /**< new value of the parameter */
2315  )
2316 {
2317  SCIP_RETCODE retcode;
2318 
2319  assert(set != NULL);
2320  assert(param != NULL);
2321 
2322  retcode = SCIPparamSetReal(param, set, messagehdlr, value, TRUE);
2323 
2324  if( retcode != SCIP_PARAMETERWRONGVAL )
2325  {
2326  SCIP_CALL( retcode );
2327  }
2328 
2329  return retcode;
2330 }
2331 
2332 /** changes the value of an existing SCIP_Real parameter */
2334  SCIP_SET* set, /**< global SCIP settings */
2335  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2336  const char* name, /**< name of the parameter */
2337  SCIP_Real value /**< new value of the parameter */
2338  )
2339 {
2340  assert(set != NULL);
2341 
2342  SCIP_CALL( SCIPparamsetSetReal(set->paramset, set, messagehdlr, name, value) );
2343 
2344  return SCIP_OKAY;
2345 }
2346 
2347 /** changes the value of an existing Char parameter */
2349  SCIP_SET* set, /**< global SCIP settings */
2350  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2351  SCIP_PARAM* param, /**< parameter */
2352  char value /**< new value of the parameter */
2353  )
2354 {
2355  SCIP_RETCODE retcode;
2356 
2357  assert(set != NULL);
2358  assert(param != NULL);
2359 
2360  retcode = SCIPparamSetChar(param, set, messagehdlr, value, TRUE);
2361 
2362  if( retcode != SCIP_PARAMETERWRONGVAL )
2363  {
2364  SCIP_CALL( retcode );
2365  }
2366 
2367  return retcode;
2368 }
2369 
2370 /** changes the value of an existing Char parameter */
2372  SCIP_SET* set, /**< global SCIP settings */
2373  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2374  const char* name, /**< name of the parameter */
2375  char value /**< new value of the parameter */
2376  )
2377 {
2378  assert(set != NULL);
2379 
2380  SCIP_CALL( SCIPparamsetSetChar(set->paramset, set, messagehdlr, name, value) );
2381 
2382  return SCIP_OKAY;
2383 }
2384 
2385 /** changes the value of an existing String parameter */
2387  SCIP_SET* set, /**< global SCIP settings */
2388  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2389  SCIP_PARAM* param, /**< parameter */
2390  const char* value /**< new value of the parameter */
2391  )
2392 {
2393  SCIP_RETCODE retcode;
2394 
2395  assert(set != NULL);
2396  assert(param != NULL);
2397 
2398  retcode = SCIPparamSetString(param, set, messagehdlr, value, TRUE);
2399 
2400  if( retcode != SCIP_PARAMETERWRONGVAL )
2401  {
2402  SCIP_CALL( retcode );
2403  }
2404 
2405  return retcode;
2406 }
2407 
2408 /** changes the value of an existing String parameter */
2410  SCIP_SET* set, /**< global SCIP settings */
2411  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2412  const char* name, /**< name of the parameter */
2413  const char* value /**< new value of the parameter */
2414  )
2415 {
2416  assert(set != NULL);
2417 
2418  SCIP_CALL( SCIPparamsetSetString(set->paramset, set, messagehdlr, name, value) );
2419 
2420  return SCIP_OKAY;
2421 }
2422 
2423 /** reads parameters from a file */
2425  SCIP_SET* set, /**< global SCIP settings */
2426  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2427  const char* filename /**< file name */
2428  )
2429 {
2430  assert(set != NULL);
2431 
2432  SCIP_CALL( SCIPparamsetRead(set->paramset, set, messagehdlr, filename) );
2433 
2434  return SCIP_OKAY;
2435 }
2436 
2437 /** writes all parameters in the parameter set to a file */
2439  SCIP_SET* set, /**< global SCIP settings */
2440  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2441  const char* filename, /**< file name, or NULL for stdout */
2442  SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
2443  SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
2444  )
2445 {
2446  assert(set != NULL);
2447 
2448  SCIP_CALL( SCIPparamsetWrite(set->paramset, messagehdlr, filename, comments, onlychanged) );
2449 
2450  return SCIP_OKAY;
2451 }
2452 
2453 /** resets a single parameters to its default value */
2455  SCIP_SET* set, /**< global SCIP settings */
2456  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2457  const char* name /**< name of the parameter */
2458  )
2459 {
2460  SCIP_CALL( SCIPparamsetSetToDefault(set->paramset, set, messagehdlr, name) );
2461 
2462  return SCIP_OKAY;
2463 }
2464 
2465 /** resets all parameters to their default values */
2467  SCIP_SET* set, /**< global SCIP settings */
2468  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
2469  )
2470 {
2471  SCIP_CALL( SCIPparamsetSetToDefaults(set->paramset, set, messagehdlr) );
2472 
2473  return SCIP_OKAY;
2474 }
2475 
2476 /** sets parameters to
2477  * - SCIP_PARAMSETTING_DEFAULT to use default values (see also SCIPsetResetParams())
2478  * - SCIP_PARAMSETTING_COUNTER to get feasible and "fast" counting process
2479  * - SCIP_PARAMSETTING_CPSOLVER to get CP like search (e.g. no LP relaxation)
2480  * - SCIP_PARAMSETTING_EASYCIP to solve easy problems fast
2481  * - SCIP_PARAMSETTING_FEASIBILITY to detect feasibility fast
2482  * - SCIP_PARAMSETTING_HARDLP to be capable to handle hard LPs
2483  * - SCIP_PARAMSETTING_OPTIMALITY to prove optimality fast
2484  */
2486  SCIP_SET* set, /**< global SCIP settings */
2487  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2488  SCIP_PARAMEMPHASIS paramemphasis, /**< parameter settings */
2489  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
2490  )
2491 {
2492  SCIP_CALL( SCIPparamsetSetEmphasis(set->paramset, set, messagehdlr, paramemphasis, quiet) );
2493 
2494  return SCIP_OKAY;
2495 }
2496 
2497 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for
2498  * auxiliary SCIP instances to avoid recursion
2499  */
2501  SCIP_SET* set, /**< global SCIP settings */
2502  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2503  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
2504  )
2505 {
2506  SCIP_CALL( SCIPparamsetSetToSubscipsOff(set->paramset, set, messagehdlr, quiet) );
2507 
2508  return SCIP_OKAY;
2509 }
2510 
2511 /** sets heuristic parameters values to
2512  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters
2513  * - SCIP_PARAMSETTING_FAST such that the time spend for heuristic is decreased
2514  * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristic are called more aggregative
2515  * - SCIP_PARAMSETTING_OFF which turn off all heuristics
2516  */
2518  SCIP_SET* set, /**< global SCIP settings */
2519  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2520  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
2521  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
2522  )
2523 {
2524  SCIP_CALL( SCIPparamsetSetHeuristics(set->paramset, set, messagehdlr, paramsetting, quiet) );
2525 
2526  return SCIP_OKAY;
2527 }
2528 
2529 /** sets presolving parameters to
2530  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters
2531  * - SCIP_PARAMSETTING_FAST such that the time spend for presolving is decreased
2532  * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggregative
2533  * - SCIP_PARAMSETTING_OFF which turn off all presolving
2534  */
2536  SCIP_SET* set, /**< global SCIP settings */
2537  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2538  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
2539  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
2540  )
2541 {
2542  SCIP_CALL( SCIPparamsetSetPresolving(set->paramset, set, messagehdlr, paramsetting, quiet) );
2543 
2544  return SCIP_OKAY;
2545 }
2546 
2547 /** sets separating parameters to
2548  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters
2549  * - SCIP_PARAMSETTING_FAST such that the time spend for separating is decreased
2550  * - SCIP_PARAMSETTING_AGGRESSIVE such that the separating is done more aggregative
2551  * - SCIP_PARAMSETTING_OFF which turn off all separating
2552  */
2554  SCIP_SET* set, /**< global SCIP settings */
2555  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2556  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
2557  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
2558  )
2559 {
2560  SCIP_CALL( SCIPparamsetSetSeparating(set->paramset, set, messagehdlr, paramsetting, quiet) );
2561 
2562  return SCIP_OKAY;
2563 }
2564 
2565 /** returns the array of all available SCIP parameters */
2567  SCIP_SET* set /**< global SCIP settings */
2568  )
2569 {
2570  assert(set != NULL);
2571 
2572  return SCIPparamsetGetParams(set->paramset);
2573 }
2574 
2575 /** returns the total number of all available SCIP parameters */
2577  SCIP_SET* set /**< global SCIP settings */
2578  )
2579 {
2580  assert(set != NULL);
2581 
2582  return SCIPparamsetGetNParams(set->paramset);
2583 }
2584 
2585 /** inserts file reader in file reader list */
2587  SCIP_SET* set, /**< global SCIP settings */
2588  SCIP_READER* reader /**< file reader */
2589  )
2590 {
2591  assert(set != NULL);
2592  assert(reader != NULL);
2593 
2594  if( set->nreaders >= set->readerssize )
2595  {
2596  set->readerssize = SCIPsetCalcMemGrowSize(set, set->nreaders+1);
2597  SCIP_ALLOC( BMSreallocMemoryArray(&set->readers, set->readerssize) );
2598  }
2599  assert(set->nreaders < set->readerssize);
2600 
2601  set->readers[set->nreaders] = reader;
2602  set->nreaders++;
2603 
2604  return SCIP_OKAY;
2605 }
2606 
2607 /** returns the file reader of the given name, or NULL if not existing */
2609  SCIP_SET* set, /**< global SCIP settings */
2610  const char* name /**< name of file reader */
2611  )
2612 {
2613  int i;
2614 
2615  assert(set != NULL);
2616  assert(name != NULL);
2617 
2618  for( i = 0; i < set->nreaders; ++i )
2619  {
2620  if( strcmp(SCIPreaderGetName(set->readers[i]), name) == 0 )
2621  return set->readers[i];
2622  }
2623 
2624  return NULL;
2625 }
2626 
2627 /** inserts variable pricer in variable pricer list */
2629  SCIP_SET* set, /**< global SCIP settings */
2630  SCIP_PRICER* pricer /**< variable pricer */
2631  )
2632 {
2633  assert(set != NULL);
2634  assert(pricer != NULL);
2635 
2636  if( set->npricers >= set->pricerssize )
2637  {
2638  set->pricerssize = SCIPsetCalcMemGrowSize(set, set->npricers+1);
2639  SCIP_ALLOC( BMSreallocMemoryArray(&set->pricers, set->pricerssize) );
2640  }
2641  assert(set->npricers < set->pricerssize);
2642 
2643  set->pricers[set->npricers] = pricer;
2644  set->npricers++;
2645  set->pricerssorted = FALSE;
2646 
2647  return SCIP_OKAY;
2648 }
2649 
2650 /** returns the variable pricer of the given name, or NULL if not existing */
2652  SCIP_SET* set, /**< global SCIP settings */
2653  const char* name /**< name of variable pricer */
2654  )
2655 {
2656  int i;
2657 
2658  assert(set != NULL);
2659  assert(name != NULL);
2660 
2661  for( i = 0; i < set->npricers; ++i )
2662  {
2663  if( strcmp(SCIPpricerGetName(set->pricers[i]), name) == 0 )
2664  return set->pricers[i];
2665  }
2666 
2667  return NULL;
2668 }
2669 
2670 /** sorts pricers by priorities */
2672  SCIP_SET* set /**< global SCIP settings */
2673  )
2674 {
2675  assert(set != NULL);
2676 
2677  if( !set->pricerssorted )
2678  {
2679  SCIPsortPtr((void**)set->pricers, SCIPpricerComp, set->npricers);
2680  set->pricerssorted = TRUE;
2681  set->pricersnamesorted = FALSE;
2682  }
2683 }
2684 
2685 /** sorts pricers by name */
2687  SCIP_SET* set /**< global SCIP settings */
2688  )
2689 {
2690  assert(set != NULL);
2691 
2692  if( !set->pricersnamesorted )
2693  {
2694  SCIPsortPtr((void**)set->pricers, SCIPpricerCompName, set->npricers);
2695  set->pricerssorted = FALSE;
2696  set->pricersnamesorted = TRUE;
2697  }
2698 }
2699 
2700 /** inserts constraint handler in constraint handler list */
2702  SCIP_SET* set, /**< global SCIP settings */
2703  SCIP_CONSHDLR* conshdlr /**< constraint handler */
2704  )
2705 {
2706  int priority;
2707  int i;
2708 
2709  assert(set != NULL);
2710  assert(conshdlr != NULL);
2711  assert(!SCIPconshdlrIsInitialized(conshdlr));
2712 
2713  /* allocate memory */
2714  if( set->nconshdlrs >= set->conshdlrssize )
2715  {
2716  set->conshdlrssize = SCIPsetCalcMemGrowSize(set, set->nconshdlrs+1);
2717  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs, set->conshdlrssize) );
2718  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_sepa, set->conshdlrssize) );
2719  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_enfo, set->conshdlrssize) );
2720  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_include, set->conshdlrssize) );
2721  }
2722  assert(set->nconshdlrs < set->conshdlrssize);
2723 
2724  /* sort constraint handler into conshdlrs array sorted by check priority */
2725  priority = SCIPconshdlrGetCheckPriority(conshdlr);
2726  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetCheckPriority(set->conshdlrs[i-1]) < priority; --i )
2727  {
2728  set->conshdlrs[i] = set->conshdlrs[i-1];
2729  }
2730  set->conshdlrs[i] = conshdlr;
2731 
2732  /* sort constraint handler into conshdlrs_sepa array sorted by sepa priority */
2733  priority = SCIPconshdlrGetSepaPriority(conshdlr);
2734  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i-1]) < priority; --i )
2735  {
2736  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i-1];
2737  }
2738  set->conshdlrs_sepa[i] = conshdlr;
2739 
2740  /* sort constraint handler into conshdlrs_enfo array sorted by enfo priority */
2741  priority = SCIPconshdlrGetEnfoPriority(conshdlr);
2742  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetEnfoPriority(set->conshdlrs_enfo[i-1]) < priority; --i )
2743  {
2744  set->conshdlrs_enfo[i] = set->conshdlrs_enfo[i-1];
2745  }
2746  set->conshdlrs_enfo[i] = conshdlr;
2747 
2748  /* add constraint handler into conshdlrs_include array sorted by inclusion order */
2749  set->conshdlrs_include[set->nconshdlrs] = conshdlr;
2750 
2751  set->nconshdlrs++;
2752 
2753  return SCIP_OKAY;
2754 }
2755 
2756 /** reinserts a constraint handler with modified sepa priority into the sepa priority sorted array */
2758  SCIP_SET* set, /**< global SCIP settings */
2759  SCIP_CONSHDLR* conshdlr, /**< constraint handler to be reinserted */
2760  int oldpriority /**< the old separation priority of constraint handler */
2761  )
2762 {
2763  int newpriority;
2764  int newpos;
2765  int i;
2766  assert(set != NULL);
2767  assert(conshdlr != NULL);
2768 
2769  newpriority = SCIPconshdlrGetSepaPriority(conshdlr);
2770  newpos = -1;
2771 
2772  /* search for the old position of constraint handler; determine its new position at the same time */
2773  if( newpriority > oldpriority )
2774  {
2775  i = 0;
2776  while( i < set->nconshdlrs &&
2777  strcmp(SCIPconshdlrGetName(set->conshdlrs_sepa[i]), SCIPconshdlrGetName(conshdlr)) != 0 )
2778  {
2779  int priorityatpos;
2780 
2781  priorityatpos = SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i]);
2782  assert(priorityatpos >= oldpriority);
2783 
2784  /* current index is the position to insert the constraint handler */
2785  if( newpriority > priorityatpos && newpos == -1 )
2786  newpos = i;
2787 
2788  ++i;
2789  }
2790  assert(i < set->nconshdlrs);
2791 
2792  /* constraint must change its position in array */
2793  if( newpos != -1 )
2794  {
2795  /* shift all constraint handlers between old and new position by one, and insert constraint handler */
2796  for( ; i > newpos; --i )
2797  {
2798  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i-1];
2799  }
2800  set->conshdlrs_sepa[newpos] = conshdlr;
2801  }
2802 
2803  }
2804  else if( newpriority < oldpriority )
2805  {
2806  i = set->nconshdlrs - 1;
2807  while( i >= 0 &&
2808  strcmp(SCIPconshdlrGetName(set->conshdlrs_sepa[i]), SCIPconshdlrGetName(conshdlr)) != 0 )
2809  {
2810  int priorityatpos;
2811 
2812  priorityatpos = SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i]);
2813  assert(priorityatpos <= oldpriority);
2814 
2815  /* current index is the position to insert the constraint handler */
2816  if( newpriority < priorityatpos && newpos == -1 )
2817  newpos = i;
2818 
2819  --i;
2820  }
2821  assert(i >= 0);
2822 
2823  /* constraint must change its position in array */
2824  if( newpos != -1 )
2825  {
2826  /* shift all constraint handlers between old and new position by one, and insert constraint handler */
2827  for(; i < newpos; ++i )
2828  {
2829  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i + 1];
2830  }
2831  set->conshdlrs_sepa[newpos] = conshdlr;
2832  }
2833 #ifndef NDEBUG
2834  for( i = 0; i < set->nconshdlrs - 1; ++i )
2835  assert(SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i])
2836  >= SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i + 1]));
2837 #endif
2838  }
2839 }
2840 
2841 /** returns the constraint handler of the given name, or NULL if not existing */
2843  SCIP_SET* set, /**< global SCIP settings */
2844  const char* name /**< name of constraint handler */
2845  )
2846 {
2847  int i;
2848 
2849  assert(set != NULL);
2850  assert(name != NULL);
2851 
2852  for( i = 0; i < set->nconshdlrs; ++i )
2853  {
2854  if( strcmp(SCIPconshdlrGetName(set->conshdlrs[i]), name) == 0 )
2855  return set->conshdlrs[i];
2856  }
2857 
2858  return NULL;
2859 }
2860 
2861 /** inserts conflict handler in conflict handler list */
2863  SCIP_SET* set, /**< global SCIP settings */
2864  SCIP_CONFLICTHDLR* conflicthdlr /**< conflict handler */
2865  )
2866 {
2867  assert(set != NULL);
2868  assert(conflicthdlr != NULL);
2869  assert(!SCIPconflicthdlrIsInitialized(conflicthdlr));
2870 
2871  if( set->nconflicthdlrs >= set->conflicthdlrssize )
2872  {
2873  set->conflicthdlrssize = SCIPsetCalcMemGrowSize(set, set->nconflicthdlrs+1);
2874  SCIP_ALLOC( BMSreallocMemoryArray(&set->conflicthdlrs, set->conflicthdlrssize) );
2875  }
2876  assert(set->nconflicthdlrs < set->conflicthdlrssize);
2877 
2878  set->conflicthdlrs[set->nconflicthdlrs] = conflicthdlr;
2879  set->nconflicthdlrs++;
2880  set->conflicthdlrssorted = FALSE;
2881 
2882  return SCIP_OKAY;
2883 }
2884 
2885 /** returns the conflict handler of the given name, or NULL if not existing */
2887  SCIP_SET* set, /**< global SCIP settings */
2888  const char* name /**< name of conflict handler */
2889  )
2890 {
2891  int i;
2892 
2893  assert(set != NULL);
2894  assert(name != NULL);
2895 
2896  for( i = 0; i < set->nconflicthdlrs; ++i )
2897  {
2898  if( strcmp(SCIPconflicthdlrGetName(set->conflicthdlrs[i]), name) == 0 )
2899  return set->conflicthdlrs[i];
2900  }
2901 
2902  return NULL;
2903 }
2904 
2905 /** sorts conflict handlers by priorities */
2907  SCIP_SET* set /**< global SCIP settings */
2908  )
2909 {
2910  assert(set != NULL);
2911 
2912  if( !set->conflicthdlrssorted )
2913  {
2914  SCIPsortPtr((void**)set->conflicthdlrs, SCIPconflicthdlrComp, set->nconflicthdlrs);
2915  set->conflicthdlrssorted = TRUE;
2916  set->conflicthdlrsnamesorted = FALSE;
2917  }
2918 }
2919 
2920 /** sorts conflict handlers by name */
2922  SCIP_SET* set /**< global SCIP settings */
2923  )
2924 {
2925  assert(set != NULL);
2926 
2927  if( !set->conflicthdlrsnamesorted )
2928  {
2929  SCIPsortPtr((void**)set->conflicthdlrs, SCIPconflicthdlrCompName, set->nconflicthdlrs);
2930  set->conflicthdlrssorted = FALSE;
2931  set->conflicthdlrsnamesorted = TRUE;
2932  }
2933 }
2934 
2935 /** inserts presolver in presolver list */
2937  SCIP_SET* set, /**< global SCIP settings */
2938  SCIP_PRESOL* presol /**< presolver */
2939  )
2940 {
2941  assert(set != NULL);
2942  assert(presol != NULL);
2943 
2944  if( set->npresols >= set->presolssize )
2945  {
2946  set->presolssize = SCIPsetCalcMemGrowSize(set, set->npresols+1);
2947  SCIP_ALLOC( BMSreallocMemoryArray(&set->presols, set->presolssize) );
2948  }
2949  assert(set->npresols < set->presolssize);
2950 
2951  set->presols[set->npresols] = presol;
2952  set->npresols++;
2953  set->presolssorted = FALSE;
2954 
2955  return SCIP_OKAY;
2956 }
2957 
2958 /** returns the presolver of the given name, or NULL if not existing */
2960  SCIP_SET* set, /**< global SCIP settings */
2961  const char* name /**< name of presolver */
2962  )
2963 {
2964  int i;
2965 
2966  assert(set != NULL);
2967  assert(name != NULL);
2968 
2969  for( i = 0; i < set->npresols; ++i )
2970  {
2971  if( strcmp(SCIPpresolGetName(set->presols[i]), name) == 0 )
2972  return set->presols[i];
2973  }
2974 
2975  return NULL;
2976 }
2977 
2978 /** sorts presolvers by priorities */
2980  SCIP_SET* set /**< global SCIP settings */
2981  )
2982 {
2983  assert(set != NULL);
2984 
2985  if( !set->presolssorted )
2986  {
2987  SCIPsortPtr((void**)set->presols, SCIPpresolComp, set->npresols);
2988  set->presolssorted = TRUE;
2989  set->presolsnamesorted = FALSE;
2990  }
2991 }
2992 
2993 /** sorts presolvers by name */
2995  SCIP_SET* set /**< global SCIP settings */
2996  )
2997 {
2998  assert(set != NULL);
2999 
3000  if( !set->presolsnamesorted )
3001  {
3002  SCIPsortPtr((void**)set->presols, SCIPpresolCompName, set->npresols);
3003  set->presolssorted = FALSE;
3004  set->presolsnamesorted = TRUE;
3005  }
3006 }
3007 
3008 /** inserts relaxator in relaxator list */
3010  SCIP_SET* set, /**< global SCIP settings */
3011  SCIP_RELAX* relax /**< relaxator */
3012  )
3013 {
3014  assert(set != NULL);
3015  assert(relax != NULL);
3016  assert(!SCIPrelaxIsInitialized(relax));
3017 
3018  if( set->nrelaxs >= set->relaxssize )
3019  {
3020  set->relaxssize = SCIPsetCalcMemGrowSize(set, set->nrelaxs+1);
3021  SCIP_ALLOC( BMSreallocMemoryArray(&set->relaxs, set->relaxssize) );
3022  }
3023  assert(set->nrelaxs < set->relaxssize);
3024 
3025  set->relaxs[set->nrelaxs] = relax;
3026  set->nrelaxs++;
3027  set->relaxssorted = FALSE;
3028 
3029  return SCIP_OKAY;
3030 }
3031 
3032 /** returns the relaxator of the given name, or NULL if not existing */
3034  SCIP_SET* set, /**< global SCIP settings */
3035  const char* name /**< name of relaxator */
3036  )
3037 {
3038  int i;
3039 
3040  assert(set != NULL);
3041  assert(name != NULL);
3042 
3043  for( i = 0; i < set->nrelaxs; ++i )
3044  {
3045  if( strcmp(SCIPrelaxGetName(set->relaxs[i]), name) == 0 )
3046  return set->relaxs[i];
3047  }
3048 
3049  return NULL;
3050 }
3051 
3052 /** sorts relaxators by priorities */
3054  SCIP_SET* set /**< global SCIP settings */
3055  )
3056 {
3057  assert(set != NULL);
3058 
3059  if( !set->relaxssorted )
3060  {
3061  SCIPsortPtr((void**)set->relaxs, SCIPrelaxComp, set->nrelaxs);
3062  set->relaxssorted = TRUE;
3063  set->relaxsnamesorted = FALSE;
3064  }
3065 }
3066 
3067 /** sorts relaxators by priorities */
3069  SCIP_SET* set /**< global SCIP settings */
3070  )
3071 {
3072  assert(set != NULL);
3073 
3074  if( !set->relaxsnamesorted )
3075  {
3076  SCIPsortPtr((void**)set->relaxs, SCIPrelaxCompName, set->nrelaxs);
3077  set->relaxssorted = FALSE;
3078  set->relaxsnamesorted = TRUE;
3079  }
3080 }
3081 
3082 /** inserts separator in separator list */
3084  SCIP_SET* set, /**< global SCIP settings */
3085  SCIP_SEPA* sepa /**< separator */
3086  )
3087 {
3088  assert(set != NULL);
3089  assert(sepa != NULL);
3090  assert(!SCIPsepaIsInitialized(sepa));
3091 
3092  if( set->nsepas >= set->sepassize )
3093  {
3094  set->sepassize = SCIPsetCalcMemGrowSize(set, set->nsepas+1);
3095  SCIP_ALLOC( BMSreallocMemoryArray(&set->sepas, set->sepassize) );
3096  }
3097  assert(set->nsepas < set->sepassize);
3098 
3099  set->sepas[set->nsepas] = sepa;
3100  set->nsepas++;
3101  set->sepassorted = FALSE;
3102 
3103  return SCIP_OKAY;
3104 }
3105 
3106 /** returns the separator of the given name, or NULL if not existing */
3108  SCIP_SET* set, /**< global SCIP settings */
3109  const char* name /**< name of separator */
3110  )
3111 {
3112  int i;
3113 
3114  assert(set != NULL);
3115  assert(name != NULL);
3116 
3117  for( i = 0; i < set->nsepas; ++i )
3118  {
3119  if( strcmp(SCIPsepaGetName(set->sepas[i]), name) == 0 )
3120  return set->sepas[i];
3121  }
3122 
3123  return NULL;
3124 }
3125 
3126 /** sorts separators by priorities */
3128  SCIP_SET* set /**< global SCIP settings */
3129  )
3130 {
3131  assert(set != NULL);
3132 
3133  if( !set->sepassorted )
3134  {
3135  SCIPsortPtr((void**)set->sepas, SCIPsepaComp, set->nsepas);
3136  set->sepassorted = TRUE;
3137  set->sepasnamesorted = FALSE;
3138  }
3139 }
3140 
3141 /** sorts separators by name */
3143  SCIP_SET* set /**< global SCIP settings */
3144  )
3145 {
3146  assert(set != NULL);
3147 
3148  if( !set->sepasnamesorted )
3149  {
3150  SCIPsortPtr((void**)set->sepas, SCIPsepaCompName, set->nsepas);
3151  set->sepassorted = FALSE;
3152  set->sepasnamesorted = TRUE;
3153  }
3154 }
3155 
3156 /** inserts propagator in propagator list */
3158  SCIP_SET* set, /**< global SCIP settings */
3159  SCIP_PROP* prop /**< propagator */
3160  )
3161 {
3162  assert(set != NULL);
3163  assert(prop != NULL);
3164  assert(!SCIPpropIsInitialized(prop));
3165 
3166  if( set->nprops >= set->propssize )
3167  {
3168  set->propssize = SCIPsetCalcMemGrowSize(set, set->nprops+1);
3169  SCIP_ALLOC( BMSreallocMemoryArray(&set->props, set->propssize) );
3170  }
3171  assert(set->nprops < set->propssize);
3172 
3173  set->props[set->nprops] = prop;
3174  set->nprops++;
3175  set->propssorted = FALSE;
3176 
3177  return SCIP_OKAY;
3178 }
3179 
3180 /** returns the propagator of the given name, or NULL if not existing */
3182  SCIP_SET* set, /**< global SCIP settings */
3183  const char* name /**< name of propagator */
3184  )
3185 {
3186  int i;
3187 
3188  assert(set != NULL);
3189  assert(name != NULL);
3190 
3191  for( i = 0; i < set->nprops; ++i )
3192  {
3193  if( strcmp(SCIPpropGetName(set->props[i]), name) == 0 )
3194  return set->props[i];
3195  }
3196 
3197  return NULL;
3198 }
3199 
3200 /** sorts propagators by priorities */
3202  SCIP_SET* set /**< global SCIP settings */
3203  )
3204 {
3205  assert(set != NULL);
3206 
3207  if( !set->propssorted )
3208  {
3209  SCIPsortPtr((void**)set->props, SCIPpropComp, set->nprops);
3210  set->propssorted = TRUE;
3211  set->propspresolsorted = FALSE;
3212  set->propsnamesorted = FALSE;
3213  }
3214 }
3215 
3216 /** sorts propagators by priorities for presolving */
3218  SCIP_SET* set /**< global SCIP settings */
3219  )
3220 {
3221  assert(set != NULL);
3222 
3223  if( !set->propspresolsorted )
3224  {
3225  SCIPsortPtr((void**)set->props, SCIPpropCompPresol, set->nprops);
3226  set->propspresolsorted = TRUE;
3227  set->propssorted = FALSE;
3228  set->propsnamesorted = FALSE;
3229  }
3230 }
3231 
3232 /** sorts propagators w.r.t. names */
3234  SCIP_SET* set /**< global SCIP settings */
3235  )
3236 {
3237  assert(set != NULL);
3238 
3239  if( !set->propsnamesorted )
3240  {
3241  SCIPsortPtr((void**)set->props, SCIPpropCompName, set->nprops);
3242  set->propssorted = FALSE;
3243  set->propspresolsorted = FALSE;
3244  set->propsnamesorted = TRUE;
3245  }
3246 }
3247 
3248 /** inserts primal heuristic in primal heuristic list */
3250  SCIP_SET* set, /**< global SCIP settings */
3251  SCIP_HEUR* heur /**< primal heuristic */
3252  )
3253 {
3254  assert(set != NULL);
3255  assert(heur != NULL);
3256  assert(!SCIPheurIsInitialized(heur));
3257 
3258  if( set->nheurs >= set->heurssize )
3259  {
3260  set->heurssize = SCIPsetCalcMemGrowSize(set, set->nheurs+1);
3261  SCIP_ALLOC( BMSreallocMemoryArray(&set->heurs, set->heurssize) );
3262  }
3263  assert(set->nheurs < set->heurssize);
3264 
3265  set->heurs[set->nheurs] = heur;
3266  set->nheurs++;
3267  set->heurssorted = FALSE;
3268 
3269  return SCIP_OKAY;
3270 }
3271 
3272 /** returns the primal heuristic of the given name, or NULL if not existing */
3274  SCIP_SET* set, /**< global SCIP settings */
3275  const char* name /**< name of primal heuristic */
3276  )
3277 {
3278  int i;
3279 
3280  assert(set != NULL);
3281  assert(name != NULL);
3282 
3283  for( i = 0; i < set->nheurs; ++i )
3284  {
3285  if( strcmp(SCIPheurGetName(set->heurs[i]), name) == 0 )
3286  return set->heurs[i];
3287  }
3288 
3289  return NULL;
3290 }
3291 
3292 /** sorts heuristics by priorities */
3294  SCIP_SET* set /**< global SCIP settings */
3295  )
3296 {
3297  assert(set != NULL);
3298 
3299  if( !set->heurssorted )
3300  {
3301  SCIPsortPtr((void**)set->heurs, SCIPheurComp, set->nheurs);
3302  set->heurssorted = TRUE;
3303  set->heursnamesorted = FALSE;
3304  }
3305 }
3306 
3307 /** sorts heuristics by names */
3309  SCIP_SET* set /**< global SCIP settings */
3310  )
3311 {
3312  assert(set != NULL);
3313 
3314  if( !set->heursnamesorted )
3315  {
3316  SCIPsortPtr((void**)set->heurs, SCIPheurCompName, set->nheurs);
3317  set->heurssorted = FALSE;
3318  set->heursnamesorted = TRUE;
3319  }
3320 }
3321 
3322 /** inserts event handler in event handler list */
3324  SCIP_SET* set, /**< global SCIP settings */
3325  SCIP_EVENTHDLR* eventhdlr /**< event handler */
3326  )
3327 {
3328  assert(set != NULL);
3329  assert(eventhdlr != NULL);
3330  assert(!SCIPeventhdlrIsInitialized(eventhdlr));
3331 
3332  if( set->neventhdlrs >= set->eventhdlrssize )
3333  {
3334  set->eventhdlrssize = SCIPsetCalcMemGrowSize(set, set->neventhdlrs+1);
3335  SCIP_ALLOC( BMSreallocMemoryArray(&set->eventhdlrs, set->eventhdlrssize) );
3336  }
3337  assert(set->neventhdlrs < set->eventhdlrssize);
3338 
3339  set->eventhdlrs[set->neventhdlrs] = eventhdlr;
3340  set->neventhdlrs++;
3341 
3342  return SCIP_OKAY;
3343 }
3344 
3345 /** returns the event handler of the given name, or NULL if not existing */
3347  SCIP_SET* set, /**< global SCIP settings */
3348  const char* name /**< name of event handler */
3349  )
3350 {
3351  int i;
3352 
3353  assert(set != NULL);
3354  assert(name != NULL);
3355 
3356  for( i = 0; i < set->neventhdlrs; ++i )
3357  {
3358  if( strcmp(SCIPeventhdlrGetName(set->eventhdlrs[i]), name) == 0 )
3359  return set->eventhdlrs[i];
3360  }
3361 
3362  return NULL;
3363 }
3364 
3365 /** inserts node selector in node selector list */
3367  SCIP_SET* set, /**< global SCIP settings */
3368  SCIP_NODESEL* nodesel /**< node selector */
3369  )
3370 {
3371  int i;
3372  int nodeselstdprio;
3373 
3374  assert(set != NULL);
3375  assert(nodesel != NULL);
3376  assert(!SCIPnodeselIsInitialized(nodesel));
3377 
3378  if( set->nnodesels >= set->nodeselssize )
3379  {
3380  set->nodeselssize = SCIPsetCalcMemGrowSize(set, set->nnodesels+1);
3381  SCIP_ALLOC( BMSreallocMemoryArray(&set->nodesels, set->nodeselssize) );
3382  }
3383  assert(set->nnodesels < set->nodeselssize);
3384 
3385  nodeselstdprio = SCIPnodeselGetStdPriority(nodesel);
3386 
3387  for( i = set->nnodesels; i > 0 && nodeselstdprio > SCIPnodeselGetStdPriority(set->nodesels[i-1]); --i )
3388  set->nodesels[i] = set->nodesels[i-1];
3389 
3390  set->nodesels[i] = nodesel;
3391  set->nnodesels++;
3392 
3393  return SCIP_OKAY;
3394 }
3395 
3396 /** returns the node selector of the given name, or NULL if not existing */
3398  SCIP_SET* set, /**< global SCIP settings */
3399  const char* name /**< name of event handler */
3400  )
3401 {
3402  int i;
3403 
3404  assert(set != NULL);
3405  assert(name != NULL);
3406 
3407  for( i = 0; i < set->nnodesels; ++i )
3408  {
3409  if( strcmp(SCIPnodeselGetName(set->nodesels[i]), name) == 0 )
3410  return set->nodesels[i];
3411  }
3412 
3413  return NULL;
3414 }
3415 
3416 /** returns node selector with highest priority in the current mode */
3418  SCIP_SET* set, /**< global SCIP settings */
3419  SCIP_STAT* stat /**< dynamic problem statistics */
3420  )
3421 {
3422  assert(set != NULL);
3423  assert(stat != NULL);
3424 
3425  /* check, if old node selector is still valid */
3426  if( set->nodesel == NULL && set->nnodesels > 0 )
3427  {
3428  int i;
3429 
3430  set->nodesel = set->nodesels[0];
3431 
3432  /* search highest priority node selector */
3433  if( stat->memsavemode )
3434  {
3435  for( i = 1; i < set->nnodesels; ++i )
3436  {
3437  if( SCIPnodeselGetMemsavePriority(set->nodesels[i]) > SCIPnodeselGetMemsavePriority(set->nodesel) )
3438  set->nodesel = set->nodesels[i];
3439  }
3440  }
3441  else
3442  {
3443  for( i = 1; i < set->nnodesels; ++i )
3444  {
3445  if( SCIPnodeselGetStdPriority(set->nodesels[i]) > SCIPnodeselGetStdPriority(set->nodesel) )
3446  set->nodesel = set->nodesels[i];
3447  }
3448  }
3449  }
3450 
3451  return set->nodesel;
3452 }
3453 
3454 /** inserts branching rule in branching rule list */
3456  SCIP_SET* set, /**< global SCIP settings */
3457  SCIP_BRANCHRULE* branchrule /**< branching rule */
3458  )
3459 {
3460  assert(set != NULL);
3461  assert(branchrule != NULL);
3462  assert(!SCIPbranchruleIsInitialized(branchrule));
3463 
3464  if( set->nbranchrules >= set->branchrulessize )
3465  {
3466  set->branchrulessize = SCIPsetCalcMemGrowSize(set, set->nbranchrules+1);
3467  SCIP_ALLOC( BMSreallocMemoryArray(&set->branchrules, set->branchrulessize) );
3468  }
3469  assert(set->nbranchrules < set->branchrulessize);
3470 
3471  set->branchrules[set->nbranchrules] = branchrule;
3472  set->nbranchrules++;
3473  set->branchrulessorted = FALSE;
3474 
3475  return SCIP_OKAY;
3476 }
3477 
3478 /** returns the branching rule of the given name, or NULL if not existing */
3480  SCIP_SET* set, /**< global SCIP settings */
3481  const char* name /**< name of event handler */
3482  )
3483 {
3484  int i;
3485 
3486  assert(set != NULL);
3487  assert(name != NULL);
3488 
3489  for( i = 0; i < set->nbranchrules; ++i )
3490  {
3491  if( strcmp(SCIPbranchruleGetName(set->branchrules[i]), name) == 0 )
3492  return set->branchrules[i];
3493  }
3494 
3495  return NULL;
3496 }
3497 
3498 /** sorts branching rules by priorities */
3500  SCIP_SET* set /**< global SCIP settings */
3501  )
3502 {
3503  assert(set != NULL);
3504 
3505  if( !set->branchrulessorted )
3506  {
3507  SCIPsortPtr((void**)set->branchrules, SCIPbranchruleComp, set->nbranchrules);
3508  set->branchrulessorted = TRUE;
3509  set->branchrulesnamesorted = FALSE;
3510  }
3511 }
3512 
3513 /** sorts branching rules by priorities */
3515  SCIP_SET* set /**< global SCIP settings */
3516  )
3517 {
3518  assert(set != NULL);
3519 
3520  if( !set->branchrulesnamesorted )
3521  {
3522  SCIPsortPtr((void**)set->branchrules, SCIPbranchruleCompName, set->nbranchrules);
3523  set->branchrulessorted = FALSE;
3524  set->branchrulesnamesorted = TRUE;
3525  }
3526 }
3527 
3528 /** inserts display column in display column list */
3530  SCIP_SET* set, /**< global SCIP settings */
3531  SCIP_DISP* disp /**< display column */
3532  )
3533 {
3534  int i;
3535  int disppos;
3536 
3537  assert(set != NULL);
3538  assert(disp != NULL);
3539  assert(!SCIPdispIsInitialized(disp));
3540 
3541  if( set->ndisps >= set->dispssize )
3542  {
3543  set->dispssize = SCIPsetCalcMemGrowSize(set, set->ndisps+1);
3544  SCIP_ALLOC( BMSreallocMemoryArray(&set->disps, set->dispssize) );
3545  }
3546  assert(set->ndisps < set->dispssize);
3547 
3548  disppos = SCIPdispGetPosition(disp);
3549 
3550  for( i = set->ndisps; i > 0 && disppos < SCIPdispGetPosition(set->disps[i-1]); --i )
3551  {
3552  set->disps[i] = set->disps[i-1];
3553  }
3554  set->disps[i] = disp;
3555  set->ndisps++;
3556 
3557  return SCIP_OKAY;
3558 }
3559 
3560 /** returns the display column of the given name, or NULL if not existing */
3562  SCIP_SET* set, /**< global SCIP settings */
3563  const char* name /**< name of display */
3564  )
3565 {
3566  int i;
3567 
3568  assert(set != NULL);
3569  assert(name != NULL);
3570 
3571  for( i = 0; i < set->ndisps; ++i )
3572  {
3573  if( strcmp(SCIPdispGetName(set->disps[i]), name) == 0 )
3574  return set->disps[i];
3575  }
3576 
3577  return NULL;
3578 }
3579 
3580 /** inserts dialog in dialog list */
3582  SCIP_SET* set, /**< global SCIP settings */
3583  SCIP_DIALOG* dialog /**< dialog */
3584  )
3585 {
3586  assert(set != NULL);
3587  assert(dialog != NULL);
3588 
3589  if( set->ndialogs >= set->dialogssize )
3590  {
3591  set->dialogssize = SCIPsetCalcMemGrowSize(set, set->ndialogs+1);
3592  SCIP_ALLOC( BMSreallocMemoryArray(&set->dialogs, set->dialogssize) );
3593  }
3594  assert(set->ndialogs < set->dialogssize);
3595 
3596  set->dialogs[set->ndialogs] = dialog;
3597  set->ndialogs++;
3598 
3599  return SCIP_OKAY;
3600 }
3601 
3602 /** returns if the dialog already exists */
3604  SCIP_SET* set, /**< global SCIP settings */
3605  SCIP_DIALOG* dialog /**< dialog */
3606  )
3607 {
3608  int i;
3609 
3610  assert(set != NULL);
3611 
3612  if( dialog == NULL )
3613  return FALSE;
3614 
3615  for( i = 0; i < set->ndialogs; ++i )
3616  {
3617  if( set->dialogs[i] == dialog )
3618  return TRUE;
3619  }
3620 
3621  return FALSE;
3622 }
3623 
3624 /** inserts NLPI in NLPI list */
3626  SCIP_SET* set, /**< global SCIP settings */
3627  SCIP_NLPI* nlpi /**< NLPI */
3628  )
3629 {
3630  assert(set != NULL);
3631  assert(nlpi != NULL);
3632 
3633  if( set->nnlpis >= set->nlpissize )
3634  {
3635  set->nlpissize = SCIPsetCalcMemGrowSize(set, set->nnlpis+1);
3636  SCIP_ALLOC( BMSreallocMemoryArray(&set->nlpis, set->nlpissize) );
3637  }
3638  assert(set->nnlpis < set->nlpissize);
3639 
3640  set->nlpis[set->nnlpis] = nlpi;
3641  set->nnlpis++;
3642  set->nlpissorted = FALSE;
3643 
3644  return SCIP_OKAY;
3645 }
3646 
3647 /** returns the NLPI of the given name, or NULL if not existing */
3649  SCIP_SET* set, /**< global SCIP settings */
3650  const char* name /**< name of NLPI */
3651  )
3652 {
3653  int i;
3654 
3655  assert(set != NULL);
3656  assert(name != NULL);
3657 
3658  for( i = 0; i < set->nnlpis; ++i )
3659  {
3660  if( strcmp(SCIPnlpiGetName(set->nlpis[i]), name) == 0 )
3661  return set->nlpis[i];
3662  }
3663 
3664  return NULL;
3665 }
3666 
3667 /** sorts NLPIs by priorities */
3669  SCIP_SET* set /**< global SCIP settings */
3670  )
3671 {
3672  assert(set != NULL);
3673 
3674  if( !set->nlpissorted )
3675  {
3676  SCIPsortPtr((void**)set->nlpis, SCIPnlpiComp, set->nnlpis);
3677  set->nlpissorted = TRUE;
3678  }
3679 }
3680 
3681 /** set priority of an NLPI */
3683  SCIP_SET* set, /**< global SCIP settings */
3684  SCIP_NLPI* nlpi, /**< NLPI */
3685  int priority /**< new priority of NLPI */
3686  )
3687 {
3688  assert(set != NULL);
3689  assert(nlpi != NULL);
3690 
3691  SCIPnlpiSetPriority(nlpi, priority);
3692  set->nlpissorted = FALSE;
3693 }
3694 
3695 /** inserts information about an external code in external codes list */
3697  SCIP_SET* set, /**< global SCIP settings */
3698  const char* name, /**< name of external code */
3699  const char* description /**< description of external code, can be NULL */
3700  )
3701 {
3702  assert(set != NULL);
3703  assert(name != NULL);
3704 
3705  if( set->nextcodes >= set->extcodessize )
3706  {
3707  set->extcodessize = SCIPsetCalcMemGrowSize(set, set->nextcodes+1);
3708  SCIP_ALLOC( BMSreallocMemoryArray(&set->extcodenames, set->extcodessize) );
3709  SCIP_ALLOC( BMSreallocMemoryArray(&set->extcodedescs, set->extcodessize) );
3710  }
3711  assert(set->nextcodes < set->extcodessize);
3712 
3713  BMSduplicateMemoryArray(&(set->extcodenames[set->nextcodes]), name, (int) strlen(name)+1); /*lint !e866*/
3714  if( description != NULL )
3715  {
3716  BMSduplicateMemoryArray(&(set->extcodedescs[set->nextcodes]), description, (int) strlen(description)+1); /*lint !e866*/
3717  }
3718  else
3719  {
3720  set->extcodedescs[set->nextcodes] = NULL;
3721  }
3722  set->nextcodes++;
3723 
3724  return SCIP_OKAY;
3725 }
3726 
3727 /** calls init methods of all plugins */
3729  SCIP_SET* set, /**< global SCIP settings */
3730  BMS_BLKMEM* blkmem, /**< block memory */
3731  SCIP_STAT* stat /**< dynamic problem statistics */
3732  )
3733 {
3734  int i;
3735 
3736  assert(set != NULL);
3737 
3738  /* active variable pricers */
3739  SCIPsetSortPricers(set);
3740  for( i = 0; i < set->nactivepricers; ++i )
3741  {
3742  SCIP_CALL( SCIPpricerInit(set->pricers[i], set) );
3743  }
3744 
3745  /* constraint handlers */
3746  for( i = 0; i < set->nconshdlrs; ++i )
3747  {
3748  SCIP_CALL( SCIPconshdlrInit(set->conshdlrs[i], blkmem, set, stat) );
3749  }
3750 
3751  /* conflict handlers */
3752  for( i = 0; i < set->nconflicthdlrs; ++i )
3753  {
3754  SCIP_CALL( SCIPconflicthdlrInit(set->conflicthdlrs[i], set) );
3755  }
3756 
3757  /* presolvers */
3758  for( i = 0; i < set->npresols; ++i )
3759  {
3760  SCIP_CALL( SCIPpresolInit(set->presols[i], set) );
3761  }
3762 
3763  /* relaxators */
3764  for( i = 0; i < set->nrelaxs; ++i )
3765  {
3766  SCIP_CALL( SCIPrelaxInit(set->relaxs[i], set) );
3767  }
3768 
3769  /* separators */
3770  for( i = 0; i < set->nsepas; ++i )
3771  {
3772  SCIP_CALL( SCIPsepaInit(set->sepas[i], set) );
3773  }
3774 
3775  /* propagators */
3776  for( i = 0; i < set->nprops; ++i )
3777  {
3778  SCIP_CALL( SCIPpropInit(set->props[i], set) );
3779  }
3780 
3781  /* primal heuristics */
3782  for( i = 0; i < set->nheurs; ++i )
3783  {
3784  SCIP_CALL( SCIPheurInit(set->heurs[i], set) );
3785  }
3786 
3787  /* event handlers */
3788  for( i = 0; i < set->neventhdlrs; ++i )
3789  {
3790  SCIP_CALL( SCIPeventhdlrInit(set->eventhdlrs[i], set) );
3791  }
3792 
3793  /* node selectors */
3794  for( i = 0; i < set->nnodesels; ++i )
3795  {
3796  SCIP_CALL( SCIPnodeselInit(set->nodesels[i], set) );
3797  }
3798 
3799  /* branching rules */
3800  for( i = 0; i < set->nbranchrules; ++i )
3801  {
3802  SCIP_CALL( SCIPbranchruleInit(set->branchrules[i], set) );
3803  }
3804 
3805  /* display columns */
3806  for( i = 0; i < set->ndisps; ++i )
3807  {
3808  SCIP_CALL( SCIPdispInit(set->disps[i], set) );
3809  }
3811 
3812  return SCIP_OKAY;
3813 }
3814 
3815 /** calls exit methods of all plugins */
3817  SCIP_SET* set, /**< global SCIP settings */
3818  BMS_BLKMEM* blkmem, /**< block memory */
3819  SCIP_STAT* stat /**< dynamic problem statistics */
3820  )
3821 {
3822  int i;
3823 
3824  assert(set != NULL);
3825 
3826  /* active variable pricers */
3827  SCIPsetSortPricers(set);
3828  for( i = 0; i < set->nactivepricers; ++i )
3829  {
3830  SCIP_CALL( SCIPpricerExit(set->pricers[i], set) );
3831  }
3832 
3833  /* constraint handlers */
3834  for( i = 0; i < set->nconshdlrs; ++i )
3835  {
3836  SCIP_CALL( SCIPconshdlrExit(set->conshdlrs[i], blkmem, set, stat) );
3837  }
3838 
3839  /* conflict handlers */
3840  for( i = 0; i < set->nconflicthdlrs; ++i )
3841  {
3842  SCIP_CALL( SCIPconflicthdlrExit(set->conflicthdlrs[i], set) );
3843  }
3844 
3845  /* presolvers */
3846  for( i = 0; i < set->npresols; ++i )
3847  {
3848  SCIP_CALL( SCIPpresolExit(set->presols[i], set) );
3849  }
3850 
3851  /* relaxators */
3852  for( i = 0; i < set->nrelaxs; ++i )
3853  {
3854  SCIP_CALL( SCIPrelaxExit(set->relaxs[i], set) );
3855  }
3856 
3857  /* separators */
3858  for( i = 0; i < set->nsepas; ++i )
3859  {
3860  SCIP_CALL( SCIPsepaExit(set->sepas[i], set) );
3861  }
3862 
3863  /* propagators */
3864  for( i = 0; i < set->nprops; ++i )
3865  {
3866  SCIP_CALL( SCIPpropExit(set->props[i], set) );
3867  }
3868 
3869  /* primal heuristics */
3870  for( i = 0; i < set->nheurs; ++i )
3871  {
3872  SCIP_CALL( SCIPheurExit(set->heurs[i], set) );
3873  }
3874 
3875  /* event handlers */
3876  for( i = 0; i < set->neventhdlrs; ++i )
3877  {
3878  SCIP_CALL( SCIPeventhdlrExit(set->eventhdlrs[i], set) );
3879  }
3880 
3881  /* node selectors */
3882  for( i = 0; i < set->nnodesels; ++i )
3883  {
3884  SCIP_CALL( SCIPnodeselExit(set->nodesels[i], set) );
3885  }
3886 
3887  /* branching rules */
3888  for( i = 0; i < set->nbranchrules; ++i )
3889  {
3890  SCIP_CALL( SCIPbranchruleExit(set->branchrules[i], set) );
3891  }
3892 
3893  /* display columns */
3894  for( i = 0; i < set->ndisps; ++i )
3895  {
3896  SCIP_CALL( SCIPdispExit(set->disps[i], set) );
3897  }
3898 
3899  return SCIP_OKAY;
3900 }
3901 
3902 /** calls initpre methods of all plugins */
3904  SCIP_SET* set, /**< global SCIP settings */
3905  BMS_BLKMEM* blkmem, /**< block memory */
3906  SCIP_STAT* stat /**< dynamic problem statistics */
3907  )
3908 {
3909  int i;
3910 
3911  assert(set != NULL);
3912 
3913  /* inform presolvers that the presolving is abound to begin */
3914  for( i = 0; i < set->npresols; ++i )
3915  {
3916  SCIP_CALL( SCIPpresolInitpre(set->presols[i], set) );
3917  }
3918 
3919  /* inform propagators that the presolving is abound to begin */
3920  for( i = 0; i < set->nprops; ++i )
3921  {
3922  SCIP_CALL( SCIPpropInitpre(set->props[i], set) );
3923  }
3924 
3925  /* inform constraint handlers that the presolving is abound to begin */
3926  for( i = 0; i < set->nconshdlrs; ++i )
3927  {
3928  SCIP_CALL( SCIPconshdlrInitpre(set->conshdlrs[i], blkmem, set, stat) );
3929  }
3930 
3931  return SCIP_OKAY;
3932 }
3933 
3934 /** calls exitpre methods of all plugins */
3936  SCIP_SET* set, /**< global SCIP settings */
3937  BMS_BLKMEM* blkmem, /**< block memory */
3938  SCIP_STAT* stat /**< dynamic problem statistics */
3939  )
3940 {
3941  int i;
3942 
3943  assert(set != NULL);
3944 
3945  /* inform presolvers that the presolving is abound to begin */
3946  for( i = 0; i < set->npresols; ++i )
3947  {
3948  SCIP_CALL( SCIPpresolExitpre(set->presols[i], set) );
3949  }
3950 
3951  /* inform propagators that the presolving is abound to begin */
3952  for( i = 0; i < set->nprops; ++i )
3953  {
3954  SCIP_CALL( SCIPpropExitpre(set->props[i], set) );
3955  }
3956 
3957  /* inform constraint handlers that the presolving is abound to begin */
3958  for( i = 0; i < set->nconshdlrs; ++i )
3959  {
3960  SCIP_CALL( SCIPconshdlrExitpre(set->conshdlrs[i], blkmem, set, stat) );
3961  }
3962 
3963  return SCIP_OKAY;
3964 }
3965 
3966 /** calls initsol methods of all plugins */
3968  SCIP_SET* set, /**< global SCIP settings */
3969  BMS_BLKMEM* blkmem, /**< block memory */
3970  SCIP_STAT* stat /**< dynamic problem statistics */
3971  )
3972 {
3973  int i;
3974 
3975  assert(set != NULL);
3976 
3977  /* active variable pricers */
3978  SCIPsetSortPricers(set);
3979  for( i = 0; i < set->nactivepricers; ++i )
3980  {
3981  SCIP_CALL( SCIPpricerInitsol(set->pricers[i], set) );
3982  }
3983 
3984  /* constraint handlers */
3985  for( i = 0; i < set->nconshdlrs; ++i )
3986  {
3987  SCIP_CALL( SCIPconshdlrInitsol(set->conshdlrs[i], blkmem, set, stat) );
3988  }
3989 
3990  /* conflict handlers */
3991  for( i = 0; i < set->nconflicthdlrs; ++i )
3992  {
3993  SCIP_CALL( SCIPconflicthdlrInitsol(set->conflicthdlrs[i], set) );
3994  }
3995 
3996  /* relaxators */
3997  for( i = 0; i < set->nrelaxs; ++i )
3998  {
3999  SCIP_CALL( SCIPrelaxInitsol(set->relaxs[i], set) );
4000  }
4001 
4002  /* separators */
4003  for( i = 0; i < set->nsepas; ++i )
4004  {
4005  SCIP_CALL( SCIPsepaInitsol(set->sepas[i], set) );
4006  }
4007 
4008  /* propagators */
4009  for( i = 0; i < set->nprops; ++i )
4010  {
4011  SCIP_CALL( SCIPpropInitsol(set->props[i], set) );
4012  }
4013 
4014  /* primal heuristics */
4015  for( i = 0; i < set->nheurs; ++i )
4016  {
4017  SCIP_CALL( SCIPheurInitsol(set->heurs[i], set) );
4018  }
4019 
4020  /* event handlers */
4021  for( i = 0; i < set->neventhdlrs; ++i )
4022  {
4023  SCIP_CALL( SCIPeventhdlrInitsol(set->eventhdlrs[i], set) );
4024  }
4025 
4026  /* node selectors */
4027  for( i = 0; i < set->nnodesels; ++i )
4028  {
4029  SCIP_CALL( SCIPnodeselInitsol(set->nodesels[i], set) );
4030  }
4031 
4032  /* branching rules */
4033  for( i = 0; i < set->nbranchrules; ++i )
4034  {
4035  SCIP_CALL( SCIPbranchruleInitsol(set->branchrules[i], set) );
4036  }
4037 
4038  /* display columns */
4039  for( i = 0; i < set->ndisps; ++i )
4040  {
4041  SCIP_CALL( SCIPdispInitsol(set->disps[i], set) );
4042  }
4043 
4044  /* reset feasibility tolerance for relaxations */
4045  set->sepa_primfeastol = SCIP_INVALID;
4046 
4047  return SCIP_OKAY;
4048 }
4049 
4050 /** calls exitsol methods of all plugins */
4052  SCIP_SET* set, /**< global SCIP settings */
4053  BMS_BLKMEM* blkmem, /**< block memory */
4054  SCIP_STAT* stat, /**< dynamic problem statistics */
4055  SCIP_Bool restart /**< was this exit solve call triggered by a restart? */
4056  )
4057 {
4058  int i;
4059 
4060  assert(set != NULL);
4061 
4062  /* active variable pricers */
4063  SCIPsetSortPricers(set);
4064  for( i = 0; i < set->nactivepricers; ++i )
4065  {
4066  SCIP_CALL( SCIPpricerExitsol(set->pricers[i], set) );
4067  }
4068 
4069  /* constraint handlers */
4070  for( i = 0; i < set->nconshdlrs; ++i )
4071  {
4072  SCIP_CALL( SCIPconshdlrExitsol(set->conshdlrs[i], blkmem, set, stat, restart) );
4073  }
4074 
4075  /* conflict handlers */
4076  for( i = 0; i < set->nconflicthdlrs; ++i )
4077  {
4078  SCIP_CALL( SCIPconflicthdlrExitsol(set->conflicthdlrs[i], set) );
4079  }
4080 
4081  /* relaxators */
4082  for( i = 0; i < set->nrelaxs; ++i )
4083  {
4084  SCIP_CALL( SCIPrelaxExitsol(set->relaxs[i], set) );
4085  }
4086 
4087  /* separators */
4088  for( i = 0; i < set->nsepas; ++i )
4089  {
4090  SCIP_CALL( SCIPsepaExitsol(set->sepas[i], set) );
4091  }
4092 
4093  /* propagators */
4094  for( i = 0; i < set->nprops; ++i )
4095  {
4096  SCIP_CALL( SCIPpropExitsol(set->props[i], set, restart) );
4097  }
4098 
4099  /* primal heuristics */
4100  for( i = 0; i < set->nheurs; ++i )
4101  {
4102  SCIP_CALL( SCIPheurExitsol(set->heurs[i], set) );
4103  }
4104 
4105  /* event handlers */
4106  for( i = 0; i < set->neventhdlrs; ++i )
4107  {
4108  SCIP_CALL( SCIPeventhdlrExitsol(set->eventhdlrs[i], set) );
4109  }
4110 
4111  /* node selectors */
4112  for( i = 0; i < set->nnodesels; ++i )
4113  {
4114  SCIP_CALL( SCIPnodeselExitsol(set->nodesels[i], set) );
4115  }
4116 
4117  /* branching rules */
4118  for( i = 0; i < set->nbranchrules; ++i )
4119  {
4120  SCIP_CALL( SCIPbranchruleExitsol(set->branchrules[i], set) );
4121  }
4122 
4123  /* display columns */
4124  for( i = 0; i < set->ndisps; ++i )
4125  {
4126  SCIP_CALL( SCIPdispExitsol(set->disps[i], set) );
4127  }
4128 
4129  return SCIP_OKAY;
4130 }
4131 
4132 /** returns the estimated number of bytes used by extern software, e.g., the LP solver */
4134  SCIP_SET* set /**< global SCIP settings */
4135  )
4136 {
4137  return set->mem_externestim;
4138 }
4139 
4140 /** calculate memory size for dynamically allocated arrays */
4142  SCIP_SET* set, /**< global SCIP settings */
4143  int num /**< minimum number of entries to store */
4144  )
4145 {
4146  return calcGrowSize(set->mem_arraygrowinit, set->mem_arraygrowfac, num);
4147 }
4148 
4149 /** calculate memory size for tree array */
4151  SCIP_SET* set, /**< global SCIP settings */
4152  int num /**< minimum number of entries to store */
4153  )
4154 {
4155  return calcGrowSize(set->mem_treegrowinit, set->mem_treegrowfac, num);
4156 }
4157 
4158 /** calculate memory size for path array */
4160  SCIP_SET* set, /**< global SCIP settings */
4161  int num /**< minimum number of entries to store */
4162  )
4163 {
4164  return calcGrowSize(set->mem_pathgrowinit, set->mem_pathgrowfac, num);
4165 }
4166 
4167 /** sets verbosity level for message output */
4169  SCIP_SET* set, /**< global SCIP settings */
4170  SCIP_VERBLEVEL verblevel /**< verbosity level for message output */
4171  )
4172 {
4173  assert(set != NULL);
4174 
4175  if( verblevel > SCIP_VERBLEVEL_FULL )
4176  {
4177  SCIPerrorMessage("invalid verbosity level <%d>, maximum is <%d>\n", verblevel, SCIP_VERBLEVEL_FULL);
4178  return SCIP_INVALIDCALL;
4179  }
4180 
4181  set->disp_verblevel = verblevel;
4182 
4183  return SCIP_OKAY;
4184 }
4185 
4186 /** sets feasibility tolerance */
4188  SCIP_SET* set, /**< global SCIP settings */
4189  SCIP_Real feastol /**< new feasibility tolerance */
4190  )
4191 {
4192  assert(set != NULL);
4193 
4194  set->num_feastol = feastol;
4195 
4196  /* the feasibility tolerance of the LP solver should never be larger than SCIP's feasibility tolerance; if necessary,
4197  * decrease it; use the SCIP change method in order to mark the LP unsolved
4198  */
4199  if( SCIPsetFeastol(set) < SCIPsetLpfeastol(set) )
4200  {
4201  SCIPdebugMessage("decreasing lpfeastol along with feastol to %g\n", SCIPsetFeastol(set));
4202  SCIP_CALL( SCIPchgLpfeastol(set->scip, SCIPsetFeastol(set), TRUE) );
4203  }
4204 
4205  return SCIP_OKAY;
4206 }
4207 
4208 /** sets primal feasibility tolerance of LP solver */
4210  SCIP_SET* set, /**< global SCIP settings */
4211  SCIP_Real lpfeastol, /**< new primal feasibility tolerance of LP solver */
4212  SCIP_Bool printnewvalue /**< should "numerics/lpfeastol = ..." be printed? */
4213  )
4214 {
4215  SCIP_RETCODE retcode;
4216 
4217  assert(set != NULL);
4218 
4219  retcode = SCIP_OKAY;
4220 
4221  /* the feasibility tolerance of the LP solver should never be larger than SCIP's feasibility tolerance; if this is
4222  * tried, we correct it to feastol; note that when we are called, e.g., by paramChgdLpfeastol, lpfeastol has already
4223  * been modified and so we cannot leave the lpfeastol value unchanged; if we would not return SCIP_PARAMETERWRONGVAL
4224  * in this case, the interactive shell would print the incorrect value to be set
4225  */
4226  if( lpfeastol > SCIPsetFeastol(set) )
4227  {
4228  SCIPerrorMessage("LP feasibility tolerance must be at least as tight as SCIP's feasibility tolerance\n");
4229 
4230  retcode = SCIP_PARAMETERWRONGVAL;
4231  printnewvalue = TRUE;
4232 
4233  set->num_lpfeastol = SCIPsetFeastol(set);
4234  }
4235  else
4236  set->num_lpfeastol = lpfeastol;
4237 
4238  if( printnewvalue )
4239  {
4240  SCIPverbMessage(set->scip, SCIP_VERBLEVEL_HIGH, NULL, "numerics/lpfeastol = %.15g\n", SCIPsetLpfeastol(set));
4241  }
4242 
4243  return retcode;
4244 }
4245 
4246 /** sets feasibility tolerance for reduced costs in LP solution */
4248  SCIP_SET* set, /**< global SCIP settings */
4249  SCIP_Real dualfeastol /**< new reduced costs feasibility tolerance */
4250  )
4251 {
4252  assert(set != NULL);
4253 
4254  set->num_dualfeastol = dualfeastol;
4255 
4256  return SCIP_OKAY;
4257 }
4258 
4259 /** sets LP convergence tolerance used in barrier algorithm */
4261  SCIP_SET* set, /**< global SCIP settings */
4262  SCIP_Real barrierconvtol /**< new convergence tolerance used in barrier algorithm */
4263  )
4264 {
4265  assert(set != NULL);
4266 
4267  set->num_barrierconvtol = barrierconvtol;
4268 
4269  return SCIP_OKAY;
4270 }
4271 
4272 /** marks that some limit parameter was changed */
4274  SCIP_SET* set /**< global SCIP settings */
4275  )
4276 {
4277  set->limitchanged = TRUE;
4278 }
4279 
4280 /** returns the maximal number of variables priced into the LP per round */
4282  SCIP_SET* set, /**< global SCIP settings */
4283  SCIP_Bool root /**< are we at the root node? */
4284  )
4285 {
4286  assert(set != NULL);
4287 
4288  if( root )
4289  return set->price_maxvarsroot;
4290  else
4291  return set->price_maxvars;
4292 }
4293 
4294 /** returns the maximal number of cuts separated per round */
4296  SCIP_SET* set, /**< global SCIP settings */
4297  SCIP_Bool root /**< are we at the root node? */
4298  )
4299 {
4300  assert(set != NULL);
4301 
4302  if( root )
4303  return set->sepa_maxcutsroot;
4304  else
4305  return set->sepa_maxcuts;
4306 }
4307 
4308 
4309 
4310 /*
4311  * simple functions implemented as defines
4312  */
4313 
4314 /* In debug mode, the following methods are implemented as function calls to ensure
4315  * type validity.
4316  * In optimized mode, the methods are implemented as defines to improve performance.
4317  * However, we want to have them in the library anyways, so we have to undef the defines.
4318  */
4319 
4320 #undef SCIPsetInfinity
4321 #undef SCIPsetEpsilon
4322 #undef SCIPsetSumepsilon
4323 #undef SCIPsetFeastol
4324 #undef SCIPsetLpfeastol
4325 #undef SCIPsetSepaprimfeastol
4326 #undef SCIPsetDualfeastol
4327 #undef SCIPsetBarrierconvtol
4328 #undef SCIPsetPseudocosteps
4329 #undef SCIPsetPseudocostdelta
4330 #undef SCIPsetCutoffbounddelta
4331 #undef SCIPsetRecompfac
4332 #undef SCIPsetIsEQ
4333 #undef SCIPsetIsLT
4334 #undef SCIPsetIsLE
4335 #undef SCIPsetIsGT
4336 #undef SCIPsetIsGE
4337 #undef SCIPsetIsInfinity
4338 #undef SCIPsetIsZero
4339 #undef SCIPsetIsPositive
4340 #undef SCIPsetIsNegative
4341 #undef SCIPsetIsIntegral
4342 #undef SCIPsetIsScalingIntegral
4343 #undef SCIPsetIsFracIntegral
4344 #undef SCIPsetFloor
4345 #undef SCIPsetCeil
4346 #undef SCIPsetRound
4347 #undef SCIPsetFrac
4348 #undef SCIPsetIsSumEQ
4349 #undef SCIPsetIsSumLT
4350 #undef SCIPsetIsSumLE
4351 #undef SCIPsetIsSumGT
4352 #undef SCIPsetIsSumGE
4353 #undef SCIPsetIsSumZero
4354 #undef SCIPsetIsSumPositive
4355 #undef SCIPsetIsSumNegative
4356 #undef SCIPsetSumFloor
4357 #undef SCIPsetSumCeil
4358 #undef SCIPsetSumRound
4359 #undef SCIPsetSumFrac
4360 #undef SCIPsetIsFeasEQ
4361 #undef SCIPsetIsFeasLT
4362 #undef SCIPsetIsFeasLE
4363 #undef SCIPsetIsFeasGT
4364 #undef SCIPsetIsFeasGE
4365 #undef SCIPsetIsFeasZero
4366 #undef SCIPsetIsFeasPositive
4367 #undef SCIPsetIsFeasNegative
4368 #undef SCIPsetIsFeasIntegral
4369 #undef SCIPsetIsFeasFracIntegral
4370 #undef SCIPsetFeasFloor
4371 #undef SCIPsetFeasCeil
4372 #undef SCIPsetFeasRound
4373 #undef SCIPsetFeasFrac
4374 #undef SCIPsetIsLbBetter
4375 #undef SCIPsetIsUbBetter
4376 #undef SCIPsetIsEfficacious
4377 #undef SCIPsetIsRelEQ
4378 #undef SCIPsetIsRelLT
4379 #undef SCIPsetIsRelLE
4380 #undef SCIPsetIsRelGT
4381 #undef SCIPsetIsRelGE
4382 #undef SCIPsetIsSumRelEQ
4383 #undef SCIPsetIsSumRelLT
4384 #undef SCIPsetIsSumRelLE
4385 #undef SCIPsetIsSumRelGT
4386 #undef SCIPsetIsSumRelGE
4387 #undef SCIPsetIsUpdateUnreliable
4388 #undef SCIPsetIsHugeValue
4389 #undef SCIPsetGetHugeValue
4390 
4391 /** returns value treated as infinity */
4393  SCIP_SET* set /**< global SCIP settings */
4394  )
4395 {
4396  assert(set != NULL);
4397 
4398  return set->num_infinity;
4399 }
4400 
4401 /** returns the minimum value that is regarded as huge and should be handled separately (e.g., in activity
4402  * computation)
4403  */
4405  SCIP_SET* set /**< global SCIP settings */
4406  )
4407 {
4408  assert(set != NULL);
4409 
4410  return set->num_hugeval;
4411 }
4412 
4413 /** returns value treated as zero */
4415  SCIP_SET* set /**< global SCIP settings */
4416  )
4417 {
4418  assert(set != NULL);
4419 
4420  return set->num_epsilon;
4421 }
4422 
4423 /** returns value treated as zero for sums of floating point values */
4425  SCIP_SET* set /**< global SCIP settings */
4426  )
4427 {
4428  assert(set != NULL);
4429 
4430  return set->num_sumepsilon;
4431 }
4432 
4433 /** returns feasibility tolerance for constraints */
4435  SCIP_SET* set /**< global SCIP settings */
4436  )
4437 {
4438  assert(set != NULL);
4439 
4440  return set->num_feastol;
4441 }
4442 
4443 /** returns feasibility tolerance for reduced costs */
4445  SCIP_SET* set /**< global SCIP settings */
4446  )
4447 {
4448  assert(set != NULL);
4449 
4450  return set->num_dualfeastol;
4451 }
4452 
4453 /** returns primal feasibility tolerance of LP solver */
4455  SCIP_SET* set /**< global SCIP settings */
4456  )
4457 {
4458  assert(set != NULL);
4459 
4460  if( set->sepa_primfeastol != SCIP_INVALID ) /*lint !e777*/
4461  return MIN(set->sepa_primfeastol, set->num_lpfeastol);
4462 
4463  return set->num_lpfeastol;
4464 }
4465 
4466 /** returns primal feasibility tolerance as specified by separation storage, or SCIP_INVALID */
4468  SCIP_SET* set /**< global SCIP settings */
4469  )
4470 {
4471  return set->sepa_primfeastol;
4472 }
4473 
4474 /** returns convergence tolerance used in barrier algorithm */
4476  SCIP_SET* set /**< global SCIP settings */
4477  )
4478 {
4479  assert(set != NULL);
4480 
4481  return set->num_barrierconvtol;
4482 }
4483 
4484 /** returns minimal variable distance value to use for pseudo cost updates */
4486  SCIP_SET* set /**< global SCIP settings */
4487  )
4488 {
4489  assert(set != NULL);
4490 
4491  return set->num_pseudocosteps;
4492 }
4493 
4494 /** returns minimal minimal objective distance value to use for pseudo cost updates */
4496  SCIP_SET* set /**< global SCIP settings */
4497  )
4498 {
4499  assert(set != NULL);
4500 
4501  return set->num_pseudocostdelta;
4502 }
4503 
4504 /** return the delta to use for computing the cutoff bound for integral objectives */
4506  SCIP_SET* set /**< global SCIP settings */
4507  )
4508 {
4509  SCIP_Real feastol;
4510 
4511  assert(set != NULL);
4512 
4513  feastol = SCIPsetFeastol(set);
4514 
4515  return MIN(100.0 * feastol, 0.0001);
4516 }
4517 
4518 /** returns minimal decrease factor that causes the recomputation of a value
4519  * (e.g., pseudo objective) instead of an update */
4521  SCIP_SET* set /**< global SCIP settings */
4522  )
4523 {
4524  assert(set != NULL);
4525 
4526  return set->num_recompfac;
4527 }
4528 
4529 /** checks, if value is (positive) infinite */
4531  SCIP_SET* set, /**< global SCIP settings */
4532  SCIP_Real val /**< value to be compared against infinity */
4533  )
4534 {
4535  assert(set != NULL);
4536 
4537  return (val >= set->num_infinity);
4538 }
4539 
4540 /** checks, if value is huge and should be handled separately (e.g., in activity computation) */
4542  SCIP_SET* set, /**< global SCIP settings */
4543  SCIP_Real val /**< value to be checked whether it is huge */
4544  )
4545 {
4546  assert(set != NULL);
4547 
4548  return (val >= set->num_hugeval);
4549 }
4550 
4551 /** checks, if values are in range of epsilon */
4553  SCIP_SET* set, /**< global SCIP settings */
4554  SCIP_Real val1, /**< first value to be compared */
4555  SCIP_Real val2 /**< second value to be compared */
4556  )
4557 {
4558  assert(set != NULL);
4559 
4560  return EPSEQ(val1, val2, set->num_epsilon);
4561 }
4562 
4563 /** checks, if val1 is (more than epsilon) lower than val2 */
4565  SCIP_SET* set, /**< global SCIP settings */
4566  SCIP_Real val1, /**< first value to be compared */
4567  SCIP_Real val2 /**< second value to be compared */
4568  )
4569 {
4570  assert(set != NULL);
4571 
4572  return EPSLT(val1, val2, set->num_epsilon);
4573 }
4574 
4575 /** checks, if val1 is not (more than epsilon) greater than val2 */
4577  SCIP_SET* set, /**< global SCIP settings */
4578  SCIP_Real val1, /**< first value to be compared */
4579  SCIP_Real val2 /**< second value to be compared */
4580  )
4581 {
4582  assert(set != NULL);
4583 
4584  return EPSLE(val1, val2, set->num_epsilon);
4585 }
4586 
4587 /** checks, if val1 is (more than epsilon) greater than val2 */
4589  SCIP_SET* set, /**< global SCIP settings */
4590  SCIP_Real val1, /**< first value to be compared */
4591  SCIP_Real val2 /**< second value to be compared */
4592  )
4593 {
4594  assert(set != NULL);
4595 
4596  return EPSGT(val1, val2, set->num_epsilon);
4597 }
4598 
4599 /** checks, if val1 is not (more than epsilon) lower than val2 */
4601  SCIP_SET* set, /**< global SCIP settings */
4602  SCIP_Real val1, /**< first value to be compared */
4603  SCIP_Real val2 /**< second value to be compared */
4604  )
4605 {
4606  assert(set != NULL);
4607 
4608  return EPSGE(val1, val2, set->num_epsilon);
4609 }
4610 
4611 /** checks, if value is in range epsilon of 0.0 */
4613  SCIP_SET* set, /**< global SCIP settings */
4614  SCIP_Real val /**< value to process */
4615  )
4616 {
4617  assert(set != NULL);
4618 
4619  return EPSZ(val, set->num_epsilon);
4620 }
4621 
4622 /** checks, if value is greater than epsilon */
4624  SCIP_SET* set, /**< global SCIP settings */
4625  SCIP_Real val /**< value to process */
4626  )
4627 {
4628  assert(set != NULL);
4629 
4630  return EPSP(val, set->num_epsilon);
4631 }
4632 
4633 /** checks, if value is lower than -epsilon */
4635  SCIP_SET* set, /**< global SCIP settings */
4636  SCIP_Real val /**< value to process */
4637  )
4638 {
4639  assert(set != NULL);
4640 
4641  return EPSN(val, set->num_epsilon);
4642 }
4643 
4644 /** checks, if value is integral within epsilon */
4646  SCIP_SET* set, /**< global SCIP settings */
4647  SCIP_Real val /**< value to process */
4648  )
4649 {
4650  assert(set != NULL);
4651 
4652  return EPSISINT(val, set->num_epsilon);
4653 }
4654 
4655 /** checks whether the product val * scalar is integral in epsilon scaled by scalar */
4657  SCIP_SET* set, /**< global SCIP settings */
4658  SCIP_Real val, /**< unscaled value to check for scaled integrality */
4659  SCIP_Real scalar /**< value to scale val with for checking for integrality */
4660  )
4661 {
4662  SCIP_Real scaledeps;
4663 
4664  assert(set != NULL);
4665 
4666  scaledeps = REALABS(scalar);
4667  scaledeps = MAX(scaledeps, 1.0);
4668  scaledeps *= set->num_epsilon;
4669 
4670  return EPSISINT(scalar*val, scaledeps);
4671 }
4672 
4673 /** checks, if given fractional part is smaller than epsilon */
4675  SCIP_SET* set, /**< global SCIP settings */
4676  SCIP_Real val /**< value to process */
4677  )
4678 {
4679  assert(set != NULL);
4680  assert(SCIPsetIsGE(set, val, -set->num_epsilon));
4681  assert(SCIPsetIsLE(set, val, 1.0+set->num_epsilon));
4682 
4683  return (val <= set->num_epsilon);
4684 }
4685 
4686 /** rounds value + feasibility tolerance down to the next integer in epsilon tolerance */
4688  SCIP_SET* set, /**< global SCIP settings */
4689  SCIP_Real val /**< value to process */
4690  )
4691 {
4692  assert(set != NULL);
4693 
4694  return EPSFLOOR(val, set->num_epsilon);
4695 }
4696 
4697 /** rounds value - feasibility tolerance up to the next integer in epsilon tolerance */
4699  SCIP_SET* set, /**< global SCIP settings */
4700  SCIP_Real val /**< value to process */
4701  )
4702 {
4703  assert(set != NULL);
4704 
4705  return EPSCEIL(val, set->num_epsilon);
4706 }
4707 
4708 /** rounds value to the nearest integer in epsilon tolerance */
4710  SCIP_SET* set, /**< global SCIP settings */
4711  SCIP_Real val /**< value to process */
4712  )
4713 {
4714  assert(set != NULL);
4715 
4716  return EPSROUND(val, set->num_epsilon);
4717 }
4718 
4719 /** returns fractional part of value, i.e. x - floor(x) in epsilon tolerance */
4721  SCIP_SET* set, /**< global SCIP settings */
4722  SCIP_Real val /**< value to return fractional part for */
4723  )
4724 {
4725  assert(set != NULL);
4726 
4727  return EPSFRAC(val, set->num_epsilon);
4728 }
4729 
4730 /** checks, if values are in range of sumepsilon */
4732  SCIP_SET* set, /**< global SCIP settings */
4733  SCIP_Real val1, /**< first value to be compared */
4734  SCIP_Real val2 /**< second value to be compared */
4735  )
4736 {
4737  assert(set != NULL);
4738 
4739  return EPSEQ(val1, val2, set->num_sumepsilon);
4740 }
4741 
4742 /** checks, if val1 is (more than sumepsilon) lower than val2 */
4744  SCIP_SET* set, /**< global SCIP settings */
4745  SCIP_Real val1, /**< first value to be compared */
4746  SCIP_Real val2 /**< second value to be compared */
4747  )
4748 {
4749  assert(set != NULL);
4750 
4751  return EPSLT(val1, val2, set->num_sumepsilon);
4752 }
4753 
4754 /** checks, if val1 is not (more than sumepsilon) greater than val2 */
4756  SCIP_SET* set, /**< global SCIP settings */
4757  SCIP_Real val1, /**< first value to be compared */
4758  SCIP_Real val2 /**< second value to be compared */
4759  )
4760 {
4761  assert(set != NULL);
4762 
4763  return EPSLE(val1, val2, set->num_sumepsilon);
4764 }
4765 
4766 /** checks, if val1 is (more than sumepsilon) greater than val2 */
4768  SCIP_SET* set, /**< global SCIP settings */
4769  SCIP_Real val1, /**< first value to be compared */
4770  SCIP_Real val2 /**< second value to be compared */
4771  )
4772 {
4773  assert(set != NULL);
4774 
4775  return EPSGT(val1, val2, set->num_sumepsilon);
4776 }
4777 
4778 /** checks, if val1 is not (more than sumepsilon) lower than val2 */
4780  SCIP_SET* set, /**< global SCIP settings */
4781  SCIP_Real val1, /**< first value to be compared */
4782  SCIP_Real val2 /**< second value to be compared */
4783  )
4784 {
4785  assert(set != NULL);
4786 
4787  return EPSGE(val1, val2, set->num_sumepsilon);
4788 }
4789 
4790 /** checks, if value is in range sumepsilon of 0.0 */
4792  SCIP_SET* set, /**< global SCIP settings */
4793  SCIP_Real val /**< value to process */
4794  )
4795 {
4796  assert(set != NULL);
4797 
4798  return EPSZ(val, set->num_sumepsilon);
4799 }
4800 
4801 /** checks, if value is greater than sumepsilon */
4803  SCIP_SET* set, /**< global SCIP settings */
4804  SCIP_Real val /**< value to process */
4805  )
4806 {
4807  assert(set != NULL);
4808 
4809  return EPSP(val, set->num_sumepsilon);
4810 }
4811 
4812 /** checks, if value is lower than -sumepsilon */
4814  SCIP_SET* set, /**< global SCIP settings */
4815  SCIP_Real val /**< value to process */
4816  )
4817 {
4818  assert(set != NULL);
4819 
4820  return EPSN(val, set->num_sumepsilon);
4821 }
4822 
4823 /** rounds value + sumepsilon tolerance down to the next integer */
4825  SCIP_SET* set, /**< global SCIP settings */
4826  SCIP_Real val /**< value to process */
4827  )
4828 {
4829  assert(set != NULL);
4830 
4831  return EPSFLOOR(val, set->num_sumepsilon);
4832 }
4833 
4834 /** rounds value - sumepsilon tolerance up to the next integer */
4836  SCIP_SET* set, /**< global SCIP settings */
4837  SCIP_Real val /**< value to process */
4838  )
4839 {
4840  assert(set != NULL);
4841 
4842  return EPSCEIL(val, set->num_sumepsilon);
4843 }
4844 
4845 /** rounds value to the nearest integer in sumepsilon tolerance */
4847  SCIP_SET* set, /**< global SCIP settings */
4848  SCIP_Real val /**< value to process */
4849  )
4850 {
4851  assert(set != NULL);
4852 
4853  return EPSROUND(val, set->num_sumepsilon);
4854 }
4855 
4856 /** returns fractional part of value, i.e. x - floor(x) in sumepsilon tolerance */
4858  SCIP_SET* set, /**< global SCIP settings */
4859  SCIP_Real val /**< value to process */
4860  )
4861 {
4862  assert(set != NULL);
4863 
4864  return EPSFRAC(val, set->num_sumepsilon);
4865 }
4866 
4867 /** checks, if relative difference of values is in range of feastol */
4869  SCIP_SET* set, /**< global SCIP settings */
4870  SCIP_Real val1, /**< first value to be compared */
4871  SCIP_Real val2 /**< second value to be compared */
4872  )
4873 {
4874  SCIP_Real diff;
4875 
4876  assert(set != NULL);
4877 
4878  diff = SCIPrelDiff(val1, val2);
4879 
4880  return EPSZ(diff, set->num_feastol);
4881 }
4882 
4883 /** checks, if relative difference of val1 and val2 is lower than feastol */
4885  SCIP_SET* set, /**< global SCIP settings */
4886  SCIP_Real val1, /**< first value to be compared */
4887  SCIP_Real val2 /**< second value to be compared */
4888  )
4889 {
4890  SCIP_Real diff;
4891 
4892  assert(set != NULL);
4893 
4894  diff = SCIPrelDiff(val1, val2);
4895 
4896  return EPSN(diff, set->num_feastol);
4897 }
4898 
4899 /** checks, if relative difference of val1 and val2 is not greater than feastol */
4901  SCIP_SET* set, /**< global SCIP settings */
4902  SCIP_Real val1, /**< first value to be compared */
4903  SCIP_Real val2 /**< second value to be compared */
4904  )
4905 {
4906  SCIP_Real diff;
4907 
4908  assert(set != NULL);
4909 
4910  diff = SCIPrelDiff(val1, val2);
4911 
4912  return !EPSP(diff, set->num_feastol);
4913 }
4914 
4915 /** checks, if relative difference of val1 and val2 is greater than feastol */
4917  SCIP_SET* set, /**< global SCIP settings */
4918  SCIP_Real val1, /**< first value to be compared */
4919  SCIP_Real val2 /**< second value to be compared */
4920  )
4921 {
4922  SCIP_Real diff;
4923 
4924  assert(set != NULL);
4925 
4926  diff = SCIPrelDiff(val1, val2);
4927 
4928  return EPSP(diff, set->num_feastol);
4929 }
4930 
4931 /** checks, if relative difference of val1 and val2 is not lower than -feastol */
4933  SCIP_SET* set, /**< global SCIP settings */
4934  SCIP_Real val1, /**< first value to be compared */
4935  SCIP_Real val2 /**< second value to be compared */
4936  )
4937 {
4938  SCIP_Real diff;
4939 
4940  assert(set != NULL);
4941 
4942  diff = SCIPrelDiff(val1, val2);
4943 
4944  return !EPSN(diff, set->num_feastol);
4945 }
4946 
4947 /** checks, if value is in range feasibility tolerance of 0.0 */
4949  SCIP_SET* set, /**< global SCIP settings */
4950  SCIP_Real val /**< value to process */
4951  )
4952 {
4953  assert(set != NULL);
4954 
4955  return EPSZ(val, set->num_feastol);
4956 }
4957 
4958 /** checks, if value is greater than feasibility tolerance */
4960  SCIP_SET* set, /**< global SCIP settings */
4961  SCIP_Real val /**< value to process */
4962  )
4963 {
4964  assert(set != NULL);
4965 
4966  return EPSP(val, set->num_feastol);
4967 }
4968 
4969 /** checks, if value is lower than -feasibility tolerance */
4971  SCIP_SET* set, /**< global SCIP settings */
4972  SCIP_Real val /**< value to process */
4973  )
4974 {
4975  assert(set != NULL);
4976 
4977  return EPSN(val, set->num_feastol);
4978 }
4979 
4980 /** checks, if value is integral within the feasibility bounds */
4982  SCIP_SET* set, /**< global SCIP settings */
4983  SCIP_Real val /**< value to process */
4984  )
4985 {
4986  assert(set != NULL);
4987 
4988  return EPSISINT(val, set->num_feastol);
4989 }
4990 
4991 /** checks, if given fractional part is smaller than feastol */
4993  SCIP_SET* set, /**< global SCIP settings */
4994  SCIP_Real val /**< value to process */
4995  )
4996 {
4997  assert(set != NULL);
4998  assert(SCIPsetIsGE(set, val, -set->num_feastol));
4999  assert(SCIPsetIsLE(set, val, 1.0+set->num_feastol));
5000 
5001  return (val <= set->num_feastol);
5002 }
5003 
5004 /** rounds value + feasibility tolerance down to the next integer in feasibility tolerance */
5006  SCIP_SET* set, /**< global SCIP settings */
5007  SCIP_Real val /**< value to process */
5008  )
5009 {
5010  assert(set != NULL);
5011 
5012  return EPSFLOOR(val, set->num_feastol);
5013 }
5014 
5015 /** rounds value - feasibility tolerance up to the next integer in feasibility tolerance */
5017  SCIP_SET* set, /**< global SCIP settings */
5018  SCIP_Real val /**< value to process */
5019  )
5020 {
5021  assert(set != NULL);
5022 
5023  return EPSCEIL(val, set->num_feastol);
5024 }
5025 
5026 /** rounds value to the nearest integer in feasibility tolerance */
5028  SCIP_SET* set, /**< global SCIP settings */
5029  SCIP_Real val /**< value to process */
5030  )
5031 {
5032  assert(set != NULL);
5033 
5034  return EPSROUND(val, set->num_feastol);
5035 }
5036 
5037 /** returns fractional part of value, i.e. x - floor(x) in feasibility tolerance */
5039  SCIP_SET* set, /**< global SCIP settings */
5040  SCIP_Real val /**< value to process */
5041  )
5042 {
5043  assert(set != NULL);
5044 
5045  return EPSFRAC(val, set->num_feastol);
5046 }
5047 
5048 /** checks, if the given new lower bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
5050  SCIP_SET* set, /**< global SCIP settings */
5051  SCIP_Real newlb, /**< new lower bound */
5052  SCIP_Real oldlb, /**< old lower bound */
5053  SCIP_Real oldub /**< old upper bound */
5054  )
5055 {
5056  SCIP_Real eps;
5057 
5058  assert(set != NULL);
5059  assert(SCIPsetIsLE(set, oldlb, oldub));
5060 
5061  eps = REALABS(oldlb);
5062  eps = MIN(oldub - oldlb, eps);
5063  return EPSGT(newlb, oldlb, set->num_boundstreps * MAX(eps, 1e-3));
5064 }
5065 
5066 /** checks, if the given new upper bound is tighter (w.r.t. bound strengthening epsilon) than the old one */
5068  SCIP_SET* set, /**< global SCIP settings */
5069  SCIP_Real newub, /**< new upper bound */
5070  SCIP_Real oldlb, /**< old lower bound */
5071  SCIP_Real oldub /**< old upper bound */
5072  )
5073 {
5074  SCIP_Real eps;
5075 
5076  assert(set != NULL);
5077  assert(SCIPsetIsLE(set, oldlb, oldub));
5078 
5079  eps = REALABS(oldub);
5080  eps = MIN(oldub - oldlb, eps);
5081  return EPSLT(newub, oldub, set->num_boundstreps * MAX(eps, 1e-3));
5082 }
5083 
5084 /** checks, if the given cut's efficacy is larger than the minimal cut efficacy */
5086  SCIP_SET* set, /**< global SCIP settings */
5087  SCIP_Bool root, /**< should the root's minimal cut efficacy be used? */
5088  SCIP_Real efficacy /**< efficacy of the cut */
5089  )
5090 {
5091  assert(set != NULL);
5092 
5093  if( root )
5094  return EPSP(efficacy, set->sepa_minefficacyroot);
5095  else
5096  return EPSP(efficacy, set->sepa_minefficacy);
5097 }
5098 
5099 /** checks, if relative difference of values is in range of epsilon */
5101  SCIP_SET* set, /**< global SCIP settings */
5102  SCIP_Real val1, /**< first value to be compared */
5103  SCIP_Real val2 /**< second value to be compared */
5104  )
5105 {
5106  SCIP_Real diff;
5107 
5108  assert(set != NULL);
5109 
5110  diff = SCIPrelDiff(val1, val2);
5111 
5112  return EPSZ(diff, set->num_epsilon);
5113 }
5114 
5115 /** checks, if relative difference of val1 and val2 is lower than epsilon */
5117  SCIP_SET* set, /**< global SCIP settings */
5118  SCIP_Real val1, /**< first value to be compared */
5119  SCIP_Real val2 /**< second value to be compared */
5120  )
5121 {
5122  SCIP_Real diff;
5123 
5124  assert(set != NULL);
5125 
5126  diff = SCIPrelDiff(val1, val2);
5127 
5128  return EPSN(diff, set->num_epsilon);
5129 }
5130 
5131 /** checks, if relative difference of val1 and val2 is not greater than epsilon */
5133  SCIP_SET* set, /**< global SCIP settings */
5134  SCIP_Real val1, /**< first value to be compared */
5135  SCIP_Real val2 /**< second value to be compared */
5136  )
5137 {
5138  SCIP_Real diff;
5139 
5140  assert(set != NULL);
5141 
5142  diff = SCIPrelDiff(val1, val2);
5143 
5144  return !EPSP(diff, set->num_epsilon);
5145 }
5146 
5147 /** checks, if relative difference of val1 and val2 is greater than epsilon */
5149  SCIP_SET* set, /**< global SCIP settings */
5150  SCIP_Real val1, /**< first value to be compared */
5151  SCIP_Real val2 /**< second value to be compared */
5152  )
5153 {
5154  SCIP_Real diff;
5155 
5156  assert(set != NULL);
5157 
5158  diff = SCIPrelDiff(val1, val2);
5159 
5160  return EPSP(diff, set->num_epsilon);
5161 }
5162 
5163 /** checks, if relative difference of val1 and val2 is not lower than -epsilon */
5165  SCIP_SET* set, /**< global SCIP settings */
5166  SCIP_Real val1, /**< first value to be compared */
5167  SCIP_Real val2 /**< second value to be compared */
5168  )
5169 {
5170  SCIP_Real diff;
5171 
5172  assert(set != NULL);
5173 
5174  diff = SCIPrelDiff(val1, val2);
5175 
5176  return !EPSN(diff, set->num_epsilon);
5177 }
5178 
5179 /** checks, if relative difference of values is in range of sumepsilon */
5181  SCIP_SET* set, /**< global SCIP settings */
5182  SCIP_Real val1, /**< first value to be compared */
5183  SCIP_Real val2 /**< second value to be compared */
5184  )
5185 {
5186  SCIP_Real diff;
5187 
5188  assert(set != NULL);
5189 
5190  diff = SCIPrelDiff(val1, val2);
5191 
5192  return EPSZ(diff, set->num_sumepsilon);
5193 }
5194 
5195 /** checks, if relative difference of val1 and val2 is lower than sumepsilon */
5197  SCIP_SET* set, /**< global SCIP settings */
5198  SCIP_Real val1, /**< first value to be compared */
5199  SCIP_Real val2 /**< second value to be compared */
5200  )
5201 {
5202  SCIP_Real diff;
5203 
5204  assert(set != NULL);
5205 
5206  diff = SCIPrelDiff(val1, val2);
5207 
5208  return EPSN(diff, set->num_sumepsilon);
5209 }
5210 
5211 /** checks, if relative difference of val1 and val2 is not greater than sumepsilon */
5213  SCIP_SET* set, /**< global SCIP settings */
5214  SCIP_Real val1, /**< first value to be compared */
5215  SCIP_Real val2 /**< second value to be compared */
5216  )
5217 {
5218  SCIP_Real diff;
5219 
5220  assert(set != NULL);
5221 
5222  diff = SCIPrelDiff(val1, val2);
5223 
5224  return !EPSP(diff, set->num_sumepsilon);
5225 }
5226 
5227 /** checks, if relative difference of val1 and val2 is greater than sumepsilon */
5229  SCIP_SET* set, /**< global SCIP settings */
5230  SCIP_Real val1, /**< first value to be compared */
5231  SCIP_Real val2 /**< second value to be compared */
5232  )
5233 {
5234  SCIP_Real diff;
5235 
5236  assert(set != NULL);
5237 
5238  diff = SCIPrelDiff(val1, val2);
5239 
5240  return EPSP(diff, set->num_sumepsilon);
5241 }
5242 
5243 /** checks, if relative difference of val1 and val2 is not lower than -sumepsilon */
5245  SCIP_SET* set, /**< global SCIP settings */
5246  SCIP_Real val1, /**< first value to be compared */
5247  SCIP_Real val2 /**< second value to be compared */
5248  )
5249 {
5250  SCIP_Real diff;
5251 
5252  assert(set != NULL);
5253 
5254  diff = SCIPrelDiff(val1, val2);
5255 
5256  return !EPSN(diff, set->num_sumepsilon);
5257 }
5258 
5259 /** Checks, if an iteratively updated value is reliable or should be recomputed from scratch.
5260  * This is useful, if the value, e.g., the activity of a linear constraint or the pseudo objective value, gets a high
5261  * absolute value during the optimization process which is later reduced significantly. In this case, the last digits
5262  * were canceled out when increasing the value and are random after decreasing it.
5263  * We dot not consider the cancellations which can occur during increasing the absolute value because they just cannot
5264  * be expressed using fixed precision floating point arithmetic, anymore.
5265  * The idea to get more reliable values is to always store the last reliable value, where increasing the absolute of
5266  * the value is viewed as preserving reliability. Then, after each update, the new absolute value can be compared
5267  * against the last reliable one with this method, checking whether it was decreased by a factor of at least
5268  * "lp/recompfac" and should be recomputed.
5269  */
5271  SCIP_SET* set, /**< global SCIP settings */
5272  SCIP_Real newvalue, /**< new value after update */
5273  SCIP_Real oldvalue /**< old value, i.e., last reliable value */
5274  )
5275 {
5276  SCIP_Real quotient;
5277 
5278  assert(set != NULL);
5279 
5280  quotient = ABS(oldvalue) / MAX(ABS(newvalue), set->num_epsilon);
5281 
5282  return quotient >= set->num_recompfac;
5283 }
5284