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