13 #ifndef CbcOrClpParam_H
14 #define CbcOrClpParam_H
312 CbcOrClpParam(std::string name, std::string help, std::string firstValue,
327 void append(std::string keyWord);
330 void addHelp(std::string keyWord);
332 inline std::string
name()
const
460 int matches(std::string input)
const;
570 #define CBCMAXPARAMETERS 250
578 const std::vector< CbcOrClpParam > ¶meters);
int displayThis() const
whether to display
void gutsOfConstructor()
gutsOfConstructor
std::string shortHelp() const
Returns short help.
std::string CoinReadNextField()
Simple read stuff.
int lengthMatchName() const
Returns length of name for ptinting.
void setCbcOrClpPrinting(bool yesNo)
int intValue_
Integer parameter - current value.
double doubleValue() const
std::string CoinReadGetCommand(int argc, const char *argv[])
double doubleValue_
Double parameter - current value.
int intParameter(CbcModel &model) const
Gets a int parameter.
std::string stringValue() const
std::string name() const
Returns name.
std::string CoinReadGetString(int argc, const char *argv[])
const char * setCurrentOptionWithMessage(int value)
Sets current parameter option and returns printable string.
Very simple class for setting parameters.
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 printIt(const char *msg)
Utility to print a long message as filled lines of text.
void setCurrentOption(int value, bool printIt=false)
Sets current parameter option.
int whereUsed() const
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
Abstract Base Class for describing an interface to a solver.
const char * setDoubleParameterWithMessage(CbcModel &model, double value, int &returnCode)
Sets double parameter and returns printable string and error code.
void printLongHelp() const
Print Long help.
const char * setDoubleValueWithMessage(double value)
Sets double value with message.
int whereUsed_
7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl
const char * setIntParameterWithMessage(CbcModel &model, int value, int &returnCode)
Sets int parameter and returns printable string and error code.
void setFakeKeyWord(int value, int fakeValue)
Sets value of fake keyword.
void setDoubleValue(double value)
Sets double value.
int whichParam(const CbcOrClpParameterType &name, const std::vector< CbcOrClpParam > ¶meters)
This solves LPs using the simplex method.
double upperDoubleValue() const
Returns the upper bound for a double-valued parameter.
int currentKeyWord_
Current keyWord (if a keyword parameter)
void CoinReadPrintit(const char *input)
std::vector< std::string > definedKeyWords_
set of valid strings
double lowerDoubleValue_
If double == okay.
void printOptions() const
Prints parameter options.
int fakeValue_
Return this as main value if an integer.
const std::vector< std::string > & definedKeywords() const
Returns set of valid strings.
double lowerDoubleValue() const
Returns the lower bound for a double-valued parameter.
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
int fakeKeyWord() const
Gets value of fake keyword.
unsigned int lengthMatch_
std::string shortHelp_
Short help.
std::string longHelp_
Long help.
void establishParams(std::vector< CbcOrClpParam > ¶ms)
int checkDoubleParameter(double value) const
Checks a double parameter (nonzero code if error)
void append(std::string keyWord)
Insert string (only valid for keywords)
CbcOrClpParameterType type() const
type
int CoinReadGetIntField(int argc, const char *argv[], int *valid)
void setLonghelp(const std::string help)
Set Long help.
int fakeKeyWord_
If >=0 then integers allowed as a fake keyword So minusnnnn would got to -nnnn in currentKeyword_ and...
CbcOrClpParameterType
Parameter codes.
CbcOrClpParam()
Constructors.
double doubleParameter(CbcModel &model) const
Gets a double parameter.
void restoreSolution(ClpSimplex *lpSolver, std::string fileName, int mode)
int lowerIntValue_
If int == okay.
int parameterOption(std::string check) const
Returns parameter option which matches (-1 if none)
std::string matchName() const
Returns name which could match.
~CbcOrClpParam()
Destructor.
int setDoubleParameter(CbcModel &model, double value)
Sets a double parameter (nonzero code if error)
void setStringValue(std::string value)
Sets string value.
CbcOrClpParameterType action_
Action.
std::string currentOption() const
Returns current parameter option.
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
int matches(std::string input) const
Returns 1 if matches minimum, 2 if matches less, 0 if not matched.
int lowerIntValue() const
Returns the lower bound for an int-valued parameter.
int currentOptionAsInteger() const
Returns current parameter option position.
void printString() const
Print action and string.
std::string longHelp() const
Returns long help.
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error)
std::string stringValue_
String parameter - current value.
const char * setIntValueWithMessage(int value)
Sets int value with message.
CbcOrClpParameterType type_
int upperIntValue() const
Returns the upper bound for an int-valued parameter.