13 #ifndef CbcOrClpParam_H 14 #define CbcOrClpParam_H 327 void append(std::string keyWord);
330 void addHelp(std::string keyWord);
332 inline std::string
name()
const 349 return definedKeyWords_;
354 return lowerDoubleValue_;
359 return upperDoubleValue_;
364 return lowerIntValue_;
369 return upperIntValue_;
420 return definedKeyWords_[currentKeyWord_];
460 int matches(std::string input)
const;
497 fakeKeyWord_ = value;
498 fakeValue_ = fakeValue;
505 void gutsOfConstructor();
516 double lowerDoubleValue_;
517 double upperDoubleValue_;
522 unsigned int lengthName_;
524 unsigned int lengthMatch_;
526 std::vector< std::string > definedKeyWords_;
530 std::string shortHelp_;
532 std::string longHelp_;
544 std::string stringValue_;
570 #define CBCMAXPARAMETERS 250 578 const std::vector< CbcOrClpParam > ¶meters);
std::string CoinReadNextField()
Simple read stuff.
void setCbcOrClpPrinting(bool yesNo)
int intParameter(CbcModel &model) const
Gets a int parameter.
std::string CoinReadGetCommand(int argc, const char *argv[])
std::string CoinReadGetString(int argc, const char *argv[])
double upperDoubleValue() const
Returns the upper bound for a double-valued parameter.
CbcOrClpParameterType type() const
type
const char * setCurrentOptionWithMessage(int value)
Sets current parameter option and returns printable string.
std::string stringValue() const
void printLongHelp() const
Print Long help.
Very simple class for setting parameters.
int checkDoubleParameter(double value) const
Checks a double parameter (nonzero code if error)
void printOptions() const
Prints parameter options.
int fakeKeyWord() const
Gets value of fake keyword.
void addHelp(std::string keyWord)
Adds one help line.
void setIntValue(int value)
Sets int value.
CbcOrClpParam & operator=(const CbcOrClpParam &rhs)
Assignment operator. This copies the data.
void setCurrentOption(int value, bool printIt=false)
Sets current parameter option.
const char * setDoubleParameterWithMessage(CbcModel &model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
int lengthMatchName() const
Returns length of name for ptinting.
void printString() const
Print action and string.
std::string name() const
Returns name.
const char * setDoubleValueWithMessage(double value)
Sets double value with message.
const char * setIntParameterWithMessage(CbcModel &model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
int displayThis() const
whether to display
void setFakeKeyWord(int value, int fakeValue)
Sets value of fake keyword.
void setDoubleValue(double value)
Sets double value.
std::string shortHelp() const
Returns short help.
int whichParam(const CbcOrClpParameterType &name, const std::vector< CbcOrClpParam > ¶meters)
This solves LPs using the simplex method.
int whereUsed() const
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
void CoinReadPrintit(const char *input)
int lowerIntValue() const
Returns the lower bound for an int-valued parameter.
std::string matchName() const
Returns name which could match.
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
void establishParams(std::vector< CbcOrClpParam > ¶ms)
double doubleParameter(CbcModel &model) const
Gets a double parameter.
int upperIntValue() const
Returns the upper bound for an int-valued parameter.
void append(std::string keyWord)
Insert string (only valid for keywords)
std::string currentOption() const
Returns current parameter option.
std::string longHelp() const
Returns long help.
int CoinReadGetIntField(int argc, const char *argv[], int *valid)
int currentOptionAsInteger() const
Returns current parameter option position.
double doubleValue() const
void setLonghelp(const std::string help)
Set Long help.
CbcOrClpParameterType
Parameter codes.
CbcOrClpParam()
Constructors.
void restoreSolution(ClpSimplex *lpSolver, std::string fileName, int mode)
~CbcOrClpParam()
Destructor.
int setDoubleParameter(CbcModel &model, double value)
Sets a double parameter (nonzero code if error)
void setStringValue(std::string value)
Sets string value.
int matches(std::string input) const
Returns 1 if matches minimum, 2 if matches less, 0 if not matched.
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
const std::vector< std::string > & definedKeywords() const
Returns set of valid strings.
int parameterOption(std::string check) const
Returns parameter option which matches (-1 if none)
double lowerDoubleValue() const
Returns the lower bound for a double-valued parameter.
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error)
const char * setIntValueWithMessage(int value)
Sets int value with message.