13#ifndef CbcOrClpParam_H
14#define CbcOrClpParam_H
332 inline std::string
name()
const
570#define CBCMAXPARAMETERS 250
578 const std::vector< CbcOrClpParam > ¶meters);
void setCbcOrClpPrinting(bool yesNo)
std::string CoinReadGetString(int argc, const char *argv[])
void restoreSolution(ClpSimplex *lpSolver, std::string fileName, int mode)
std::string CoinReadNextField()
Simple read stuff.
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
int whichParam(const CbcOrClpParameterType &name, const std::vector< CbcOrClpParam > ¶meters)
void CoinReadPrintit(const char *input)
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
CbcOrClpParameterType
Parameter codes.
@ CBC_PARAM_NOTUSED_CBCSTUFF
@ CBC_PARAM_STR_PREPROCESS
@ CLP_PARAM_STR_CROSSOVER
@ CBC_PARAM_STR_RANDROUND
@ CLP_PARAM_INT_SUBSTITUTION
@ CLP_PARAM_ACTION_PRIMALSIMPLEX
@ CLP_PARAM_ACTION_DUALSIMPLEX
@ CBC_PARAM_ACTION_MIPLIB
@ CLP_PARAM_ACTION_NEXTBESTSOLUTION
@ CBC_PARAM_NOTUSED_INVALID
@ CLP_PARAM_DBL_TIMELIMIT
@ CBC_PARAM_INT_STRONG_STRATEGY
@ CLP_PARAM_ACTION_NETWORK
@ CLP_PARAM_ACTION_DIRECTORY
@ CBC_PARAM_ACTION_DIRMIPLIB
@ CBC_PARAM_DBL_INFEASIBILITYWEIGHT
@ CLP_PARAM_STR_BUFFER_MODE
@ CLP_PARAM_STR_DUALPIVOT
@ CBC_PARAM_STR_COSTSTRATEGY
@ CBC_PARAM_INT_MULTIPLEROOTS
@ CLP_PARAM_INT_MORESPECIALOPTIONS
@ CBC_PARAM_ACTION_MIPSTART
@ CLP_PARAM_STR_SPARSEFACTOR
@ CLP_PARAM_ACTION_EITHERSIMPLEX
@ CLP_PARAM_ACTION_UNITTEST
@ CBC_PARAM_STR_PROXIMITY
@ CLP_PARAM_INT_PRESOLVEPASS
@ CBC_PARAM_STR_NODESTRATEGY
@ CBC_PARAM_STR_LAGOMORYCUTS
@ CBC_PARAM_STR_LANDPCUTS
@ CBC_PARAM_DBL_ARTIFICIALCOST
@ CBC_PARAM_INT_DIVEOPTSOLVES
@ CLP_PARAM_ACTION_USERCLP
@ CBC_PARAM_STR_LATWOMIRCUTS
@ CBC_PARAM_STR_PIVOTANDCOMPLEMENT
@ CBC_PARAM_STR_RESIDCUTS
@ CLP_PARAM_STR_DIRECTION
@ CBC_PARAM_STR_CLIQUECUTS
@ CLP_PARAM_INT_MAXFACTOR
@ CLP_PARAM_STR_KEEPNAMES
@ CLP_PARAM_ACTION_NETLIB_TUNE
@ CBC_PARAM_INT_CUTLENGTH
@ CBC_PARAM_INT_MOREMIPOPTIONS
@ CBC_PARAM_STR_MIXEDCUTS
@ CLP_PARAM_ACTION_PARAMETRICS
@ CLP_PARAM_DBL_ZEROTOLERANCE
@ CBC_PARAM_ACTION_USERCBC
@ CBC_PARAM_DBL_TIMELIMIT_BAB
@ CLP_PARAM_ACTION_STOREDFILE
@ CLP_PARAM_ACTION_ALLSLACK
@ CLP_PARAM_INT_PROCESSTUNE
@ CLP_PARAM_ACTION_CSVSTATISTICS
@ CLP_PARAM_ACTION_PRINTMASK
@ CLP_PARAM_ACTION_DIRNETLIB
@ CLP_PARAM_ACTION_EXPORT
@ CLP_PARAM_INT_RANDOMSEED
@ CLP_PARAM_INT_PRESOLVEOPTIONS
@ CBC_PARAM_STR_BRANCHSTRATEGY
@ CBC_PARAM_DBL_INCREMENT
@ CBC_PARAM_DBL_ALLOWABLEGAP
@ CLP_PARAM_ACTION_NETLIB_PRIMAL
@ CBC_PARAM_INT_NUMBERANALYZE
@ CLP_PARAM_ACTION_PLUSMINUS
@ CLP_PARAM_DBL_PRIMALWEIGHT
@ CBC_PARAM_DBL_TIGHTENFACTOR
@ CLP_PARAM_ACTION_CLEARCUTS
@ CLP_PARAM_ACTION_IMPORT
@ CLP_PARAM_INT_SPECIALOPTIONS
@ CLP_PARAM_STR_PERTURBATION
@ CLP_PARAM_INT_PRINTOPTIONS
@ CLP_PARAM_INT_OUTPUTFORMAT
@ CLP_PARAM_ACTION_BASISOUT
@ CBC_PARAM_ACTION_STRENGTHEN
@ CLP_PARAM_STR_ALLCOMMANDS
@ CBC_PARAM_INT_NUMBERBEFORE
@ CLP_PARAM_ACTION_RESTORESOL
@ CLP_PARAM_INT_USESOLUTION
@ CBC_PARAM_INT_FPUMPTUNE
@ CLP_PARAM_DBL_PRIMALTOLERANCE
@ CBC_PARAM_STR_HEURISTICSTRATEGY
@ CLP_PARAM_ACTION_NETLIB_BARRIER
@ CBC_PARAM_INT_EXTRA_VARIABLES
@ CLP_PARAM_INT_MAXITERATION
@ CLP_PARAM_DBL_OBJSCALE2
@ CBC_PARAM_INT_MOREMOREMIPOPTIONS
@ CBC_PARAM_STR_LOCALTREE
@ CLP_PARAM_DBL_DUALTOLERANCE
@ CLP_PARAM_ACTION_TIGHTEN
@ CLP_PARAM_ACTION_MINIMIZE
@ CBC_PARAM_INT_MIPOPTIONS
@ CBC_PARAM_STR_SOSPRIORITIZE
@ CBC_PARAM_INT_MAX_SLOW_CUTS
@ CBC_PARAM_ACTION_DOHEURISTIC
@ CLP_PARAM_INT_VECTOR_MODE
@ CBC_PARAM_STR_TWOMIRCUTS
@ CBC_PARAM_INT_MAXHOTITS
@ CLP_PARAM_STR_FACTORIZATION
@ CLP_PARAM_ACTION_REALLY_SCALE
@ CLP_PARAM_ACTION_SAVESOL
@ CLP_PARAM_ACTION_FAKEBOUND
@ CBC_PARAM_INT_MAXSAVEDSOLS
@ CLP_PARAM_ACTION_MAXIMIZE
@ CLP_PARAM_STR_PRIMALPIVOT
@ CLP_PARAM_STR_ABCWANTED
@ CLP_PARAM_STR_TIME_MODE
@ CBC_PARAM_STR_CUTSSTRATEGY
@ CBC_PARAM_STR_PREPROCNAMES
@ CBC_PARAM_STR_KNAPSACKCUTS
@ CBC_PARAM_INT_DEPTHMINIBAB
@ CBC_PARAM_STR_ZEROHALFCUTS
@ CBC_PARAM_STR_GOMORYCUTS
@ CBC_PARAM_STR_PIVOTANDFIX
@ CBC_PARAM_STR_PROBINGCUTS
@ CBC_PARAM_STR_CUTOFF_CONSTRAINT
@ CLP_PARAM_ACTION_SOLUTION
@ CBC_PARAM_INT_EXPERIMENT
@ CBC_PARAM_FULLGENERALQUERY
@ CLP_PARAM_ACTION_VERSION
@ CLP_PARAM_STR_ERRORSALLOWED
@ CLP_PARAM_ACTION_NETLIB_EITHER
@ CLP_PARAM_ACTION_OUTDUPROWS
@ CLP_PARAM_ACTION_STATISTICS
@ CLP_PARAM_ACTION_BASISIN
@ CBC_PARAM_ACTION_PRIORITYIN
@ CBC_PARAM_INT_FPUMPTUNE2
@ CBC_PARAM_STR_REDSPLIT2CUTS
@ CLP_PARAM_STR_BARRIERSCALE
@ CLP_PARAM_DBL_DUALBOUND
@ CLP_PARAM_ACTION_REVERSE
@ CBC_PARAM_STR_REDSPLITCUTS
@ CLP_PARAM_INT_SOLVERLOGLEVEL
@ CLP_PARAM_ACTION_RESTORE
@ CLP_PARAM_STR_AUTOSCALE
@ CBC_PARAM_DBL_FAKECUTOFF
@ CBC_PARAM_DBL_FAKEINCREMENT
@ CLP_PARAM_ACTION_SOLVECONTINUOUS
@ CLP_PARAM_ACTION_ENVIRONMENT
@ CBC_PARAM_DBL_INTEGERTOLERANCE
@ CLP_PARAM_INT_DECOMPOSE_BLOCKS
@ CBC_PARAM_INT_SMALLFACT
@ CLP_PARAM_ACTION_BARRIER
@ CBC_PARAM_NOTUSED_OSLSTUFF
@ CLP_PARAM_ACTION_NETLIB_DUAL
@ CBC_PARAM_INT_RANDOMSEED
@ CBC_PARAM_INT_CUTPASSINTREE
@ CLP_PARAM_ACTION_DIRSAMPLE
@ CBC_PARAM_INT_STRONGBRANCHING
@ CLP_PARAM_DBL_PRESOLVETOLERANCE
@ CLP_PARAM_ACTION_GMPL_SOLUTION
@ CBC_PARAM_STR_CROSSOVER2
@ CLP_PARAM_ACTION_MODELIN
@ CLP_PARAM_INT_PERTVALUE
std::string CoinReadGetCommand(int argc, const char *argv[])
int CoinReadGetIntField(int argc, const char *argv[], int *valid)
void establishParams(std::vector< CbcOrClpParam > ¶ms)
#define OsiSolverInterface
Very simple class for setting parameters.
CbcOrClpParam()
Constructors.
std::string longHelp() const
Returns long help.
const char * setDoubleValueWithMessage(double value)
Sets double value with message.
int setDoubleParameter(CbcModel &model, double value)
Sets a double parameter (nonzero code if error)
int lowerIntValue() const
Returns the lower bound for an int-valued parameter.
int whereUsed() const
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
void setStringValue(std::string value)
Sets string value.
int upperIntValue() const
Returns the upper bound for an int-valued parameter.
void printLongHelp() const
Print Long help.
std::string currentOption() const
Returns current parameter option.
void setDoubleValue(double value)
Sets double value.
void setCurrentOption(int value, bool printIt=false)
Sets current parameter option.
void setCurrentOption(const std::string value)
Sets current parameter option using string.
const std::vector< std::string > & definedKeywords() const
Returns set of valid strings.
void setLonghelp(const std::string help)
Set Long help.
std::string matchName() const
Returns name which could match.
const char * setDoubleParameterWithMessage(ClpSimplex *model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
CbcOrClpParam(std::string name, std::string help, double lower, double upper, CbcOrClpParameterType type, int display=2)
void printOptions() const
Prints parameter options.
int currentOptionAsInteger() const
Returns current parameter option position.
double doubleParameter(ClpSimplex *model) const
Gets a double parameter.
const char * setIntParameterWithMessage(CbcModel &model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
int setDoubleParameter(ClpSimplex *model, double value)
Sets a double parameter (nonzero code if error)
const char * setIntParameterWithMessage(ClpSimplex *model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
std::string shortHelp_
Short help.
void setIntValue(int value)
Sets int value.
void append(std::string keyWord)
Insert string (only valid for keywords)
int currentKeyWord_
Current keyWord (if a keyword parameter)
const char * setDoubleParameterWithMessage(CbcModel &model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
void gutsOfConstructor()
gutsOfConstructor
int displayThis() const
whether to display
int lengthMatchName() const
Returns length of name for ptinting.
std::vector< std::string > definedKeyWords_
set of valid strings
int setIntParameter(OsiSolverInterface *model, int value)
Sets a int parameter (nonzero code if error)
double doubleValue() const
int intParameter(CbcModel &model) const
Gets a int parameter.
void printString() const
Print action and string.
CbcOrClpParameterType action_
Action.
void addHelp(std::string keyWord)
Adds one help line.
int fakeValue_
Return this as main value if an integer.
const char * setIntValueWithMessage(int value)
Sets int value with message.
std::string name() const
Returns name.
int intParameter(ClpSimplex *model) const
Gets a int parameter.
int intParameter(OsiSolverInterface *model) const
Gets a int parameter.
double doubleValue_
Double parameter - current value.
int lowerIntValue_
If int == okay.
std::string shortHelp() const
Returns short help.
CbcOrClpParameterType type_
const char * setCurrentOptionWithMessage(const std::string value)
Sets current parameter option using string with message.
const char * setCurrentOptionWithMessage(int value)
Sets current parameter option and returns printable string.
double lowerDoubleValue_
If double == okay.
int intValue_
Integer parameter - current value.
double doubleParameter(OsiSolverInterface *model) const
Gets a double parameter.
void setFakeKeyWord(int fakeValue)
Sets value of fake keyword to current size of keywords.
CbcOrClpParam(std::string name, std::string help, CbcOrClpParameterType type, int whereUsed=7, int display=2)
std::string longHelp_
Long help.
int setDoubleParameter(OsiSolverInterface *model, double value)
Sets a double parameter (nonzero code if error)
int parameterOption(std::string check) const
Returns parameter option which matches (-1 if none)
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
std::string stringValue_
String parameter - current value.
CbcOrClpParam(const CbcOrClpParam &)
Copy constructor.
double lowerDoubleValue() const
Returns the lower bound for a double-valued parameter.
CbcOrClpParam(std::string name, std::string help, std::string firstValue, CbcOrClpParameterType type, int whereUsed=7, int display=2)
CbcOrClpParam(std::string name, std::string help, int lower, int upper, CbcOrClpParameterType type, int display=2)
const char * setIntParameterWithMessage(OsiSolverInterface *model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
int currentOptionAsInteger(int &fakeInteger) const
Returns current parameter option position but if fake keyword returns a fake value and sets fakeInteg...
unsigned int lengthMatch_
void setFakeKeyWord(int value, int fakeValue)
Sets value of fake keyword.
std::string stringValue() const
int checkDoubleParameter(double value) const
Checks a double parameter (nonzero code if error)
int matches(std::string input) const
Returns 1 if matches minimum, 2 if matches less, 0 if not matched.
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error)
~CbcOrClpParam()
Destructor.
double doubleParameter(CbcModel &model) const
Gets a double parameter.
int fakeKeyWord() const
Gets value of fake keyword.
int fakeKeyWord_
If >=0 then integers allowed as a fake keyword So minusnnnn would got to -nnnn in currentKeyword_ and...
int setIntParameter(ClpSimplex *model, int value)
Sets a int parameter (nonzero code if error)
const char * setDoubleParameterWithMessage(OsiSolverInterface *model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
CbcOrClpParameterType type() const
type
double upperDoubleValue() const
Returns the upper bound for a double-valued parameter.
This solves LPs using the simplex method.