13#ifndef CbcOrClpParam_H
14#define CbcOrClpParam_H
48enum CbcOrClpParameterType
51 CBC_PARAM_GENERALQUERY = -100,
52 CBC_PARAM_FULLGENERALQUERY,
54 CLP_PARAM_DBL_PRIMALTOLERANCE = 1,
55 CLP_PARAM_DBL_DUALTOLERANCE,
56 CLP_PARAM_DBL_TIMELIMIT,
57 CLP_PARAM_DBL_DUALBOUND,
58 CLP_PARAM_DBL_PRIMALWEIGHT,
59 CLP_PARAM_DBL_OBJSCALE,
60 CLP_PARAM_DBL_RHSSCALE,
61 CLP_PARAM_DBL_ZEROTOLERANCE,
64 CBC_PARAM_DBL_INFEASIBILITYWEIGHT = 51,
66 CBC_PARAM_DBL_INTEGERTOLERANCE,
67 CBC_PARAM_DBL_INCREMENT,
68 CBC_PARAM_DBL_ALLOWABLEGAP,
69 CBC_PARAM_DBL_TIMELIMIT_BAB,
70 CBC_PARAM_DBL_GAPRATIO,
72 CBC_PARAM_DBL_DJFIX = 81,
73 CBC_PARAM_DBL_TIGHTENFACTOR,
74 CLP_PARAM_DBL_PRESOLVETOLERANCE,
75 CLP_PARAM_DBL_OBJSCALE2,
76 CBC_PARAM_DBL_FAKEINCREMENT,
77 CBC_PARAM_DBL_FAKECUTOFF,
78 CBC_PARAM_DBL_ARTIFICIALCOST,
79 CBC_PARAM_DBL_DEXTRA3,
80 CBC_PARAM_DBL_SMALLBAB,
81 CBC_PARAM_DBL_DEXTRA4,
82 CBC_PARAM_DBL_DEXTRA5,
84 CLP_PARAM_INT_SOLVERLOGLEVEL = 101,
86 CLP_PARAM_INT_LOGLEVEL = 101,
88 CLP_PARAM_INT_MAXFACTOR,
89 CLP_PARAM_INT_PERTVALUE,
90 CLP_PARAM_INT_MAXITERATION,
91 CLP_PARAM_INT_PRESOLVEPASS,
94 CLP_PARAM_INT_OUTPUTFORMAT,
95 CLP_PARAM_INT_SLPVALUE,
96 CLP_PARAM_INT_PRESOLVEOPTIONS,
97 CLP_PARAM_INT_PRINTOPTIONS,
98 CLP_PARAM_INT_SPECIALOPTIONS,
99 CLP_PARAM_INT_SUBSTITUTION,
100 CLP_PARAM_INT_DUALIZE,
101 CLP_PARAM_INT_VERBOSE,
103 CLP_PARAM_INT_PROCESSTUNE,
104 CLP_PARAM_INT_USESOLUTION,
105 CLP_PARAM_INT_RANDOMSEED,
106 CLP_PARAM_INT_MORESPECIALOPTIONS,
107 CLP_PARAM_INT_DECOMPOSE_BLOCKS,
108 CLP_PARAM_INT_VECTOR_MODE,
110 CBC_PARAM_INT_STRONGBRANCHING = 151,
111 CBC_PARAM_INT_CUTDEPTH,
112 CBC_PARAM_INT_MAXNODES,
113 CBC_PARAM_INT_NUMBERBEFORE,
114 CBC_PARAM_INT_NUMBERANALYZE,
115 CBC_PARAM_INT_MIPOPTIONS,
116 CBC_PARAM_INT_MOREMIPOPTIONS,
117 CBC_PARAM_INT_MAXHOTITS,
118 CBC_PARAM_INT_FPUMPITS,
119 CBC_PARAM_INT_MAXSOLS,
120 CBC_PARAM_INT_FPUMPTUNE,
121 CBC_PARAM_INT_TESTOSI,
122 CBC_PARAM_INT_EXTRA1,
123 CBC_PARAM_INT_EXTRA2,
124 CBC_PARAM_INT_EXTRA3,
125 CBC_PARAM_INT_EXTRA4,
126 CBC_PARAM_INT_DEPTHMINIBAB,
127 CBC_PARAM_INT_CUTPASSINTREE,
128 CBC_PARAM_INT_THREADS,
129 CBC_PARAM_INT_CUTPASS,
130 CBC_PARAM_INT_VUBTRY,
132 CBC_PARAM_INT_EXPERIMENT,
133 CBC_PARAM_INT_DIVEOPT,
134 CBC_PARAM_INT_DIVEOPTSOLVES,
135 CBC_PARAM_INT_STRATEGY,
136 CBC_PARAM_INT_SMALLFACT,
137 CBC_PARAM_INT_HOPTIONS,
138 CBC_PARAM_INT_CUTLENGTH,
139 CBC_PARAM_INT_FPUMPTUNE2,
141 CLP_PARAM_INT_LOGLEVEL,
143 CBC_PARAM_INT_MAXSAVEDSOLS,
144 CBC_PARAM_INT_RANDOMSEED,
145 CBC_PARAM_INT_MULTIPLEROOTS,
146 CBC_PARAM_INT_STRONG_STRATEGY,
147 CBC_PARAM_INT_EXTRA_VARIABLES,
148 CBC_PARAM_INT_MAX_SLOW_CUTS,
149 CBC_PARAM_INT_MOREMOREMIPOPTIONS,
151 CLP_PARAM_STR_DIRECTION = 201,
152 CLP_PARAM_STR_DUALPIVOT,
153 CLP_PARAM_STR_SCALING,
154 CLP_PARAM_STR_ERRORSALLOWED,
155 CLP_PARAM_STR_KEEPNAMES,
156 CLP_PARAM_STR_SPARSEFACTOR,
157 CLP_PARAM_STR_PRIMALPIVOT,
158 CLP_PARAM_STR_PRESOLVE,
160 CLP_PARAM_STR_BIASLU,
161 CLP_PARAM_STR_PERTURBATION,
162 CLP_PARAM_STR_MESSAGES,
163 CLP_PARAM_STR_AUTOSCALE,
164 CLP_PARAM_STR_CHOLESKY,
166 CLP_PARAM_STR_BARRIERSCALE,
168 CLP_PARAM_STR_CROSSOVER,
170 CLP_PARAM_STR_INTPRINT,
171 CLP_PARAM_STR_VECTOR,
172 CLP_PARAM_STR_FACTORIZATION,
173 CLP_PARAM_STR_ALLCOMMANDS,
174 CLP_PARAM_STR_TIME_MODE,
175 CLP_PARAM_STR_ABCWANTED,
176 CLP_PARAM_STR_BUFFER_MODE,
178 CBC_PARAM_STR_NODESTRATEGY = 301,
179 CBC_PARAM_STR_BRANCHSTRATEGY,
180 CBC_PARAM_STR_CUTSSTRATEGY,
181 CBC_PARAM_STR_HEURISTICSTRATEGY,
182 CBC_PARAM_STR_GOMORYCUTS,
183 CBC_PARAM_STR_PROBINGCUTS,
184 CBC_PARAM_STR_KNAPSACKCUTS,
185 CBC_PARAM_STR_REDSPLITCUTS,
186 CBC_PARAM_STR_ROUNDING,
187 CBC_PARAM_STR_SOLVER,
188 CBC_PARAM_STR_CLIQUECUTS,
189 CBC_PARAM_STR_COSTSTRATEGY,
190 CBC_PARAM_STR_FLOWCUTS,
191 CBC_PARAM_STR_MIXEDCUTS,
192 CBC_PARAM_STR_TWOMIRCUTS,
193 CBC_PARAM_STR_PREPROCESS,
195 CBC_PARAM_STR_GREEDY,
196 CBC_PARAM_STR_COMBINE,
197 CBC_PARAM_STR_PROXIMITY,
198 CBC_PARAM_STR_LOCALTREE,
200 CBC_PARAM_STR_LANDPCUTS,
202 CBC_PARAM_STR_RESIDCUTS,
204 CBC_PARAM_STR_DIVINGS,
205 CBC_PARAM_STR_DIVINGC,
206 CBC_PARAM_STR_DIVINGF,
207 CBC_PARAM_STR_DIVINGG,
208 CBC_PARAM_STR_DIVINGL,
209 CBC_PARAM_STR_DIVINGP,
210 CBC_PARAM_STR_DIVINGV,
212 CBC_PARAM_STR_PIVOTANDFIX,
213 CBC_PARAM_STR_RANDROUND,
215 CBC_PARAM_STR_ZEROHALFCUTS,
217 CBC_PARAM_STR_CROSSOVER2,
218 CBC_PARAM_STR_PIVOTANDCOMPLEMENT,
220 CBC_PARAM_STR_LAGOMORYCUTS,
221 CBC_PARAM_STR_LATWOMIRCUTS,
222 CBC_PARAM_STR_REDSPLIT2CUTS,
223 CBC_PARAM_STR_GMICUTS,
224 CBC_PARAM_STR_CUTOFF_CONSTRAINT,
226 CBC_PARAM_STR_ORBITAL,
227 CBC_PARAM_STR_PREPROCNAMES,
228 CBC_PARAM_STR_SOSPRIORITIZE,
230 CLP_PARAM_ACTION_DIRECTORY = 401,
231 CLP_PARAM_ACTION_DIRSAMPLE,
232 CLP_PARAM_ACTION_DIRNETLIB,
233 CBC_PARAM_ACTION_DIRMIPLIB,
234 CLP_PARAM_ACTION_IMPORT,
235 CLP_PARAM_ACTION_EXPORT,
236 CLP_PARAM_ACTION_RESTORE,
237 CLP_PARAM_ACTION_SAVE,
238 CLP_PARAM_ACTION_DUALSIMPLEX,
239 CLP_PARAM_ACTION_PRIMALSIMPLEX,
240 CLP_PARAM_ACTION_EITHERSIMPLEX,
241 CLP_PARAM_ACTION_MAXIMIZE,
242 CLP_PARAM_ACTION_MINIMIZE,
243 CLP_PARAM_ACTION_EXIT,
244 CLP_PARAM_ACTION_STDIN,
245 CLP_PARAM_ACTION_UNITTEST,
246 CLP_PARAM_ACTION_NETLIB_EITHER,
247 CLP_PARAM_ACTION_NETLIB_DUAL,
248 CLP_PARAM_ACTION_NETLIB_PRIMAL,
249 CLP_PARAM_ACTION_SOLUTION,
250 CLP_PARAM_ACTION_SAVESOL,
251 CLP_PARAM_ACTION_TIGHTEN,
252 CLP_PARAM_ACTION_FAKEBOUND,
253 CLP_PARAM_ACTION_HELP,
254 CLP_PARAM_ACTION_PLUSMINUS,
255 CLP_PARAM_ACTION_NETWORK,
256 CLP_PARAM_ACTION_ALLSLACK,
257 CLP_PARAM_ACTION_REVERSE,
258 CLP_PARAM_ACTION_BARRIER,
259 CLP_PARAM_ACTION_NETLIB_BARRIER,
260 CLP_PARAM_ACTION_NETLIB_TUNE,
261 CLP_PARAM_ACTION_REALLY_SCALE,
262 CLP_PARAM_ACTION_BASISIN,
263 CLP_PARAM_ACTION_BASISOUT,
264 CLP_PARAM_ACTION_SOLVECONTINUOUS,
265 CLP_PARAM_ACTION_CLEARCUTS,
266 CLP_PARAM_ACTION_VERSION,
267 CLP_PARAM_ACTION_STATISTICS,
268 CLP_PARAM_ACTION_DEBUG,
269 CLP_PARAM_ACTION_DUMMY,
270 CLP_PARAM_ACTION_PRINTMASK,
271 CLP_PARAM_ACTION_OUTDUPROWS,
272 CLP_PARAM_ACTION_USERCLP,
273 CLP_PARAM_ACTION_MODELIN,
274 CLP_PARAM_ACTION_CSVSTATISTICS,
275 CLP_PARAM_ACTION_STOREDFILE,
276 CLP_PARAM_ACTION_ENVIRONMENT,
277 CLP_PARAM_ACTION_PARAMETRICS,
278 CLP_PARAM_ACTION_GMPL_SOLUTION,
279 CLP_PARAM_ACTION_RESTORESOL,
280 CLP_PARAM_ACTION_GUESS,
282 CBC_PARAM_ACTION_BAB = 501,
283 CBC_PARAM_ACTION_MIPLIB,
284 CBC_PARAM_ACTION_STRENGTHEN,
285 CBC_PARAM_ACTION_PRIORITYIN,
286 CBC_PARAM_ACTION_MIPSTART,
287 CBC_PARAM_ACTION_USERCBC,
288 CBC_PARAM_ACTION_DOHEURISTIC,
289 CLP_PARAM_ACTION_NEXTBESTSOLUTION,
291 CBC_PARAM_NOTUSED_OSLSTUFF = 601,
292 CBC_PARAM_NOTUSED_CBCSTUFF,
294 CBC_PARAM_NOTUSED_INVALID = 1000
308 double lower,
double upper, CbcOrClpParameterType
type,
int display = 2);
310 int lower,
int upper, CbcOrClpParameterType
type,
int display = 2);
313 CbcOrClpParameterType
type,
int whereUsed = 7,
int display = 2);
316 CbcOrClpParameterType
type,
int whereUsed = 7,
int display = 2);
332 inline std::string
name()
const
462 inline CbcOrClpParameterType
type()
const
570#define CBCMAXPARAMETERS 250
578 const std::vector< CbcOrClpParam > ¶meters);
CbcOrClpParameterType type() const
type
const char * setDoubleParameterWithMessage(CbcModel &model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
void gutsOfConstructor()
gutsOfConstructor
void setCbcOrClpPrinting(bool yesNo)
std::string shortHelp() const
Returns short help.
std::string CoinReadGetString(int argc, const char *argv[])
void restoreSolution(ClpSimplex *lpSolver, std::string fileName, int mode)
void printLongHelp() const
Print Long help.
std::string name() const
Returns name.
int intValue_
Integer parameter - current value.
int currentKeyWord_
Current keyWord (if a keyword parameter).
std::string CoinReadNextField()
Simple read stuff.
void setCurrentOption(int value, bool printIt=false)
Sets current parameter option.
int checkDoubleParameter(double value) const
Checks a double parameter (nonzero code if error).
std::string longHelp() const
Returns long help.
~CbcOrClpParam()
Destructor.
void append(std::string keyWord)
Insert string (only valid for keywords).
CbcOrClpParam & operator=(const CbcOrClpParam &rhs)
Assignment operator. This copies the data.
int whereUsed_
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
int fakeKeyWord_
If >=0 then integers allowed as a fake keyword So minusnnnn would got to -nnnn in currentKeyword_ and...
void setLonghelp(const std::string help)
Set Long help.
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
CbcOrClpParam()
Constructors.
void printOptions() const
Prints parameter options.
void setDoubleValue(double value)
Sets double value.
const char * setDoubleValueWithMessage(double value)
Sets double value with message.
int whereUsed() const
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
double lowerDoubleValue_
If double == okay.
unsigned int lengthMatch_
int whichParam(const CbcOrClpParameterType &name, const std::vector< CbcOrClpParam > ¶meters)
CbcOrClpParameterType type_
double lowerDoubleValue() const
Returns the lower bound for a double-valued parameter.
void CoinReadPrintit(const char *input)
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error).
std::string stringValue_
String parameter - current value.
void setIntValue(int value)
Sets int value.
void addHelp(std::string keyWord)
Adds one help line.
int upperIntValue() const
Returns the upper bound for an int-valued parameter.
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
int setDoubleParameter(CbcModel &model, double value)
Sets a double parameter (nonzero code if error).
std::vector< std::string > definedKeyWords_
set of valid strings
double upperDoubleValue() const
Returns the upper bound for a double-valued parameter.
const char * setIntValueWithMessage(int value)
Sets int value with message.
const char * setCurrentOptionWithMessage(int value)
Sets current parameter option and returns printable string.
void setStringValue(std::string value)
Sets string value.
int displayThis() const
whether to display
std::string longHelp_
Long help.
void printString() const
Print action and string.
int lowerIntValue() const
Returns the lower bound for an int-valued parameter.
std::string shortHelp_
Short help.
double doubleValue() const
int parameterOption(std::string check) const
Returns parameter option which matches (-1 if none).
std::string currentOption() const
Returns current parameter option.
const char * setIntParameterWithMessage(CbcModel &model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
std::string CoinReadGetCommand(int argc, const char *argv[])
int CoinReadGetIntField(int argc, const char *argv[], int *valid)
int lowerIntValue_
If int == okay.
int fakeKeyWord() const
Gets value of fake keyword.
double doubleValue_
Double parameter - current value.
void setFakeKeyWord(int value, int fakeValue)
Sets value of fake keyword.
int currentOptionAsInteger() const
Returns current parameter option position.
std::string stringValue() const
int matches(std::string input) const
Returns 1 if matches minimum, 2 if matches less, 0 if not matched.
int lengthMatchName() const
Returns length of name for ptinting.
int intParameter(CbcModel &model) const
Gets a int parameter.
CbcOrClpParameterType action_
Action.
const std::vector< std::string > & definedKeywords() const
Returns set of valid strings.
std::string matchName() const
Returns name which could match.
void establishParams(std::vector< CbcOrClpParam > ¶ms)
int fakeValue_
Return this as main value if an integer.
double doubleParameter(CbcModel &model) const
Gets a double parameter.
#define OsiSolverInterface
This solves LPs using the simplex method.