All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
paramset.c
Go to the documentation of this file.
24 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
64 SCIPmessagePrintWarning(messagehdlr, "parameter <%s> is fixed and cannot be changed. Unfix it to allow changing the value.\n",
72 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
85 SCIPmessagePrintWarning(messagehdlr, "Invalid value <%d> for bool parameter <%s>. Must be <0> (FALSE) or <1> (TRUE).\n",
95 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
108 SCIPmessagePrintWarning(messagehdlr, "Invalid value <%d> for int parameter <%s>. Must be in range [%d,%d].\n",
118 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
131 SCIPmessagePrintWarning(messagehdlr, "Invalid value <%"SCIP_LONGINT_FORMAT"> for longint parameter <%s>. Must be in range [%"SCIP_LONGINT_FORMAT",%"SCIP_LONGINT_FORMAT"].\n",
141 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
154 SCIPmessagePrintWarning(messagehdlr, "Invalid real parameter value <%.15g> for parameter <%s>. Must be in range [%.15g,%.15g].\n",
164 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
191 SCIPmessagePrintWarning(messagehdlr, "Invalid char parameter value <%c>. Must be in set {%s}.\n",
202 /** checks parameter value according to the given feasible domain; issues a warning message if value was invalid */
223 if( value[i] == '\b' || value[i] == '\f' || value[i] == '\n' || value[i] == '\r' || value[i] == '\v' )
225 SCIPmessagePrintWarning(messagehdlr, "Invalid character <%x> in string parameter at position %d.\n", (int)value[i], i);
242 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
247 /* write parameters at default values only, if the onlychanged flag is not set or if the parameter is fixed */
263 param->data.intparam.minvalue, param->data.intparam.maxvalue, param->data.intparam.defaultvalue);
266 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: longint, range: [%"SCIP_LONGINT_FORMAT",%"SCIP_LONGINT_FORMAT"], default: %"SCIP_LONGINT_FORMAT"]\n",
267 param->data.longintparam.minvalue, param->data.longintparam.maxvalue, param->data.longintparam.defaultvalue);
270 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: real, range: [%.15g,%.15g], default: %.15g]\n",
271 param->data.realparam.minvalue, param->data.realparam.maxvalue, param->data.realparam.defaultvalue);
275 param->data.charparam.allowedvalues != NULL ? param->data.charparam.allowedvalues : "all chars",
279 SCIPmessageFPrintInfo(messagehdlr, file, "# [type: string, default: \"%s\"]\n", param->data.stringparam.defaultvalue);
434 /** if a long integer parameter exits with the given parameter name it is set to the new value */
953 /** creates a parameter with name and description, does not set the type specific parameter values themselves */
1121 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
1136 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->data.charparam.allowedvalues, allowedvalues, strlen(allowedvalues)+1) );
1170 SCIP_ALLOC( BMSduplicateMemoryArray(&(*param)->data.stringparam.defaultvalue, defaultvalue, strlen(defaultvalue)+1) );
1244 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Bool parameter <%s>\n", valuestr, param->name);
1273 SCIPerrorMessage("invalid parameter value <%s> for int parameter <%s>\n", valuestr, param->name);
1302 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Longint parameter <%s>\n", valuestr, param->name);
1331 SCIPerrorMessage("invalid parameter value <%s> for SCIP_Real parameter <%s>\n", valuestr, param->name);
1360 SCIPerrorMessage("invalid parameter value <%s> for char parameter <%s>\n", valuestr, param->name);
1387 SCIPerrorMessage("invalid parameter value <%s> for string parameter <%s> (string has to be in double quotes)\n",
1478 /** creates a SCIP_Bool parameter, sets it to its default value, and adds it to the parameter set */
1497 SCIP_CALL( paramCreateBool(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, paramchgd, paramdata) );
1526 SCIP_CALL( paramCreateInt(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
1535 /** creates a SCIP_Longint parameter, sets it to its default value, and adds it to the parameter set */
1556 SCIP_CALL( paramCreateLongint(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
1565 /** creates a SCIP_Real parameter, sets it to its default value, and adds it to the parameter set */
1586 SCIP_CALL( paramCreateReal(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, minvalue, maxvalue,
1595 /** creates a char parameter, sets it to its default value, and adds it to the parameter set */
1605 const char* allowedvalues, /**< array with possible parameter values, or NULL if not restricted */
1615 SCIP_CALL( paramCreateChar(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, allowedvalues,
1624 /** creates a string parameter, sets it to its default value, and adds it to the parameter set */
1643 SCIP_CALL( paramCreateString(¶m, messagehdlr, blkmem, name, desc, valueptr, isadvanced, defaultvalue, paramchgd, paramdata) );
1955 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, (SCIP_Longint) (size_t) value, TRUE) );
2276 while( *line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#' && *line != '\0' && *line != '=' )
2312 while( (quoted || (*line != ' ' && *line != '\t' && *line != '\r' && *line != '\n' && *line != '#')) && *line != '\0' )
2339 SCIPerrorMessage("additional characters <%c> after parameter value (and possible 'fix' keyword)\n", *line);
2441 SCIP_Bool onlychanged /**< should only the parameters been written, that are changed from default? */
2541 /** resets parameters changed by SCIPparamsetSetHeuristicsXyz functions to their default values
2543 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
2581 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/rens/minfixingrate") );
2584 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/nwaitingnodes") );
2585 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/dontwaitatroot") );
2586 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/nodesquot") );
2587 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "heuristics/crossover/minfixingrate") );
2657 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * SCIPparamGetIntDefault(param)), quiet) );
2667 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, paramname, 1.5 * SCIPparamGetRealDefault(param), quiet) );
2677 SCIP_CALL( paramSetLongint(paramset, set, messagehdlr, "heuristics/rens/nodesofs", (SCIP_Longint)2000, quiet) );
2678 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/rens/minfixingrate", 0.3, quiet) );
2686 SCIP_CALL( paramSetLongint(paramset, set, messagehdlr, "heuristics/crossover/nwaitingnodes", (SCIP_Longint)20, quiet) );
2687 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "heuristics/crossover/dontwaitatroot", TRUE, quiet) );
2688 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/crossover/nodesquot", 0.15, quiet) );
2689 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "heuristics/crossover/minfixingrate", 0.5, quiet) );
2769 /** resets all parameters that start with "presolving" in their name to their default value; additionally set the
2770 * parameters which might have previously been changed by the methods SCIPparamsetSetToPresolving{Off,Fast,Aggressive}
2773 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
2839 /* explicitly reset parameters of setppc constraint handler, if the constraint handler is included */
2840 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/setppc/cliquelifting") );
2842 /* explicitly reset parameters of knapsack constraint handler, if the constraint handler is included */
2843 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/knapsack/disaggregation") );
2851 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxuseless") );
2852 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxtotaluseless") );
2853 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "propagating/probing/maxprerounds") );
2875 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "presolving/restartminred", 0.06, quiet) );
2882 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/setppc/cliquelifting", TRUE, quiet) );
2890 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/boundshift/maxrounds", -1, quiet) );
2898 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/convertinttobin/maxrounds", 0, quiet) );
2911 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defvalue), quiet) );
2922 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defvalue), quiet) );
2973 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/convertinttobin/maxrounds", 0, quiet) );
2981 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "propagating/probing/maxprerounds", 0, quiet) );
2989 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/components/maxrounds", 0, quiet) );
3005 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/gateextraction/maxrounds", 0, quiet) );
3083 /** reset parameters that may have been changed by other SCIPparamsetSetSeparatingXyz to their default values
3085 * @note fixed parameters stay as they are; you need to unfix them first if they should be changed, too
3138 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxsepacutsroot", conshdlrname);
3146 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "constraints/linear/separateall") );
3148 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/maxroundsrootsubrun") );
3152 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/cmir/maxfailsroot") );
3153 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/mcf/maxtestdelta") );
3154 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/mcf/trynegscaling") );
3155 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/cmir/maxtriesroot") );
3156 SCIP_CALL( SCIPparamsetSetToDefault(paramset, set, messagehdlr, "separating/cmir/maxaggrsroot") );
3232 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, paramname, (int) (1.5 * defrounds), quiet) );
3272 /* for constraint handlers with enabled separation, change frequency to at least every 10th depths and
3286 (void) SCIPsnprintf(paramname, SCIP_MAXSTRLEN, "constraints/%s/maxsepacutsroot", conshdlrname);
3303 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/maxroundsrootsubrun", 5, quiet) );
3313 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/separateall", TRUE, quiet) );
3321 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/cmir/maxfailsroot", 200, quiet) );
3329 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/mcf/maxtestdelta", -1, quiet) );
3330 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "separating/mcf/trynegscaling", TRUE, quiet) );
3362 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/cmir/maxroundsroot", 5, quiet) );
3363 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/cmir/maxtriesroot", 100, quiet) );
3364 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/cmir/maxaggrsroot", 3, quiet) );
3365 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/cmir/maxsepacutsroot", 200, quiet) );
3377 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/gomory/maxroundsroot", 20, quiet) );
3378 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/gomory/maxsepacutsroot", 200, quiet) );
3390 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/strongcg/maxroundsroot", 10, quiet) );
3391 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "separating/strongcg/maxsepacutsroot", 200, quiet) );
3474 /* avoid logicor upgrade since the logicor constraint handler does not perform full propagation */
3475 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/linear/upgrade/logicor", FALSE, quiet) );
3478 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/inference/priority", INT_MAX/4, quiet) );
3481 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/dfs/stdpriority", INT_MAX/4, quiet) );
3484 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "reading/zplreader/usestartsol", FALSE, quiet) );
3509 /* turn off components presolver since we are currently not able to handle that in case of counting */
3510 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "presolving/components/maxrounds", 0, quiet) );
3523 /* after 250 conflict we force a restart since then the variable statistics are reasonable initialized */
3533 SCIP_CALL( paramSetBool(paramset, set, messagehdlr, "constraints/disableenfops", TRUE, quiet) );
3551 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/dfs/stdpriority", INT_MAX/4, quiet) );
3579 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "nodeselection/restartdfs/stdpriority", INT_MAX/4, quiet) );
3590 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/relpscost/maxreliable", 1.0, quiet) );
3591 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/relpscost/inititer", 10, quiet) );
3604 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/fullstrong/maxdepth", 10, quiet) );
3605 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/fullstrong/maxbounddist", 0.0, quiet) );
3606 SCIP_CALL( paramSetReal(paramset, set, messagehdlr, "branching/relpscost/sbiterquot", 1.0, quiet) );
3607 SCIP_CALL( paramSetInt(paramset, set, messagehdlr, "branching/relpscost/sbiterofs", 1000000, quiet) );
3612 SCIPerrorMessage("the parameter setting <%d> is not allowed for emphasis call\n", paramemphasis);
3618 /** sets parameters to deactivate separators and heuristics that use auxiliary SCIP instances; should be called for
3658 /* if the frequency is already set to -1, we do not have to unfix it, but must not try to set it, either */
3663 SCIPmessageFPrintInfo(messagehdlr, NULL, "unfixing parameter %s in order to disable sub-SCIPs in the current (sub-)SCIP instance\n", paramname);
3692 /* if the frequency is already set to -1, we do not have to unfix it, but must not try to set it, either */
3697 SCIPmessageFPrintInfo(messagehdlr, NULL, "unfixing parameter %s in order to disable sub-SCIPs in the current (sub-)SCIP instance\n", paramname);
3836 /** copies all parameter values of the source parameter set to the corresponding parameters in the target set */
3897 /* the vbc parameters are explicitly not copied to avoid that the vbc file of the original SCIP is overwritten;
3898 * to avoid that hard coded comparison, each parameter could get a Bool flag which tells if the value
3933 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
3967 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
4001 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
4035 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
4071 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
4105 SCIP_SET* set, /**< global SCIP settings, or NULL if param change method should not be called */
4120 SCIP_ALLOC( BMSduplicateMemoryArray(param->data.stringparam.valueptr, value, strlen(value)+1) );
4125 SCIP_ALLOC( BMSduplicateMemoryArray(¶m->data.stringparam.curvalue, value, strlen(value)+1) );
4164 assert(param->data.intparam.minvalue <= defaultvalue && param->data.intparam.maxvalue >= defaultvalue);
4181 SCIPdebugMessage("parameter <%s> is fixed and is not reset to its default value.\n", param->name);
4197 SCIP_CALL( SCIPparamSetLongint(param, set, messagehdlr, SCIPparamGetLongintDefault(param), TRUE) );
4209 SCIP_CALL( SCIPparamSetString(param, set, messagehdlr, SCIPparamGetStringDefault(param), TRUE) );
|