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