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