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 {
380 return definedKeyWords_[currentKeyWord_];
417 int matches (std::string input)
const;
444 {
return fakeKeyWord_;}
447 { fakeKeyWord_ = value; fakeValue_ = fakeValue;}
453 void gutsOfConstructor();
465 double lowerDoubleValue_;
466 double upperDoubleValue_;
471 unsigned int lengthName_;
473 unsigned int lengthMatch_;
475 std::vector<std::string> definedKeyWords_;
479 std::string shortHelp_;
481 std::string longHelp_;
493 std::string stringValue_;
519 #define CBCMAXPARAMETERS 250
int displayThis() const
whether to display
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)
void establishParams(int &numberParameters, CbcOrClpParam *const parameters)
double doubleValue() const
std::string CoinReadGetCommand(int argc, const char *argv[])
int intParameter(CbcModel &model) const
Gets a int parameter.
int whichParam(CbcOrClpParameterType name, int numberParameters, CbcOrClpParam *const parameters)
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 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
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.
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.
This solves LPs using the simplex method.
void CoinReadPrintit(const char *input)
void printOptions() const
Prints parameter options.
double CoinReadGetDoubleField(int argc, const char *argv[], int *valid)
int fakeKeyWord() const
Gets value of fake keyword.
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.
CbcOrClpParameterType
Parameter codes.
CbcOrClpParam()
Constructors.
double doubleParameter(CbcModel &model) const
Gets a double parameter.
void restoreSolution(ClpSimplex *lpSolver, std::string fileName, int mode)
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.
std::string currentOption() const
Returns current parameter option.
#define OsiSolverInterface
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 currentOptionAsInteger() const
Returns current parameter option position.
void printString() const
Print action and string.
int setIntParameter(CbcModel &model, int value)
Sets a int parameter (nonzero code if error)
const char * setIntValueWithMessage(int value)
Sets int value with message.