Scippy

SCIP

Solving Constraint Integer Programs

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