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
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.
void establishParams(int &numberParameters, CbcOrClpParam *const parameters)
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.
int whichParam(CbcOrClpParameterType name, int numberParameters, CbcOrClpParam *const parameters)
std::string stringValue() const
std::vector< std::string > definedKeyWords_
set of valid strings
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.
This solves LPs using the simplex method.
int currentKeyWord_
Current keyWord (if a keyword parameter)
void CoinReadPrintit(const char *input)
double lowerDoubleValue_
If double == okay.
void printOptions() const
Prints parameter options.
int fakeValue_
Return this as main value if an integer.
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.
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 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)
std::string stringValue_
String parameter - current value.
const char * setIntValueWithMessage(int value)
Sets int value with message.
CbcOrClpParameterType type_