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 2002-2022 Zuse Institute Berlin */
7 /* */
8 /* Licensed under the Apache License, Version 2.0 (the "License"); */
9 /* you may not use this file except in compliance with the License. */
10 /* You may obtain a copy of the License at */
11 /* */
12 /* http://www.apache.org/licenses/LICENSE-2.0 */
13 /* */
14 /* Unless required by applicable law or agreed to in writing, software */
15 /* distributed under the License is distributed on an "AS IS" BASIS, */
16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17 /* See the License for the specific language governing permissions and */
18 /* limitations under the License. */
19 /* */
20 /* You should have received a copy of the Apache-2.0 license */
21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22 /* */
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24 
25 /**@file set.c
26  * @ingroup OTHER_CFILES
27  * @brief methods for global SCIP settings
28  * @author Tobias Achterberg
29  * @author Timo Berthold
30  *
31  * @todo Functions like SCIPsetFeastol() are misleading (it seems that the feasibility tolerance can be set).
32  * Rename all functions starting with SCIPsetXXX, e.g., SCIPsetGetFeastol() and SCIPsetSetFeastol().
33  */
34 
35 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36 
37 #include <assert.h>
38 #include <string.h>
39 #include <math.h>
40 
41 #include "scip/def.h"
42 #include "scip/set.h"
43 #include "scip/stat.h"
44 #include "scip/clock.h"
45 #include "scip/event.h"
46 #include "scip/lp.h"
47 #include "scip/paramset.h"
48 #include "scip/scip.h"
49 #include "scip/bandit.h"
50 #include "scip/branch.h"
51 #include "scip/conflict.h"
52 #include "scip/cons.h"
53 #include "scip/disp.h"
54 #include "scip/dialog.h"
55 #include "scip/heur.h"
56 #include "scip/concsolver.h"
57 #include "scip/compr.h"
58 #include "scip/nodesel.h"
59 #include "scip/presol.h"
60 #include "scip/pricer.h"
61 #include "scip/reader.h"
62 #include "scip/relax.h"
63 #include "scip/sepa.h"
64 #include "scip/cutsel.h"
65 #include "scip/table.h"
66 #include "scip/prop.h"
67 #include "scip/benders.h"
68 #include "scip/expr.h"
69 #include "scip/nlpi.h"
70 #include "scip/pub_nlpi.h"
71 #include "scip/struct_scip.h" /* for SCIPsetPrintDebugMessage() */
72 
73 /*
74  * Default settings
75  */
76 
77 
78 /* Branching */
79 
80 #define SCIP_DEFAULT_BRANCH_SCOREFUNC 'p' /**< branching score function ('s'um, 'p'roduct) */
81 #define SCIP_DEFAULT_BRANCH_SCOREFAC 0.167 /**< branching score factor to weigh downward and upward gain prediction
82  * in sum score function */
83 #define SCIP_DEFAULT_BRANCH_PREFERBINARY FALSE /**< should branching on binary variables be preferred? */
84 #define SCIP_DEFAULT_BRANCH_CLAMP 0.2 /**< minimal fractional distance of branching point to a continuous variable'
85  * bounds; a value of 0.5 leads to branching always in the middle of a bounded domain */
86 #define SCIP_DEFAULT_BRANCH_MIDPULL 0.75 /**< fraction by which to move branching point of a continuous variable towards the middle of the domain */
87 #define SCIP_DEFAULT_BRANCH_MIDPULLRELDOMTRIG 0.5 /**< multiply midpull by relative domain width if the latter is below this value */
88 #define SCIP_DEFAULT_BRANCH_LPGAINNORMALIZE 's' /**< strategy for normalizing LP gain when updating pseudo costs of continuous variables */
89 #define SCIP_DEFAULT_BRANCH_DELAYPSCOST TRUE /**< should updating pseudo costs of continuous variables be delayed to after separation */
90 #define SCIP_DEFAULT_BRANCH_DIVINGPSCOST TRUE /**< should pseudo costs be updated also in diving and probing mode? */
91 #define SCIP_DEFAULT_BRANCH_FORCEALL FALSE /**< should all strong branching children be regarded even if
92  * one is detected to be infeasible? (only with propagation) */
93 #define SCIP_DEFAULT_BRANCH_FIRSTSBCHILD 'a' /**< child node to be regarded first during strong branching (only with propagation): 'u'p child, 'd'own child, 'h'istory-based, or 'a'utomatic */
94 #define SCIP_DEFAULT_BRANCH_CHECKSBSOL TRUE /**< should LP solutions during strong branching with propagation be checked for feasibility? */
95 #define SCIP_DEFAULT_BRANCH_ROUNDSBSOL TRUE /**< should LP solutions during strong branching with propagation be rounded? (only when checksbsol=TRUE) */
96 #define SCIP_DEFAULT_BRANCH_SUMADJUSTSCORE FALSE /**< score adjustment near zero by adding epsilon (TRUE) or using maximum (FALSE) */
97 
98 /* Tree Compression */
99 
100 #define SCIP_DEFAULT_COMPR_ENABLE FALSE /**< should automatic tree compression in reoptimization after presolving be enabled? */
101 
102 
103 /* Conflict Analysis (general) */
104 
105 #define SCIP_DEFAULT_CONF_ENABLE TRUE /**< conflict analysis be enabled? */
106 #define SCIP_DEFAULT_CONF_MAXVARSFAC 0.15 /**< maximal fraction of variables involved in a conflict constraint */
107 #define SCIP_DEFAULT_CONF_MINMAXVARS 0 /**< minimal absolute maximum of variables involved in a conflict constraint */
108 #define SCIP_DEFAULT_CONF_MAXLPLOOPS 2 /**< maximal number of LP resolving loops during conflict analysis
109  * (-1: no limit) */
110 #define SCIP_DEFAULT_CONF_LPITERATIONS 10 /**< maximal number of LP iterations in each LP resolving loop
111  * (-1: no limit) */
112 #define SCIP_DEFAULT_CONF_USEPROP TRUE /**< should propagation conflict analysis be used? */
113 #define SCIP_DEFAULT_CONF_USEINFLP 'b' /**< should infeasible LP conflict analysis be used?
114  * ('o'ff, 'c'onflict graph, 'd'ual ray, 'b'oth conflict graph and dual ray)
115  */
116 #define SCIP_DEFAULT_CONF_USEBOUNDLP 'b' /**< should bound exceeding LP conflict analysis be used?
117  * ('o'ff, 'c'onflict graph, 'd'ual ray, 'b'oth conflict graph and dual solution)
118  */
119 #define SCIP_DEFAULT_CONF_USESB TRUE /**< should infeasible/bound exceeding strong branching conflict analysis
120  * be used? */
121 #define SCIP_DEFAULT_CONF_USEPSEUDO TRUE /**< should pseudo solution conflict analysis be used? */
122 #define SCIP_DEFAULT_CONF_PREFINFPROOF TRUE /**< prefer infeasibility proof to boundexceeding proof */
123 #define SCIP_DEFAULT_CONF_SEPARATE TRUE /**< should the conflict constraints be separated? */
124 #define SCIP_DEFAULT_CONF_DYNAMIC TRUE /**< should the conflict constraints be subject to aging? */
125 
126 
127 /* Conflict Analysis (conflict graph) */
129 #define SCIP_DEFAULT_CONF_MAXSTORESIZE 10000 /**< maximal size of the conflict pool */
130 #define SCIP_DEFAULT_CONF_RECONVLEVELS -1 /**< number of depth levels up to which UIP reconvergence constraints are
131  * generated (-1: generate reconvergence constraints in all depth levels) */
132 #define SCIP_DEFAULT_CONF_CLEANBNDDEPEND TRUE /**< should conflicts based on an old cutoff bound removed? */
133 #define SCIP_DEFAULT_CONF_FUIPLEVELS -1 /**< number of depth levels up to which first UIP's are used in conflict
134  * analysis (-1: use All-FirstUIP rule) */
135 #define SCIP_DEFAULT_CONF_INTERCONSS -1 /**< maximal number of intermediate conflict constraints generated in
136  * conflict graph (-1: use every intermediate constraint) */
137 #define SCIP_DEFAULT_CONF_MAXCONSS 10 /**< maximal number of conflict constraints accepted at an infeasible node
138  * (-1: use all generated conflict constraints) */
139 #define SCIP_DEFAULT_CONF_PREFERBINARY FALSE /**< should binary conflicts be preferred? */
140 #define SCIP_DEFAULT_CONF_ALLOWLOCAL TRUE /**< should conflict constraints be generated that are only valid locally? */
141 #define SCIP_DEFAULT_CONF_SETTLELOCAL FALSE /**< should conflict constraints be attached only to the local subtree
142  * where they can be useful? */
143 #define SCIP_DEFAULT_CONF_REPROPAGATE TRUE /**< should earlier nodes be repropagated in order to replace branching
144  * decisions by deductions? */
145 #define SCIP_DEFAULT_CONF_KEEPREPROP TRUE /**< should constraints be kept for repropagation even if they are too long? */
146 #define SCIP_DEFAULT_CONF_REMOVEABLE TRUE /**< should the conflict's relaxations be subject to LP aging and cleanup? */
147 #define SCIP_DEFAULT_CONF_DEPTHSCOREFAC 1.0 /**< score factor for depth level in bound relaxation heuristic of LP analysis */
148 #define SCIP_DEFAULT_CONF_PROOFSCOREFAC 1.0 /**< score factor for impact on acticity in bound relaxation heuristic of LP analysis */
149 #define SCIP_DEFAULT_CONF_UPLOCKSCOREFAC 0.0 /**< score factor for up locks in bound relaxation heuristic of LP analysis */
150 #define SCIP_DEFAULT_CONF_DOWNLOCKSCOREFAC 0.0 /**< score factor for down locks in bound relaxation heuristic of LP analysis */
151 #define SCIP_DEFAULT_CONF_SCOREFAC 0.98 /**< factor to decrease importance of variables' earlier conflict scores */
152 #define SCIP_DEFAULT_CONF_RESTARTNUM 0 /**< number of successful conflict analysis calls that trigger a restart
153  * (0: disable conflict restarts) */
154 #define SCIP_DEFAULT_CONF_RESTARTFAC 1.5 /**< factor to increase restartnum with after each restart */
155 #define SCIP_DEFAULT_CONF_IGNORERELAXEDBD FALSE /**< should relaxed bounds be ignored? */
156 #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) */
157 #define SCIP_DEFAULT_CONF_FULLSHORTENCONFLICT TRUE /**< try to shorten the whole conflict set or terminate early (depending on the 'maxvarsdetectimpliedbounds' parameter) */
158 #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 */
159 #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 */
160 #define SCIP_DEFAULT_CONF_WEIGHTSIZE 0.001 /**< weight of the size of a conflict used in score calculation */
161 #define SCIP_DEFAULT_CONF_WEIGHTREPROPDEPTH 0.1 /**< weight of the repropagation depth of a conflict used in score calculation */
162 #define SCIP_DEFAULT_CONF_WEIGHTVALIDDEPTH 1.0 /**< weight of the valid depth of a conflict used in score calculation */
163 #define SCIP_DEFAULT_CONF_MINIMPROVE 0.05 /**< minimal improvement of primal bound to remove conflicts based on a previous incumbent */
165 /* Conflict Analysis (dual ray) */
167 #define SCIP_DEFAULT_CONF_SEPAALTPROOFS FALSE /**< apply cut generating functions to construct alternative proofs */
168 #define SCIP_DEFAULT_CONF_USELOCALROWS TRUE /**< use local rows to construct infeasibility proofs */
169 
170 /* Constraints */
172 #define SCIP_DEFAULT_CONS_AGELIMIT 0 /**< maximum age an unnecessary constraint can reach before it is deleted
173  * (0: dynamic adjustment, -1: constraints are never deleted) */
174 #define SCIP_DEFAULT_CONS_OBSOLETEAGE -1 /**< age of a constraint after which it is marked obsolete
175  * (0: dynamic adjustment, -1: constraints are never marked obsolete) */
176 #define SCIP_DEFAULT_CONS_DISABLEENFOPS FALSE /**< should enforcement of pseudo solution be disabled? */
179 /* Display */
181 #define SCIP_DEFAULT_DISP_VERBLEVEL SCIP_VERBLEVEL_HIGH /**< verbosity level of output */
182 #define SCIP_DEFAULT_DISP_WIDTH 143 /**< maximal number of characters in a node information line */
183 #define SCIP_DEFAULT_DISP_FREQ 100 /**< frequency for displaying node information lines */
184 #define SCIP_DEFAULT_DISP_HEADERFREQ 15 /**< frequency for displaying header lines (every n'th node info line) */
185 #define SCIP_DEFAULT_DISP_LPINFO FALSE /**< should the LP solver display status messages? */
186 #define SCIP_DEFAULT_DISP_ALLVIOLS FALSE /**< display all violations of the best solution after the solving process finished? */
187 #define SCIP_DEFAULT_DISP_RELEVANTSTATS TRUE /**< should the relevant statistics be displayed at the end of solving? */
188 
189 /* Heuristics */
190 
191 #define SCIP_DEFAULT_HEUR_USEUCTSUBSCIP FALSE /**< should setting of common subscip parameters include the activation of the UCT node selector? */
193 /* History */
194 
195 #define SCIP_DEFAULT_HISTORY_VALUEBASED FALSE /**< should statistics be collected for variable domain value pairs */
196 #define SCIP_DEFAULT_HISTORY_ALLOWMERGE FALSE /**< should variable histories be merged from sub-SCIPs whenever possible? */
197 #define SCIP_DEFAULT_HISTORY_ALLOWTRANSFER FALSE /**< should variable histories be transferred to initialize SCIP copies? */
198 
199 /* Limits */
201 #define SCIP_DEFAULT_LIMIT_TIME 1e+20 /**< maximal time in seconds to run */
202 #define SCIP_DEFAULT_LIMIT_MEMORY SCIP_MEM_NOLIMIT/**< maximal memory usage in MB */
203 #define SCIP_DEFAULT_LIMIT_GAP 0.0 /**< solving stops, if the gap is below the given value */
204 #define SCIP_DEFAULT_LIMIT_ABSGAP 0.0 /**< solving stops, if the absolute difference between primal and dual
205  * bound reaches this value */
206 #define SCIP_DEFAULT_LIMIT_NODES -1LL /**< maximal number of nodes to process (-1: no limit) */
207 #define SCIP_DEFAULT_LIMIT_STALLNODES -1LL /**< solving stops, if the given number of nodes was processed since the
208  * last improvement of the primal solution value (-1: no limit) */
209 #define SCIP_DEFAULT_LIMIT_SOLUTIONS -1 /**< solving stops, if given number of sols were found (-1: no limit) */
210 #define SCIP_DEFAULT_LIMIT_BESTSOL -1 /**< solving stops, if given number of solution improvements were found
211  * (-1: no limit) */
212 #define SCIP_DEFAULT_LIMIT_MAXSOL 100 /**< maximal number of solutions to store in the solution storage */
213 #define SCIP_DEFAULT_LIMIT_MAXORIGSOL 10 /**< maximal number of solutions candidates to store in the solution storage of the original problem */
214 #define SCIP_DEFAULT_LIMIT_RESTARTS -1 /**< solving stops, if the given number of restarts was triggered (-1: no limit) */
215 #define SCIP_DEFAULT_LIMIT_AUTORESTARTNODES -1 /**< if solve exceeds this number of nodes, an automatic restart is triggered (-1: no automatic restart)*/
217 
218 /* LP */
219 
220 #define SCIP_DEFAULT_LP_SOLVEFREQ 1 /**< frequency for solving LP at the nodes; -1: never; 0: only root LP */
221 #define SCIP_DEFAULT_LP_ITERLIM -1LL /**< iteration limit for each single LP solve; -1: no limit */
222 #define SCIP_DEFAULT_LP_ROOTITERLIM -1LL /**< iteration limit for initial root LP solve; -1: no limit */
223 #define SCIP_DEFAULT_LP_SOLVEDEPTH -1 /**< maximal depth for solving LPs (-1: no depth limit) */
224 #define SCIP_DEFAULT_LP_INITALGORITHM 's' /**< LP algorithm for solving initial LP relaxations ('s'implex, 'b'arrier,
225  * barrier with 'c'rossover) */
226 #define SCIP_DEFAULT_LP_RESOLVEALGORITHM 's' /**< LP algorithm for resolving LP relaxations if a starting basis exists
227  * ('s'implex, 'b'arrier, barrier with 'c'rossover) */
228 #define SCIP_DEFAULT_LP_PRICING 'l' /**< LP pricing strategy ('l'pi default, 'a'uto, 'f'ull pricing, 'p'artial,
229  * 's'teepest edge pricing, 'q'uickstart steepest edge pricing,
230  * 'd'evex pricing) */
231 #define SCIP_DEFAULT_LP_CLEARINITIALPROBINGLP TRUE/**< should lp state be cleared at the end of probing mode when lp
232  * was initially unsolved, e.g., when called right after presolving? */
233 #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)? */
234 #define SCIP_DEFAULT_LP_FREESOLVALBUFFERS FALSE /**< should the buffers for storing LP solution values during diving be freed at end of diving? */
235 #define SCIP_DEFAULT_LP_COLAGELIMIT 10 /**< maximum age a dynamic column can reach before it is deleted from SCIP_LP
236  * (-1: don't delete columns due to aging) */
237 #define SCIP_DEFAULT_LP_ROWAGELIMIT 10 /**< maximum age a dynamic row can reach before it is deleted from SCIP_LP
238  * (-1: don't delete rows due to aging) */
239 #define SCIP_DEFAULT_LP_CLEANUPCOLS FALSE /**< should new non-basic columns be removed after LP solving? */
240 #define SCIP_DEFAULT_LP_CLEANUPCOLSROOT FALSE /**< should new non-basic columns be removed after root LP solving? */
241 #define SCIP_DEFAULT_LP_CLEANUPROWS TRUE /**< should new basic rows be removed after LP solving? */
242 #define SCIP_DEFAULT_LP_CLEANUPROWSROOT TRUE /**< should new basic rows be removed after root LP solving? */
243 #define SCIP_DEFAULT_LP_CHECKSTABILITY TRUE /**< should LP solver's return status be checked for stability? */
244 #define SCIP_DEFAULT_LP_CONDITIONLIMIT -1.0 /**< maximum condition number of LP basis counted as stable (-1.0: no limit) */
245 #define SCIP_DEFAULT_LP_MARKOWITZ 0.01 /**< minimal Markowitz threshold to control sparsity/stability in LU factorization */
246 #define SCIP_DEFAULT_LP_CHECKPRIMFEAS TRUE /**< should LP solutions be checked for primal feasibility to resolve LP at numerical troubles? */
247 #define SCIP_DEFAULT_LP_CHECKDUALFEAS TRUE /**< should LP solutions be checked for dual feasibility to resolve LP at numerical troubles? */
248 #define SCIP_DEFAULT_LP_CHECKFARKAS TRUE /**< should infeasibility proofs from the LP be checked? */
249 #define SCIP_DEFAULT_LP_FASTMIP 1 /**< should FASTMIP setting of LP solver be used? */
250 #define SCIP_DEFAULT_LP_SCALING 1 /**< LP scaling (0: none, 1: normal, 2: aggressive) */
251 #define SCIP_DEFAULT_LP_PRESOLVING TRUE /**< should presolving of LP solver be used? */
252 #define SCIP_DEFAULT_LP_LEXDUALALGO FALSE /**< should the dual lexicographic algorithm be used? */
253 #define SCIP_DEFAULT_LP_LEXDUALROOTONLY TRUE /**< should the lexicographic dual algorithm be applied only at the root node */
254 #define SCIP_DEFAULT_LP_LEXDUALMAXROUNDS 2 /**< maximum number of rounds in the dual lexicographic algorithm */
255 #define SCIP_DEFAULT_LP_LEXDUALBASIC FALSE /**< choose fractional basic variables in lexicographic dual algorithm */
256 #define SCIP_DEFAULT_LP_LEXDUALSTALLING TRUE /**< turn on the lex dual algorithm only when stalling? */
257 #define SCIP_DEFAULT_LP_DISABLECUTOFF 2 /**< disable the cutoff bound in the LP solver? (0: enabled, 1: disabled, 2: auto) */
258 #define SCIP_DEFAULT_LP_ROWREPSWITCH 1.2 /**< simplex algorithm shall use row representation of the basis
259  * if number of rows divided by number of columns exceeds this value */
260 #define SCIP_DEFAULT_LP_THREADS 0 /**< number of threads used for solving the LP (0: automatic) */
261 #define SCIP_DEFAULT_LP_RESOLVEITERFAC -1.0 /**< factor of average LP iterations that is used as LP iteration limit
262  * for LP resolve (-1.0: unlimited) */
263 #define SCIP_DEFAULT_LP_RESOLVEITERMIN 1000 /**< minimum number of iterations that are allowed for LP resolve */
264 #define SCIP_DEFAULT_LP_SOLUTIONPOLISHING 3 /**< LP solution polishing method (0: disabled, 1: only root, 2: always, 3: auto) */
265 #define SCIP_DEFAULT_LP_REFACTORINTERVAL 0 /**< LP refactorization interval (0: automatic) */
266 #define SCIP_DEFAULT_LP_ALWAYSGETDUALS FALSE /**< should the dual solution always be collected */
267 
268 /* NLP */
270 #define SCIP_DEFAULT_NLP_SOLVER "" /**< name of NLP solver to use, or "" if solver should be chosen by priority */
271 #define SCIP_DEFAULT_NLP_DISABLE FALSE /**< should the NLP be always disabled? */
274 /* Memory */
276 #define SCIP_DEFAULT_MEM_SAVEFAC 0.8 /**< fraction of maximal mem usage when switching to memory saving mode */
277 #define SCIP_DEFAULT_MEM_TREEGROWFAC 2.0 /**< memory growing factor for tree array */
278 #define SCIP_DEFAULT_MEM_PATHGROWFAC 2.0 /**< memory growing factor for path array */
279 #define SCIP_DEFAULT_MEM_TREEGROWINIT 65536 /**< initial size of tree array */
280 #define SCIP_DEFAULT_MEM_PATHGROWINIT 256 /**< initial size of path array */
283 /* Miscellaneous */
285 #define SCIP_DEFAULT_MISC_CATCHCTRLC TRUE /**< should the CTRL-C interrupt be caught by SCIP? */
286 #define SCIP_DEFAULT_MISC_USEVARTABLE TRUE /**< should a hashtable be used to map from variable names to variables? */
287 #define SCIP_DEFAULT_MISC_USECONSTABLE TRUE /**< should a hashtable be used to map from constraint names to constraints? */
288 #define SCIP_DEFAULT_MISC_USESMALLTABLES FALSE /**< should smaller hashtables be used? yields better performance for small problems with about 100 variables */
289 #define SCIP_DEFAULT_MISC_EXACTSOLVE FALSE /**< should the problem be solved exactly (with proven dual bounds)? */
290 #define SCIP_DEFAULT_MISC_RESETSTAT TRUE /**< should the statistics be reset if the transformed problem is
291  * freed otherwise the statistics get reset after original problem is
292  * freed (in case of Benders' decomposition this parameter should be set
293  * to FALSE and therefore can be used to collect statistics over all
294  * runs) */
295 #define SCIP_DEFAULT_MISC_IMPROVINGSOLS FALSE /**< should only solutions be checked which improve the primal bound */
296 #define SCIP_DEFAULT_MISC_PRINTREASON TRUE /**< should the reason be printed if a given start solution is infeasible? */
297 #define SCIP_DEFAULT_MISC_ESTIMEXTERNMEM TRUE /**< should the usage of external memory be estimated? */
298 #define SCIP_DEFAULT_MISC_AVOIDMEMOUT TRUE /**< try to avoid running into memory limit by restricting plugins like heuristics? */
299 #define SCIP_DEFAULT_MISC_TRANSORIGSOLS TRUE /**< should SCIP try to transfer original solutions to the transformed space (after presolving)? */
300 #define SCIP_DEFAULT_MISC_TRANSSOLSORIG TRUE /**< should SCIP try to transfer transformed solutions to the original space (after solving)? */
301 #define SCIP_DEFAULT_MISC_CALCINTEGRAL TRUE /**< should SCIP calculate the primal dual integral? */
302 #define SCIP_DEFAULT_MISC_FINITESOLSTORE FALSE /**< should SCIP try to remove infinite fixings from solutions copied to the solution store? */
303 #define SCIP_DEFAULT_MISC_OUTPUTORIGSOL TRUE /**< should the best solution be transformed to the orignal space and be output in command line run? */
304 #define SCIP_DEFAULT_MISC_ALLOWSTRONGDUALREDS TRUE /**< should strong dual reductions be allowed in propagation and presolving? */
305 #define SCIP_DEFAULT_MISC_ALLOWWEAKDUALREDS TRUE /**< should weak dual reductions be allowed in propagation and presolving? */
306 #define SCIP_DEFAULT_MISC_REFERENCEVALUE 1e99 /**< objective value for reference purposes */
307 #define SCIP_DEFAULT_MISC_USESYMMETRY 7 /**< bitset describing used symmetry handling technique (0: off; 1: polyhedral (orbitopes and/or symresacks)
308  * 2: orbital fixing; 3: orbitopes and orbital fixing; 4: Schreier Sims cuts; 5: Schreier Sims cuts and
309  * orbitopes); 6: Schreier Sims cuts and orbital fixing; 7: Schreier Sims cuts, orbitopes, and orbital
310  * fixing, see type_symmetry.h */
311 #define SCIP_DEFAULT_MISC_SCALEOBJ TRUE /**< should the objective function be scaled? */
312 #define SCIP_DEFAULT_MISC_SHOWDIVINGSTATS FALSE /**< should detailed statistics for diving heuristics be shown? */
313 
314 #ifdef WITH_DEBUG_SOLUTION
315 #define SCIP_DEFAULT_MISC_DEBUGSOLUTION "-" /**< path to a debug solution */
316 #endif
318 /* Randomization */
319 #define SCIP_DEFAULT_RANDOM_RANDSEEDSHIFT 0 /**< global shift of all random seeds in the plugins, this will have no impact on the permutation and LP seeds */
320 #define SCIP_DEFAULT_RANDOM_PERMUTATIONSEED 0 /**< seed value for permuting the problem after reading/transformation (0: no permutation) */
321 #define SCIP_DEFAULT_RANDOM_LPSEED 0 /**< random seed for LP solver, e.g. for perturbations in the simplex (0: LP default) */
322 #define SCIP_DEFAULT_RANDOM_PERMUTECONSS TRUE /**< should order of constraints be permuted (depends on permutationseed)? */
323 #define SCIP_DEFAULT_RANDOM_PERMUTEVARS FALSE /**< should order of variables be permuted (depends on permutationseed)? */
324 
325 
326 /* Node Selection */
327 
328 #define SCIP_DEFAULT_NODESEL_CHILDSEL 'h' /**< child selection rule ('d'own, 'u'p, 'p'seudo costs, 'i'nference, 'l'p value,
329  * 'r'oot LP value difference, 'h'brid inference/root LP value difference) */
332 /* Presolving */
334 #define SCIP_DEFAULT_PRESOL_ABORTFAC 8e-04 /**< abort presolve, if at most this fraction of the problem was changed
335  * in last presolve round */
336 #define SCIP_DEFAULT_PRESOL_MAXROUNDS -1 /**< maximal number of presolving rounds (-1: unlimited, 0: off) */
337 #define SCIP_DEFAULT_PRESOL_MAXRESTARTS -1 /**< maximal number of restarts (-1: unlimited) */
338 #define SCIP_DEFAULT_PRESOL_CLQTABLEFAC 2.0 /**< limit on number of entries in clique table relative to number of problem nonzeros */
339 #define SCIP_DEFAULT_PRESOL_RESTARTFAC 0.025 /**< fraction of integer variables that were fixed in the root node
340  * triggering a restart with preprocessing after root node evaluation */
341 #define SCIP_DEFAULT_PRESOL_IMMRESTARTFAC 0.10 /**< fraction of integer variables that were fixed in the root node triggering an
342  * immediate restart with preprocessing */
343 #define SCIP_DEFAULT_PRESOL_SUBRESTARTFAC 1.00 /**< fraction of integer variables that were globally fixed during the
344  * solving process triggering a restart with preprocessing */
345 #define SCIP_DEFAULT_PRESOL_RESTARTMINRED 0.10 /**< minimal fraction of integer variables removed after restart to allow
346  * for an additional restart */
347 #define SCIP_DEFAULT_PRESOL_DONOTMULTAGGR FALSE /**< should multi-aggregation of variables be forbidden? */
348 #define SCIP_DEFAULT_PRESOL_DONOTAGGR FALSE /**< should aggregation of variables be forbidden? */
351 /* Pricing */
352 
353 #define SCIP_DEFAULT_PRICE_ABORTFAC 2.0 /**< pricing is aborted, if fac * price_maxvars pricing candidates were
354  * found */
355 #define SCIP_DEFAULT_PRICE_MAXVARS 100 /**< maximal number of variables priced in per pricing round */
356 #define SCIP_DEFAULT_PRICE_MAXVARSROOT 2000 /**< maximal number of priced variables at the root node */
357 #define SCIP_DEFAULT_PRICE_DELVARS FALSE /**< should variables created at the current node be deleted when the node is solved
358  * in case they are not present in the LP anymore? */
359 #define SCIP_DEFAULT_PRICE_DELVARSROOT FALSE /**< should variables created at the root node be deleted when the root is solved
360  * in case they are not present in the LP anymore? */
362 /* Decomposition */
363 #define SCIP_DEFAULT_DECOMP_BENDERSLABELS FALSE /**< should the variables be labelled for the application of Benders' decomposition */
364 #define SCIP_DEFAULT_DECOMP_APPLYBENDERS FALSE /**< if a decomposition exists, should Benders' decomposition be applied? */
365 #define SCIP_DEFAULT_DECOMP_MAXGRAPHEDGE 10000 /**< maximum number of edges in block graph computation (-1: no limit, 0: disable block graph computation) */
366 #define SCIP_DEFAULT_DECOMP_DISABLEMEASURES FALSE /**< disable expensive measures */
367 
368 /* Benders' decomposition */
369 #define SCIP_DEFAULT_BENDERS_SOLTOL 1e-6 /**< the tolerance used to determine optimality in Benders' decomposition */
370 #define SCIP_DEFAULT_BENDERS_CUTLPSOL TRUE /**< should Benders' cuts be generated from the LP solution? */
371 #define SCIP_DEFAULT_BENDERS_COPYBENDERS TRUE /**< should Benders' decomposition be copied for sub-SCIPs? */
372 
373 /* Reoptimization */
374 
375 #define SCIP_DEFAULT_REOPT_OBJSIMSOL -1.0 /**< re-use stored solutions only if the similarity of the new and the old objective
376  function is greater or equal than this value */
377 #define SCIP_DEFAULT_REOPT_OBJSIMROOTLP 0.8 /**< similarity of two sequential objective function to disable solving the root LP. */
378 #define SCIP_DEFAULT_REOPT_OBJSIMDELAY -1.0 /**< start reoptimizing the search if the new objective function has similarity of
379  * at least SCIP_DEFAULT_REOPT_DELAY w.r.t. the previous objective function. */
380 #define SCIP_DEFAULT_REOPT_VARORDERINTERDICTION 'd' /** use 'd'efault, 'r'andom or 'i'nference score for variable
381  * ordering when performing interdiction branching during
382  * reoptimization of nodes
383  */
384 #define SCIP_DEFAULT_REOPT_MAXSAVEDNODES INT_MAX/**< maximum number of saved nodes */
385 #define SCIP_DEFAULT_REOPT_MAXDIFFOFNODES INT_MAX/**< maximum number of bound changes of two ancestor nodes
386  * such that the path get not shrunk */
387 #define SCIP_DEFAULT_REOPT_FORCEHEURRESTART 3 /**< force a restart if the last n optimal solutions are found by
388  * reoptsols heuristic
389  */
390 #define SCIP_DEFAULT_REOPT_SAVESOLS INT_MAX/**< save n best solutions found so far. */
391 #define SCIP_DEFAULT_REOPT_SOLVELP 1 /**< strategy for solving the LP at nodes from reoptimization */
392 #define SCIP_DEFAULT_REOPT_SOLVELPDIFF 1 /**< difference of path length between two ancestor nodes to solve the LP */
393 #define SCIP_DEFAULT_REOPT_ENABLE FALSE /**< enable reoptimization */
394 #define SCIP_DEFAULT_REOPT_SEPAGLBINFSUBTREES TRUE/**< save global constraints to separate infeasible subtrees */
395 #define SCIP_DEFAULT_REOPT_SEPABESTSOL FALSE /**< separate the optimal solution, e.g., for solving constraint shortest
396  * path problems
397  */
398 #define SCIP_DEFAULT_REOPT_STOREVARHISTOTY FALSE/**< use the variable history of the previous solve if the objective
399  * function has changed only slightly
400  */
401 #define SCIP_DEFAULT_REOPT_USEPSCOST FALSE /**< re-use pseudo costs of the objective function changed only slightly */
402 #define SCIP_DEFAULT_REOPT_COMMONTIMELIMIT FALSE/**< is the given time limit for all reoptimization round? */
403 #define SCIP_DEFAULT_REOPT_SHRINKINNER TRUE /**< replace branched transit nodes by their child nodes, if the number
404  * of bound changes is not to large
405  */
406 #define SCIP_DEFAULT_REOPT_STRONGBRANCHINIT TRUE/**< try to fix variables before reoptimizing by probing like strong
407  * branching
408  */
409 #define SCIP_DEFAULT_REOPT_REDUCETOFRONTIER TRUE/**< delete stored nodes which were not reoptimized */
410 #define SCIP_DEFAULT_REOPT_SAVECONSPROP FALSE/**< save constraint propagation */
411 #define SCIP_DEFAULT_REOPT_USESPLITCONS TRUE /**< use constraints to reconstruct the subtree pruned be dual reduction
412  * when reactivating the node
413  */
414 #define SCIP_DEFAULT_REOPT_USECUTS FALSE /**< reoptimize cuts found at the root node */
415 #define SCIP_DEFAULT_REOPT_MAXCUTAGE 0 /**< maximal age of a cut to be use for reoptimization */
417 /* Propagating */
419 #define SCIP_DEFAULT_PROP_MAXROUNDS 100 /**< maximal number of propagation rounds per node (-1: unlimited) */
420 #define SCIP_DEFAULT_PROP_MAXROUNDSROOT 1000 /**< maximal number of propagation rounds in root node (-1: unlimited) */
421 #define SCIP_DEFAULT_PROP_ABORTONCUTOFF TRUE /**< should propagation be aborted immediately? setting this to FALSE could
422  * help conflict analysis to produce more conflict constraints */
423 
424 
425 /* Separation */
427 #define SCIP_DEFAULT_SEPA_MAXBOUNDDIST 1.0 /**< maximal relative distance from current node's dual bound to primal
428  * bound compared to best node's dual bound for applying separation
429  * (0.0: only on current best node, 1.0: on all nodes) */
430 #define SCIP_DEFAULT_SEPA_MAXLOCALBOUNDDIST 0.0 /**< maximal relative distance from current node's dual bound to primal
431  * bound compared to best node's dual bound for applying local separation
432  * (0.0: only on current best node, 1.0: on all nodes) */
433 #define SCIP_DEFAULT_SEPA_MAXCOEFRATIO 1e+4 /**< maximal ratio between coefficients in strongcg, cmir, and flowcover cuts */
434 #define SCIP_DEFAULT_SEPA_MAXCOEFRATIOFACROWPREP 10.0 /**< maximal ratio between coefficients (as factor of 1/feastol) to ensure in rowprep cleanup */
435 #define SCIP_DEFAULT_SEPA_MINEFFICACY 1e-4 /**< minimal efficacy for a cut to enter the LP */
436 #define SCIP_DEFAULT_SEPA_MINEFFICACYROOT 1e-4 /**< minimal efficacy for a cut to enter the LP in the root node */
437 #define SCIP_DEFAULT_SEPA_ORTHOFUNC 'e' /**< function used for calc. scalar prod. in orthogonality test ('e'uclidean, 'd'iscrete) */
438 #define SCIP_DEFAULT_SEPA_EFFICACYNORM 'e' /**< row norm to use for efficacy calculation ('e'uclidean, 'm'aximum,
439  * 's'um, 'd'iscrete) */
440 #define SCIP_DEFAULT_SEPA_CUTSELRESTART 'a' /**< cut selection during restart ('a'ge, activity 'q'uotient) */
441 #define SCIP_DEFAULT_SEPA_CUTSELSUBSCIP 'a' /**< cut selection for sub SCIPs ('a'ge, activity 'q'uotient) */
442 #define SCIP_DEFAULT_SEPA_FILTERCUTPOOLREL TRUE /**< should cutpool separate only cuts with high relative efficacy? */
443 #define SCIP_DEFAULT_SEPA_MAXRUNS -1 /**< maximal number of runs for which separation is enabled (-1: unlimited) */
444 #define SCIP_DEFAULT_SEPA_MAXROUNDS -1 /**< maximal number of separation rounds per node (-1: unlimited) */
445 #define SCIP_DEFAULT_SEPA_MAXROUNDSROOT -1 /**< maximal number of separation rounds in the root node (-1: unlimited) */
446 #define SCIP_DEFAULT_SEPA_MAXROUNDSROOTSUBRUN -1 /**< maximal number of separation rounds in the root node of a subsequent run (-1: unlimited) */
447 #define SCIP_DEFAULT_SEPA_MAXADDROUNDS 1 /**< maximal additional number of separation rounds in subsequent
448  * price-and-cut loops (-1: no additional restriction) */
449 #define SCIP_DEFAULT_SEPA_MAXSTALLROUNDSROOT 10 /**< maximal number of consecutive separation rounds without objective
450  * or integrality improvement in the root node (-1: no additional restriction) */
451 #define SCIP_DEFAULT_SEPA_MAXSTALLROUNDS 1 /**< maximal number of consecutive separation rounds without objective
452  * or integrality improvement in local nodes (-1: no additional restriction) */
453 #define SCIP_DEFAULT_SEPA_MAXCUTS 100 /**< maximal number of cuts separated per separation round */
454 #define SCIP_DEFAULT_SEPA_MAXCUTSROOT 2000 /**< maximal separated cuts at the root node */
455 #define SCIP_DEFAULT_SEPA_CUTAGELIMIT 80 /**< maximum age a cut can reach before it is deleted from global cut pool
456  * (-1: cuts are never deleted from the global cut pool) */
457 #define SCIP_DEFAULT_SEPA_POOLFREQ 10 /**< separation frequency for the global cut pool */
458 #define SCIP_DEFAULT_SEPA_MINACTIVITYQUOT 0.8 /**< minimum cut activity quotient to convert cuts into constraints
459  * during a restart (0.0: all cuts are converted) */
460 
461 /* Parallel */
462 #define SCIP_DEFAULT_PARALLEL_MODE 1 /**< the mode for the parallel implementation. Either 0: opportunistic or
463  * 1: deterministic */
464 #define SCIP_DEFAULT_PARALLEL_MINNTHREADS 1 /**< the minimum number of threads used in parallel code */
465 #define SCIP_DEFAULT_PARALLEL_MAXNTHREADS 8 /**< the maximum number of threads used in parallel code */
466 
467 /* Concurrent solvers */
468 #define SCIP_DEFAULT_CONCURRENT_CHANGESEEDS TRUE /**< should the concurrent solvers use different random seeds? */
469 #define SCIP_DEFAULT_CONCURRENT_CHANGECHILDSEL TRUE /**< should the concurrent solvers use different child selection rules? */
470 #define SCIP_DEFAULT_CONCURRENT_COMMVARBNDS TRUE /**< should the concurrent solvers communicate variable bounds? */
471 #define SCIP_DEFAULT_CONCURRENT_PRESOLVEBEFORE TRUE /**< should the problem be presolved before it is copied to the concurrent solvers? */
472 #define SCIP_DEFAULT_CONCURRENT_INITSEED 5131912 /**< the seed used to initialize the random seeds for the concurrent solvers */
473 #define SCIP_DEFAULT_CONCURRENT_FREQINIT 10.0 /**< initial frequency of synchronization with other threads
474  * (fraction of time required for solving the root LP) */
475 #define SCIP_DEFAULT_CONCURRENT_FREQMAX 10.0 /**< maximal frequency of synchronization with other threads
476  * (fraction of time required for solving the root LP) */
477 #define SCIP_DEFAULT_CONCURRENT_FREQFACTOR 1.5 /**< factor by which the frequency of synchronization is changed */
478 #define SCIP_DEFAULT_CONCURRENT_TARGETPROGRESS 0.001 /**< when adapting the synchronization frequency this value is the targeted
479  * relative difference by which the absolute gap decreases per synchronization */
480 #define SCIP_DEFAULT_CONCURRENT_MAXNSOLS 3 /**< maximum number of solutions that will be shared in a single synchronization */
481 #define SCIP_DEFAULT_CONCURRENT_MAXNSYNCDELAY 7 /**< maximum number of synchronizations before reading is enforced regardless of delay */
482 #define SCIP_DEFAULT_CONCURRENT_MINSYNCDELAY 10.0 /**< minimum delay before synchronization data is read */
483 #define SCIP_DEFAULT_CONCURRENT_NBESTSOLS 10 /**< how many of the N best solutions should be considered for synchronization */
484 #define SCIP_DEFAULT_CONCURRENT_PARAMSETPREFIX "" /**< path prefix for parameter setting files of concurrent solvers */
485 
486 
487 /* Timing */
488 
489 #define SCIP_DEFAULT_TIME_CLOCKTYPE SCIP_CLOCKTYPE_WALL /**< default clock type for timing */
490 #define SCIP_DEFAULT_TIME_ENABLED TRUE /**< is timing enabled? */
491 #define SCIP_DEFAULT_TIME_READING FALSE /**< belongs reading time to solving time? */
492 #define SCIP_DEFAULT_TIME_RARECLOCKCHECK FALSE /**< should clock checks of solving time be performed less frequently (might exceed time limit slightly) */
493 #define SCIP_DEFAULT_TIME_STATISTICTIMING TRUE /**< should timing for statistic output be enabled? */
494 #define SCIP_DEFAULT_TIME_NLPIEVAL FALSE /**< should time for evaluation in NLP solves be measured? */
496 
497 /* visualization output */
498 
499 #define SCIP_DEFAULT_VISUAL_VBCFILENAME "-" /**< name of the VBC tool output file, or "-" if no VBC tool output should be created */
500 #define SCIP_DEFAULT_VISUAL_BAKFILENAME "-" /**< name of the BAK tool output file, or "-" if no BAK tool output should be created */
501 #define SCIP_DEFAULT_VISUAL_REALTIME TRUE /**< should the real solving time be used instead of a time step counter in visualization? */
502 #define SCIP_DEFAULT_VISUAL_DISPSOLS FALSE /**< should the node where solutions are found be visualized? */
503 #define SCIP_DEFAULT_VISUAL_DISPLB FALSE /**< should lower bound information be visualized? */
504 #define SCIP_DEFAULT_VISUAL_OBJEXTERN TRUE /**< should be output the external value of the objective? */
506 
507 /* Reading */
509 #define SCIP_DEFAULT_READ_INITIALCONSS TRUE /**< should model constraints be marked as initial? */
510 #define SCIP_DEFAULT_READ_DYNAMICCONSS TRUE /**< should model constraints be subject to aging? */
511 #define SCIP_DEFAULT_READ_DYNAMICCOLS FALSE /**< should columns be added and removed dynamically to the LP? */
512 #define SCIP_DEFAULT_READ_DYNAMICROWS FALSE /**< should rows be added and removed dynamically to the LP? */
513 #define SCIP_DEFAULT_WRITE_GENNAMES_OFFSET 0 /**< when writing the problem with generic names, we start with index
514  * 0; using this parameter we can change the starting index to be
515  * different */
516 
517 
518 /* Writing */
519 
520 #define SCIP_DEFAULT_WRITE_ALLCONSS FALSE /**< should all constraints be written (including the redundant constraints)? */
521 #define SCIP_DEFAULT_PRINTZEROS FALSE /**< should variables set to zero be printed? */
522 
523 
525 /** calculate memory size for dynamically allocated arrays */
526 static
527 int calcGrowSize(
528  int initsize, /**< initial size of array */
529  SCIP_Real growfac, /**< growing factor of array */
530  int num /**< minimum number of entries to store */
531  )
532 {
533  int size;
534 
535  assert(initsize >= 0);
536  assert(growfac >= 1.0);
537  assert(num >= 0);
539  if( growfac == 1.0 )
540  size = MAX(initsize, num);
541  else
542  {
543  int oldsize;
545  /* calculate the size with this loop, such that the resulting numbers are always the same (-> block memory) */
546  initsize = MAX(initsize, 4);
547  size = initsize;
548  oldsize = size - 1;
549 
550  /* second condition checks against overflow */
551  while( size < num && size > oldsize )
552  {
553  oldsize = size;
554  size = (int)(growfac * size + initsize);
555  }
556 
557  /* if an overflow happened, set the correct value */
558  if( size <= oldsize )
559  size = num;
560  }
562  assert(size >= initsize);
563  assert(size >= num);
564 
565  return size;
566 }
569 /** information method for a parameter change of feastol */
570 static
571 SCIP_DECL_PARAMCHGD(paramChgdFeastol)
572 { /*lint --e{715}*/
573  SCIP_Real newfeastol;
574 
575  newfeastol = SCIPparamGetReal(param);
577  /* change the feastol through the SCIP call in order to adjust LP's feastol if necessary */
578  SCIP_CALL( SCIPchgFeastol(scip, newfeastol) );
580  return SCIP_OKAY;
581 }
582 
583 /** information method for a parameter change of lpfeastolfactor */
584 static
585 SCIP_DECL_PARAMCHGD(paramChgdLPFeastolFactor)
586 { /*lint --e{715}*/
587  SCIP_Real newlpfeastolfactor;
589  newlpfeastolfactor = SCIPparamGetReal(param);
591  if( SCIPgetStage(scip) == SCIP_STAGE_SOLVING && SCIPgetLPFeastol(scip) > newlpfeastolfactor * SCIPfeastol(scip) )
592  {
593  /* reset the LP feastol to ensure that it does not exceed newlpfeastolfactor * SCIP's feastol
594  * this also marks the LP unsolved
595  */
597  }
598 
599  return SCIP_OKAY;
600 }
601 
602 /** information method for a parameter change of dualfeastol */
603 static
604 SCIP_DECL_PARAMCHGD(paramChgdDualfeastol)
605 { /*lint --e{715}*/
606  SCIP_Real newdualfeastol;
607 
608  newdualfeastol = SCIPparamGetReal(param);
609 
610  /* change the dualfeastol through the SCIP call in order to mark the LP unsolved */
611  SCIP_CALL( SCIPchgDualfeastol(scip, newdualfeastol) );
612 
613  return SCIP_OKAY;
614 }
615 
616 /** information method for a parameter change of barrierconvtol */
617 static
618 SCIP_DECL_PARAMCHGD(paramChgdBarrierconvtol)
619 { /*lint --e{715}*/
620  SCIP_Real newbarrierconvtol;
621 
622  newbarrierconvtol = SCIPparamGetReal(param);
623 
624  /* change the barrierconvtol through the SCIP call in order to mark the LP unsolved */
625  SCIP_CALL( SCIPchgBarrierconvtol(scip, newbarrierconvtol) );
626 
627  return SCIP_OKAY;
628 }
629 
630 /** information method for a parameter change of infinity value */
631 static
632 SCIP_DECL_PARAMCHGD(paramChgdInfinity)
633 { /*lint --e{715}*/
635 
636  infinity = SCIPparamGetReal(param);
637 
638  /* Check that infinity value of LP-solver is at least as large as the one used in SCIP. This is necessary, because we
639  * transfer SCIP infinity values to the ones by the LPI, but not the converse. */
640  if ( scip->lp != NULL && scip->lp->lpi != NULL && infinity > SCIPlpiInfinity(scip->lp->lpi) )
641  {
642  SCIPerrorMessage("The infinity value of the LP solver has to be at least as large as the one of SCIP.\n");
643  return SCIP_PARAMETERWRONGVAL;
644  }
645 
646  return SCIP_OKAY;
647 }
648 
649 /** parameter change information method to autoselect display columns again */
650 static
651 SCIP_DECL_PARAMCHGD(SCIPparamChgdDispWidth)
652 { /*lint --e{715}*/
653  /* automatically select the new active display columns */
655 
656  return SCIP_OKAY;
657 }
658 
659 /** parameter change information method that some limit was changed */
660 static
661 SCIP_DECL_PARAMCHGD(SCIPparamChgdLimit)
662 { /*lint --e{715}*/
664  return SCIP_OKAY;
665 }
666 
667 /** information method for a parameter change of mem_arraygrowfac */
668 static
669 SCIP_DECL_PARAMCHGD(paramChgdArraygrowfac)
670 { /*lint --e{715}*/
671  SCIP_Real newarraygrowfac;
672 
673  newarraygrowfac = SCIPparamGetReal(param);
674 
675  /* change arraygrowfac */
678 
679  return SCIP_OKAY;
680 }
681 
682 /** information method for a parameter change of mem_arraygrowinit */
683 static
684 SCIP_DECL_PARAMCHGD(paramChgdArraygrowinit)
685 { /*lint --e{715}*/
686  int newarraygrowinit;
687 
688  newarraygrowinit = SCIPparamGetInt(param);
689 
690  /* change arraygrowinit */
691  BMSsetBufferMemoryArraygrowinit(SCIPbuffer(scip), newarraygrowinit);
693 
694  return SCIP_OKAY;
695 }
696 
697 /** information method for a parameter change of reopt_enable */
698 static
699 SCIP_DECL_PARAMCHGD(paramChgdEnableReopt)
700 { /*lint --e{715}*/
701  SCIP_RETCODE retcode;
702 
703  assert( scip != NULL );
704  assert( param != NULL );
705 
706  /* create or deconstruct the reoptimization data structures */
708 
709  /* an appropriate error message is already printed in the above method */
710  if( retcode == SCIP_INVALIDCALL )
712 
713  return SCIP_OKAY;
714 }
715 
716 /** information method for a parameter change of usesymmetry */
717 static
718 SCIP_DECL_PARAMCHGD(paramChgdUsesymmetry)
719 { /*lint --e{715}*/
720  assert( scip != NULL );
721  assert( param != NULL );
722 
724  {
725  if ( SCIPparamGetInt(param) > 0 )
726  {
727  SCIPerrorMessage("Cannot turn on symmetry handling during (pre)solving or change method.\n");
728  return SCIP_PARAMETERWRONGVAL;
729  }
730  }
731 
732  return SCIP_OKAY;
733 }
734 
735 /** set parameters for reoptimization */
737  SCIP_SET* set, /**< SCIP data structure */
738  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
739  )
740 {
741  assert(set != NULL);
742  assert(messagehdlr != NULL);
743 
744  if( set->reopt_enable )
745  {
746  /* disable some parts of conflict analysis */
747  SCIP_CALL( SCIPsetSetCharParam(set, messagehdlr, "conflict/useboundlp", 'o') );
748  SCIP_CALL( SCIPsetSetBoolParam(set, messagehdlr, "conflict/usepseudo", FALSE) );
749 
750  /* TODO check wheather multi aggregation can be enabled in reoptimization */
751  if( SCIPsetIsParamFixed(set, "presolving/donotmultaggr") )
752  {
753  SCIP_CALL( SCIPsetChgParamFixed(set, "presolving/donotmultaggr", FALSE) );
754  }
755  SCIP_CALL( SCIPsetSetBoolParam(set, messagehdlr, "presolving/donotmultaggr", TRUE) );
756 
757  if( SCIPsetIsParamFixed(set, "branching/nodereopt/priority") )
758  {
759  SCIP_CALL( SCIPsetChgParamFixed(set, "branching/nodereopt/priority", FALSE) );
760  }
761  SCIP_CALL( SCIPsetSetIntParam(set, messagehdlr, "branching/nodereopt/priority", INT_MAX/4) );
762  }
763  else
764  {
765  /* disable conflict analysis */
766  if( SCIPsetIsParamFixed(set, "conflict/enable") )
767  {
768  SCIP_CALL( SCIPsetChgParamFixed(set, "conflict/enable", FALSE) );
769  }
770  SCIP_CALL( SCIPsetResetParam(set, messagehdlr, "conflict/enable") );
771 
772  /* TODO check wheather multi aggregation can be enabled in reoptimization */
773  if( SCIPsetIsParamFixed(set, "presolving/donotmultaggr") )
774  {
775  SCIP_CALL( SCIPsetChgParamFixed(set, "presolving/donotmultaggr", FALSE) );
776  }
777  SCIP_CALL( SCIPsetResetParam(set, messagehdlr, "presolving/donotmultaggr") );
779  /* set priority to defeault */
780  if( SCIPsetFindBranchrule(set, "nodereopt") != NULL )
781  {
782  if( SCIPsetIsParamFixed(set, "branching/nodereopt/priority") )
783  {
784  SCIP_CALL( SCIPsetChgParamFixed(set, "branching/nodereopt/priority", FALSE) );
785  }
786  SCIP_CALL( SCIPsetResetParam(set, messagehdlr, "branching/nodereopt/priority") );
787  }
788  }
789 
790  return SCIP_OKAY;
791 }
792 
793 /** enable or disable all plugin timers depending on the value of the flag \p enabled */
795  SCIP_SET* set, /**< SCIP settings */
796  SCIP_Bool enabled /**< should plugin clocks be enabled? */
797  )
798 {
799  int i;
800 
801  assert(set != NULL);
802 
803  /* go through all plugin types and enable or disable their respective clocks */
804  for( i = set->nreaders - 1; i >= 0; --i )
805  SCIPreaderEnableOrDisableClocks(set->readers[i], enabled);
806 
807  for( i = set->npricers - 1; i >= 0; --i )
808  SCIPpricerEnableOrDisableClocks(set->pricers[i], enabled);
809 
810  for( i = set->nconshdlrs - 1; i >= 0; --i )
811  SCIPconshdlrEnableOrDisableClocks(set->conshdlrs[i], enabled);
812 
813  for( i = set->nconflicthdlrs - 1; i >= 0; --i )
814  SCIPconflicthdlrEnableOrDisableClocks(set->conflicthdlrs[i], enabled);
816  for( i = set->npresols - 1; i >= 0; --i )
817  SCIPpresolEnableOrDisableClocks(set->presols[i], enabled);
818 
819  for( i = set->nrelaxs - 1; i >= 0; --i )
820  SCIPrelaxEnableOrDisableClocks(set->relaxs[i], enabled);
821 
822  for( i = set->nsepas - 1; i >= 0; --i )
823  SCIPsepaEnableOrDisableClocks(set->sepas[i], enabled);
824 
825  for( i = set->nprops - 1; i >= 0; --i )
826  SCIPpropEnableOrDisableClocks(set->props[i], enabled);
827 
828  for( i = set->nheurs - 1; i >= 0; --i )
829  SCIPheurEnableOrDisableClocks(set->heurs[i], enabled);
830 
831  for( i = set->neventhdlrs - 1; i >= 0; --i )
832  SCIPeventhdlrEnableOrDisableClocks(set->eventhdlrs[i], enabled);
833 
834  for( i = set->nnodesels - 1; i >= 0; --i )
835  SCIPnodeselEnableOrDisableClocks(set->nodesels[i], enabled);
836 
837  for ( i = set->ncutsels - 1; i >= 0; --i )
838  SCIPcutselEnableOrDisableClocks(set->cutsels[i], enabled);
839 
840  for( i = set->nbranchrules - 1; i >= 0; --i )
841  SCIPbranchruleEnableOrDisableClocks(set->branchrules[i], enabled);
842 }
843 
844 /* method to be invoked when the parameter timing/statistictiming is changed */
845 static
846 SCIP_DECL_PARAMCHGD(paramChgdStatistictiming)
847 { /*lint --e{715}*/
849 
850  return SCIP_OKAY;
851 }
852 
853 /** copies plugins from sourcescip to targetscip; in case that a constraint handler which does not need constraints
854  * cannot be copied, valid will return FALSE. All plugins can declare that, if their copy process failed, the
855  * copied SCIP instance might not represent the same problem semantics as the original.
856  * Note that in this case dual reductions might be invalid. */
858  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
859  SCIP_SET* targetset, /**< target SCIP_SET data structure */
860  SCIP_Bool copyreaders, /**< should the file readers be copied */
861  SCIP_Bool copypricers, /**< should the variable pricers be copied */
862  SCIP_Bool copyconshdlrs, /**< should the constraint handlers be copied */
863  SCIP_Bool copyconflicthdlrs, /**< should the conflict handlers be copied */
864  SCIP_Bool copypresolvers, /**< should the presolvers be copied */
865  SCIP_Bool copyrelaxators, /**< should the relaxators be copied */
866  SCIP_Bool copyseparators, /**< should the separators be copied */
867  SCIP_Bool copycutselectors, /**< should the cut selectors be copied */
868  SCIP_Bool copypropagators, /**< should the propagators be copied */
869  SCIP_Bool copyheuristics, /**< should the heuristics be copied */
870  SCIP_Bool copyeventhdlrs, /**< should the event handlers be copied */
871  SCIP_Bool copynodeselectors, /**< should the node selectors be copied */
872  SCIP_Bool copybranchrules, /**< should the branchrules be copied */
873  SCIP_Bool copydisplays, /**< should the display columns be copied */
874  SCIP_Bool copydialogs, /**< should the dialogs be copied */
875  SCIP_Bool copytables, /**< should the statistics tables be copied */
876  SCIP_Bool copyexprhdlrs, /**< should the expression handlers be copied */
877  SCIP_Bool copynlpis, /**< should the NLP interfaces be copied */
878  SCIP_Bool* allvalid /**< pointer to store whether all plugins were validly copied */
879  )
880 {
881  int p;
882  SCIP_Bool valid;
883 
884  assert(sourceset != NULL);
885  assert(targetset != NULL);
886  assert(sourceset != targetset);
887  assert(allvalid != NULL);
888 
889  *allvalid = TRUE;
890 
891  /* copy all dialog plugins */
892  if( copydialogs && sourceset->dialogs != NULL )
893  {
894  for( p = sourceset->ndialogs - 1; p >= 0; --p )
895  {
896  /* @todo: the copying process of dialog handlers is currently not checked for consistency */
897  SCIP_CALL( SCIPdialogCopyInclude(sourceset->dialogs[p], targetset) );
898  }
899  }
900 
901  /* copy all reader plugins */
902  if( copyreaders && sourceset->readers != NULL )
903  {
904  for( p = sourceset->nreaders - 1; p >= 0; --p )
905  {
906  SCIP_CALL( SCIPreaderCopyInclude(sourceset->readers[p], targetset) );
907  }
908  }
909 
910  /* copy all variable pricer plugins */
911  if( copypricers && sourceset->pricers != NULL )
912  {
913  for( p = sourceset->npricers - 1; p >= 0; --p )
914  {
915  valid = FALSE;
916  SCIP_CALL( SCIPpricerCopyInclude(sourceset->pricers[p], targetset, &valid) );
917  *allvalid = *allvalid && valid;
918  if( SCIPpricerIsActive(sourceset->pricers[p]) )
919  {
920  SCIP_CALL( SCIPactivatePricer(targetset->scip, targetset->pricers[p]) );
921  }
922  }
923  }
924 
925  /* copy all constraint handler plugins */
926  if( copyconshdlrs && sourceset->conshdlrs_include != NULL )
927  {
928  /* copy them in order they were added to the sourcescip
929  *
930  * @note we only have to set the valid pointer to FALSE in case that a constraint handler, which does not need
931  * constraints, does not copy; in the case that a constraint handler does not copy and it needs constraint
932  * we will detect later that the problem is not valid if a constraint of that type exits
933  */
934  for( p = 0; p < sourceset->nconshdlrs; ++p )
935  {
937  {
938  valid = FALSE;
939  SCIP_CALL( SCIPconshdlrCopyInclude(sourceset->conshdlrs_include[p], targetset, &valid) );
940  *allvalid = *allvalid && valid;
941  SCIPsetDebugMsg(sourceset, "Copying conshdlr <%s> was%s valid.\n", SCIPconshdlrGetName(sourceset->conshdlrs_include[p]), valid ? "" : " not");
942  }
943  else if( !SCIPconshdlrNeedsCons(sourceset->conshdlrs_include[p]) )
944  {
945  SCIPsetDebugMsg(sourceset, "Copying Conshdlr <%s> without constraints not valid.\n", SCIPconshdlrGetName(sourceset->conshdlrs_include[p]));
946  *allvalid = FALSE;
947  }
948  }
949  }
950 
951  /* copy all conflict handler plugins */
952  if( copyconflicthdlrs && sourceset->conflicthdlrs != NULL )
953  {
954  for( p = sourceset->nconflicthdlrs - 1; p >= 0; --p )
955  {
956  SCIP_CALL( SCIPconflicthdlrCopyInclude(sourceset->conflicthdlrs[p], targetset) );
957  }
958  }
959 
960  /* copy all presolver plugins */
961  if( copypresolvers && sourceset->presols != NULL )
962  {
963  for( p = sourceset->npresols - 1; p >= 0; --p )
964  {
965  SCIP_CALL( SCIPpresolCopyInclude(sourceset->presols[p], targetset) );
966  }
967  }
968 
969  /* copy all relaxator plugins */
970  if( copyrelaxators && sourceset->relaxs != NULL )
971  {
972  for( p = sourceset->nrelaxs - 1; p >= 0; --p )
973  {
974  SCIP_CALL( SCIPrelaxCopyInclude(sourceset->relaxs[p], targetset) );
975  }
976  }
977 
978  /* copy all separator plugins */
979  if( copyseparators && sourceset->sepas != NULL )
980  {
981  for( p = sourceset->nsepas - 1; p >= 0; --p )
982  {
983  SCIP_CALL( SCIPsepaCopyInclude(sourceset->sepas[p], targetset) );
984  }
985  }
986 
987  /* copy all cut selector plugins */
988  if( copycutselectors && sourceset->cutsels != NULL )
989  {
990  for( p = sourceset->ncutsels - 1; p >= 0; --p )
991  {
992  SCIP_CALL( SCIPcutselCopyInclude(sourceset->cutsels[p], targetset) );
993  }
994  }
995 
996  /* copy all propagators plugins */
997  if( copypropagators && sourceset->props != NULL )
998  {
999  for( p = sourceset->nprops - 1; p >= 0; --p )
1000  {
1001  SCIP_CALL( SCIPpropCopyInclude(sourceset->props[p], targetset) );
1002  }
1003  }
1004 
1005  /* copy all primal heuristics plugins */
1006  if( copyheuristics && sourceset->heurs != NULL )
1007  {
1008  for( p = sourceset->nheurs - 1; p >= 0; --p )
1009  {
1010  SCIP_CALL( SCIPheurCopyInclude(sourceset->heurs[p], targetset) );
1011  }
1012  }
1013 
1014  /* copy all event handler plugins */
1015  if( copyeventhdlrs && sourceset->eventhdlrs != NULL )
1016  {
1017  for( p = sourceset->neventhdlrs - 1; p >= 0; --p )
1018  {
1019  /* @todo: the copying process of event handlers is currently not checked for consistency */
1020  SCIP_CALL( SCIPeventhdlrCopyInclude(sourceset->eventhdlrs[p], targetset) );
1021  }
1022  }
1023 
1024  /* copy all node selector plugins */
1025  if( copynodeselectors && sourceset->nodesels != NULL )
1026  {
1027  for( p = sourceset->nnodesels - 1; p >= 0; --p )
1028  {
1029  SCIP_CALL( SCIPnodeselCopyInclude(sourceset->nodesels[p], targetset) );
1030  }
1031  }
1032 
1033  /* copy all branchrule plugins */
1034  if( copybranchrules && sourceset->branchrules != NULL )
1035  {
1036  for( p = sourceset->nbranchrules - 1; p >= 0; --p )
1037  {
1038  SCIP_CALL( SCIPbranchruleCopyInclude(sourceset->branchrules[p], targetset) );
1039  }
1040  }
1041 
1042  /* copy all display plugins */
1043  if( copydisplays && sourceset->disps != NULL )
1044  {
1045  for( p = sourceset->ndisps - 1; p >= 0; --p )
1046  {
1047  SCIP_CALL( SCIPdispCopyInclude(sourceset->disps[p], targetset) );
1048  }
1049  }
1050 
1051  /* copy all table plugins */
1052  if( copytables && sourceset->tables != NULL )
1053  {
1054  for( p = sourceset->ntables - 1; p >= 0; --p )
1055  {
1056  SCIP_CALL( SCIPtableCopyInclude(sourceset->tables[p], targetset) );
1057  }
1058  }
1059 
1060  /* copy all expression handlers */
1061  if( copyexprhdlrs && sourceset->exprhdlrs != NULL )
1062  {
1063  for( p = sourceset->nexprhdlrs - 1; p >= 0; --p )
1064  {
1065  SCIP_CALL( SCIPexprhdlrCopyInclude(sourceset->exprhdlrs[p], targetset) );
1066  }
1067  }
1068 
1069  /* copy all NLP interfaces */
1070  if( copynlpis && sourceset->nlpis != NULL )
1071  {
1072  for( p = sourceset->nnlpis - 1; p >= 0; --p )
1073  {
1074  SCIP_CALL( SCIPnlpiCopyInclude(sourceset->nlpis[p], targetset) );
1075  }
1076  }
1077 
1078  return SCIP_OKAY;
1079 }
1080 
1081 
1082 /** copies parameters from sourcescip to targetscip */
1084  SCIP_SET* sourceset, /**< source SCIP_SET data structure */
1085  SCIP_SET* targetset, /**< target SCIP_SET data structure */
1086  SCIP_MESSAGEHDLR* messagehdlr /**< message handler of target SCIP */
1087  )
1088 {
1089  assert(sourceset != NULL);
1090  assert(targetset != NULL);
1091  assert(sourceset != targetset);
1092  assert(targetset->scip != NULL);
1093 
1094  SCIP_CALL( SCIPparamsetCopyParams(sourceset->paramset, targetset->paramset, targetset, messagehdlr) );
1095 
1096  return SCIP_OKAY;
1097 }
1098 
1099 /** creates global SCIP settings */
1101  SCIP_SET** set, /**< pointer to SCIP settings */
1102  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
1103  BMS_BLKMEM* blkmem, /**< block memory */
1104  SCIP* scip /**< SCIP data structure */
1105  )
1106 {
1107  assert(set != NULL);
1108  assert(scip != NULL);
1109 
1110  SCIP_ALLOC( BMSallocMemory(set) );
1111 
1112  (*set)->stage = SCIP_STAGE_INIT;
1113  (*set)->scip = scip;
1114  (*set)->buffer = SCIPbuffer(scip);
1115  (*set)->cleanbuffer = SCIPcleanbuffer(scip);
1116 
1117  SCIP_CALL( SCIPparamsetCreate(&(*set)->paramset, blkmem) );
1118 
1119  (*set)->readers = NULL;
1120  (*set)->nreaders = 0;
1121  (*set)->readerssize = 0;
1122  (*set)->pricers = NULL;
1123  (*set)->npricers = 0;
1124  (*set)->nactivepricers = 0;
1125  (*set)->pricerssize = 0;
1126  (*set)->pricerssorted = FALSE;
1127  (*set)->pricersnamesorted = FALSE;
1128  (*set)->conshdlrs = NULL;
1129  (*set)->conshdlrs_sepa = NULL;
1130  (*set)->conshdlrs_enfo = NULL;
1131  (*set)->conshdlrs_include = NULL;
1132  (*set)->nconshdlrs = 0;
1133  (*set)->conshdlrssize = 0;
1134  (*set)->conflicthdlrs = NULL;
1135  (*set)->nconflicthdlrs = 0;
1136  (*set)->conflicthdlrssize = 0;
1137  (*set)->conflicthdlrssorted = FALSE;
1138  (*set)->conflicthdlrsnamesorted = FALSE;
1139  (*set)->benders = NULL;
1140  (*set)->nbenders = 0;
1141  (*set)->nactivebenders = 0;
1142  (*set)->benderssize = 0;
1143  (*set)->benderssorted = FALSE;
1144  (*set)->bendersnamesorted = FALSE;
1145 
1146  (*set)->debugsoldata = NULL;
1147  SCIP_CALL( SCIPdebugSolDataCreate(&(*set)->debugsoldata) ); /*lint !e506 !e774*/
1148 
1149  (*set)->presols = NULL;
1150  (*set)->npresols = 0;
1151  (*set)->presolssize = 0;
1152  (*set)->presolssorted = FALSE;
1153  (*set)->presolsnamesorted = FALSE;
1154  (*set)->relaxs = NULL;
1155  (*set)->nrelaxs = 0;
1156  (*set)->relaxssize = 0;
1157  (*set)->relaxssorted = FALSE;
1158  (*set)->relaxsnamesorted = FALSE;
1159  (*set)->sepas = NULL;
1160  (*set)->nsepas = 0;
1161  (*set)->sepassize = 0;
1162  (*set)->sepassorted = FALSE;
1163  (*set)->sepasnamesorted = FALSE;
1164  (*set)->props = NULL;
1165  (*set)->props_presol = NULL;
1166  (*set)->nprops = 0;
1167  (*set)->propssize = 0;
1168  (*set)->propssorted = FALSE;
1169  (*set)->propspresolsorted = FALSE;
1170  (*set)->propsnamesorted = FALSE;
1171  (*set)->concsolvertypes = NULL;
1172  (*set)->nconcsolvertypes = 0;
1173  (*set)->concsolvertypessize = 0;
1174  (*set)->concsolvers = NULL;
1175  (*set)->nconcsolvers = 0;
1176  (*set)->concsolverssize = 0;
1177  (*set)->concurrent_paramsetprefix = NULL;
1178  (*set)->cutsels = NULL;
1179  (*set)->ncutsels = 0;
1180  (*set)->cutselssize = 0;
1181  (*set)->cutselssorted = FALSE;
1182  (*set)->heurs = NULL;
1183  (*set)->nheurs = 0;
1184  (*set)->heurssize = 0;
1185  (*set)->heurssorted = FALSE;
1186  (*set)->heursnamesorted = FALSE;
1187  (*set)->comprs = NULL;
1188  (*set)->ncomprs = 0;
1189  (*set)->comprssize = 0;
1190  (*set)->comprssorted = FALSE;
1191  (*set)->comprsnamesorted = FALSE;
1192  (*set)->eventhdlrs = NULL;
1193  (*set)->neventhdlrs = 0;
1194  (*set)->eventhdlrssize = 0;
1195  (*set)->nodesels = NULL;
1196  (*set)->nnodesels = 0;
1197  (*set)->nodeselssize = 0;
1198  (*set)->nodesel = NULL;
1199  (*set)->branchrules = NULL;
1200  (*set)->nbranchrules = 0;
1201  (*set)->branchrulessize = 0;
1202  (*set)->branchrulessorted = FALSE;
1203  (*set)->branchrulesnamesorted = FALSE;
1204  (*set)->banditvtables = NULL;
1205  (*set)->banditvtablessize = 0;
1206  (*set)->nbanditvtables = 0;
1207  (*set)->disps = NULL;
1208  (*set)->ndisps = 0;
1209  (*set)->dispssize = 0;
1210  (*set)->tables = NULL;
1211  (*set)->ntables = 0;
1212  (*set)->tablessize = 0;
1213  (*set)->tablessorted = FALSE;
1214  (*set)->dialogs = NULL;
1215  (*set)->ndialogs = 0;
1216  (*set)->dialogssize = 0;
1217  (*set)->exprhdlrs = NULL;
1218  (*set)->exprhdlrvar = NULL;
1219  (*set)->exprhdlrval = NULL;
1220  (*set)->exprhdlrsum = NULL;
1221  (*set)->exprhdlrproduct = NULL;
1222  (*set)->exprhdlrpow = NULL;
1223  (*set)->nexprhdlrs = 0;
1224  (*set)->exprhdlrssize = 0;
1225  (*set)->exprhdlrssorted = FALSE;
1226  (*set)->nlpis = NULL;
1227  (*set)->nnlpis = 0;
1228  (*set)->nlpissize = 0;
1229  (*set)->nlpissorted = FALSE;
1230  (*set)->limitchanged = FALSE;
1231  (*set)->subscipsoff = FALSE;
1232  (*set)->extcodenames = NULL;
1233  (*set)->extcodedescs = NULL;
1234  (*set)->nextcodes = 0;
1235  (*set)->extcodessize = 0;
1236  (*set)->visual_vbcfilename = NULL;
1237  (*set)->visual_bakfilename = NULL;
1238  (*set)->nlp_solver = NULL;
1239  (*set)->nlp_disable = FALSE;
1240  (*set)->num_relaxfeastol = SCIP_INVALID;
1241  (*set)->misc_debugsol = NULL;
1242 
1243  /* the default time limit is infinite */
1244  (*set)->istimelimitfinite = FALSE;
1245 
1246  /* branching parameters */
1247  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1248  "branching/scorefunc",
1249  "branching score function ('s'um, 'p'roduct, 'q'uotient)",
1250  &(*set)->branch_scorefunc, TRUE, SCIP_DEFAULT_BRANCH_SCOREFUNC, "spq",
1251  NULL, NULL) );
1252  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1253  "branching/scorefac",
1254  "branching score factor to weigh downward and upward gain prediction in sum score function",
1255  &(*set)->branch_scorefac, TRUE, SCIP_DEFAULT_BRANCH_SCOREFAC, 0.0, 1.0,
1256  NULL, NULL) );
1257  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1258  "branching/preferbinary",
1259  "should branching on binary variables be preferred?",
1260  &(*set)->branch_preferbinary, FALSE, SCIP_DEFAULT_BRANCH_PREFERBINARY,
1261  NULL, NULL) );
1262  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1263  "branching/clamp",
1264  "minimal relative distance of branching point to bounds when branching on a continuous variable",
1265  &(*set)->branch_clamp, FALSE, SCIP_DEFAULT_BRANCH_CLAMP, 0.0, 0.5,
1266  NULL, NULL) );
1267  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1268  "branching/midpull",
1269  "fraction by which to move branching point of a continuous variable towards the middle of the domain; a value of 1.0 leads to branching always in the middle of the domain",
1270  &(*set)->branch_midpull, FALSE, SCIP_DEFAULT_BRANCH_MIDPULL, 0.0, 1.0,
1271  NULL, NULL) );
1272  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1273  "branching/midpullreldomtrig",
1274  "multiply midpull by relative domain width if the latter is below this value",
1275  &(*set)->branch_midpullreldomtrig, FALSE, SCIP_DEFAULT_BRANCH_MIDPULLRELDOMTRIG, 0.0, 1.0,
1276  NULL, NULL) );
1277  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1278  "branching/lpgainnormalize",
1279  "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)",
1280  &(*set)->branch_lpgainnorm, FALSE, SCIP_DEFAULT_BRANCH_LPGAINNORMALIZE, "dls",
1281  NULL, NULL) );
1282  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1283  "branching/delaypscostupdate",
1284  "should updating pseudo costs for continuous variables be delayed to the time after separation?",
1285  &(*set)->branch_delaypscost, FALSE, SCIP_DEFAULT_BRANCH_DELAYPSCOST,
1286  NULL, NULL) );
1287  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1288  "branching/divingpscost",
1289  "should pseudo costs be updated also in diving and probing mode?",
1290  &(*set)->branch_divingpscost, FALSE, SCIP_DEFAULT_BRANCH_DIVINGPSCOST,
1291  NULL, NULL) );
1292  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1293  "branching/forceallchildren",
1294  "should all strong branching children be regarded even if one is detected to be infeasible? (only with propagation)",
1295  &(*set)->branch_forceall, TRUE, SCIP_DEFAULT_BRANCH_FORCEALL,
1296  NULL, NULL) );
1297  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1298  "branching/firstsbchild",
1299  "child node to be regarded first during strong branching (only with propagation): 'u'p child, 'd'own child, 'h'istory-based, or 'a'utomatic",
1300  &(*set)->branch_firstsbchild, TRUE, SCIP_DEFAULT_BRANCH_FIRSTSBCHILD, "aduh",
1301  NULL, NULL) );
1302  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1303  "branching/checksol",
1304  "should LP solutions during strong branching with propagation be checked for feasibility?",
1305  &(*set)->branch_checksbsol, TRUE, SCIP_DEFAULT_BRANCH_CHECKSBSOL,
1306  NULL, NULL) );
1307  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1308  "branching/roundsbsol",
1309  "should LP solutions during strong branching with propagation be rounded? (only when checksbsol=TRUE)",
1310  &(*set)->branch_roundsbsol, TRUE, SCIP_DEFAULT_BRANCH_ROUNDSBSOL,
1311  NULL, NULL) );
1312  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1313  "branching/sumadjustscore",
1314  "score adjustment near zero by adding epsilon (TRUE) or using maximum (FALSE)",
1315  &(*set)->branch_sumadjustscore, TRUE, SCIP_DEFAULT_BRANCH_SUMADJUSTSCORE,
1316  NULL, NULL) );
1317 
1318  /* tree compression parameters */
1319  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1320  "compression/enable",
1321  "should automatic tree compression after the presolving be enabled?",
1322  &(*set)->compr_enable, TRUE, SCIP_DEFAULT_COMPR_ENABLE,
1323  NULL, NULL) );
1324 
1325  /* conflict analysis parameters */
1326  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1327  "conflict/enable",
1328  "should conflict analysis be enabled?",
1329  &(*set)->conf_enable, FALSE, SCIP_DEFAULT_CONF_ENABLE,
1330  NULL, NULL) );
1331  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1332  "conflict/cleanboundexceedings",
1333  "should conflicts based on an old cutoff bound be removed from the conflict pool after improving the primal bound?",
1334  &(*set)->conf_cleanbnddepend, TRUE, SCIP_DEFAULT_CONF_CLEANBNDDEPEND,
1335  NULL, NULL) );
1336  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1337  "conflict/uselocalrows",
1338  "use local rows to construct infeasibility proofs",
1339  &(*set)->conf_uselocalrows, TRUE, SCIP_DEFAULT_CONF_USELOCALROWS,
1340  NULL, NULL) );
1341  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1342  "conflict/useprop",
1343  "should propagation conflict analysis be used?",
1344  &(*set)->conf_useprop, FALSE, SCIP_DEFAULT_CONF_USEPROP,
1345  NULL, NULL) );
1346  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1347  "conflict/useinflp",
1348  "should infeasible LP conflict analysis be used? ('o'ff, 'c'onflict graph, 'd'ual ray, 'b'oth conflict graph and dual ray)",
1349  &(*set)->conf_useinflp, FALSE, SCIP_DEFAULT_CONF_USEINFLP, "ocdb",
1350  NULL, NULL) );
1351  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1352  "conflict/useboundlp",
1353  "should bound exceeding LP conflict analysis be used? ('o'ff, 'c'onflict graph, 'd'ual ray, 'b'oth conflict graph and dual ray)",
1354  &(*set)->conf_useboundlp, FALSE, SCIP_DEFAULT_CONF_USEBOUNDLP, "ocdb",
1355  NULL, NULL) );
1356  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1357  "conflict/usesb",
1358  "should infeasible/bound exceeding strong branching conflict analysis be used?",
1359  &(*set)->conf_usesb, FALSE, SCIP_DEFAULT_CONF_USESB,
1360  NULL, NULL) );
1361  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1362  "conflict/usepseudo",
1363  "should pseudo solution conflict analysis be used?",
1364  &(*set)->conf_usepseudo, FALSE, SCIP_DEFAULT_CONF_USEPSEUDO,
1365  NULL, NULL) );
1366  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1367  "conflict/maxvarsfac",
1368  "maximal fraction of variables involved in a conflict constraint",
1369  &(*set)->conf_maxvarsfac, TRUE, SCIP_DEFAULT_CONF_MAXVARSFAC, 0.0, SCIP_REAL_MAX,
1370  NULL, NULL) );
1371  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1372  "conflict/minmaxvars",
1373  "minimal absolute maximum of variables involved in a conflict constraint",
1374  &(*set)->conf_minmaxvars, TRUE, SCIP_DEFAULT_CONF_MINMAXVARS, 0, INT_MAX,
1375  NULL, NULL) );
1376  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1377  "conflict/maxlploops",
1378  "maximal number of LP resolving loops during conflict analysis (-1: no limit)",
1379  &(*set)->conf_maxlploops, TRUE, SCIP_DEFAULT_CONF_MAXLPLOOPS, -1, INT_MAX,
1380  NULL, NULL) );
1381  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1382  "conflict/lpiterations",
1383  "maximal number of LP iterations in each LP resolving loop (-1: no limit)",
1384  &(*set)->conf_lpiterations, TRUE, SCIP_DEFAULT_CONF_LPITERATIONS, -1, INT_MAX,
1385  NULL, NULL) );
1386  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1387  "conflict/fuiplevels",
1388  "number of depth levels up to which first UIP's are used in conflict analysis (-1: use All-FirstUIP rule)",
1389  &(*set)->conf_fuiplevels, TRUE, SCIP_DEFAULT_CONF_FUIPLEVELS, -1, INT_MAX,
1390  NULL, NULL) );
1391  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1392  "conflict/interconss",
1393  "maximal number of intermediate conflict constraints generated in conflict graph (-1: use every intermediate constraint)",
1394  &(*set)->conf_interconss, TRUE, SCIP_DEFAULT_CONF_INTERCONSS, -1, INT_MAX,
1395  NULL, NULL) );
1396  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1397  "conflict/reconvlevels",
1398  "number of depth levels up to which UIP reconvergence constraints are generated (-1: generate reconvergence constraints in all depth levels)",
1399  &(*set)->conf_reconvlevels, TRUE, SCIP_DEFAULT_CONF_RECONVLEVELS, -1, INT_MAX,
1400  NULL, NULL) );
1401  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1402  "conflict/maxconss",
1403  "maximal number of conflict constraints accepted at an infeasible node (-1: use all generated conflict constraints)",
1404  &(*set)->conf_maxconss, TRUE, SCIP_DEFAULT_CONF_MAXCONSS, -1, INT_MAX,
1405  NULL, NULL) );
1406  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1407  "conflict/maxstoresize",
1408  "maximal size of conflict store (-1: auto, 0: disable storage)",
1409  &(*set)->conf_maxstoresize, TRUE, SCIP_DEFAULT_CONF_MAXSTORESIZE, -1, INT_MAX,
1410  NULL, NULL) );
1411  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1412  "conflict/preferbinary",
1413  "should binary conflicts be preferred?",
1414  &(*set)->conf_preferbinary, FALSE, SCIP_DEFAULT_CONF_PREFERBINARY,
1415  NULL, NULL) );
1416  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1417  "conflict/prefinfproof",
1418  "prefer infeasibility proof to boundexceeding proof",
1419  &(*set)->conf_prefinfproof, TRUE, SCIP_DEFAULT_CONF_PREFINFPROOF,
1420  NULL, NULL) );
1421  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1422  "conflict/allowlocal",
1423  "should conflict constraints be generated that are only valid locally?",
1424  &(*set)->conf_allowlocal, TRUE, SCIP_DEFAULT_CONF_ALLOWLOCAL,
1425  NULL, NULL) );
1426  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1427  "conflict/settlelocal",
1428  "should conflict constraints be attached only to the local subtree where they can be useful?",
1429  &(*set)->conf_settlelocal, TRUE, SCIP_DEFAULT_CONF_SETTLELOCAL,
1430  NULL, NULL) );
1431  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1432  "conflict/repropagate",
1433  "should earlier nodes be repropagated in order to replace branching decisions by deductions?",
1434  &(*set)->conf_repropagate, TRUE, SCIP_DEFAULT_CONF_REPROPAGATE,
1435  NULL, NULL) );
1436  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1437  "conflict/keepreprop",
1438  "should constraints be kept for repropagation even if they are too long?",
1439  &(*set)->conf_keepreprop, TRUE, SCIP_DEFAULT_CONF_KEEPREPROP,
1440  NULL, NULL) );
1441  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1442  "conflict/separate",
1443  "should the conflict constraints be separated?",
1444  &(*set)->conf_separate, TRUE, SCIP_DEFAULT_CONF_SEPARATE,
1445  NULL, NULL) );
1446  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1447  "conflict/dynamic",
1448  "should the conflict constraints be subject to aging?",
1449  &(*set)->conf_dynamic, TRUE, SCIP_DEFAULT_CONF_DYNAMIC,
1450  NULL, NULL) );
1451  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1452  "conflict/removable",
1453  "should the conflict's relaxations be subject to LP aging and cleanup?",
1454  &(*set)->conf_removable, TRUE, SCIP_DEFAULT_CONF_REMOVEABLE,
1455  NULL, NULL) );
1456  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1457  "conflict/graph/depthscorefac",
1458  "score factor for depth level in bound relaxation heuristic",
1459  &(*set)->conf_depthscorefac, TRUE, SCIP_DEFAULT_CONF_DEPTHSCOREFAC, SCIP_REAL_MIN, SCIP_REAL_MAX,
1460  NULL, NULL) );
1461  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1462  "conflict/proofscorefac",
1463  "score factor for impact on acticity in bound relaxation heuristic",
1464  &(*set)->conf_proofscorefac, TRUE, SCIP_DEFAULT_CONF_PROOFSCOREFAC, SCIP_REAL_MIN, SCIP_REAL_MAX,
1465  NULL, NULL) );
1466  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1467  "conflict/uplockscorefac",
1468  "score factor for up locks in bound relaxation heuristic",
1469  &(*set)->conf_uplockscorefac, TRUE, SCIP_DEFAULT_CONF_UPLOCKSCOREFAC, SCIP_REAL_MIN, SCIP_REAL_MAX,
1470  NULL, NULL) );
1471  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1472  "conflict/downlockscorefac",
1473  "score factor for down locks in bound relaxation heuristic",
1474  &(*set)->conf_downlockscorefac, TRUE, SCIP_DEFAULT_CONF_DOWNLOCKSCOREFAC, SCIP_REAL_MIN, SCIP_REAL_MAX,
1475  NULL, NULL) );
1476  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1477  "conflict/scorefac",
1478  "factor to decrease importance of variables' earlier conflict scores",
1479  &(*set)->conf_scorefac, TRUE, SCIP_DEFAULT_CONF_SCOREFAC, 1e-6, 1.0,
1480  NULL, NULL) );
1481  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1482  "conflict/restartnum",
1483  "number of successful conflict analysis calls that trigger a restart (0: disable conflict restarts)",
1484  &(*set)->conf_restartnum, FALSE, SCIP_DEFAULT_CONF_RESTARTNUM, 0, INT_MAX,
1485  NULL, NULL) );
1486  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1487  "conflict/restartfac",
1488  "factor to increase restartnum with after each restart",
1489  &(*set)->conf_restartfac, FALSE, SCIP_DEFAULT_CONF_RESTARTFAC, 0.0, SCIP_REAL_MAX,
1490  NULL, NULL) );
1491  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1492  "conflict/ignorerelaxedbd",
1493  "should relaxed bounds be ignored?",
1494  &(*set)->conf_ignorerelaxedbd, TRUE, SCIP_DEFAULT_CONF_IGNORERELAXEDBD,
1495  NULL, NULL) );
1496  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1497  "conflict/maxvarsdetectimpliedbounds",
1498  "maximal number of variables to try to detect global bound implications and shorten the whole conflict set (0: disabled)",
1499  &(*set)->conf_maxvarsdetectimpliedbounds, TRUE, SCIP_DEFAULT_CONF_MAXVARSDETECTIMPLIEDBOUNDS, 0, INT_MAX,
1500  NULL, NULL) );
1501  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1502  "conflict/fullshortenconflict",
1503  "try to shorten the whole conflict set or terminate early (depending on the 'maxvarsdetectimpliedbounds' parameter)",
1504  &(*set)->conf_fullshortenconflict, TRUE, SCIP_DEFAULT_CONF_FULLSHORTENCONFLICT,
1505  NULL, NULL) );
1506  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1507  "conflict/conflictweight",
1508  "the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict",
1509  &(*set)->conf_conflictweight, FALSE, SCIP_DEFAULT_CONF_CONFLITWEIGHT, 0.0, 1.0,
1510  NULL, NULL) );
1511  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1512  "conflict/conflictgraphweight",
1513  "the weight the VSIDS score is weight by updating the VSIDS for a variable if it is part of a conflict graph",
1514  &(*set)->conf_conflictgraphweight, FALSE, SCIP_DEFAULT_CONF_CONFLITGRAPHWEIGHT, 0.0, 1.0,
1515  NULL, NULL) );
1516  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1517  "conflict/minimprove",
1518  "minimal improvement of primal bound to remove conflicts based on a previous incumbent",
1519  &(*set)->conf_minimprove, TRUE, SCIP_DEFAULT_CONF_MINIMPROVE, 0.0, 1.0, NULL, NULL) );
1520  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1521  "conflict/weightsize",
1522  "weight of the size of a conflict used in score calculation",
1523  &(*set)->conf_weightsize, TRUE, SCIP_DEFAULT_CONF_WEIGHTSIZE, 0.0, 1.0, NULL, NULL) );
1524  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1525  "conflict/weightrepropdepth",
1526  "weight of the repropagation depth of a conflict used in score calculation",
1527  &(*set)->conf_weightrepropdepth, TRUE, SCIP_DEFAULT_CONF_WEIGHTREPROPDEPTH, 0.0, 1.0, NULL, NULL) );
1528  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1529  "conflict/weightvaliddepth",
1530  "weight of the valid depth of a conflict used in score calculation",
1531  &(*set)->conf_weightvaliddepth, TRUE, SCIP_DEFAULT_CONF_WEIGHTVALIDDEPTH, 0.0, 1.0, NULL, NULL) );
1532  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1533  "conflict/sepaaltproofs",
1534  "apply cut generating functions to construct alternative proofs",
1535  &(*set)->conf_sepaaltproofs, FALSE, SCIP_DEFAULT_CONF_SEPAALTPROOFS,
1536  NULL, NULL) );
1537 
1538  /* constraint parameters */
1539  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1540  "constraints/agelimit",
1541  "maximum age an unnecessary constraint can reach before it is deleted (0: dynamic, -1: keep all constraints)",
1542  &(*set)->cons_agelimit, TRUE, SCIP_DEFAULT_CONS_AGELIMIT, -1, INT_MAX,
1543  NULL, NULL) );
1544  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1545  "constraints/obsoleteage",
1546  "age of a constraint after which it is marked obsolete (0: dynamic, -1 do not mark constraints obsolete)",
1547  &(*set)->cons_obsoleteage, TRUE, SCIP_DEFAULT_CONS_OBSOLETEAGE, -1, INT_MAX,
1548  NULL, NULL) );
1549  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1550  "constraints/disableenfops",
1551  "should enforcement of pseudo solution be disabled?",
1552  &(*set)->cons_disableenfops, TRUE, SCIP_DEFAULT_CONS_DISABLEENFOPS,
1553  NULL, NULL) );
1554 
1555  /* display parameters */
1556  assert(sizeof(int) == sizeof(SCIP_VERBLEVEL)); /*lint !e506*/
1557  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1558  "display/verblevel",
1559  "verbosity level of output",
1560  (int*)&(*set)->disp_verblevel, FALSE, (int)SCIP_DEFAULT_DISP_VERBLEVEL,
1562  NULL, NULL) );
1563  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1564  "display/width",
1565  "maximal number of characters in a node information line",
1566  &(*set)->disp_width, FALSE, SCIP_DEFAULT_DISP_WIDTH, 0, INT_MAX,
1567  SCIPparamChgdDispWidth, NULL) );
1568  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1569  "display/freq",
1570  "frequency for displaying node information lines",
1571  &(*set)->disp_freq, FALSE, SCIP_DEFAULT_DISP_FREQ, -1, INT_MAX,
1572  NULL, NULL) );
1573  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1574  "display/headerfreq",
1575  "frequency for displaying header lines (every n'th node information line)",
1576  &(*set)->disp_headerfreq, FALSE, SCIP_DEFAULT_DISP_HEADERFREQ, -1, INT_MAX,
1577  NULL, NULL) );
1578  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1579  "display/lpinfo",
1580  "should the LP solver display status messages?",
1581  &(*set)->disp_lpinfo, FALSE, SCIP_DEFAULT_DISP_LPINFO,
1582  NULL, NULL) );
1583  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1584  "display/allviols",
1585  "display all violations for a given start solution / the best solution after the solving process?",
1586  &(*set)->disp_allviols, FALSE, SCIP_DEFAULT_DISP_ALLVIOLS,
1587  NULL, NULL) );
1588  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1589  "display/relevantstats",
1590  "should the relevant statistics be displayed at the end of solving?",
1591  &(*set)->disp_relevantstats, FALSE, SCIP_DEFAULT_DISP_RELEVANTSTATS,
1592  NULL, NULL) );
1593 
1594  /* heuristic parameters */
1595  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1596  "heuristics/useuctsubscip",
1597  "should setting of common subscip parameters include the activation of the UCT node selector?",
1598  &(*set)->heur_useuctsubscip, TRUE, SCIP_DEFAULT_HEUR_USEUCTSUBSCIP, NULL, NULL) );
1599 
1600  /* history parameters */
1601  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1602  "history/valuebased",
1603  "should statistics be collected for variable domain value pairs?",
1604  &(*set)->history_valuebased, FALSE, SCIP_DEFAULT_HISTORY_VALUEBASED,
1605  NULL, NULL) );
1606  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1607  "history/allowmerge",
1608  "should variable histories be merged from sub-SCIPs whenever possible?",
1609  &(*set)->history_allowmerge, FALSE, SCIP_DEFAULT_HISTORY_ALLOWMERGE,
1610  NULL, NULL) );
1611  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1612  "history/allowtransfer",
1613  "should variable histories be transferred to initialize SCIP copies?",
1614  &(*set)->history_allowtransfer, FALSE, SCIP_DEFAULT_HISTORY_ALLOWTRANSFER,
1615  NULL, NULL) );
1616 
1617  /* limit parameters */
1618  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1619  "limits/time",
1620  "maximal time in seconds to run",
1621  &(*set)->limit_time, FALSE, SCIP_DEFAULT_LIMIT_TIME, 0.0, SCIP_DEFAULT_LIMIT_TIME,
1622  SCIPparamChgdLimit, NULL) );
1623  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1624  "limits/nodes",
1625  "maximal number of nodes to process (-1: no limit)",
1626  &(*set)->limit_nodes, FALSE, SCIP_DEFAULT_LIMIT_NODES, -1LL, SCIP_LONGINT_MAX,
1627  SCIPparamChgdLimit, NULL) );
1628  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1629  "limits/totalnodes",
1630  "maximal number of total nodes (incl. restarts) to process (-1: no limit)",
1631  &(*set)->limit_totalnodes, FALSE, SCIP_DEFAULT_LIMIT_NODES, -1LL, SCIP_LONGINT_MAX,
1632  SCIPparamChgdLimit, NULL) );
1633  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1634  "limits/stallnodes",
1635  "solving stops, if the given number of nodes was processed since the last improvement of the primal solution value (-1: no limit)",
1636  &(*set)->limit_stallnodes, FALSE, SCIP_DEFAULT_LIMIT_STALLNODES, -1LL, SCIP_LONGINT_MAX,
1637  SCIPparamChgdLimit, NULL) );
1638  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1639  "limits/memory",
1640  "maximal memory usage in MB; reported memory usage is lower than real memory usage!",
1641  &(*set)->limit_memory, FALSE, (SCIP_Real)SCIP_DEFAULT_LIMIT_MEMORY, 0.0, (SCIP_Real)SCIP_MEM_NOLIMIT,
1642  SCIPparamChgdLimit, NULL) );
1643  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1644  "limits/gap",
1645  "solving stops, if the relative gap = |primal - dual|/MIN(|dual|,|primal|) is below the given value, the gap is 'Infinity', if primal and dual bound have opposite signs",
1646  &(*set)->limit_gap, FALSE, SCIP_DEFAULT_LIMIT_GAP, 0.0, SCIP_REAL_MAX,
1647  SCIPparamChgdLimit, NULL) );
1648  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1649  "limits/absgap",
1650  "solving stops, if the absolute gap = |primalbound - dualbound| is below the given value",
1651  &(*set)->limit_absgap, FALSE, SCIP_DEFAULT_LIMIT_ABSGAP, 0.0, SCIP_REAL_MAX,
1652  SCIPparamChgdLimit, NULL) );
1653  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1654  "limits/solutions",
1655  "solving stops, if the given number of solutions were found (-1: no limit)",
1656  &(*set)->limit_solutions, FALSE, SCIP_DEFAULT_LIMIT_SOLUTIONS, -1, INT_MAX,
1657  SCIPparamChgdLimit, NULL) );
1658  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1659  "limits/bestsol",
1660  "solving stops, if the given number of solution improvements were found (-1: no limit)",
1661  &(*set)->limit_bestsol, FALSE, SCIP_DEFAULT_LIMIT_BESTSOL, -1, INT_MAX,
1662  SCIPparamChgdLimit, NULL) );
1663  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1664  "limits/maxsol",
1665  "maximal number of solutions to store in the solution storage",
1666  &(*set)->limit_maxsol, FALSE, SCIP_DEFAULT_LIMIT_MAXSOL, 1, INT_MAX,
1667  SCIPparamChgdLimit, NULL) );
1668  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1669  "limits/maxorigsol",
1670  "maximal number of solutions candidates to store in the solution storage of the original problem",
1671  &(*set)->limit_maxorigsol, FALSE, SCIP_DEFAULT_LIMIT_MAXORIGSOL, 0, INT_MAX,
1672  SCIPparamChgdLimit, NULL) );
1673  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1674  "limits/restarts",
1675  "solving stops, if the given number of restarts was triggered (-1: no limit)",
1676  &(*set)->limit_restarts, FALSE, SCIP_DEFAULT_LIMIT_RESTARTS, -1, INT_MAX,
1677  SCIPparamChgdLimit, NULL) );
1678 
1679  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1680  "limits/autorestartnodes",
1681  "if solve exceeds this number of nodes for the first time, an automatic restart is triggered (-1: no automatic restart)",
1682  &(*set)->limit_autorestartnodes, FALSE, SCIP_DEFAULT_LIMIT_AUTORESTARTNODES, -1, INT_MAX,
1683  SCIPparamChgdLimit, NULL) );
1684 
1685  /* LP parameters */
1686  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1687  "lp/solvefreq",
1688  "frequency for solving LP at the nodes (-1: never; 0: only root LP)",
1689  &(*set)->lp_solvefreq, FALSE, SCIP_DEFAULT_LP_SOLVEFREQ, -1, SCIP_MAXTREEDEPTH,
1690  NULL, NULL) );
1691  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1692  "lp/iterlim",
1693  "iteration limit for each single LP solve (-1: no limit)",
1694  &(*set)->lp_iterlim, TRUE, SCIP_DEFAULT_LP_ITERLIM, -1LL, SCIP_LONGINT_MAX,
1695  NULL, NULL) );
1696  SCIP_CALL( SCIPsetAddLongintParam(*set, messagehdlr, blkmem,
1697  "lp/rootiterlim",
1698  "iteration limit for initial root LP solve (-1: no limit)",
1699  &(*set)->lp_rootiterlim, TRUE, SCIP_DEFAULT_LP_ROOTITERLIM, -1LL, SCIP_LONGINT_MAX,
1700  NULL, NULL) );
1701  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1702  "lp/solvedepth",
1703  "maximal depth for solving LP at the nodes (-1: no depth limit)",
1704  &(*set)->lp_solvedepth, FALSE, SCIP_DEFAULT_LP_SOLVEDEPTH, -1, SCIP_MAXTREEDEPTH,
1705  NULL, NULL) );
1706  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1707  "lp/initalgorithm",
1708  "LP algorithm for solving initial LP relaxations (automatic 's'implex, 'p'rimal simplex, 'd'ual simplex, 'b'arrier, barrier with 'c'rossover)",
1709  &(*set)->lp_initalgorithm, FALSE, SCIP_DEFAULT_LP_INITALGORITHM, "spdbc",
1710  NULL, NULL) );
1711  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1712  "lp/resolvealgorithm",
1713  "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)",
1714  &(*set)->lp_resolvealgorithm, FALSE, SCIP_DEFAULT_LP_RESOLVEALGORITHM, "spdbc",
1715  NULL, NULL) );
1716  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
1717  "lp/pricing",
1718  "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)",
1719  &(*set)->lp_pricing, FALSE, SCIP_DEFAULT_LP_PRICING, "lafpsqd",
1720  NULL, NULL) );
1721  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1722  "lp/clearinitialprobinglp",
1723  "should lp state be cleared at the end of probing mode when lp was initially unsolved, e.g., when called right after presolving?",
1724  &(*set)->lp_clearinitialprobinglp, TRUE, SCIP_DEFAULT_LP_CLEARINITIALPROBINGLP,
1725  NULL, NULL) );
1726  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1727  "lp/resolverestore",
1728  "should the LP be resolved to restore the state at start of diving (if FALSE we buffer the solution values)?",
1729  &(*set)->lp_resolverestore, TRUE, SCIP_DEFAULT_LP_RESOLVERESTORE,
1730  NULL, NULL) );
1731  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1732  "lp/freesolvalbuffers",
1733  "should the buffers for storing LP solution values during diving be freed at end of diving?",
1734  &(*set)->lp_freesolvalbuffers, TRUE, SCIP_DEFAULT_LP_FREESOLVALBUFFERS,
1735  NULL, NULL) );
1736  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1737  "lp/colagelimit",
1738  "maximum age a dynamic column can reach before it is deleted from the LP (-1: don't delete columns due to aging)",
1739  &(*set)->lp_colagelimit, TRUE, SCIP_DEFAULT_LP_COLAGELIMIT, -1, INT_MAX,
1740  NULL, NULL) );
1741  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1742  "lp/rowagelimit",
1743  "maximum age a dynamic row can reach before it is deleted from the LP (-1: don't delete rows due to aging)",
1744  &(*set)->lp_rowagelimit, TRUE, SCIP_DEFAULT_LP_ROWAGELIMIT, -1, INT_MAX,
1745  NULL, NULL) );
1746  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1747  "lp/cleanupcols",
1748  "should new non-basic columns be removed after LP solving?",
1749  &(*set)->lp_cleanupcols, TRUE, SCIP_DEFAULT_LP_CLEANUPCOLS,
1750  NULL, NULL) );
1751  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1752  "lp/cleanupcolsroot",
1753  "should new non-basic columns be removed after root LP solving?",
1754  &(*set)->lp_cleanupcolsroot, TRUE, SCIP_DEFAULT_LP_CLEANUPCOLSROOT,
1755  NULL, NULL) );
1756  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1757  "lp/cleanuprows",
1758  "should new basic rows be removed after LP solving?",
1759  &(*set)->lp_cleanuprows, TRUE, SCIP_DEFAULT_LP_CLEANUPROWS,
1760  NULL, NULL) );
1761  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1762  "lp/cleanuprowsroot",
1763  "should new basic rows be removed after root LP solving?",
1764  &(*set)->lp_cleanuprowsroot, TRUE, SCIP_DEFAULT_LP_CLEANUPROWSROOT,
1765  NULL, NULL) );
1766  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1767  "lp/checkstability",
1768  "should LP solver's return status be checked for stability?",
1769  &(*set)->lp_checkstability, TRUE, SCIP_DEFAULT_LP_CHECKSTABILITY,
1770  NULL, NULL) );
1771  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1772  "lp/conditionlimit",
1773  "maximum condition number of LP basis counted as stable (-1.0: no limit)",
1774  &(*set)->lp_conditionlimit, TRUE, SCIP_DEFAULT_LP_CONDITIONLIMIT, -1.0, SCIP_REAL_MAX,
1775  NULL, NULL) );
1776  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1777  "lp/minmarkowitz",
1778  "minimal Markowitz threshold to control sparsity/stability in LU factorization",
1779  &(*set)->lp_markowitz, TRUE, SCIP_DEFAULT_LP_MARKOWITZ, 1e-4, 0.9999,
1780  NULL, NULL) );
1781  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1782  "lp/checkprimfeas",
1783  "should LP solutions be checked for primal feasibility, resolving LP when numerical troubles occur?",
1784  &(*set)->lp_checkprimfeas, TRUE, SCIP_DEFAULT_LP_CHECKPRIMFEAS,
1785  NULL, NULL) );
1786  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1787  "lp/checkdualfeas",
1788  "should LP solutions be checked for dual feasibility, resolving LP when numerical troubles occur?",
1789  &(*set)->lp_checkdualfeas, TRUE, SCIP_DEFAULT_LP_CHECKDUALFEAS,
1790  NULL, NULL) );
1791  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1792  "lp/checkfarkas",
1793  "should infeasibility proofs from the LP be checked?",
1794  &(*set)->lp_checkfarkas, TRUE, SCIP_DEFAULT_LP_CHECKFARKAS,
1795  NULL, NULL) );
1796  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1797  "lp/fastmip",
1798  "which FASTMIP setting of LP solver should be used? 0: off, 1: low",
1799  &(*set)->lp_fastmip, TRUE, SCIP_DEFAULT_LP_FASTMIP, 0, 1,
1800  NULL, NULL) );
1801  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1802  "lp/scaling",
1803  "LP scaling (0: none, 1: normal, 2: aggressive)",
1804  &(*set)->lp_scaling, TRUE, SCIP_DEFAULT_LP_SCALING, 0, 2,
1805  NULL, NULL) );
1806  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1807  "lp/presolving",
1808  "should presolving of LP solver be used?",
1809  &(*set)->lp_presolving, TRUE, SCIP_DEFAULT_LP_PRESOLVING,
1810  NULL, NULL) );
1811  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1812  "lp/lexdualalgo",
1813  "should the lexicographic dual algorithm be used?",
1814  &(*set)->lp_lexdualalgo, TRUE, SCIP_DEFAULT_LP_LEXDUALALGO,
1815  NULL, NULL) );
1816  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1817  "lp/lexdualrootonly",
1818  "should the lexicographic dual algorithm be applied only at the root node",
1819  &(*set)->lp_lexdualrootonly, TRUE, SCIP_DEFAULT_LP_LEXDUALROOTONLY,
1820  NULL, NULL) );
1821  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1822  "lp/lexdualmaxrounds",
1823  "maximum number of rounds in the lexicographic dual algorithm (-1: unbounded)",
1824  &(*set)->lp_lexdualmaxrounds, TRUE, SCIP_DEFAULT_LP_LEXDUALMAXROUNDS, -1, INT_MAX,
1825  NULL, NULL) );
1826  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1827  "lp/lexdualbasic",
1828  "choose fractional basic variables in lexicographic dual algorithm?",
1829  &(*set)->lp_lexdualbasic, TRUE, SCIP_DEFAULT_LP_LEXDUALBASIC,
1830  NULL, NULL) );
1831  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1832  "lp/lexdualstalling",
1833  "turn on the lex dual algorithm only when stalling?",
1834  &(*set)->lp_lexdualstalling, TRUE, SCIP_DEFAULT_LP_LEXDUALSTALLING,
1835  NULL, NULL) );
1836  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1837  "lp/disablecutoff",
1838  "disable the cutoff bound in the LP solver? (0: enabled, 1: disabled, 2: auto)",
1839  &(*set)->lp_disablecutoff, TRUE, SCIP_DEFAULT_LP_DISABLECUTOFF,
1840  0, 2, NULL, NULL) );
1841  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1842  "lp/rowrepswitch",
1843  "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)",
1844  &(*set)->lp_rowrepswitch, TRUE, SCIP_DEFAULT_LP_ROWREPSWITCH, -1.0, SCIP_REAL_MAX,
1845  NULL, NULL) );
1846  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1847  "lp/threads",
1848  "number of threads used for solving the LP (0: automatic)",
1849  &(*set)->lp_threads, TRUE, SCIP_DEFAULT_LP_THREADS, 0, 64,
1850  NULL, NULL) );
1851  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1852  "lp/resolveiterfac",
1853  "factor of average LP iterations that is used as LP iteration limit for LP resolve (-1: unlimited)",
1854  &(*set)->lp_resolveiterfac, TRUE, SCIP_DEFAULT_LP_RESOLVEITERFAC, -1.0, SCIP_REAL_MAX,
1855  NULL, NULL) );
1856  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1857  "lp/resolveitermin",
1858  "minimum number of iterations that are allowed for LP resolve",
1859  &(*set)->lp_resolveitermin, TRUE, SCIP_DEFAULT_LP_RESOLVEITERMIN, 1, INT_MAX,
1860  NULL, NULL) );
1861 
1862  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1863  "lp/solutionpolishing",
1864  "LP solution polishing method (0: disabled, 1: only root, 2: always, 3: auto)",
1865  &(*set)->lp_solutionpolishing, TRUE, SCIP_DEFAULT_LP_SOLUTIONPOLISHING, 0, 3,
1866  NULL, NULL) );
1867 
1868  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1869  "lp/refactorinterval",
1870  "LP refactorization interval (0: auto)",
1871  &(*set)->lp_refactorinterval, TRUE, SCIP_DEFAULT_LP_REFACTORINTERVAL, 0, INT_MAX,
1872  NULL, NULL) );
1873  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1874  "lp/alwaysgetduals",
1875  "should the Farkas duals always be collected when an LP is found to be infeasible?",
1876  &(*set)->lp_alwaysgetduals, FALSE, SCIP_DEFAULT_LP_ALWAYSGETDUALS,
1877  NULL, NULL) );
1878 
1879  /* NLP parameters */
1880  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
1881  "nlp/solver",
1882  "solver to use for solving NLPs; leave empty to select NLPI with highest priority",
1883  &(*set)->nlp_solver, FALSE, SCIP_DEFAULT_NLP_SOLVER,
1884  NULL, NULL) );
1885  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1886  "nlp/disable",
1887  "should the NLP relaxation be always disabled (also for NLPs/MINLPs)?",
1888  &(*set)->nlp_disable, FALSE, SCIP_DEFAULT_NLP_DISABLE,
1889  NULL, NULL) );
1890 
1891  /* memory parameters */
1892  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1893  "memory/savefac",
1894  "fraction of maximal memory usage resulting in switch to memory saving mode",
1895  &(*set)->mem_savefac, FALSE, SCIP_DEFAULT_MEM_SAVEFAC, 0.0, 1.0,
1896  NULL, NULL) );
1897  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1898  "memory/arraygrowfac",
1899  "memory growing factor for dynamically allocated arrays",
1900  &(*set)->mem_arraygrowfac, TRUE, SCIP_DEFAULT_MEM_ARRAYGROWFAC, 1.0, 10.0,
1901  paramChgdArraygrowfac, NULL) );
1902  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1903  "memory/arraygrowinit",
1904  "initial size of dynamically allocated arrays",
1905  &(*set)->mem_arraygrowinit, TRUE, SCIP_DEFAULT_MEM_ARRAYGROWINIT, 0, INT_MAX,
1906  paramChgdArraygrowinit, NULL) );
1907  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1908  "memory/treegrowfac",
1909  "memory growing factor for tree array",
1910  &(*set)->mem_treegrowfac, TRUE, SCIP_DEFAULT_MEM_TREEGROWFAC, 1.0, 10.0,
1911  NULL, NULL) );
1912  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1913  "memory/treegrowinit",
1914  "initial size of tree array",
1915  &(*set)->mem_treegrowinit, TRUE, SCIP_DEFAULT_MEM_TREEGROWINIT, 0, INT_MAX,
1916  NULL, NULL) );
1917  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
1918  "memory/pathgrowfac",
1919  "memory growing factor for path array",
1920  &(*set)->mem_pathgrowfac, TRUE, SCIP_DEFAULT_MEM_PATHGROWFAC, 1.0, 10.0,
1921  NULL, NULL) );
1922  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
1923  "memory/pathgrowinit",
1924  "initial size of path array",
1925  &(*set)->mem_pathgrowinit, TRUE, SCIP_DEFAULT_MEM_PATHGROWINIT, 0, INT_MAX,
1926  NULL, NULL) );
1927 
1928  /* miscellaneous parameters */
1929  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1930  "misc/catchctrlc",
1931  "should the CTRL-C interrupt be caught by SCIP?",
1932  &(*set)->misc_catchctrlc, FALSE, SCIP_DEFAULT_MISC_CATCHCTRLC,
1933  NULL, NULL) );
1934  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1935  "misc/usevartable",
1936  "should a hashtable be used to map from variable names to variables?",
1937  &(*set)->misc_usevartable, FALSE, SCIP_DEFAULT_MISC_USEVARTABLE,
1938  NULL, NULL) );
1939  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1940  "misc/useconstable",
1941  "should a hashtable be used to map from constraint names to constraints?",
1942  &(*set)->misc_useconstable, FALSE, SCIP_DEFAULT_MISC_USECONSTABLE,
1943  NULL, NULL) );
1944  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1945  "misc/usesmalltables",
1946  "should smaller hashtables be used? yields better performance for small problems with about 100 variables",
1947  &(*set)->misc_usesmalltables, FALSE, SCIP_DEFAULT_MISC_USESMALLTABLES,
1948  NULL, NULL) );
1949 #if 0 /**@todo activate exactsolve parameter and finish implementation of solving MIPs exactly */
1950  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1951  "misc/exactsolve",
1952  "should the problem be solved exactly (with proven dual bounds)?",
1953  &(*set)->misc_exactsolve, FALSE, SCIP_DEFAULT_MISC_EXACTSOLVE,
1954  NULL, NULL) );
1955 #else
1956  (*set)->misc_exactsolve = SCIP_DEFAULT_MISC_EXACTSOLVE;
1957 #endif
1958 
1959  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1960  "misc/resetstat",
1961  "should the statistics be reset if the transformed problem is freed (in case of a Benders' decomposition this parameter should be set to FALSE)",
1962  &(*set)->misc_resetstat, FALSE, SCIP_DEFAULT_MISC_RESETSTAT,
1963  NULL, NULL) );
1964 
1965  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1966  "misc/improvingsols",
1967  "should only solutions be checked which improve the primal bound",
1968  &(*set)->misc_improvingsols, FALSE, SCIP_DEFAULT_MISC_IMPROVINGSOLS,
1969  NULL, NULL) );
1970  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1971  "misc/printreason",
1972  "should the reason be printed if a given start solution is infeasible",
1973  &(*set)->misc_printreason, FALSE, SCIP_DEFAULT_MISC_PRINTREASON,
1974  NULL, NULL) );
1975  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1976  "misc/estimexternmem",
1977  "should the usage of external memory be estimated?",
1978  &(*set)->misc_estimexternmem, FALSE, SCIP_DEFAULT_MISC_ESTIMEXTERNMEM,
1979  NULL, NULL) );
1980  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1981  "misc/avoidmemout",
1982  "try to avoid running into memory limit by restricting plugins like heuristics?",
1983  &(*set)->misc_avoidmemout, FALSE, SCIP_DEFAULT_MISC_AVOIDMEMOUT,
1984  NULL, NULL) );
1985  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1986  "misc/transorigsols",
1987  "should SCIP try to transfer original solutions to the transformed space (after presolving)?",
1988  &(*set)->misc_transorigsols, FALSE, SCIP_DEFAULT_MISC_TRANSORIGSOLS,
1989  NULL, NULL) );
1990  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1991  "misc/transsolsorig",
1992  "should SCIP try to transfer transformed solutions to the original space (after solving)?",
1993  &(*set)->misc_transsolsorig, FALSE, SCIP_DEFAULT_MISC_TRANSSOLSORIG,
1994  NULL, NULL) );
1995  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
1996  "misc/calcintegral",
1997  "should SCIP calculate the primal dual integral value?",
1998  &(*set)->misc_calcintegral, FALSE, SCIP_DEFAULT_MISC_CALCINTEGRAL,
1999  NULL, NULL) );
2000  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2001  "misc/finitesolutionstore",
2002  "should SCIP try to remove infinite fixings from solutions copied to the solution store?",
2003  &(*set)->misc_finitesolstore, FALSE, SCIP_DEFAULT_MISC_FINITESOLSTORE,
2004  NULL, NULL) );
2005  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2006  "misc/outputorigsol",
2007  "should the best solution be transformed to the orignal space and be output in command line run?",
2008  &(*set)->misc_outputorigsol, FALSE, SCIP_DEFAULT_MISC_OUTPUTORIGSOL,
2009  NULL, NULL) );
2010  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2011  "misc/allowstrongdualreds",
2012  "should strong dual reductions be allowed in propagation and presolving?",
2013  &(*set)->misc_allowstrongdualreds, FALSE, SCIP_DEFAULT_MISC_ALLOWSTRONGDUALREDS,
2014  NULL, NULL) );
2015  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2016  "misc/allowweakdualreds",
2017  "should weak dual reductions be allowed in propagation and presolving?",
2018  &(*set)->misc_allowweakdualreds, FALSE, SCIP_DEFAULT_MISC_ALLOWWEAKDUALREDS,
2019  NULL, NULL) );
2020  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2021  "misc/scaleobj",
2022  "should the objective function be scaled so that it is always integer?",
2023  &(*set)->misc_scaleobj, FALSE, SCIP_DEFAULT_MISC_SCALEOBJ,
2024  NULL, NULL) );
2025  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2026  "misc/showdivingstats",
2027  "should detailed statistics for diving heuristics be shown?",
2028  &(*set)->misc_showdivingstats, FALSE, SCIP_DEFAULT_MISC_SHOWDIVINGSTATS,
2029  NULL, NULL) );
2030 
2031  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2032  "misc/referencevalue",
2033  "objective value for reference purposes",
2034  &(*set)->misc_referencevalue, FALSE, SCIP_DEFAULT_MISC_REFERENCEVALUE, SCIP_REAL_MIN, SCIP_REAL_MAX,
2035  NULL, NULL) );
2036 
2037 #ifdef WITH_DEBUG_SOLUTION
2038  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
2039  "misc/debugsol",
2040  "path to a debug solution",
2041  &(*set)->misc_debugsol, FALSE, SCIP_DEFAULT_MISC_DEBUGSOLUTION,
2042  NULL, NULL) );
2043 #endif
2044 
2045  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2046  "misc/usesymmetry",
2047  "bitset describing used symmetry handling technique (0: off; 1: polyhedral (orbitopes and/or symresacks);" \
2048  " 2: orbital fixing; 3: orbitopes and orbital fixing; 4: Schreier Sims cuts; 5: Schreier Sims cuts and " \
2049  "orbitopes); 6: Schreier Sims cuts and orbital fixing; 7: Schreier Sims cuts, orbitopes, and orbital " \
2050  "fixing, see type_symmetry.h.",
2051  &(*set)->misc_usesymmetry, FALSE, SCIP_DEFAULT_MISC_USESYMMETRY, 0, 7,
2052  paramChgdUsesymmetry, NULL) );
2053 
2054  /* randomization parameters */
2055  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2056  "randomization/randomseedshift",
2057  "global shift of all random seeds in the plugins and the LP random seed",
2058  &(*set)->random_randomseedshift, FALSE, SCIP_DEFAULT_RANDOM_RANDSEEDSHIFT, 0, INT_MAX,
2059  NULL, NULL) );
2060 
2061  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2062  "randomization/permutationseed",
2063  "seed value for permuting the problem after reading/transformation (0: no permutation)",
2064  &(*set)->random_permutationseed, FALSE, SCIP_DEFAULT_RANDOM_PERMUTATIONSEED, 0, INT_MAX,
2065  NULL, NULL) );
2066 
2067  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2068  "randomization/permuteconss",
2069  "should order of constraints be permuted (depends on permutationseed)?",
2070  &(*set)->random_permuteconss, TRUE, SCIP_DEFAULT_RANDOM_PERMUTECONSS,
2071  NULL, NULL) );
2072 
2073  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2074  "randomization/permutevars",
2075  "should order of variables be permuted (depends on permutationseed)?",
2076  &(*set)->random_permutevars, TRUE, SCIP_DEFAULT_RANDOM_PERMUTEVARS,
2077  NULL, NULL) );
2078 
2079  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2080  "randomization/lpseed",
2081  "random seed for LP solver, e.g. for perturbations in the simplex (0: LP default)",
2082  &(*set)->random_randomseed, FALSE, SCIP_DEFAULT_RANDOM_LPSEED, 0, INT_MAX,
2083  NULL, NULL) );
2084 
2085  /* node selection */
2086  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2087  "nodeselection/childsel",
2088  "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)",
2089  &(*set)->nodesel_childsel, FALSE, SCIP_DEFAULT_NODESEL_CHILDSEL, "dupilrh",
2090  NULL, NULL) );
2091 
2092  /* numerical parameters */
2093  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2094  "numerics/infinity",
2095  "values larger than this are considered infinity",
2096  &(*set)->num_infinity, FALSE, SCIP_DEFAULT_INFINITY, 1e+10, SCIP_INVALID/10.0,
2097  paramChgdInfinity, NULL) );
2098  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2099  "numerics/epsilon",
2100  "absolute values smaller than this are considered zero",
2101  &(*set)->num_epsilon, FALSE, SCIP_DEFAULT_EPSILON, SCIP_MINEPSILON, SCIP_MAXEPSILON,
2102  NULL, NULL) );
2103  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2104  "numerics/sumepsilon",
2105  "absolute values of sums smaller than this are considered zero",
2106  &(*set)->num_sumepsilon, FALSE, SCIP_DEFAULT_SUMEPSILON, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
2107  NULL, NULL) );
2108  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2109  "numerics/feastol",
2110  "feasibility tolerance for constraints",
2111  &(*set)->num_feastol, FALSE, SCIP_DEFAULT_FEASTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
2112  paramChgdFeastol, NULL) );
2113  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2114  "numerics/checkfeastolfac",
2115  "feasibility tolerance factor; for checking the feasibility of the best solution",
2116  &(*set)->num_checkfeastolfac, FALSE, SCIP_DEFAULT_CHECKFEASTOLFAC, 0.0, SCIP_REAL_MAX,
2117  NULL, NULL) );
2118  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2119  "numerics/lpfeastolfactor",
2120  "factor w.r.t. primal feasibility tolerance that determines default (and maximal) primal feasibility tolerance of LP solver",
2121  &(*set)->num_lpfeastolfactor, FALSE, SCIP_DEFAULT_LPFEASTOLFACTOR, 1e-6, 1.0,
2122  paramChgdLPFeastolFactor, NULL) );
2123  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2124  "numerics/dualfeastol",
2125  "feasibility tolerance for reduced costs in LP solution",
2126  &(*set)->num_dualfeastol, FALSE, SCIP_DEFAULT_DUALFEASTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
2127  paramChgdDualfeastol, NULL) );
2128  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2129  "numerics/barrierconvtol",
2130  "LP convergence tolerance used in barrier algorithm",
2131  &(*set)->num_barrierconvtol, TRUE, SCIP_DEFAULT_BARRIERCONVTOL, SCIP_MINEPSILON*1e+03, SCIP_MAXEPSILON,
2132  paramChgdBarrierconvtol, NULL) );
2133  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2134  "numerics/boundstreps",
2135  "minimal relative improve for strengthening bounds",
2136  &(*set)->num_boundstreps, TRUE, SCIP_DEFAULT_BOUNDSTREPS, SCIP_MINEPSILON*1e+03, SCIP_INVALID/10.0,
2137  NULL, NULL) );
2138  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2139  "numerics/pseudocosteps",
2140  "minimal variable distance value to use for branching pseudo cost updates",
2141  &(*set)->num_pseudocosteps, TRUE, SCIP_DEFAULT_PSEUDOCOSTEPS, SCIP_MINEPSILON*1e+03, 1.0,
2142  NULL, NULL) );
2143  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2144  "numerics/pseudocostdelta",
2145  "minimal objective distance value to use for branching pseudo cost updates",
2146  &(*set)->num_pseudocostdelta, TRUE, SCIP_DEFAULT_PSEUDOCOSTDELTA, 0.0, SCIP_REAL_MAX,
2147  NULL, NULL) );
2148  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2149  "numerics/recomputefac",
2150  "minimal decrease factor that causes the recomputation of a value (e.g., pseudo objective) instead of an update",
2151  &(*set)->num_recompfac, TRUE, SCIP_DEFAULT_RECOMPFAC, 0.0, SCIP_REAL_MAX,
2152  NULL, NULL) );
2153  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2154  "numerics/hugeval",
2155  "values larger than this are considered huge and should be handled separately (e.g., in activity computation)",
2156  &(*set)->num_hugeval, TRUE, SCIP_DEFAULT_HUGEVAL, 0.0, SCIP_INVALID/10.0,
2157  NULL, NULL) );
2158 
2159  /* presolving parameters */
2160  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2161  "presolving/maxrounds",
2162  "maximal number of presolving rounds (-1: unlimited, 0: off)",
2163  &(*set)->presol_maxrounds, FALSE, SCIP_DEFAULT_PRESOL_MAXROUNDS, -1, INT_MAX,
2164  NULL, NULL) );
2165  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2166  "presolving/abortfac",
2167  "abort presolve, if at most this fraction of the problem was changed in last presolve round",
2168  &(*set)->presol_abortfac, TRUE, SCIP_DEFAULT_PRESOL_ABORTFAC, 0.0, 1.0,
2169  NULL, NULL) );
2170  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2171  "presolving/maxrestarts",
2172  "maximal number of restarts (-1: unlimited)",
2173  &(*set)->presol_maxrestarts, FALSE, SCIP_DEFAULT_PRESOL_MAXRESTARTS, -1, INT_MAX,
2174  NULL, NULL) );
2175  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2176  "presolving/restartfac",
2177  "fraction of integer variables that were fixed in the root node triggering a restart with preprocessing after root node evaluation",
2178  &(*set)->presol_restartfac, TRUE, SCIP_DEFAULT_PRESOL_RESTARTFAC, 0.0, 1.0,
2179  NULL, NULL) );
2180  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2181  "presolving/clqtablefac",
2182  "limit on number of entries in clique table relative to number of problem nonzeros",
2183  &(*set)->presol_clqtablefac, TRUE, SCIP_DEFAULT_PRESOL_CLQTABLEFAC, 0.0, SCIP_REAL_MAX,
2184  NULL, NULL) );
2185  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2186  "presolving/immrestartfac",
2187  "fraction of integer variables that were fixed in the root node triggering an immediate restart with preprocessing",
2188  &(*set)->presol_immrestartfac, TRUE, SCIP_DEFAULT_PRESOL_IMMRESTARTFAC, 0.0, 1.0,
2189  NULL, NULL) );
2190  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2191  "presolving/subrestartfac",
2192  "fraction of integer variables that were globally fixed during the solving process triggering a restart with preprocessing",
2193  &(*set)->presol_subrestartfac, TRUE, SCIP_DEFAULT_PRESOL_SUBRESTARTFAC, 0.0, 1.0,
2194  NULL, NULL) );
2195  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2196  "presolving/restartminred",
2197  "minimal fraction of integer variables removed after restart to allow for an additional restart",
2198  &(*set)->presol_restartminred, TRUE, SCIP_DEFAULT_PRESOL_RESTARTMINRED, 0.0, 1.0,
2199  NULL, NULL) );
2200  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2201  "presolving/donotmultaggr",
2202  "should multi-aggregation of variables be forbidden?",
2203  &(*set)->presol_donotmultaggr, TRUE, SCIP_DEFAULT_PRESOL_DONOTMULTAGGR,
2204  NULL, NULL) );
2205  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2206  "presolving/donotaggr",
2207  "should aggregation of variables be forbidden?",
2208  &(*set)->presol_donotaggr, TRUE, SCIP_DEFAULT_PRESOL_DONOTAGGR,
2209  NULL, NULL) );
2210 
2211  /* pricing parameters */
2212  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2213  "pricing/maxvars",
2214  "maximal number of variables priced in per pricing round",
2215  &(*set)->price_maxvars, FALSE, SCIP_DEFAULT_PRICE_MAXVARS, 1, INT_MAX,
2216  NULL, NULL) );
2217  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2218  "pricing/maxvarsroot",
2219  "maximal number of priced variables at the root node",
2220  &(*set)->price_maxvarsroot, FALSE, SCIP_DEFAULT_PRICE_MAXVARSROOT, 1, INT_MAX,
2221  NULL, NULL) );
2222  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2223  "pricing/abortfac",
2224  "pricing is aborted, if fac * pricing/maxvars pricing candidates were found",
2225  &(*set)->price_abortfac, FALSE, SCIP_DEFAULT_PRICE_ABORTFAC, 1.0, SCIP_REAL_MAX,
2226  NULL, NULL) );
2227  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2228  "pricing/delvars",
2229  "should variables created at the current node be deleted when the node is solved in case they are not present in the LP anymore?",
2230  &(*set)->price_delvars, FALSE, SCIP_DEFAULT_PRICE_DELVARS,
2231  NULL, NULL) );
2232  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2233  "pricing/delvarsroot",
2234  "should variables created at the root node be deleted when the root is solved in case they are not present in the LP anymore?",
2235  &(*set)->price_delvarsroot, FALSE, SCIP_DEFAULT_PRICE_DELVARSROOT,
2236  NULL, NULL) );
2237 
2238  /* Decomposition parameters */
2239  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2240  "decomposition/benderslabels",
2241  "should the variables be labelled for the application of Benders' decomposition?",
2242  &(*set)->decomp_benderslabels, FALSE, SCIP_DEFAULT_DECOMP_BENDERSLABELS,
2243  NULL, NULL) );
2244  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2245  "decomposition/applybenders",
2246  "if a decomposition exists, should Benders' decomposition be applied?",
2247  &(*set)->decomp_applybenders, FALSE, SCIP_DEFAULT_DECOMP_APPLYBENDERS,
2248  NULL, NULL) );
2249  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2250  "decomposition/maxgraphedge",
2251  "maximum number of edges in block graph computation (-1: no limit, 0: disable block graph computation)",
2252  &(*set)->decomp_maxgraphedge, FALSE, SCIP_DEFAULT_DECOMP_MAXGRAPHEDGE, -1, INT_MAX,
2253  NULL, NULL) );
2254  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2255  "decomposition/disablemeasures",
2256  "disable expensive measures",
2257  &(*set)->decomp_disablemeasures, FALSE, SCIP_DEFAULT_DECOMP_DISABLEMEASURES,
2258  NULL, NULL) );
2259 
2260  /* Benders' decomposition parameters */
2261  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2262  "benders/solutiontol",
2263  "the tolerance used for checking optimality in Benders' decomposition. tol where optimality is given by LB + tol > UB.",
2264  &(*set)->benders_soltol, FALSE, SCIP_DEFAULT_BENDERS_SOLTOL, 0.0, SCIP_REAL_MAX,
2265  NULL, NULL) );
2266  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2267  "benders/cutlpsol",
2268  "should Benders' cuts be generated from the solution to the LP relaxation?",
2269  &(*set)->benders_cutlpsol, FALSE, SCIP_DEFAULT_BENDERS_CUTLPSOL,
2270  NULL, NULL) );
2271  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2272  "benders/copybenders",
2273  "should Benders' decomposition be copied for use in sub-SCIPs?",
2274  &(*set)->benders_copybenders, FALSE, SCIP_DEFAULT_BENDERS_COPYBENDERS,
2275  NULL, NULL) );
2276 
2277  /* propagation parameters */
2278  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2279  "propagating/maxrounds",
2280  "maximal number of propagation rounds per node (-1: unlimited)",
2281  &(*set)->prop_maxrounds, FALSE, SCIP_DEFAULT_PROP_MAXROUNDS, -1, INT_MAX,
2282  NULL, NULL) );
2283  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2284  "propagating/maxroundsroot",
2285  "maximal number of propagation rounds in the root node (-1: unlimited)",
2286  &(*set)->prop_maxroundsroot, FALSE, SCIP_DEFAULT_PROP_MAXROUNDSROOT, -1, INT_MAX,
2287  NULL, NULL) );
2288  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2289  "propagating/abortoncutoff",
2290  "should propagation be aborted immediately? setting this to FALSE could help conflict analysis to produce more conflict constraints",
2291  &(*set)->prop_abortoncutoff, FALSE, SCIP_DEFAULT_PROP_ABORTONCUTOFF,
2292  NULL, NULL) );
2293 
2294  /* reoptimization */
2295  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2296  "reoptimization/enable",
2297  "should reoptimization used?",
2298  &(*set)->reopt_enable, FALSE, SCIP_DEFAULT_REOPT_ENABLE,
2299  paramChgdEnableReopt, NULL) );
2300  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2301  "reoptimization/maxsavednodes",
2302  "maximal number of saved nodes",
2303  &(*set)->reopt_maxsavednodes, TRUE, SCIP_DEFAULT_REOPT_MAXSAVEDNODES, -1, INT_MAX,
2304  NULL, NULL) );
2305  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2306  "reoptimization/maxdiffofnodes",
2307  "maximal number of bound changes between two stored nodes on one path",
2308  &(*set)->reopt_maxdiffofnodes, TRUE, SCIP_DEFAULT_REOPT_MAXDIFFOFNODES, 0, INT_MAX,
2309  NULL, NULL) );
2310  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2311  "reoptimization/globalcons/sepainfsubtrees",
2312  "save global constraints to separate infeasible subtrees.",
2313  &(*set)->reopt_sepaglbinfsubtrees, FALSE, SCIP_DEFAULT_REOPT_SEPAGLBINFSUBTREES,
2314  NULL, NULL) );
2315  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2316  "reoptimization/sepabestsol",
2317  "separate the optimal solution, i.e., for constrained shortest path",
2318  &(*set)->reopt_sepabestsol, TRUE, SCIP_DEFAULT_REOPT_SEPABESTSOL,
2319  NULL, NULL) );
2320  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2321  "reoptimization/storevarhistory",
2322  "use variable history of the previous solve if the objctive function has changed only slightly",
2323  &(*set)->reopt_storevarhistory, TRUE, SCIP_DEFAULT_REOPT_STOREVARHISTOTY,
2324  NULL, NULL) );
2325  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2326  "reoptimization/usepscost",
2327  "re-use pseudo costs if the objective function changed only slightly ",
2328  &(*set)->reopt_usepscost, TRUE, SCIP_DEFAULT_REOPT_USEPSCOST,
2329  NULL, NULL) );
2330  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2331  "reoptimization/solvelp",
2332  "at which reopttype should the LP be solved? (1: transit, 3: strong branched, 4: w/ added logicor, 5: only leafs).",
2333  &(*set)->reopt_solvelp, TRUE, SCIP_DEFAULT_REOPT_SOLVELP, 1, 5,
2334  NULL, NULL) );
2335  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2336  "reoptimization/solvelpdiff",
2337  "maximal number of bound changes at node to skip solving the LP",
2338  &(*set)->reopt_solvelpdiff, TRUE, SCIP_DEFAULT_REOPT_SOLVELPDIFF, 0, INT_MAX,
2339  NULL, NULL) );
2340  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2341  "reoptimization/savesols",
2342  "number of best solutions which should be saved for the following runs. (-1: save all)",
2343  &(*set)->reopt_savesols, TRUE, SCIP_DEFAULT_REOPT_SAVESOLS, 0, INT_MAX,
2344  NULL, NULL) );
2345  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2346  "reoptimization/objsimrootLP",
2347  "similarity of two sequential objective function to disable solving the root LP.",
2348  &(*set)->reopt_objsimrootlp, TRUE, SCIP_DEFAULT_REOPT_OBJSIMROOTLP, -1.0, 1.0,
2349  NULL, NULL) );
2350  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2351  "reoptimization/objsimsol",
2352  "similarity of two objective functions to re-use stored solutions",
2353  &(*set)->reopt_objsimsol, TRUE, SCIP_DEFAULT_REOPT_OBJSIMSOL, -1.0, 1.0,
2354  NULL, NULL) );
2355  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2356  "reoptimization/delay",
2357  "minimum similarity for using reoptimization of the search tree.",
2358  &(*set)->reopt_objsimdelay, TRUE, SCIP_DEFAULT_REOPT_OBJSIMDELAY, -1.0, 1.0,
2359  NULL, NULL) );
2360  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2361  "reoptimization/commontimelimit",
2362  "time limit over all reoptimization rounds?.",
2363  &(*set)->reopt_commontimelimit, TRUE, SCIP_DEFAULT_REOPT_COMMONTIMELIMIT,
2364  NULL, NULL) );
2365  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2366  "reoptimization/shrinkinner",
2367  "replace branched inner nodes by their child nodes, if the number of bound changes is not to large",
2368  &(*set)->reopt_shrinkinner, TRUE, SCIP_DEFAULT_REOPT_SHRINKINNER,
2369  NULL, NULL) );
2370  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2371  "reoptimization/strongbranchinginit",
2372  "try to fix variables at the root node before reoptimizing by probing like strong branching",
2373  &(*set)->reopt_sbinit, TRUE, SCIP_DEFAULT_REOPT_STRONGBRANCHINIT,
2374  NULL, NULL) );
2375  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2376  "reoptimization/reducetofrontier",
2377  "delete stored nodes which were not reoptimized",
2378  &(*set)->reopt_reducetofrontier, TRUE, SCIP_DEFAULT_REOPT_REDUCETOFRONTIER,
2379  NULL, NULL) );
2380  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2381  "reoptimization/forceheurrestart",
2382  "force a restart if the last n optimal solutions were found by heuristic reoptsols",
2383  &(*set)->reopt_forceheurrestart, TRUE, SCIP_DEFAULT_REOPT_FORCEHEURRESTART, 1, INT_MAX,
2384  NULL, NULL) );
2385  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2386  "reoptimization/saveconsprop",
2387  "save constraint propagations",
2388  &(*set)->reopt_saveconsprop, TRUE, SCIP_DEFAULT_REOPT_SAVECONSPROP,
2389  NULL, NULL) );
2390  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2391  "reoptimization/usesplitcons", "use constraints to reconstruct the subtree pruned be dual reduction when reactivating the node",
2392  &(*set)->reopt_usesplitcons, TRUE, SCIP_DEFAULT_REOPT_USESPLITCONS,
2393  NULL, NULL) );
2394  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2395  "reoptimization/varorderinterdiction", "use 'd'efault, 'r'andom or a variable ordering based on 'i'nference score for interdiction branching used during reoptimization",
2396  &(*set)->reopt_varorderinterdiction, TRUE, SCIP_DEFAULT_REOPT_VARORDERINTERDICTION, "dir",
2397  NULL, NULL) );
2398  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2399  "reoptimization/usecuts",
2400  "reoptimize cuts found at the root node",
2401  &(*set)->reopt_usecuts, TRUE, SCIP_DEFAULT_REOPT_USECUTS,
2402  NULL, NULL) );
2403  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2404  "reoptimization/maxcutage",
2405  "maximal age of a cut to be use for reoptimization",
2406  &(*set)->reopt_maxcutage, TRUE, SCIP_DEFAULT_REOPT_MAXCUTAGE, 0, INT_MAX,
2407  NULL, NULL) );
2408 
2409  /* separation parameters */
2410  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2411  "separating/maxbounddist",
2412  "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)",
2413  &(*set)->sepa_maxbounddist, FALSE, SCIP_DEFAULT_SEPA_MAXBOUNDDIST, 0.0, 1.0,
2414  NULL, NULL) );
2415  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2416  "separating/maxlocalbounddist",
2417  "maximal relative distance from current node's dual bound to primal bound compared to best node's dual bound for applying local separation (0.0: only on current best node, 1.0: on all nodes)",
2418  &(*set)->sepa_maxlocalbounddist, FALSE, SCIP_DEFAULT_SEPA_MAXLOCALBOUNDDIST, 0.0, 1.0,
2419  NULL, NULL) );
2420  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2421  "separating/maxcoefratio",
2422  "maximal ratio between coefficients in strongcg, cmir, and flowcover cuts",
2423  &(*set)->sepa_maxcoefratio, FALSE, SCIP_DEFAULT_SEPA_MAXCOEFRATIO, 1.0, SCIP_INVALID/10.0,
2424  NULL, NULL) );
2425  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2426  "separating/maxcoefratiofacrowprep",
2427  "maximal ratio between coefficients (as factor of 1/feastol) to ensure in rowprep cleanup",
2428  &(*set)->sepa_maxcoefratiofacrowprep, FALSE, SCIP_DEFAULT_SEPA_MAXCOEFRATIOFACROWPREP, 0.0, SCIP_REAL_MAX,
2429  NULL, NULL) );
2430  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2431  "separating/minefficacy",
2432  "minimal efficacy for a cut to enter the LP",
2433  &(*set)->sepa_minefficacy, FALSE, SCIP_DEFAULT_SEPA_MINEFFICACY, 0.0, SCIP_INVALID/10.0,
2434  NULL, NULL) );
2435  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2436  "separating/minefficacyroot",
2437  "minimal efficacy for a cut to enter the LP in the root node",
2438  &(*set)->sepa_minefficacyroot, FALSE, SCIP_DEFAULT_SEPA_MINEFFICACYROOT, 0.0, SCIP_INVALID/10.0,
2439  NULL, NULL) );
2440  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2441  "separating/minactivityquot",
2442  "minimum cut activity quotient to convert cuts into constraints during a restart (0.0: all cuts are converted)",
2443  &(*set)->sepa_minactivityquot, FALSE, SCIP_DEFAULT_SEPA_MINACTIVITYQUOT, 0.0, 1.0,
2444  NULL, NULL) );
2445  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2446  "separating/orthofunc",
2447  "function used for calc. scalar prod. in orthogonality test ('e'uclidean, 'd'iscrete)",
2448  &(*set)->sepa_orthofunc, TRUE, SCIP_DEFAULT_SEPA_ORTHOFUNC, "ed",
2449  NULL, NULL) );
2450  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2451  "separating/efficacynorm",
2452  "row norm to use for efficacy calculation ('e'uclidean, 'm'aximum, 's'um, 'd'iscrete)",
2453  &(*set)->sepa_efficacynorm, TRUE, SCIP_DEFAULT_SEPA_EFFICACYNORM, "emsd",
2454  NULL, NULL) );
2455  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2456  "separating/cutselrestart",
2457  "cut selection during restart ('a'ge, activity 'q'uotient)",
2458  &(*set)->sepa_cutselrestart, TRUE, SCIP_DEFAULT_SEPA_CUTSELRESTART, "aq",
2459  NULL, NULL) );
2460  SCIP_CALL( SCIPsetAddCharParam(*set, messagehdlr, blkmem,
2461  "separating/cutselsubscip",
2462  "cut selection for sub SCIPs ('a'ge, activity 'q'uotient)",
2463  &(*set)->sepa_cutselsubscip, TRUE, SCIP_DEFAULT_SEPA_CUTSELSUBSCIP, "aq",
2464  NULL, NULL) );
2465  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2466  "separating/filtercutpoolrel",
2467  "should cutpool separate only cuts with high relative efficacy?",
2468  &(*set)->sepa_filtercutpoolrel, TRUE, SCIP_DEFAULT_SEPA_FILTERCUTPOOLREL,
2469  NULL, NULL) );
2470  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2471  "separating/maxruns",
2472  "maximal number of runs for which separation is enabled (-1: unlimited)",
2473  &(*set)->sepa_maxruns, TRUE, SCIP_DEFAULT_SEPA_MAXRUNS, -1, INT_MAX,
2474  NULL, NULL) );
2475  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2476  "separating/maxrounds",
2477  "maximal number of separation rounds per node (-1: unlimited)",
2478  &(*set)->sepa_maxrounds, FALSE, SCIP_DEFAULT_SEPA_MAXROUNDS, -1, INT_MAX,
2479  NULL, NULL) );
2480  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2481  "separating/maxroundsroot",
2482  "maximal number of separation rounds in the root node (-1: unlimited)",
2483  &(*set)->sepa_maxroundsroot, FALSE, SCIP_DEFAULT_SEPA_MAXROUNDSROOT, -1, INT_MAX,
2484  NULL, NULL) );
2485  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2486  "separating/maxroundsrootsubrun",
2487  "maximal number of separation rounds in the root node of a subsequent run (-1: unlimited)",
2488  &(*set)->sepa_maxroundsrootsubrun, TRUE, SCIP_DEFAULT_SEPA_MAXROUNDSROOTSUBRUN, -1, INT_MAX,
2489  NULL, NULL) );
2490  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2491  "separating/maxaddrounds",
2492  "maximal additional number of separation rounds in subsequent price-and-cut loops (-1: no additional restriction)",
2493  &(*set)->sepa_maxaddrounds, TRUE, SCIP_DEFAULT_SEPA_MAXADDROUNDS, -1, INT_MAX,
2494  NULL, NULL) );
2495  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2496  "separating/maxstallrounds",
2497  "maximal number of consecutive separation rounds without objective or integrality improvement in local nodes (-1: no additional restriction)",
2498  &(*set)->sepa_maxstallrounds, FALSE, SCIP_DEFAULT_SEPA_MAXSTALLROUNDS, -1, INT_MAX,
2499  NULL, NULL) );
2500  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2501  "separating/maxstallroundsroot",
2502  "maximal number of consecutive separation rounds without objective or integrality improvement in the root node (-1: no additional restriction)",
2503  &(*set)->sepa_maxstallroundsroot, FALSE, SCIP_DEFAULT_SEPA_MAXSTALLROUNDSROOT, -1, INT_MAX,
2504  NULL, NULL) );
2505  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2506  "separating/maxcuts",
2507  "maximal number of cuts separated per separation round (0: disable local separation)",
2508  &(*set)->sepa_maxcuts, FALSE, SCIP_DEFAULT_SEPA_MAXCUTS, 0, INT_MAX,
2509  NULL, NULL) );
2510  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2511  "separating/maxcutsroot",
2512  "maximal number of separated cuts at the root node (0: disable root node separation)",
2513  &(*set)->sepa_maxcutsroot, FALSE, SCIP_DEFAULT_SEPA_MAXCUTSROOT, 0, INT_MAX,
2514  NULL, NULL) );
2515  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2516  "separating/cutagelimit",
2517  "maximum age a cut can reach before it is deleted from the global cut pool, or -1 to keep all cuts",
2518  &(*set)->sepa_cutagelimit, TRUE, SCIP_DEFAULT_SEPA_CUTAGELIMIT, -1, INT_MAX,
2519  NULL, NULL) );
2520  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2521  "separating/poolfreq",
2522  "separation frequency for the global cut pool (-1: disable global cut pool, 0: only separate pool at the root)",
2523  &(*set)->sepa_poolfreq, FALSE, SCIP_DEFAULT_SEPA_POOLFREQ, -1, SCIP_MAXTREEDEPTH,
2524  NULL, NULL) );
2525 
2526  /* parallel parameters */
2527  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2528  "parallel/mode",
2529  "parallel optimisation mode, 0: opportunistic or 1: deterministic.",
2530  &(*set)->parallel_mode, FALSE, SCIP_DEFAULT_PARALLEL_MODE, 0, 1,
2531  NULL, NULL) );
2532  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2533  "parallel/minnthreads",
2534  "the minimum number of threads used during parallel solve",
2535  &(*set)->parallel_minnthreads, FALSE, SCIP_DEFAULT_PARALLEL_MINNTHREADS, 0, 64,
2536  NULL, NULL) );
2537  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2538  "parallel/maxnthreads",
2539  "the maximum number of threads used during parallel solve",
2540  &(*set)->parallel_maxnthreads, FALSE, SCIP_DEFAULT_PARALLEL_MAXNTHREADS, 0, 64,
2541  NULL, NULL) );
2542 
2543  /* concurrent solver parameters */
2544  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2545  "concurrent/changeseeds",
2546  "set different random seeds in each concurrent solver?",
2547  &(*set)->concurrent_changeseeds, FALSE, SCIP_DEFAULT_CONCURRENT_CHANGESEEDS,
2548  NULL, NULL) );
2549  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2550  "concurrent/changechildsel",
2551  "use different child selection rules in each concurrent solver?",
2552  &(*set)->concurrent_changechildsel, FALSE, SCIP_DEFAULT_CONCURRENT_CHANGECHILDSEL,
2553  NULL, NULL) );
2554  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2555  "concurrent/commvarbnds",
2556  "should the concurrent solvers communicate global variable bound changes?",
2557  &(*set)->concurrent_commvarbnds, FALSE, SCIP_DEFAULT_CONCURRENT_COMMVARBNDS,
2558  NULL, NULL) );
2559  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2560  "concurrent/presolvebefore",
2561  "should the problem be presolved before it is copied to the concurrent solvers?",
2562  &(*set)->concurrent_presolvebefore, FALSE, SCIP_DEFAULT_CONCURRENT_PRESOLVEBEFORE,
2563  NULL, NULL) );
2564  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2565  "concurrent/initseed",
2566  "maximum number of solutions that will be shared in a one synchronization",
2567  &(*set)->concurrent_initseed, FALSE, SCIP_DEFAULT_CONCURRENT_INITSEED, 0, INT_MAX,
2568  NULL, NULL) );
2569  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2570  "concurrent/sync/freqinit",
2571  "initial frequency of synchronization with other threads",
2572  &(*set)->concurrent_freqinit, FALSE, SCIP_DEFAULT_CONCURRENT_FREQINIT, 0.0, SCIP_REAL_MAX,
2573  NULL, NULL) );
2574  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2575  "concurrent/sync/freqmax",
2576  "maximal frequency of synchronization with other threads",
2577  &(*set)->concurrent_freqmax, FALSE, SCIP_DEFAULT_CONCURRENT_FREQMAX, 0.0, SCIP_REAL_MAX,
2578  NULL, NULL) );
2579  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2580  "concurrent/sync/freqfactor",
2581  "factor by which the frequency of synchronization is changed",
2582  &(*set)->concurrent_freqfactor, FALSE, SCIP_DEFAULT_CONCURRENT_FREQFACTOR, 1.0, SCIP_REAL_MAX,
2583  NULL, NULL) );
2584  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2585  "concurrent/sync/targetprogress",
2586  "when adapting the synchronization frequency this value is the targeted relative difference by which the absolute gap decreases per synchronization",
2587  &(*set)->concurrent_targetprogress, FALSE, SCIP_DEFAULT_CONCURRENT_TARGETPROGRESS, 0.0, SCIP_REAL_MAX,
2588  NULL, NULL) );
2589  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2590  "concurrent/sync/maxnsols",
2591  "maximum number of solutions that will be shared in a single synchronization",
2592  &(*set)->concurrent_maxnsols, FALSE, SCIP_DEFAULT_CONCURRENT_MAXNSOLS, 0, 1000,
2593  NULL, NULL) );
2594  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2595  "concurrent/sync/maxnsyncdelay",
2596  "maximum number of synchronizations before reading is enforced regardless of delay",
2597  &(*set)->concurrent_maxnsyncdelay, TRUE, SCIP_DEFAULT_CONCURRENT_MAXNSYNCDELAY, 0, 100,
2598  NULL, NULL) );
2599  SCIP_CALL( SCIPsetAddRealParam(*set, messagehdlr, blkmem,
2600  "concurrent/sync/minsyncdelay",
2601  "minimum delay before synchronization data is read",
2602  &(*set)->concurrent_minsyncdelay, FALSE, SCIP_DEFAULT_CONCURRENT_MINSYNCDELAY, 0.0, SCIP_REAL_MAX,
2603  NULL, NULL) );
2604  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2605  "concurrent/sync/nbestsols",
2606  "how many of the N best solutions should be considered for synchronization?",
2607  &(*set)->concurrent_nbestsols, FALSE, SCIP_DEFAULT_CONCURRENT_NBESTSOLS, 0, INT_MAX,
2608  NULL, NULL) );
2609  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
2610  "concurrent/paramsetprefix",
2611  "path prefix for parameter setting files of concurrent solvers",
2612  &(*set)->concurrent_paramsetprefix, FALSE, SCIP_DEFAULT_CONCURRENT_PARAMSETPREFIX,
2613  NULL, NULL) );
2614 
2615  /* timing parameters */
2616  assert(sizeof(int) == sizeof(SCIP_CLOCKTYPE)); /*lint !e506*/
2617  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2618  "timing/clocktype",
2619  "default clock type (1: CPU user seconds, 2: wall clock time)",
2620  (int*)&(*set)->time_clocktype, FALSE, (int)SCIP_DEFAULT_TIME_CLOCKTYPE, 1, 2,
2621  NULL, NULL) );
2622  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2623  "timing/enabled",
2624  "is timing enabled?",
2625  &(*set)->time_enabled, FALSE, SCIP_DEFAULT_TIME_ENABLED,
2626  NULL, NULL) );
2627  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2628  "timing/reading",
2629  "belongs reading time to solving time?",
2630  &(*set)->time_reading, FALSE, SCIP_DEFAULT_TIME_READING,
2631  NULL, NULL) );
2632  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2633  "timing/rareclockcheck",
2634  "should clock checks of solving time be performed less frequently (note: time limit could be exceeded slightly)",
2635  &(*set)->time_rareclockcheck, FALSE, SCIP_DEFAULT_TIME_RARECLOCKCHECK,
2636  NULL, NULL) );
2637  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2638  "timing/statistictiming",
2639  "should timing for statistic output be performed?",
2640  &(*set)->time_statistictiming, FALSE, SCIP_DEFAULT_TIME_STATISTICTIMING,
2641  paramChgdStatistictiming, NULL) );
2642  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2643  "timing/nlpieval",
2644  "should time for evaluation in NLP solves be measured?",
2645  &(*set)->time_nlpieval, FALSE, SCIP_DEFAULT_TIME_NLPIEVAL,
2646  NULL, NULL) );
2647 
2648  /* visualization parameters */
2649  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
2650  "visual/vbcfilename",
2651  "name of the VBC tool output file, or - if no VBC tool output should be created",
2652  &(*set)->visual_vbcfilename, FALSE, SCIP_DEFAULT_VISUAL_VBCFILENAME,
2653  NULL, NULL) );
2654  SCIP_CALL( SCIPsetAddStringParam(*set, messagehdlr, blkmem,
2655  "visual/bakfilename",
2656  "name of the BAK tool output file, or - if no BAK tool output should be created",
2657  &(*set)->visual_bakfilename, FALSE, SCIP_DEFAULT_VISUAL_BAKFILENAME,
2658  NULL, NULL) );
2659  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2660  "visual/realtime",
2661  "should the real solving time be used instead of a time step counter in visualization?",
2662  &(*set)->visual_realtime, FALSE, SCIP_DEFAULT_VISUAL_REALTIME,
2663  NULL, NULL) );
2664  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2665  "visual/dispsols",
2666  "should the node where solutions are found be visualized?",
2667  &(*set)->visual_dispsols, FALSE, SCIP_DEFAULT_VISUAL_DISPSOLS,
2668  NULL, NULL) );
2669  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2670  "visual/displb",
2671  "should lower bound information be visualized?",
2672  &(*set)->visual_displb, FALSE, SCIP_DEFAULT_VISUAL_DISPLB,
2673  NULL, NULL) );
2674  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2675  "visual/objextern",
2676  "should be output the external value of the objective?",
2677  &(*set)->visual_objextern, FALSE, SCIP_DEFAULT_VISUAL_OBJEXTERN,
2678  NULL, NULL) );
2679 
2680  /* Reading parameters */
2681  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2682  "reading/initialconss",
2683  "should model constraints be marked as initial?",
2684  &(*set)->read_initialconss, FALSE, SCIP_DEFAULT_READ_INITIALCONSS,
2685  NULL, NULL) );
2686  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2687  "reading/dynamicconss",
2688  "should model constraints be subject to aging?",
2689  &(*set)->read_dynamicconss, FALSE, SCIP_DEFAULT_READ_DYNAMICCONSS,
2690  NULL, NULL) );
2691  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2692  "reading/dynamiccols",
2693  "should columns be added and removed dynamically to the LP?",
2694  &(*set)->read_dynamiccols, FALSE, SCIP_DEFAULT_READ_DYNAMICCOLS,
2695  NULL, NULL) );
2696  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2697  "reading/dynamicrows",
2698  "should rows be added and removed dynamically to the LP?",
2699  &(*set)->read_dynamicrows, FALSE, SCIP_DEFAULT_READ_DYNAMICROWS,
2700  NULL, NULL) );
2701 
2702  /* Writing parameters */
2703  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2704  "write/allconss",
2705  "should all constraints be written (including the redundant constraints)?",
2706  &(*set)->write_allconss, FALSE, SCIP_DEFAULT_WRITE_ALLCONSS,
2707  NULL, NULL) );
2708  SCIP_CALL( SCIPsetAddBoolParam(*set, messagehdlr, blkmem,
2709  "write/printzeros",
2710  "should variables set to zero be printed?",
2711  &(*set)->write_printzeros, FALSE, SCIP_DEFAULT_PRINTZEROS,
2712  NULL, NULL) );
2713  SCIP_CALL( SCIPsetAddIntParam(*set, messagehdlr, blkmem,
2714  "write/genericnamesoffset",
2715  "when writing a generic problem the index for the first variable should start with?",
2716  &(*set)->write_genoffset, FALSE, SCIP_DEFAULT_WRITE_GENNAMES_OFFSET, 0, INT_MAX/2,
2717  NULL, NULL) );
2718 
2719  return SCIP_OKAY;
2720 }
2721 
2722 /** frees global SCIP settings */
2724  SCIP_SET** set, /**< pointer to SCIP settings */
2725  BMS_BLKMEM* blkmem /**< block memory */
2726  )
2727 {
2728  int i;
2729 
2730  assert(set != NULL);
2731 
2732  if( *set == NULL )
2733  return SCIP_OKAY;
2734 
2735  /* free parameter set */
2736  SCIPparamsetFree(&(*set)->paramset, blkmem);
2737 
2738  /* free file readers */
2739  for( i = 0; i < (*set)->nreaders; ++i )
2740  {
2741  SCIP_CALL( SCIPreaderFree(&(*set)->readers[i], *set) );
2742  }
2743  BMSfreeMemoryArrayNull(&(*set)->readers);
2744 
2745  /* free variable pricers */
2746  for( i = 0; i < (*set)->npricers; ++i )
2747  {
2748  SCIP_CALL( SCIPpricerFree(&(*set)->pricers[i], *set) );
2749  }
2750  BMSfreeMemoryArrayNull(&(*set)->pricers);
2751 
2752  /* free Benders' decomposition */
2753  for( i = 0; i < (*set)->nbenders; ++i )
2754  {
2755  SCIP_CALL( SCIPbendersFree(&(*set)->benders[i], *set) );
2756  }
2757  BMSfreeMemoryArrayNull(&(*set)->benders);
2758 
2759  /* free constraint handlers */
2760  for( i = 0; i < (*set)->nconshdlrs; ++i )
2761  {
2762  SCIP_CALL( SCIPconshdlrFree(&(*set)->conshdlrs[i], *set) );
2763  }
2764  BMSfreeMemoryArrayNull(&(*set)->conshdlrs);
2765  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_sepa);
2766  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_enfo);
2767  BMSfreeMemoryArrayNull(&(*set)->conshdlrs_include);
2768 
2769  /* free conflict handlers */
2770  for( i = 0; i < (*set)->nconflicthdlrs; ++i )
2771  {
2772  SCIP_CALL( SCIPconflicthdlrFree(&(*set)->conflicthdlrs[i], *set) );
2773  }
2774  BMSfreeMemoryArrayNull(&(*set)->conflicthdlrs);
2775 
2776  /* free presolvers */
2777  for( i = 0; i < (*set)->npresols; ++i )
2778  {
2779  SCIP_CALL( SCIPpresolFree(&(*set)->presols[i], *set) );
2780  }
2781  BMSfreeMemoryArrayNull(&(*set)->presols);
2782 
2783  /* free relaxators */
2784  for( i = 0; i < (*set)->nrelaxs; ++i )
2785  {
2786  SCIP_CALL( SCIPrelaxFree(&(*set)->relaxs[i], *set) );
2787  }
2788  BMSfreeMemoryArrayNull(&(*set)->relaxs);
2789 
2790  /* free separators */
2791  for( i = 0; i < (*set)->nsepas; ++i )
2792  {
2793  SCIP_CALL( SCIPsepaFree(&(*set)->sepas[i], *set) );
2794  }
2795  BMSfreeMemoryArrayNull(&(*set)->sepas);
2796 
2797  /* free cut selectors */
2798  for( i = 0; i < (*set)->ncutsels; ++i)
2799  {
2800  SCIP_CALL( SCIPcutselFree(&(*set)->cutsels[i], *set) );
2801  }
2802  BMSfreeMemoryArrayNull(&(*set)->cutsels);
2803 
2804  /* free propagators */
2805  for( i = 0; i < (*set)->nprops; ++i )
2806  {
2807  SCIP_CALL( SCIPpropFree(&(*set)->props[i], *set) );
2808  }
2809  BMSfreeMemoryArrayNull(&(*set)->props);
2810  BMSfreeMemoryArrayNull(&(*set)->props_presol);
2811 
2812  /* free primal heuristics */
2813  for( i = 0; i < (*set)->nheurs; ++i )
2814  {
2815  SCIP_CALL( SCIPheurFree(&(*set)->heurs[i], *set, blkmem) );
2816  }
2817  BMSfreeMemoryArrayNull(&(*set)->heurs);
2818 
2819  /* free tree compressions */
2820  for( i = 0; i < (*set)->ncomprs; ++i )
2821  {
2822  SCIP_CALL( SCIPcomprFree(&(*set)->comprs[i], *set) );
2823  }
2824  BMSfreeMemoryArrayNull(&(*set)->comprs);
2825 
2826  /* free event handlers */
2827  for( i = 0; i < (*set)->neventhdlrs; ++i )
2828  {
2829  SCIP_CALL( SCIPeventhdlrFree(&(*set)->eventhdlrs[i], *set) );
2830  }
2831  BMSfreeMemoryArrayNull(&(*set)->eventhdlrs);
2832 
2833  /* free node selectors */
2834  for( i = 0; i < (*set)->nnodesels; ++i )
2835  {
2836  SCIP_CALL( SCIPnodeselFree(&(*set)->nodesels[i], *set) );
2837  }
2838  BMSfreeMemoryArrayNull(&(*set)->nodesels);
2839 
2840  /* free branching methods */
2841  for( i = 0; i < (*set)->nbranchrules; ++i )
2842  {
2843  SCIP_CALL( SCIPbranchruleFree(&(*set)->branchrules[i], *set) );
2844  }
2845  BMSfreeMemoryArrayNull(&(*set)->branchrules);
2846 
2847  /* free statistics tables */
2848  for( i = 0; i < (*set)->ntables; ++i )
2849  {
2850  SCIP_CALL( SCIPtableFree(&(*set)->tables[i], *set) );
2851  }
2852  BMSfreeMemoryArrayNull(&(*set)->tables);
2853 
2854  /* free display columns */
2855  for( i = 0; i < (*set)->ndisps; ++i )
2856  {
2857  SCIP_CALL( SCIPdispFree(&(*set)->disps[i], *set) );
2858  }
2859  BMSfreeMemoryArrayNull(&(*set)->disps);
2860 
2861  /* free dialogs */
2862  BMSfreeMemoryArrayNull(&(*set)->dialogs);
2863 
2864  /* free expression handlers */
2865  for( i = 0; i < (*set)->nexprhdlrs; ++i )
2866  {
2867  SCIP_CALL( SCIPexprhdlrFree(&(*set)->exprhdlrs[i], *set, blkmem) );
2868  }
2869  BMSfreeMemoryArrayNull(&(*set)->exprhdlrs);
2870  (*set)->exprhdlrvar = NULL;
2871  (*set)->exprhdlrval = NULL;
2872  (*set)->exprhdlrsum = NULL;
2873  (*set)->exprhdlrproduct = NULL;
2874  (*set)->exprhdlrpow = NULL;
2875 
2876  /* free NLPIs */
2877  for( i = 0; i < (*set)->nnlpis; ++i )
2878  {
2879  SCIP_CALL( SCIPnlpiFree(&(*set)->nlpis[i], *set) );
2880  }
2881  BMSfreeMemoryArrayNull(&(*set)->nlpis);
2882 
2883  /* free concsolvers */
2885 
2886  /* free concsolvers types */
2887  for( i = 0; i < (*set)->nconcsolvertypes; ++i )
2888  {
2889  SCIPconcsolverTypeFree(&(*set)->concsolvertypes[i]);
2890  }
2891  BMSfreeMemoryArrayNull(&(*set)->concsolvertypes);
2892 
2893  /* free information on external codes */
2894  for( i = 0; i < (*set)->nextcodes; ++i )
2895  {
2896  BMSfreeMemoryArrayNull(&(*set)->extcodenames[i]);
2897  BMSfreeMemoryArrayNull(&(*set)->extcodedescs[i]);
2898  }
2899  BMSfreeMemoryArrayNull(&(*set)->extcodenames);
2900  BMSfreeMemoryArrayNull(&(*set)->extcodedescs);
2901 
2902  /* free virtual tables of bandit algorithms */
2903  for( i = 0; i < (*set)->nbanditvtables; ++i )
2904  {
2905  SCIPbanditvtableFree(&(*set)->banditvtables[i]);
2906  }
2907  BMSfreeMemoryArrayNull(&(*set)->banditvtables);
2908 
2909  /* free debugging data structure */
2910  SCIP_CALL( SCIPdebugFree(*set) );
2911 
2912  BMSfreeMemory(set);
2913 
2914  return SCIP_OKAY;
2915 }
2916 
2917 /** returns current stage of SCIP */
2919  SCIP_SET* set /**< global SCIP settings */
2920  )
2921 {
2922  assert(set != NULL);
2923 
2924  return set->stage;
2925 }
2926 
2927 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */
2929  SCIP_SET* set, /**< global SCIP settings */
2930  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2931  BMS_BLKMEM* blkmem, /**< block memory */
2932  const char* name, /**< name of the parameter */
2933  const char* desc, /**< description of the parameter */
2934  SCIP_Bool* valueptr, /**< pointer to store the current parameter value, or NULL */
2935  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
2936  SCIP_Bool defaultvalue, /**< default value of the parameter */
2937  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
2938  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
2939  )
2940 {
2941  assert(set != NULL);
2942 
2943  SCIP_CALL( SCIPparamsetAddBool(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
2944  defaultvalue, paramchgd, paramdata) );
2945 
2946  return SCIP_OKAY;
2947 }
2948 
2949 /** creates an int parameter, sets it to its default value, and adds it to the parameter set */
2951  SCIP_SET* set, /**< global SCIP settings */
2952  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2953  BMS_BLKMEM* blkmem, /**< block memory */
2954  const char* name, /**< name of the parameter */
2955  const char* desc, /**< description of the parameter */
2956  int* valueptr, /**< pointer to store the current parameter value, or NULL */
2957  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
2958  int defaultvalue, /**< default value of the parameter */
2959  int minvalue, /**< minimum value for parameter */
2960  int maxvalue, /**< maximum value for parameter */
2961  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
2962  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
2963  )
2964 {
2965  assert(set != NULL);
2966 
2967  SCIP_CALL( SCIPparamsetAddInt(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
2968  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
2969 
2970  return SCIP_OKAY;
2971 }
2972 
2973 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */
2975  SCIP_SET* set, /**< global SCIP settings */
2976  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
2977  BMS_BLKMEM* blkmem, /**< block memory */
2978  const char* name, /**< name of the parameter */
2979  const char* desc, /**< description of the parameter */
2980  SCIP_Longint* valueptr, /**< pointer to store the current parameter value, or NULL */
2981  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
2982  SCIP_Longint defaultvalue, /**< default value of the parameter */
2983  SCIP_Longint minvalue, /**< minimum value for parameter */
2984  SCIP_Longint maxvalue, /**< maximum value for parameter */
2985  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
2986  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
2987  )
2988 {
2989  assert(set != NULL);
2990 
2991  SCIP_CALL( SCIPparamsetAddLongint(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
2992  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
2993 
2994  return SCIP_OKAY;
2995 }
2996 
2997 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */
2999  SCIP_SET* set, /**< global SCIP settings */
3000  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3001  BMS_BLKMEM* blkmem, /**< block memory */
3002  const char* name, /**< name of the parameter */
3003  const char* desc, /**< description of the parameter */
3004  SCIP_Real* valueptr, /**< pointer to store the current parameter value, or NULL */
3005  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
3006  SCIP_Real defaultvalue, /**< default value of the parameter */
3007  SCIP_Real minvalue, /**< minimum value for parameter */
3008  SCIP_Real maxvalue, /**< maximum value for parameter */
3009  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
3010  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
3011  )
3012 {
3013  assert(set != NULL);
3014 
3015  SCIP_CALL( SCIPparamsetAddReal(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
3016  defaultvalue, minvalue, maxvalue, paramchgd, paramdata) );
3017 
3018  return SCIP_OKAY;
3019 }
3020 
3021 /** creates a char parameter, sets it to its default value, and adds it to the parameter set */
3023  SCIP_SET* set, /**< global SCIP settings */
3024  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3025  BMS_BLKMEM* blkmem, /**< block memory */
3026  const char* name, /**< name of the parameter */
3027  const char* desc, /**< description of the parameter */
3028  char* valueptr, /**< pointer to store the current parameter value, or NULL */
3029  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
3030  char defaultvalue, /**< default value of the parameter */
3031  const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
3032  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
3033  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
3034  )
3035 {
3036  assert(set != NULL);
3037 
3038  SCIP_CALL( SCIPparamsetAddChar(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
3039  defaultvalue, allowedvalues, paramchgd, paramdata) );
3040 
3041  return SCIP_OKAY;
3042 }
3043 
3044 /** creates a string parameter, sets it to its default value, and adds it to the parameter set */
3046  SCIP_SET* set, /**< global SCIP settings */
3047  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3048  BMS_BLKMEM* blkmem, /**< block memory */
3049  const char* name, /**< name of the parameter */
3050  const char* desc, /**< description of the parameter */
3051  char** valueptr, /**< pointer to store the current parameter value, or NULL */
3052  SCIP_Bool isadvanced, /**< is this parameter an advanced parameter? */
3053  const char* defaultvalue, /**< default value of the parameter */
3054  SCIP_DECL_PARAMCHGD ((*paramchgd)), /**< change information method of parameter */
3055  SCIP_PARAMDATA* paramdata /**< locally defined parameter specific data */
3056  )
3057 {
3058  assert(set != NULL);
3059 
3060  SCIP_CALL( SCIPparamsetAddString(set->paramset, messagehdlr, blkmem, name, desc, valueptr, isadvanced,
3061  defaultvalue, paramchgd, paramdata) );
3062 
3063  return SCIP_OKAY;
3064 }
3065 
3066 /** gets the fixing status value of an existing parameter */
3068  SCIP_SET* set, /**< global SCIP settings */
3069  const char* name /**< name of the parameter */
3070  )
3071 {
3072  assert(set != NULL);
3073 
3074  return SCIPparamsetIsFixed(set->paramset, name);
3075 }
3076 
3077 /** returns the pointer to the SCIP parameter with the given name */
3079  SCIP_SET* set, /**< global SCIP settings */
3080  const char* name /**< name of the parameter */
3081  )
3082 {
3083  assert(set != NULL);
3084 
3085  return SCIPparamsetGetParam(set->paramset, name);
3086 }
3087 
3088 /** gets the value of an existing SCIP_Bool parameter */
3090  SCIP_SET* set, /**< global SCIP settings */
3091  const char* name, /**< name of the parameter */
3092  SCIP_Bool* value /**< pointer to store the parameter */
3093  )
3094 {
3095  assert(set != NULL);
3096 
3097  SCIP_CALL( SCIPparamsetGetBool(set->paramset, name, value) );
3098 
3099  return SCIP_OKAY;
3100 }
3102 /** gets the value of an existing Int parameter */
3104  SCIP_SET* set, /**< global SCIP settings */
3105  const char* name, /**< name of the parameter */
3106  int* value /**< pointer to store the value of the parameter */
3107  )
3108 {
3109  assert(set != NULL);
3110 
3111  SCIP_CALL( SCIPparamsetGetInt(set->paramset, name, value) );
3112 
3113  return SCIP_OKAY;
3114 }
3115 
3116 /** gets the value of an existing SCIP_Longint parameter */
3118  SCIP_SET* set, /**< global SCIP settings */
3119  const char* name, /**< name of the parameter */
3120  SCIP_Longint* value /**< pointer to store the value of the parameter */
3121  )
3122 {
3123  assert(set != NULL);
3125  SCIP_CALL( SCIPparamsetGetLongint(set->paramset, name, value) );
3126 
3127  return SCIP_OKAY;
3128 }
3129 
3130 /** gets the value of an existing SCIP_Real parameter */
3132  SCIP_SET* set, /**< global SCIP settings */
3133  const char* name, /**< name of the parameter */
3134  SCIP_Real* value /**< pointer to store the value of the parameter */
3135  )
3136 {
3137  assert(set != NULL);
3138 
3139  SCIP_CALL( SCIPparamsetGetReal(set->paramset, name, value) );
3140 
3141  return SCIP_OKAY;
3142 }
3143 
3144 /** gets the value of an existing Char parameter */
3146  SCIP_SET* set, /**< global SCIP settings */
3147  const char* name, /**< name of the parameter */
3148  char* value /**< pointer to store the value of the parameter */
3149  )
3150 {
3151  assert(set != NULL);
3152 
3153  SCIP_CALL( SCIPparamsetGetChar(set->paramset, name, value) );
3154 
3155  return SCIP_OKAY;
3156 }
3158 /** gets the value of an existing String parameter */
3160  SCIP_SET* set, /**< global SCIP settings */
3161  const char* name, /**< name of the parameter */
3162  char** value /**< pointer to store the value of the parameter */
3163  )
3164 {
3165  assert(set != NULL);
3166 
3167  SCIP_CALL( SCIPparamsetGetString(set->paramset, name, value) );
3169  return SCIP_OKAY;
3170 }
3171 
3172 /** changes the fixing status of an existing parameter */
3174  SCIP_SET* set, /**< global SCIP settings */
3175  const char* name, /**< name of the parameter */
3176  SCIP_Bool fixed /**< new fixing status of the parameter */
3177  )
3178 {
3179  assert(set != NULL);
3180 
3181  SCIP_CALL( SCIPparamsetFix(set->paramset, name, fixed) );
3183  return SCIP_OKAY;
3184 }
3185 
3186 /** changes the value of an existing SCIP_Bool parameter */
3188  SCIP_SET* set, /**< global SCIP settings */
3189  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3190  SCIP_PARAM* param, /**< parameter */
3191  SCIP_Bool value /**< new value of the parameter */
3192  )
3193 {
3194  SCIP_RETCODE retcode;
3195 
3196  assert(set != NULL);
3197 
3198  retcode = SCIPparamSetBool(param, set, messagehdlr, value, FALSE, TRUE);
3199 
3200  if( retcode != SCIP_PARAMETERWRONGVAL )
3201  {
3202  SCIP_CALL( retcode );
3203  }
3204 
3205  return retcode;
3206 }
3207 
3208 /** changes the value of an existing SCIP_Bool parameter */
3210  SCIP_SET* set, /**< global SCIP settings */
3211  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3212  const char* name, /**< name of the parameter */
3213  SCIP_Bool value /**< new value of the parameter */
3214  )
3215 {
3216  assert(set != NULL);
3217 
3218  SCIP_CALL( SCIPparamsetSetBool(set->paramset, set, messagehdlr, name, value) );
3219 
3220  return SCIP_OKAY;
3221 }
3222 
3223 /** sets the default value of an existing SCIP_Bool parameter */
3225  SCIP_SET* set, /**< global SCIP settings */
3226  const char* name, /**< name of the parameter */
3227  SCIP_Bool defaultvalue /**< new default value of the parameter */
3228  )
3229 {
3230  assert(set != NULL);
3231 
3232  SCIP_CALL( SCIPparamsetSetDefaultBool(set->paramset, name, defaultvalue) );
3233 
3234  return SCIP_OKAY;
3235 }
3236 
3237 
3238 /** changes the value of an existing Int parameter */
3240  SCIP_SET* set, /**< global SCIP settings */
3241  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3242  SCIP_PARAM* param, /**< parameter */
3243  int value /**< new value of the parameter */
3244  )
3245 {
3246  SCIP_RETCODE retcode;
3247 
3248  assert(set != NULL);
3249  assert(param != NULL);
3250 
3251  retcode = SCIPparamSetInt(param, set, messagehdlr, value, FALSE, TRUE);
3253  if( retcode != SCIP_PARAMETERWRONGVAL )
3254  {
3255  SCIP_CALL( retcode );
3256  }
3257 
3258  return retcode;
3259 }
3260 
3261 /** changes the value of an existing Int parameter */
3263  SCIP_SET* set, /**< global SCIP settings */
3264  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3265  const char* name, /**< name of the parameter */
3266  int value /**< new value of the parameter */
3267  )
3268 {
3269  assert(set != NULL);
3270 
3271  SCIP_CALL( SCIPparamsetSetInt(set->paramset, set, messagehdlr, name, value) );
3272 
3273  return SCIP_OKAY;
3274 }
3275 
3276 /** changes the default value of an existing Int parameter */
3278  SCIP_SET* set, /**< global SCIP settings */
3279  const char* name, /**< name of the parameter */
3280  int defaultvalue /**< new default value of the parameter */
3281  )
3282 {
3283  assert(set != NULL);
3284 
3285  SCIP_CALL( SCIPparamsetSetDefaultInt(set->paramset, name, defaultvalue) );
3286 
3287  return SCIP_OKAY;
3289 
3290 /** changes the value of an existing SCIP_Longint parameter */
3292  SCIP_SET* set, /**< global SCIP settings */
3293  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3294  SCIP_PARAM* param, /**< parameter */
3295  SCIP_Longint value /**< new value of the parameter */
3296  )
3297 {
3298  SCIP_RETCODE retcode;
3299 
3300  assert(set != NULL);
3301  assert(param != NULL);
3302 
3303  retcode = SCIPparamSetLongint(param, set, messagehdlr, value, FALSE, TRUE);
3304 
3305  if( retcode != SCIP_PARAMETERWRONGVAL )
3306  {
3307  SCIP_CALL( retcode );
3308  }
3309 
3310  return retcode;
3311 }
3312 
3313 /** changes the value of an existing SCIP_Longint parameter */
3315  SCIP_SET* set, /**< global SCIP settings */
3316  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3317  const char* name, /**< name of the parameter */
3318  SCIP_Longint value /**< new value of the parameter */
3319  )
3320 {
3321  assert(set != NULL);
3322 
3323  SCIP_CALL( SCIPparamsetSetLongint(set->paramset, set, messagehdlr, name, value) );
3324 
3325  return SCIP_OKAY;
3326 }
3327 
3328 /** changes the value of an existing SCIP_Real parameter */
3330  SCIP_SET* set, /**< global SCIP settings */
3331  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3332  SCIP_PARAM* param, /**< parameter */
3333  SCIP_Real value /**< new value of the parameter */
3334  )
3335 {
3336  SCIP_RETCODE retcode;
3337 
3338  assert(set != NULL);
3339  assert(param != NULL);
3340 
3341  retcode = SCIPparamSetReal(param, set, messagehdlr, value, FALSE, TRUE);
3342 
3343  if( retcode != SCIP_PARAMETERWRONGVAL )
3344  {
3345  SCIP_CALL( retcode );
3346  }
3347 
3348  return retcode;
3349 }
3350 
3351 /** changes the value of an existing SCIP_Real parameter */
3353  SCIP_SET* set, /**< global SCIP settings */
3354  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3355  const char* name, /**< name of the parameter */
3356  SCIP_Real value /**< new value of the parameter */
3357  )
3358 {
3359  assert(set != NULL);
3360 
3361  SCIP_CALL( SCIPparamsetSetReal(set->paramset, set, messagehdlr, name, value) );
3362 
3363  return SCIP_OKAY;
3364 }
3365 
3366 /** changes the value of an existing Char parameter */
3368  SCIP_SET* set, /**< global SCIP settings */
3369  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3370  SCIP_PARAM* param, /**< parameter */
3371  char value /**< new value of the parameter */
3372  )
3373 {
3374  SCIP_RETCODE retcode;
3375 
3376  assert(set != NULL);
3377  assert(param != NULL);
3378 
3379  retcode = SCIPparamSetChar(param, set, messagehdlr, value, FALSE, TRUE);
3380 
3381  if( retcode != SCIP_PARAMETERWRONGVAL )
3382  {
3383  SCIP_CALL( retcode );
3384  }
3385 
3386  return retcode;
3387 }
3388 
3389 /** changes the value of an existing Char parameter */
3391  SCIP_SET* set, /**< global SCIP settings */
3392  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3393  const char* name, /**< name of the parameter */
3394  char value /**< new value of the parameter */
3395  )
3396 {
3397  assert(set != NULL);
3398 
3399  SCIP_CALL( SCIPparamsetSetChar(set->paramset, set, messagehdlr, name, value) );
3400 
3401  return SCIP_OKAY;
3402 }
3403 
3404 /** changes the value of an existing String parameter */
3406  SCIP_SET* set, /**< global SCIP settings */
3407  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3408  SCIP_PARAM* param, /**< parameter */
3409  const char* value /**< new value of the parameter */
3410  )
3411 {
3412  SCIP_RETCODE retcode;
3413 
3414  assert(set != NULL);
3415  assert(param != NULL);
3416 
3417  retcode = SCIPparamSetString(param, set, messagehdlr, value, TRUE);
3418 
3419  if( retcode != SCIP_PARAMETERWRONGVAL )
3420  {
3421  SCIP_CALL( retcode );
3422  }
3423 
3424  return retcode;
3425 }
3426 
3427 /** changes the value of an existing String parameter */
3429  SCIP_SET* set, /**< global SCIP settings */
3430  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3431  const char* name, /**< name of the parameter */
3432  const char* value /**< new value of the parameter */
3433  )
3434 {
3435  assert(set != NULL);
3436 
3437  SCIP_CALL( SCIPparamsetSetString(set->paramset, set, messagehdlr, name, value) );
3438 
3439  return SCIP_OKAY;
3440 }
3441 
3442 /** reads parameters from a file */
3444  SCIP_SET* set, /**< global SCIP settings */
3445  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3446  const char* filename /**< file name */
3447  )
3448 {
3449  assert(set != NULL);
3450 
3451  SCIP_CALL( SCIPparamsetRead(set->paramset, set, messagehdlr, filename) );
3452 
3453  return SCIP_OKAY;
3454 }
3455 
3456 /** writes all parameters in the parameter set to a file */
3458  SCIP_SET* set, /**< global SCIP settings */
3459  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3460  const char* filename, /**< file name, or NULL for stdout */
3461  SCIP_Bool comments, /**< should parameter descriptions be written as comments? */
3462  SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
3463  )
3464 {
3465  assert(set != NULL);
3466 
3467  SCIP_CALL( SCIPparamsetWrite(set->paramset, messagehdlr, filename, comments, onlychanged) );
3468 
3469  return SCIP_OKAY;
3470 }
3471 
3472 /** resets a single parameters to its default value */
3474  SCIP_SET* set, /**< global SCIP settings */
3475  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3476  const char* name /**< name of the parameter */
3477  )
3478 {
3479  SCIP_CALL( SCIPparamsetSetToDefault(set->paramset, set, messagehdlr, name) );
3480 
3481  return SCIP_OKAY;
3482 }
3483 
3484 /** resets all parameters to their default values */
3486  SCIP_SET* set, /**< global SCIP settings */
3487  SCIP_MESSAGEHDLR* messagehdlr /**< message handler */
3488  )
3489 {
3490  SCIP_CALL( SCIPparamsetSetToDefaults(set->paramset, set, messagehdlr) );
3491 
3492  return SCIP_OKAY;
3493 }
3494 
3495 /** sets parameters to
3496  *
3497  * - \ref SCIP_PARAMEMPHASIS_DEFAULT to use default values (see also SCIPsetResetParams())
3498  * - \ref SCIP_PARAMEMPHASIS_COUNTER to get feasible and "fast" counting process
3499  * - \ref SCIP_PARAMEMPHASIS_CPSOLVER to get CP like search (e.g. no LP relaxation)
3500  * - \ref SCIP_PARAMEMPHASIS_EASYCIP to solve easy problems fast
3501  * - \ref SCIP_PARAMEMPHASIS_FEASIBILITY to detect feasibility fast
3502  * - \ref SCIP_PARAMEMPHASIS_HARDLP to be capable to handle hard LPs
3503  * - \ref SCIP_PARAMEMPHASIS_OPTIMALITY to prove optimality fast
3504  * - \ref SCIP_PARAMEMPHASIS_PHASEFEAS to find feasible solutions during a 3 phase solution process
3505  * - \ref SCIP_PARAMEMPHASIS_PHASEIMPROVE to find improved solutions during a 3 phase solution process
3506  * - \ref SCIP_PARAMEMPHASIS_PHASEPROOF to proof optimality during a 3 phase solution process
3507  */
3509  SCIP_SET* set, /**< global SCIP settings */
3510  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3511  SCIP_PARAMEMPHASIS paramemphasis, /**< parameter settings */
3512  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
3513  )
3514 {
3515  SCIP_CALL( SCIPparamsetSetEmphasis(set->paramset, set, messagehdlr, paramemphasis, quiet) );
3516 
3517  return SCIP_OKAY;
3518 }
3519 
3520 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for
3521  * auxiliary SCIP instances to avoid recursion
3522  */
3524  SCIP_SET* set, /**< global SCIP settings */
3525  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3526  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
3527  )
3528 {
3529  SCIP_CALL( SCIPparamsetSetToSubscipsOff(set->paramset, set, messagehdlr, quiet) );
3530 
3531  return SCIP_OKAY;
3532 }
3533 
3534 /** sets heuristic parameters values to
3535  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all heuristic parameters
3536  * - SCIP_PARAMSETTING_FAST such that the time spent on heuristics is decreased
3537  * - SCIP_PARAMSETTING_AGGRESSIVE such that the heuristics are called more aggressively
3538  * - SCIP_PARAMSETTING_OFF which turn off all heuristics
3539  */
3541  SCIP_SET* set, /**< global SCIP settings */
3542  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3543  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
3544  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
3545  )
3546 {
3547  SCIP_CALL( SCIPparamsetSetHeuristics(set->paramset, set, messagehdlr, paramsetting, quiet) );
3548 
3549  return SCIP_OKAY;
3550 }
3551 
3552 /** sets presolving parameters to
3553  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all presolving parameters
3554  * - SCIP_PARAMSETTING_FAST such that the time spent on presolving is decreased
3555  * - SCIP_PARAMSETTING_AGGRESSIVE such that the presolving is more aggressive
3556  * - SCIP_PARAMSETTING_OFF which turn off all presolving
3557  */
3559  SCIP_SET* set, /**< global SCIP settings */
3560  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3561  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
3562  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
3563  )
3565  SCIP_CALL( SCIPparamsetSetPresolving(set->paramset, set, messagehdlr, paramsetting, quiet) );
3566 
3567  return SCIP_OKAY;
3568 }
3569 
3570 /** sets separating parameters to
3571  * - SCIP_PARAMSETTING_DEFAULT which are the default values of all separating parameters
3572  * - SCIP_PARAMSETTING_FAST such that the time spent on separating is decreased
3573  * - SCIP_PARAMSETTING_AGGRESSIVE such that separating is more aggressive
3574  * - SCIP_PARAMSETTING_OFF which turn off all separating
3575  */
3577  SCIP_SET* set, /**< global SCIP settings */
3578  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
3579  SCIP_PARAMSETTING paramsetting, /**< parameter settings */
3580  SCIP_Bool quiet /**< should the parameter be set quiet (no output) */
3581  )
3582 {
3583  SCIP_CALL( SCIPparamsetSetSeparating(set->paramset, set, messagehdlr, paramsetting, quiet) );
3584 
3585  return SCIP_OKAY;
3586 }
3588 /** returns the array of all available SCIP parameters */
3590  SCIP_SET* set /**< global SCIP settings */
3591  )
3592 {
3593  assert(set != NULL);
3594 
3595  return SCIPparamsetGetParams(set->paramset);
3596 }
3597 
3598 /** returns the total number of all available SCIP parameters */
3599 int SCIPsetGetNParams(
3600  SCIP_SET* set /**< global SCIP settings */
3601  )
3603  assert(set != NULL);
3604 
3605  return SCIPparamsetGetNParams(set->paramset);
3606 }
3607 
3608 /** inserts file reader in file reader list */
3610  SCIP_SET* set, /**< global SCIP settings */
3611  SCIP_READER* reader /**< file reader */
3612  )
3613 {
3614  assert(set != NULL);
3615  assert(reader != NULL);
3616 
3617  if( set->nreaders >= set->readerssize )
3618  {
3619  set->readerssize = SCIPsetCalcMemGrowSize(set, set->nreaders+1);
3620  SCIP_ALLOC( BMSreallocMemoryArray(&set->readers, set->readerssize) );
3621  }
3622  assert(set->nreaders < set->readerssize);
3623 
3624  set->readers[set->nreaders] = reader;
3625  set->nreaders++;
3626 
3627  return SCIP_OKAY;
3628 }
3629 
3630 /** returns the file reader of the given name, or NULL if not existing */
3632  SCIP_SET* set, /**< global SCIP settings */
3633  const char* name /**< name of file reader */
3634  )
3635 {
3636  int i;
3638  assert(set != NULL);
3639  assert(name != NULL);
3640 
3641  for( i = 0; i < set->nreaders; ++i )
3642  {
3643  if( strcmp(SCIPreaderGetName(set->readers[i]), name) == 0 )
3644  return set->readers[i];
3645  }
3646 
3647  return NULL;
3648 }
3649 
3650 /** inserts variable pricer in variable pricer list */
3652  SCIP_SET* set, /**< global SCIP settings */
3653  SCIP_PRICER* pricer /**< variable pricer */
3654  )
3656  assert(set != NULL);
3657  assert(pricer != NULL);
3658 
3659  if( set->npricers >= set->pricerssize )
3660  {
3661  set->pricerssize = SCIPsetCalcMemGrowSize(set, set->npricers+1);
3662  SCIP_ALLOC( BMSreallocMemoryArray(&set->pricers, set->pricerssize) );
3663  }
3664  assert(set->npricers < set->pricerssize);
3665 
3666  set->pricers[set->npricers] = pricer;
3667  set->npricers++;
3668  set->pricerssorted = FALSE;
3669 
3670  return SCIP_OKAY;
3671 }
3672 
3673 /** returns the variable pricer of the given name, or NULL if not existing */
3675  SCIP_SET* set, /**< global SCIP settings */
3676  const char* name /**< name of variable pricer */
3677  )
3679  int i;
3680 
3681  assert(set != NULL);
3682  assert(name != NULL);
3683 
3684  for( i = 0; i < set->npricers; ++i )
3685  {
3686  if( strcmp(SCIPpricerGetName(set->pricers[i]), name) == 0 )
3687  return set->pricers[i];
3688  }
3689 
3690  return NULL;
3691 }
3692 
3693 /** sorts pricers by priorities */
3694 void SCIPsetSortPricers(
3695  SCIP_SET* set /**< global SCIP settings */
3696  )
3697 {
3698  assert(set != NULL);
3699 
3700  if( !set->pricerssorted )
3701  {
3702  SCIPsortPtr((void**)set->pricers, SCIPpricerComp, set->npricers);
3703  set->pricerssorted = TRUE;
3704  set->pricersnamesorted = FALSE;
3705  }
3706 }
3707 
3708 /** sorts pricers by name */
3710  SCIP_SET* set /**< global SCIP settings */
3711  )
3712 {
3713  assert(set != NULL);
3714 
3715  if( !set->pricersnamesorted )
3716  {
3717  SCIPsortPtr((void**)set->pricers, SCIPpricerCompName, set->npricers);
3718  set->pricerssorted = FALSE;
3719  set->pricersnamesorted = TRUE;
3720  }
3721 }
3722 
3723 /** inserts Benders' decomposition in the Benders' decomposition list */
3725  SCIP_SET* set, /**< global SCIP settings */
3726  SCIP_BENDERS* benders /**< Benders' decomposition structure */
3727  )
3728 {
3729  assert(set != NULL);
3730  assert(benders != NULL);
3731 
3732  if( set->nbenders >= set->benderssize )
3733  {
3734  set->benderssize = SCIPsetCalcMemGrowSize(set, set->nbenders+1);
3735  SCIP_ALLOC( BMSreallocMemoryArray(&set->benders, set->benderssize) );
3736  }
3737  assert(set->nbenders < set->benderssize);
3738 
3739  set->benders[set->nbenders] = benders;
3740  set->nbenders++;
3741  set->benderssorted = FALSE;
3742 
3743  return SCIP_OKAY;
3744 }
3745 
3746 /** returns the Benders' decomposition of the given name, or NULL if not existing */
3748  SCIP_SET* set, /**< global SCIP settings */
3749  const char* name /**< name of the Benders' decomposition */
3750  )
3751 {
3752  int i;
3754  assert(set != NULL);
3755  assert(name != NULL);
3756 
3757  for( i = 0; i < set->nbenders; ++i )
3758  {
3759  if( strcmp(SCIPbendersGetName(set->benders[i]), name) == 0 )
3760  return set->benders[i];
3761  }
3762 
3763  return NULL;
3764 }
3765 
3766 /** sorts Benders' decomposition by priorities */
3767 void SCIPsetSortBenders(
3768  SCIP_SET* set /**< global SCIP settings */
3769  )
3770 {
3771  assert(set != NULL);
3772 
3773  if( !set->benderssorted )
3774  {
3775  SCIPsortPtr((void**)set->benders, SCIPbendersComp, set->nbenders);
3776  set->benderssorted = TRUE;
3777  set->bendersnamesorted = FALSE;
3778  }
3779 }
3780 
3781 /** sorts Benders' decomposition by name */
3783  SCIP_SET* set /**< global SCIP settings */
3784  )
3785 {
3786  assert(set != NULL);
3787 
3788  if( !set->bendersnamesorted )
3789  {
3790  SCIPsortPtr((void**)set->benders, SCIPbendersCompName, set->nbenders);
3791  set->benderssorted = FALSE;
3792  set->bendersnamesorted = TRUE;
3793  }
3794 }
3795 
3796 /** inserts constraint handler in constraint handler list */
3798  SCIP_SET* set, /**< global SCIP settings */
3799  SCIP_CONSHDLR* conshdlr /**< constraint handler */
3800  )
3801 {
3802  int priority;
3803  int i;
3804 
3805  assert(set != NULL);
3806  assert(conshdlr != NULL);
3807  assert(!SCIPconshdlrIsInitialized(conshdlr));
3808 
3809  /* allocate memory */
3810  if( set->nconshdlrs >= set->conshdlrssize )
3811  {
3812  set->conshdlrssize = SCIPsetCalcMemGrowSize(set, set->nconshdlrs+1);
3813  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs, set->conshdlrssize) );
3814  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_sepa, set->conshdlrssize) );
3815  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_enfo, set->conshdlrssize) );
3816  SCIP_ALLOC( BMSreallocMemoryArray(&set->conshdlrs_include, set->conshdlrssize) );
3817  }
3818  assert(set->nconshdlrs < set->conshdlrssize);
3819 
3820  /* sort constraint handler into conshdlrs array sorted by check priority */
3821  priority = SCIPconshdlrGetCheckPriority(conshdlr);
3822  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetCheckPriority(set->conshdlrs[i-1]) < priority; --i )
3823  {
3824  set->conshdlrs[i] = set->conshdlrs[i-1];
3825  }
3826  set->conshdlrs[i] = conshdlr;
3827 
3828  /* sort constraint handler into conshdlrs_sepa array sorted by sepa priority */
3829  priority = SCIPconshdlrGetSepaPriority(conshdlr);
3830  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i-1]) < priority; --i )
3831  {
3832  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i-1];
3833  }
3834  set->conshdlrs_sepa[i] = conshdlr;
3835 
3836  /* sort constraint handler into conshdlrs_enfo array sorted by enfo priority */
3837  priority = SCIPconshdlrGetEnfoPriority(conshdlr);
3838  for( i = set->nconshdlrs; i > 0 && SCIPconshdlrGetEnfoPriority(set->conshdlrs_enfo[i-1]) < priority; --i )
3839  {
3840  set->conshdlrs_enfo[i] = set->conshdlrs_enfo[i-1];
3841  }
3842  set->conshdlrs_enfo[i] = conshdlr;
3843 
3844  /* add constraint handler into conshdlrs_include array sorted by inclusion order */
3845  set->conshdlrs_include[set->nconshdlrs] = conshdlr;
3847  set->nconshdlrs++;
3848 
3849  return SCIP_OKAY;
3850 }
3851 
3852 /** reinserts a constraint handler with modified sepa priority into the sepa priority sorted array */
3854  SCIP_SET* set, /**< global SCIP settings */
3855  SCIP_CONSHDLR* conshdlr, /**< constraint handler to be reinserted */
3856  int oldpriority /**< the old separation priority of constraint handler */
3857  )
3858 {
3859  int newpriority;
3860  int newpos;
3861  int i;
3862  assert(set != NULL);
3863  assert(conshdlr != NULL);
3864 
3865  newpriority = SCIPconshdlrGetSepaPriority(conshdlr);
3866  newpos = -1;
3867 
3868  /* search for the old position of constraint handler; determine its new position at the same time */
3869  if( newpriority > oldpriority )
3870  {
3871  i = 0;
3872  while( i < set->nconshdlrs &&
3873  strcmp(SCIPconshdlrGetName(set->conshdlrs_sepa[i]), SCIPconshdlrGetName(conshdlr)) != 0 )
3874  {
3875  int priorityatpos;
3877  priorityatpos = SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i]);
3878  assert(priorityatpos >= oldpriority);
3879 
3880  /* current index is the position to insert the constraint handler */
3881  if( newpriority > priorityatpos && newpos == -1 )
3882  newpos = i;
3883 
3884  ++i;
3885  }
3886  assert(i < set->nconshdlrs);
3887 
3888  /* constraint must change its position in array */
3889  if( newpos != -1 )
3890  {
3891  /* shift all constraint handlers between old and new position by one, and insert constraint handler */
3892  for( ; i > newpos; --i )
3893  {
3894  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i-1];
3895  }
3896  set->conshdlrs_sepa[newpos] = conshdlr;
3897  }
3898  }
3899  else if( newpriority < oldpriority )
3900  {
3901  i = set->nconshdlrs - 1;
3902  while( i >= 0 && strcmp(SCIPconshdlrGetName(set->conshdlrs_sepa[i]), SCIPconshdlrGetName(conshdlr)) != 0 )
3903  {
3904  int priorityatpos;
3905 
3906  priorityatpos = SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i]);
3907  assert(priorityatpos <= oldpriority);
3908 
3909  /* current index is the position to insert the constraint handler */
3910  if( newpriority < priorityatpos && newpos == -1 )
3911  newpos = i;
3912 
3913  --i;
3914  }
3915  assert(i >= 0);
3916 
3917  /* constraint must change its position in array */
3918  if( newpos != -1 )
3919  {
3920  /* shift all constraint handlers between old and new position by one, and insert constraint handler */
3921  for(; i < newpos; ++i )
3922  {
3923  set->conshdlrs_sepa[i] = set->conshdlrs_sepa[i + 1];
3924  }
3925  set->conshdlrs_sepa[newpos] = conshdlr;
3926  }
3927 #ifndef NDEBUG
3928  for( i = 0; i < set->nconshdlrs - 1; ++i )
3929  assert(SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i])
3930  >= SCIPconshdlrGetSepaPriority(set->conshdlrs_sepa[i + 1]));
3931 #endif
3932  }
3933 }
3934 
3935 /** returns the constraint handler of the given name, or NULL if not existing */
3937  SCIP_SET* set, /**< global SCIP settings */
3938  const char* name /**< name of constraint handler */
3939  )
3940 {
3941  int i;
3942 
3943  assert(set != NULL);
3944  assert(name != NULL);
3945 
3946  for( i = 0; i < set->nconshdlrs; ++i )
3947  {
3948  if( strcmp(SCIPconshdlrGetName(set->conshdlrs[i]), name) == 0 )
3949  return set->conshdlrs[i];
3950  }
3951 
3952  return NULL;
3953 }
3954 
3955 /** inserts conflict handler in conflict handler list */
3957  SCIP_SET* set, /**< global SCIP settings */
3958  SCIP_CONFLICTHDLR* conflicthdlr /**< conflict handler */
3959  )
3960 {
3961  assert(set != NULL);
3962  assert(conflicthdlr != NULL);
3963  assert(!SCIPconflicthdlrIsInitialized(conflicthdlr));
3964 
3965  if( set->nconflicthdlrs >= set->conflicthdlrssize )
3966  {
3967  set->conflicthdlrssize = SCIPsetCalcMemGrowSize(set, set->nconflicthdlrs+1);
3968  SCIP_ALLOC( BMSreallocMemoryArray(&set->conflicthdlrs, set->conflicthdlrssize) );
3969  }
3970  assert(set->nconflicthdlrs < set->conflicthdlrssize);
3971 
3972  set->conflicthdlrs[set->nconflicthdlrs] = conflicthdlr;
3973  set->nconflicthdlrs++;
3974  set->conflicthdlrssorted = FALSE;
3975 
3976  return SCIP_OKAY;
3977 }
3978 
3979 /** returns the conflict handler of the given name, or NULL if not existing */
3981  SCIP_SET* set, /**< global SCIP settings */
3982  const char* name /**< name of conflict handler */
3983  )
3984 {
3985  int i;
3986 
3987  assert(set != NULL);
3988  assert(name != NULL);
3989 
3990  for( i = 0; i < set->nconflicthdlrs; ++i )
3991  {
3992  if( strcmp(SCIPconflicthdlrGetName(set->conflicthdlrs[i]), name) == 0 )
3993  return set->conflicthdlrs[i];
3994  }
3995 
3996  return NULL;
3997 }
3998 
3999 /** sorts conflict handlers by priorities */
4001  SCIP_SET* set /**< global SCIP settings */
4002  )
4003 {
4004  assert(set != NULL);
4005 
4006  if( !set->conflicthdlrssorted )
4007  {
4008  SCIPsortPtr((void**)set->conflicthdlrs, SCIPconflicthdlrComp, set->nconflicthdlrs);
4009  set->conflicthdlrssorted = TRUE;
4010  set->conflicthdlrsnamesorted = FALSE;
4011  }
4012 }
4013 
4014 /** sorts conflict handlers by name */
4016  SCIP_SET* set /**< global SCIP settings */
4017  )
4018 {
4019  assert(set != NULL);
4020 
4021  if( !set->conflicthdlrsnamesorted )
4022  {
4023  SCIPsortPtr((void**)set->conflicthdlrs, SCIPconflicthdlrCompName, set->nconflicthdlrs);
4024  set->conflicthdlrssorted = FALSE;
4025  set->conflicthdlrsnamesorted = TRUE;
4026  }
4027 }
4028 
4029 /** inserts presolver in presolver list */
4031  SCIP_SET* set, /**< global SCIP settings */
4032  SCIP_PRESOL* presol /**< presolver */
4033  )
4034 {
4035  assert(set != NULL);
4036  assert(presol != NULL);
4037 
4038  if( set->npresols >= set->presolssize )
4039  {
4040  set->presolssize = SCIPsetCalcMemGrowSize(set, set->npresols+1);
4041  SCIP_ALLOC( BMSreallocMemoryArray(&set->presols, set->presolssize) );
4042  }
4043  assert(set->npresols < set->presolssize);
4044 
4045  set->presols[set->npresols] = presol;
4046  set->npresols++;
4047  set->presolssorted = FALSE;
4048 
4049  return SCIP_OKAY;
4050 }
4051 
4052 /** returns the presolver of the given name, or NULL if not existing */
4054  SCIP_SET* set, /**< global SCIP settings */
4055  const char* name /**< name of presolver */
4056  )
4057 {
4058  int i;
4060  assert(set != NULL);
4061  assert(name != NULL);
4062 
4063  for( i = 0; i < set->npresols; ++i )
4064  {
4065  if( strcmp(SCIPpresolGetName(set->presols[i]), name) == 0 )
4066  return set->presols[i];
4067  }
4068 
4069  return NULL;
4070 }
4071 
4072 /** sorts presolvers by priorities */
4073 void SCIPsetSortPresols(
4074  SCIP_SET* set /**< global SCIP settings */
4075  )
4076 {
4077  assert(set != NULL);
4078 
4079  if( !set->presolssorted )
4080  {
4081  SCIPsortPtr((void**)set->presols, SCIPpresolComp, set->npresols);
4082  set->presolssorted = TRUE;
4083  set->presolsnamesorted = FALSE;
4084  }
4085 }
4086 
4087 /** sorts presolvers by name */
4089  SCIP_SET* set /**< global SCIP settings */
4090  )
4091 {
4092  assert(set != NULL);
4093 
4094  if( !set->presolsnamesorted )
4095  {
4096  SCIPsortPtr((void**)set->presols, SCIPpresolCompName, set->npresols);
4097  set->presolssorted = FALSE;
4098  set->presolsnamesorted = TRUE;
4099  }
4100 }
4101 
4102 /** inserts relaxator in relaxator list */
4104  SCIP_SET* set, /**< global SCIP settings */
4105  SCIP_RELAX* relax /**< relaxator */
4106  )
4107 {
4108  assert(set != NULL);
4109  assert(relax != NULL);
4110  assert(!SCIPrelaxIsInitialized(relax));
4111 
4112  if( set->nrelaxs >= set->relaxssize )
4113  {
4114  set->relaxssize = SCIPsetCalcMemGrowSize(set, set->nrelaxs+1);
4115  SCIP_ALLOC( BMSreallocMemoryArray(&set->relaxs, set->relaxssize) );
4116  }
4117  assert(set->nrelaxs < set->relaxssize);
4118 
4119  set->relaxs[set->nrelaxs] = relax;
4120  set->nrelaxs++;
4121  set->relaxssorted = FALSE;
4122 
4123  return SCIP_OKAY;
4124 }
4125 
4126 /** returns the relaxator of the given name, or NULL if not existing */
4128  SCIP_SET* set, /**< global SCIP settings */
4129  const char* name /**< name of relaxator */
4130  )
4131 {
4132  int i;
4133 
4134  assert(set != NULL);
4135  assert(name != NULL);
4136 
4137  for( i = 0; i < set->nrelaxs; ++i )
4138  {
4139  if( strcmp(SCIPrelaxGetName(set->relaxs[i]), name) == 0 )
4140  return set->relaxs[i];
4141  }
4142 
4143  return NULL;
4144 }
4145 
4146 /** sorts relaxators by priorities */
4147 void SCIPsetSortRelaxs(
4148  SCIP_SET* set /**< global SCIP settings */
4149  )
4150 {
4151  assert(set != NULL);
4153  if( !set->relaxssorted )
4154  {
4155  SCIPsortPtr((void**)set->relaxs, SCIPrelaxComp, set->nrelaxs);
4156  set->relaxssorted = TRUE;
4157  set->relaxsnamesorted = FALSE;
4158  }
4159 }
4160 
4161 /** sorts relaxators by priorities */
4163  SCIP_SET* set /**< global SCIP settings */
4164  )
4165 {
4166  assert(set != NULL);
4168  if( !set->relaxsnamesorted )
4169  {
4170  SCIPsortPtr((void**)set->relaxs, SCIPrelaxCompName, set->nrelaxs);
4171  set->relaxssorted = FALSE;
4172  set->relaxsnamesorted = TRUE;
4173  }
4174 }
4175 
4176 /** inserts separator in separator list */
4178  SCIP_SET* set, /**< global SCIP settings */
4179  SCIP_SEPA* sepa /**< separator */
4180  )
4181 {
4182  assert(set != NULL);
4183  assert(sepa != NULL);
4184  assert(!SCIPsepaIsInitialized(sepa));
4185 
4186  if( set->nsepas >= set->sepassize )
4187  {
4188  set->sepassize = SCIPsetCalcMemGrowSize(set, set->nsepas+1);
4189  SCIP_ALLOC( BMSreallocMemoryArray(&set->sepas, set->sepassize) );
4190  }
4191  assert(set->nsepas < set->sepassize);
4192 
4193  set->sepas[set->nsepas] = sepa;
4194  set->nsepas++;
4195  set->sepassorted = FALSE;
4196 
4197  return SCIP_OKAY;
4198 }
4199 
4200 /** returns the separator of the given name, or NULL if not existing */
4202  SCIP_SET* set, /**< global SCIP settings */
4203  const char* name /**< name of separator */
4204  )
4205 {
4206  int i;
4207 
4208  assert(set != NULL);
4209  assert(name != NULL);
4210 
4211  for( i = 0; i < set->nsepas; ++i )
4212  {
4213  if( strcmp(SCIPsepaGetName(set->sepas[i]), name) == 0 )
4214  return set->sepas[i];
4215  }
4216 
4217  return NULL;
4218 }
4219 
4220 /** sorts separators by priorities */
4221 void SCIPsetSortSepas(
4222  SCIP_SET* set /**< global SCIP settings */
4223  )
4224 {
4225  assert(set != NULL);
4227  if( !set->sepassorted )
4228  {
4229  SCIPsortPtr((void**)set->sepas, SCIPsepaComp, set->nsepas);
4230  set->sepassorted = TRUE;
4231  set->sepasnamesorted = FALSE;
4232  }
4233 }
4234 
4235 /** sorts separators by name */
4237  SCIP_SET* set /**< global SCIP settings */
4238  )
4239 {
4240  assert(set != NULL);
4242  if( !set->sepasnamesorted )
4243  {
4244  SCIPsortPtr((void**)set->sepas, SCIPsepaCompName, set->nsepas);
4245  set->sepassorted = FALSE;
4246  set->sepasnamesorted = TRUE;
4247  }
4248 }
4249 
4250 /** inserts cut selector in cut selector list */
4252  SCIP_SET* set, /**< global SCIP settings */
4253  SCIP_CUTSEL* cutsel /**< cut selector */
4254  )
4255 {
4256  assert(set != NULL);
4257  assert(cutsel != NULL);
4258  assert(!SCIPcutselIsInitialized(cutsel));
4259 
4260  if( set->ncutsels >= set->cutselssize )
4261  {
4262  set->cutselssize = SCIPsetCalcMemGrowSize(set, set->ncutsels + 1);
4263  SCIP_ALLOC( BMSreallocMemoryArray(&set->cutsels, set->cutselssize) );
4264  }
4265  assert(set->ncutsels < set->cutselssize);
4266 
4267  set->cutsels[set->ncutsels] = cutsel;
4268  set->ncutsels++;
4269  set->cutselssorted = FALSE;
4270 
4271  return SCIP_OKAY;
4272 }
4273 
4274 /** returns the cut selector of the given name, or NULL if not existing */
4276  SCIP_SET* set, /**< global SCIP settings */
4277  const char* name /**< name of separator */
4278  )
4279 {
4280  int i;
4281 
4282  assert(set != NULL);
4283  assert(name != NULL);
4284 
4285  for( i = 0; i < set->ncutsels; ++i )
4286  {
4287  if( strcmp(SCIPcutselGetName(set->cutsels[i]), name) == 0 )
4288  return set->cutsels[i];
4289  }
4290 
4291  return NULL;
4292 }
4293 
4294 /** sorts cut selectors by priorities */
4295 void SCIPsetSortCutsels(
4296  SCIP_SET* set /**< global SCIP settings */
4297  )
4298 {
4299  assert(set != NULL);
4301  if( !set->cutselssorted )
4302  {
4303  SCIPsortPtr((void**)set->cutsels, SCIPcutselComp, set->ncutsels);
4304  set->cutselssorted = TRUE;
4305  }
4306 }
4307 
4308 /** inserts propagator in propagator list */
4310  SCIP_SET* set, /**< global SCIP settings */
4311  SCIP_PROP* prop /**< propagator */
4312  )
4313 {
4314  assert(set != NULL);
4315  assert(prop != NULL);
4316  assert(!SCIPpropIsInitialized(prop));
4317 
4318  if( set->nprops >= set->propssize )
4319  {
4320  set->propssize = SCIPsetCalcMemGrowSize(set, set->nprops+1);
4321  SCIP_ALLOC( BMSreallocMemoryArray(&set->props, set->propssize) );
4322  SCIP_ALLOC( BMSreallocMemoryArray(&set->props_presol, set->propssize) );
4323  }
4324  assert(set->nprops < set->propssize);
4325 
4326  set->props[set->nprops] = prop;
4327  set->props_presol[set->nprops] = prop;
4328  set->nprops++;
4329  set->propssorted = FALSE;
4330  set->propspresolsorted = FALSE;
4331 
4332  return SCIP_OKAY;
4333 }
4334 
4335 /** returns the propagator of the given name, or NULL if not existing */
4337  SCIP_SET* set, /**< global SCIP settings */
4338  const char* name /**< name of propagator */
4339  )
4340 {
4341  int i;
4342 
4343  assert(set != NULL);
4344  assert(name != NULL);
4345 
4346  for( i = 0; i < set->nprops; ++i )
4347  {
4348  if( strcmp(SCIPpropGetName(set->props[i]), name) == 0 )
4349  return set->props[i];
4350  }
4351 
4352  return NULL;
4353 }
4355 /** sorts propagators by priorities */
4356 void SCIPsetSortProps(
4357  SCIP_SET* set /**< global SCIP settings */
4358  )
4359 {
4360  assert(set != NULL);
4361 
4362  if( !set->propssorted )
4363  {
4364  SCIPsortPtr((void**)set->props, SCIPpropComp, set->nprops);
4365  set->propssorted = TRUE;
4366  set->propsnamesorted = FALSE;
4367  }
4368 }
4369 
4370 /** sorts propagators by priorities for presolving */
4372  SCIP_SET* set /**< global SCIP settings */
4373  )
4375  assert(set != NULL);
4376 
4377  if( !set->propspresolsorted )
4378  {
4379  SCIPsortPtr((void**)set->props_presol, SCIPpropCompPresol, set->nprops);
4380  set->propspresolsorted = TRUE;
4381  set->propsnamesorted = FALSE;
4382  }
4383 }
4384 
4385 /** sorts propagators w.r.t. names */
4387  SCIP_SET* set /**< global SCIP settings */
4388  )
4389 {
4390  assert(set != NULL);
4391 
4392  if( !set->propsnamesorted )
4393  {
4394  SCIPsortPtr((void**)set->props, SCIPpropCompName, set->nprops);
4395  set->propssorted = FALSE;
4396  set->propsnamesorted = TRUE;
4397  }
4398 }
4399 
4400 /** inserts bandit virtual function table into set */
4402  SCIP_SET* set, /**< global SCIP settings */
4403  SCIP_BANDITVTABLE* banditvtable /**< bandit algorithm virtual function table */
4404  )
4405 {
4406  assert(set != NULL);
4407  assert(banditvtable != NULL);
4408 
4409  if( set->nbanditvtables >= set->banditvtablessize )
4410  {
4411  int newsize = SCIPsetCalcMemGrowSize(set, set->nbanditvtables + 1);
4412  SCIP_ALLOC( BMSreallocMemoryArray(&set->banditvtables, newsize) );
4413  set->banditvtablessize = newsize;
4414  }
4416  assert(set->nbanditvtables < set->banditvtablessize);
4417  set->banditvtables[set->nbanditvtables++] = banditvtable;
4418 
4419  return SCIP_OKAY;
4420 }
4421 
4422 /** returns the bandit virtual function table of the given name, or NULL if not existing */
4424  SCIP_SET* set, /**< global SCIP settings */
4425  const char* name /**< name of bandit algorithm virtual function table */
4426  )
4427 {
4428  int b;
4429 
4430  assert(set != NULL);
4431  assert(name != NULL);
4432 
4433  /* search for a bandit v table of the given name */
4434  for( b = 0; b < set->nbanditvtables; ++b )
4435  {
4436  if( strcmp(name, SCIPbanditvtableGetName(set->banditvtables[b])) == 0 )
4437  return set->banditvtables[b];
4438  }
4439 
4440  return NULL;
4441 }
4442 
4443 /** inserts concurrent solver type into the concurrent solver type list */
4445  SCIP_SET* set, /**< global SCIP settings */
4446  SCIP_CONCSOLVERTYPE* concsolvertype /**< concurrent solver type */
4447  )
4448 {
4449  assert(set != NULL);
4450  assert(concsolvertype != NULL);
4451 
4452  if( set->nconcsolvertypes >= set->concsolvertypessize )
4453  {
4454  set->concsolvertypessize = SCIPsetCalcMemGrowSize(set, set->nconcsolvertypes + 1);
4455  SCIP_ALLOC( BMSreallocMemoryArray(&set->concsolvertypes, set->concsolvertypessize) );
4456  }
4457  assert(set->nconcsolvertypes < set->concsolvertypessize);
4458 
4459  set->concsolvertypes[set->nconcsolvertypes] = concsolvertype;
4460  set->nconcsolvertypes++;
4461 
4462  return SCIP_OKAY;
4463 }
4464 
4465 /** returns the concurrent solver type with the given name, or NULL if not existing */
4467  SCIP_SET* set, /**< global SCIP settings */
4468  const char* name /**< name of concurrent solver type */
4469  )
4470 {
4471  int i;
4472 
4473  assert(set != NULL);
4474  assert(name != NULL);
4475 
4476  for( i = 0; i < set->nconcsolvertypes; ++i )
4477  {
4478  if( strcmp(SCIPconcsolverTypeGetName(set->concsolvertypes[i]), name) == 0 )
4479  return set->concsolvertypes[i];
4480  }
4481 
4482  return NULL;
4483 }
4484 
4485 /** inserts concurrent solver into the concurrent solver list */
4487  SCIP_SET* set, /**< global SCIP settings */
4488  SCIP_CONCSOLVER* concsolver /**< concurrent solver */
4489  )
4490 {
4491  assert(set != NULL);
4492  assert(concsolver != NULL);
4493 
4494  if( set->nconcsolvers >= set->concsolverssize )
4495  {
4496  set->concsolverssize = SCIPsetCalcMemGrowSize(set, set->nconcsolvers + 1);
4497  SCIP_ALLOC( BMSreallocMemoryArray(&set->concsolvers, set->concsolverssize) );
4498  }
4499  assert(set->nconcsolvers < set->concsolverssize);
4500 
4501  set->concsolvers[set->nconcsolvers] = concsolver;
4502  assert(set->nconcsolvers == SCIPconcsolverGetIdx(concsolver));
4503 
4504  set->nconcsolvers++;
4505 
4506  return SCIP_OKAY;
4507 }
4508 
4509 /** frees all concurrent solvers in the concurrent solver list */
4511  SCIP_SET* set /**< global SCIP settings */
4512  )
4513 {
4514  int i;
4515  assert(set != NULL);
4516 
4517  /* call user callback for each concurrent solver */
4518  for( i = 0; i < set->nconcsolvers; ++i )
4519  {
4520  SCIP_CALL( SCIPconcsolverDestroyInstance(set, &set->concsolvers[i]) );
4521  }
4522 
4523  /* set size and number to zero and free the concurent solver array */
4524  set->nconcsolvers = 0;
4525  set->concsolverssize = 0;
4526  BMSfreeMemoryArrayNull(&set->concsolvers);
4527 
4528  return SCIP_OKAY;
4529 }
4530 
4531 /** inserts primal heuristic in primal heuristic list */
4533  SCIP_SET* set, /**< global SCIP settings */
4534  SCIP_HEUR* heur /**< primal heuristic */
4535  )
4536 {
4537  assert(set != NULL);
4538  assert(heur != NULL);
4539  assert(!SCIPheurIsInitialized(heur));
4540 
4541  if( set->nheurs >= set->heurssize )
4542  {
4543  set->heurssize = SCIPsetCalcMemGrowSize(set, set->nheurs+1);
4544  SCIP_ALLOC( BMSreallocMemoryArray(&set->heurs, set->heurssize) );
4545  }
4546  assert(set->nheurs < set->heurssize);
4547 
4548  set->heurs[set->nheurs] = heur;
4549  set->nheurs++;
4550  set->heurssorted = FALSE;
4551 
4552  return SCIP_OKAY;
4553 }
4554 
4555 /** returns the primal heuristic of the given name, or NULL if not existing */
4557  SCIP_SET* set, /**< global SCIP settings */
4558  const char* name /**< name of primal heuristic */
4559  )
4560 {
4561  int i;
4562 
4563  assert(set != NULL);
4564  assert(name != NULL);
4566  for( i = 0; i < set->nheurs; ++i )
4567  {
4568  if( strcmp(SCIPheurGetName(set->heurs[i]), name) == 0 )
4569  return set->heurs[i];
4570  }
4571 
4572  return NULL;
4573 }
4574 
4575 /** sorts heuristics by their delay positions and priorities */
4576 void SCIPsetSortHeurs(
4577  SCIP_SET* set /**< global SCIP settings */
4578  )
4579 {
4580  assert(set != NULL);
4581 
4582  if( !set->heurssorted )
4583  {
4584  SCIPsortPtr((void**)set->heurs, SCIPheurComp, set->nheurs);
4585  set->heurssorted = TRUE;
4586  set->heursnamesorted = FALSE;
4587  }
4588 }
4590 /** sorts heuristics by names */
4592  SCIP_SET* set /**< global SCIP settings */
4593  )
4594 {
4595  assert(set != NULL);
4596 
4597  if( !set->heursnamesorted )
4598  {
4599  SCIPsortPtr((void**)set->heurs, SCIPheurCompName, set->nheurs);
4600  set->heurssorted = FALSE;
4601  set->heursnamesorted = TRUE;
4602  }
4603 }
4604 
4605 /** inserts tree compression in tree compression list */
4607  SCIP_SET* set, /**< global SCIP settings */
4608  SCIP_COMPR* compr /**< tree compression */
4609  )
4610 {
4611  assert(set != NULL);
4612  assert(compr != NULL);
4613  assert(!SCIPcomprIsInitialized(compr));
4614 
4615  if( set->ncomprs >= set->comprssize )
4616  {
4617  set->comprssize = SCIPsetCalcMemGrowSize(set, set->ncomprs+1);
4618  SCIP_ALLOC( BMSreallocMemoryArray(&set->comprs, set->comprssize) );
4619  }
4620  assert(set->ncomprs < set->comprssize);
4621 
4622  set->comprs[set->ncomprs] = compr;
4623  set->ncomprs++;
4624  set->comprssorted = FALSE;
4625 
4626  return SCIP_OKAY;
4627 }
4628 
4629 /** returns the tree compression of the given name, or NULL if not existing */
4631  SCIP_SET* set, /**< global SCIP settings */
4632  const char* name /**< name of tree compression */
4633  )
4634 {
4635  int i;
4636 
4637  assert(set != NULL);
4638  assert(name != NULL);
4639 
4640  for( i = 0; i < set->ncomprs; ++i )
4641  {
4642  if( strcmp(SCIPcomprGetName(set->comprs[i]), name) == 0 )
4643  return set->comprs[i];
4644  }
4645 
4646  return NULL;
4647 }
4648 
4649 /** sorts compressions by priorities */
4650 void SCIPsetSortComprs(
4651  SCIP_SET* set /**< global SCIP settings */
4652  )
4653 {
4654  assert(set != NULL);
4656  if( !set->comprssorted )
4657  {
4658  SCIPsortPtr((void**)set->comprs, SCIPcomprComp, set->ncomprs);
4659  set->comprssorted = TRUE;
4660  set->comprsnamesorted = FALSE;
4661  }
4662 }
4663 
4664 /** sorts heuristics by names */
4666  SCIP_SET* set /**< global SCIP settings */
4667  )
4668 {
4669  assert(set != NULL);
4671  if( !set->comprsnamesorted )
4672  {
4673  SCIPsortPtr((void**)set->comprs, SCIPcomprCompName, set->ncomprs);
4674  set->comprssorted = FALSE;
4675  set->comprsnamesorted = TRUE;
4676  }
4677 }
4678 
4679 /** inserts event handler in event handler list */
4681  SCIP_SET* set, /**< global SCIP settings */
4682  SCIP_EVENTHDLR* eventhdlr /**< event handler */
4683  )
4684 {
4685  assert(set != NULL);
4686  assert(eventhdlr != NULL);
4687  assert(!SCIPeventhdlrIsInitialized(eventhdlr));
4688 
4689  if( set->neventhdlrs >= set->eventhdlrssize )
4690  {
4691  set->eventhdlrssize = SCIPsetCalcMemGrowSize(set, set->neventhdlrs+1);
4692  SCIP_ALLOC( BMSreallocMemoryArray(&set->eventhdlrs, set->eventhdlrssize) );
4693  }
4694  assert(set->neventhdlrs < set->eventhdlrssize);
4695 
4696  set->eventhdlrs[set->neventhdlrs] = eventhdlr;
4697  set->neventhdlrs++;
4698 
4699  return SCIP_OKAY;
4700 }
4701 
4702 /** returns the event handler of the given name, or NULL if not existing */
4704  SCIP_SET* set, /**< global SCIP settings */
4705  const char* name /**< name of event handler */
4706  )
4707 {
4708  int i;
4710  assert(set != NULL);
4711  assert(name != NULL);
4712 
4713  for( i = 0; i < set->neventhdlrs; ++i )
4714  {
4715  if( strcmp(SCIPeventhdlrGetName(set->eventhdlrs[i]), name) == 0 )
4716  return set->eventhdlrs[i];
4717  }
4718 
4719  return NULL;
4720 }
4721 
4722 /** inserts node selector in node selector list */
4724  SCIP_SET* set, /**< global SCIP settings */
4725  SCIP_NODESEL* nodesel /**< node selector */
4726  )
4727 {
4728  int i;
4729  int nodeselstdprio;
4730 
4731  assert(set != NULL);
4732  assert(nodesel != NULL);
4733  assert(!SCIPnodeselIsInitialized(nodesel));
4734 
4735  if( set->nnodesels >= set->nodeselssize )
4736  {
4737  set->nodeselssize = SCIPsetCalcMemGrowSize(set, set->nnodesels+1);
4738  SCIP_ALLOC( BMSreallocMemoryArray(&set->nodesels, set->nodeselssize) );
4739  }
4740  assert(set->nnodesels < set->nodeselssize);
4741 
4742  nodeselstdprio = SCIPnodeselGetStdPriority(nodesel);
4743 
4744  for( i = set->nnodesels; i > 0 && nodeselstdprio > SCIPnodeselGetStdPriority(set->nodesels[i-1]); --i )
4745  set->nodesels[i] = set->nodesels[i-1];
4746 
4747  set->nodesels[i] = nodesel;
4748  set->nnodesels++;
4749 
4750  return SCIP_OKAY;
4751 }
4752 
4753 /** returns the node selector of the given name, or NULL if not existing */
4755  SCIP_SET* set, /**< global SCIP settings */
4756  const char* name /**< name of event handler */
4757  )
4758 {
4759  int i;
4760 
4761  assert(set != NULL);
4762  assert(name != NULL);
4763 
4764  for( i = 0; i < set->nnodesels; ++i )
4765  {
4766  if( strcmp(SCIPnodeselGetName(set->nodesels[i]), name) == 0 )
4767  return set->nodesels[i];
4768  }
4769 
4770  return NULL;
4771 }
4772 
4773 /** returns node selector with highest priority in the current mode */
4775  SCIP_SET* set, /**< global SCIP settings */
4776  SCIP_STAT* stat /**< dynamic problem statistics */
4777  )
4778 {
4779  assert(set != NULL);
4780  assert(stat != NULL);
4781 
4782  /* check, if old node selector is still valid */
4783  if( set->nodesel == NULL && set->nnodesels > 0 )
4784  {
4785  int i;
4786 
4787  set->nodesel = set->nodesels[0];
4788 
4789  /* search highest priority node selector */
4790  if( stat->memsavemode )
4791  {
4792  for( i = 1; i < set->nnodesels; ++i )
4793  {
4794  if( SCIPnodeselGetMemsavePriority(set->nodesels[i]) > SCIPnodeselGetMemsavePriority(set->nodesel) )
4795  set->nodesel = set->nodesels[i];
4796  }
4797  }
4798  else
4799  {
4800  for( i = 1; i < set->nnodesels; ++i )
4801  {
4803  set->nodesel = set->nodesels[i];
4804  }
4805  }
4806  }
4807 
4808  return set->nodesel;
4809 }
4810 
4811 /** inserts branching rule in branching rule list */
4813  SCIP_SET* set, /**< global SCIP settings */
4814  SCIP_BRANCHRULE* branchrule /**< branching rule */
4815  )
4816 {
4817  assert(set != NULL);
4818  assert(branchrule != NULL);
4819  assert(!SCIPbranchruleIsInitialized(branchrule));
4820 
4821  if( set->nbranchrules >= set->branchrulessize )
4822  {
4823  set->branchrulessize = SCIPsetCalcMemGrowSize(set, set->nbranchrules+1);
4824  SCIP_ALLOC( BMSreallocMemoryArray(&set->branchrules, set->branchrulessize) );
4825  }
4826  assert(set->nbranchrules < set->branchrulessize);
4827 
4828  set->branchrules[set->nbranchrules] = branchrule;
4829  set->nbranchrules++;
4830  set->branchrulessorted = FALSE;
4831 
4832  return SCIP_OKAY;
4834 
4835 /** returns the branching rule of the given name, or NULL if not existing */
4837  SCIP_SET* set, /**< global SCIP settings */
4838  const char* name /**< name of event handler */
4839  )
4840 {
4841  int i;
4842 
4843  assert(set != NULL);
4844  assert(name != NULL);
4845 
4846  for( i = 0; i < set->nbranchrules; ++i )
4847  {
4848  if( strcmp(SCIPbranchruleGetName(set->branchrules[i]), name) == 0 )
4849  return set->branchrules[i];
4850  }
4851 
4852  return NULL;
4854 
4855 /** sorts branching rules by priorities */
4857  SCIP_SET* set /**< global SCIP settings */
4858  )
4859 {
4860  assert(set != NULL);
4861 
4862  if( !set->branchrulessorted )
4863  {
4864  SCIPsortPtr((void**)set->branchrules, SCIPbranchruleComp, set->nbranchrules);
4865  set->branchrulessorted = TRUE;
4866  set->branchrulesnamesorted = FALSE;
4867  }
4868 }
4869 
4870 /** sorts branching rules by priorities */
4872  SCIP_SET* set /**< global SCIP settings */
4873  )
4874 {
4875  assert(set != NULL);
4876 
4877  if( !set->branchrulesnamesorted )
4878  {
4879  SCIPsortPtr((void**)set->branchrules, SCIPbranchruleCompName, set->nbranchrules);
4880  set->branchrulessorted = FALSE;
4881  set->branchrulesnamesorted = TRUE;
4882  }
4883 }
4884 
4885 /** inserts display column in display column list */
4887  SCIP_SET* set, /**< global SCIP settings */
4888  SCIP_DISP* disp /**< display column */
4889  )
4890 {
4891  int i;
4892  int disppos;
4893 
4894  assert(set != NULL);
4895  assert(disp != NULL);
4896  assert(!SCIPdispIsInitialized(disp));
4897 
4898  if( set->ndisps >= set->dispssize )
4899  {
4900  set->dispssize = SCIPsetCalcMemGrowSize(set, set->ndisps+1);
4901  SCIP_ALLOC( BMSreallocMemoryArray(&set->disps, set->dispssize) );
4902  }
4903  assert(set->ndisps < set->dispssize);
4904 
4905  disppos = SCIPdispGetPosition(disp);
4906 
4907  for( i = set->ndisps; i > 0 && disppos < SCIPdispGetPosition(set->disps[i-1]); --i )
4908  {
4909  set->disps[i] = set->disps[i-1];
4910  }
4911  set->disps[i] = disp;
4912  set->ndisps++;
4913 
4914  return SCIP_OKAY;
4916 
4917 /** returns the display column of the given name, or NULL if not existing */
4919  SCIP_SET* set, /**< global SCIP settings */
4920  const char* name /**< name of display */
4921  )
4922 {
4923  int i;
4924 
4925  assert(set != NULL);
4926  assert(name != NULL);
4927 
4928  for( i = 0; i < set->ndisps; ++i )
4929  {
4930  if( strcmp(SCIPdispGetName(set->disps[i]), name) == 0 )
4931  return set->disps[i];
4932  }
4933 
4934  return NULL;
4936 
4937 /** inserts statistics table in statistics table list */
4939  SCIP_SET* set, /**< global SCIP settings */
4940  SCIP_TABLE* table /**< statistics table */
4941  )
4942 {
4943  assert(set != NULL);
4944  assert(table != NULL);
4945  assert(!SCIPtableIsInitialized(table));
4946 
4947  if( set->ntables >= set->tablessize )
4948  {
4949  set->tablessize = SCIPsetCalcMemGrowSize(set, set->ntables+1);
4950  SCIP_ALLOC( BMSreallocMemoryArray(&set->tables, set->tablessize) );
4951  }
4952  assert(set->ntables < set->tablessize);
4953 
4954  /* we insert in arbitrary order and sort once before printing statistics */
4955  set->tables[set->ntables] = table;
4956  set->ntables++;
4957  set->tablessorted = FALSE;
4958 
4959  return SCIP_OKAY;
4960 }
4961 
4962 /** returns the statistics table of the given name, or NULL if not existing */
4964  SCIP_SET* set, /**< global SCIP settings */
4965  const char* name /**< name of statistics table */
4966  )
4967 {