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