8 # include "CbcConfig.h" 13 #ifndef CbcOrClpParam_H 14 #define CbcOrClpParam_H 306 CbcOrClpParam (std::string name, std::string help, std::string firstValue,
321 void append(std::string keyWord);
324 void addHelp(std::string keyWord);
326 inline std::string
name( )
const {
381 return definedKeyWords_[currentKeyWord_];
418 int matches (std::string input)
const;
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
std::string CoinReadNextField()
Simple read stuff.
void setCbcOrClpPrinting(bool yesNo)
int intParameter(CbcModel &model) const
Gets a int parameter.
void establishParams(int &numberParameters, CbcOrClpParam *const parameters)
std::string CoinReadGetCommand(int argc, const char *argv[])
int whichParam(CbcOrClpParameterType name, int numberParameters, CbcOrClpParam *const parameters)
std::string CoinReadGetString(int argc, const char *argv[])
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.
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)
std::string matchName() const
Returns name which could match.
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
double doubleParameter(CbcModel &model) const
Gets a double parameter.
void append(std::string keyWord)
Insert string (only valid for keywords)
std::string currentOption() const
Returns current parameter option.
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.
#define OsiSolverInterface
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
int parameterOption(std::string check) const
Returns parameter option which matches (-1 if none)
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error)
const char * setIntValueWithMessage(int value)
Sets int value with message.