Clp  1.17.8
List of all members
CbcOrClpParam Class Reference

Very simple class for setting parameters. More...

#include <CbcOrClpParam.hpp>

+ Collaboration diagram for CbcOrClpParam:

Public Member Functions

Constructor and destructor
 CbcOrClpParam ()
 Constructors. More...
 
 CbcOrClpParam (std::string name, std::string help, double lower, double upper, CbcOrClpParameterType type, int display=2)
 
 CbcOrClpParam (std::string name, std::string help, int lower, int upper, CbcOrClpParameterType type, int display=2)
 
 CbcOrClpParam (std::string name, std::string help, std::string firstValue, CbcOrClpParameterType type, int whereUsed=7, int display=2)
 
 CbcOrClpParam (std::string name, std::string help, CbcOrClpParameterType type, int whereUsed=7, int display=2)
 
 CbcOrClpParam (const CbcOrClpParam &)
 Copy constructor. More...
 
CbcOrClpParamoperator= (const CbcOrClpParam &rhs)
 Assignment operator. This copies the data. More...
 
 ~CbcOrClpParam ()
 Destructor. More...
 

Private Attributes

data

We might as well throw all type data in - could derive?

CbcOrClpParameterType type_
 
double lowerDoubleValue_
 If double == okay. More...
 
double upperDoubleValue_
 
int lowerIntValue_
 If int == okay. More...
 
int upperIntValue_
 
unsigned int lengthName_
 
unsigned int lengthMatch_
 
std::vector< std::string > definedKeyWords_
 set of valid strings More...
 
std::string name_
 Name. More...
 
std::string shortHelp_
 Short help. More...
 
std::string longHelp_
 Long help. More...
 
CbcOrClpParameterType action_
 Action. More...
 
int currentKeyWord_
 Current keyWord (if a keyword parameter) More...
 
int display_
 Display on ? More...
 
int intValue_
 Integer parameter - current value. More...
 
double doubleValue_
 Double parameter - current value. More...
 
std::string stringValue_
 String parameter - current value. More...
 
int whereUsed_
 7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl More...
 
int fakeKeyWord_
 If >=0 then integers allowed as a fake keyword So minusnnnn would got to -nnnn in currentKeyword_ and plusnnnn would go to fakeKeyword_+nnnn. More...
 
int fakeValue_
 Return this as main value if an integer. More...
 

stuff

void append (std::string keyWord)
 Insert string (only valid for keywords) More...
 
void addHelp (std::string keyWord)
 Adds one help line. More...
 
std::string name () const
 Returns name. More...
 
std::string shortHelp () const
 Returns short help. More...
 
std::string longHelp () const
 Returns long help. More...
 
const std::vector< std::string > & definedKeywords () const
 Returns set of valid strings. More...
 
double lowerDoubleValue () const
 Returns the lower bound for a double-valued parameter. More...
 
double upperDoubleValue () const
 Returns the upper bound for a double-valued parameter. More...
 
int lowerIntValue () const
 Returns the lower bound for an int-valued parameter. More...
 
int upperIntValue () const
 Returns the upper bound for an int-valued parameter. More...
 
int setDoubleParameter (CbcModel &model, double value)
 Sets a double parameter (nonzero code if error) More...
 
const char * setDoubleParameterWithMessage (CbcModel &model, double value, int &returnCode)
 Sets double parameter and returns printable string and error code. More...
 
double doubleParameter (CbcModel &model) const
 Gets a double parameter. More...
 
int setIntParameter (CbcModel &model, int value)
 Sets a int parameter (nonzero code if error) More...
 
const char * setIntParameterWithMessage (CbcModel &model, int value, int &returnCode)
 Sets int parameter and returns printable string and error code. More...
 
int intParameter (CbcModel &model) const
 Gets a int parameter. More...
 
int setDoubleParameter (ClpSimplex *model, double value)
 Sets a double parameter (nonzero code if error) More...
 
double doubleParameter (ClpSimplex *model) const
 Gets a double parameter. More...
 
const char * setDoubleParameterWithMessage (ClpSimplex *model, double value, int &returnCode)
 Sets double parameter and returns printable string and error code. More...
 
int setIntParameter (ClpSimplex *model, int value)
 Sets a int parameter (nonzero code if error) More...
 
const char * setIntParameterWithMessage (ClpSimplex *model, int value, int &returnCode)
 Sets int parameter and returns printable string and error code. More...
 
int intParameter (ClpSimplex *model) const
 Gets a int parameter. More...
 
int setDoubleParameter (OsiSolverInterface *model, double value)
 Sets a double parameter (nonzero code if error) More...
 
const char * setDoubleParameterWithMessage (OsiSolverInterface *model, double value, int &returnCode)
 Sets double parameter and returns printable string and error code. More...
 
double doubleParameter (OsiSolverInterface *model) const
 Gets a double parameter. More...
 
int setIntParameter (OsiSolverInterface *model, int value)
 Sets a int parameter (nonzero code if error) More...
 
const char * setIntParameterWithMessage (OsiSolverInterface *model, int value, int &returnCode)
 Sets int parameter and returns printable string and error code. More...
 
int intParameter (OsiSolverInterface *model) const
 Gets a int parameter. More...
 
int checkDoubleParameter (double value) const
 Checks a double parameter (nonzero code if error) More...
 
std::string matchName () const
 Returns name which could match. More...
 
int lengthMatchName () const
 Returns length of name for ptinting. More...
 
int parameterOption (std::string check) const
 Returns parameter option which matches (-1 if none) More...
 
void printOptions () const
 Prints parameter options. More...
 
std::string currentOption () const
 Returns current parameter option. More...
 
void setCurrentOption (int value, bool printIt=false)
 Sets current parameter option. More...
 
const char * setCurrentOptionWithMessage (int value)
 Sets current parameter option and returns printable string. More...
 
void setCurrentOption (const std::string value)
 Sets current parameter option using string. More...
 
const char * setCurrentOptionWithMessage (const std::string value)
 Sets current parameter option using string with message. More...
 
int currentOptionAsInteger () const
 Returns current parameter option position. More...
 
int currentOptionAsInteger (int &fakeInteger) const
 Returns current parameter option position but if fake keyword returns a fake value and sets fakeInteger to true value. More...
 
void setIntValue (int value)
 Sets int value. More...
 
const char * setIntValueWithMessage (int value)
 Sets int value with message. More...
 
int intValue () const
 
void setDoubleValue (double value)
 Sets double value. More...
 
const char * setDoubleValueWithMessage (double value)
 Sets double value with message. More...
 
double doubleValue () const
 
void setStringValue (std::string value)
 Sets string value. More...
 
std::string stringValue () const
 
int matches (std::string input) const
 Returns 1 if matches minimum, 2 if matches less, 0 if not matched. More...
 
CbcOrClpParameterType type () const
 type More...
 
int displayThis () const
 whether to display More...
 
void setLonghelp (const std::string help)
 Set Long help. More...
 
void printLongHelp () const
 Print Long help. More...
 
void printString () const
 Print action and string. More...
 
int whereUsed () const
 7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl More...
 
int fakeKeyWord () const
 Gets value of fake keyword. More...
 
void setFakeKeyWord (int value, int fakeValue)
 Sets value of fake keyword. More...
 
void setFakeKeyWord (int fakeValue)
 Sets value of fake keyword to current size of keywords. More...
 
void gutsOfConstructor ()
 gutsOfConstructor More...
 

Detailed Description

Very simple class for setting parameters.

Definition at line 301 of file CbcOrClpParam.hpp.

Constructor & Destructor Documentation

◆ CbcOrClpParam() [1/6]

CbcOrClpParam::CbcOrClpParam ( )

Constructors.

◆ CbcOrClpParam() [2/6]

CbcOrClpParam::CbcOrClpParam ( std::string  name,
std::string  help,
double  lower,
double  upper,
CbcOrClpParameterType  type,
int  display = 2 
)

◆ CbcOrClpParam() [3/6]

CbcOrClpParam::CbcOrClpParam ( std::string  name,
std::string  help,
int  lower,
int  upper,
CbcOrClpParameterType  type,
int  display = 2 
)

◆ CbcOrClpParam() [4/6]

CbcOrClpParam::CbcOrClpParam ( std::string  name,
std::string  help,
std::string  firstValue,
CbcOrClpParameterType  type,
int  whereUsed = 7,
int  display = 2 
)

◆ CbcOrClpParam() [5/6]

CbcOrClpParam::CbcOrClpParam ( std::string  name,
std::string  help,
CbcOrClpParameterType  type,
int  whereUsed = 7,
int  display = 2 
)

◆ CbcOrClpParam() [6/6]

CbcOrClpParam::CbcOrClpParam ( const CbcOrClpParam )

Copy constructor.

◆ ~CbcOrClpParam()

CbcOrClpParam::~CbcOrClpParam ( )

Destructor.

Member Function Documentation

◆ operator=()

CbcOrClpParam& CbcOrClpParam::operator= ( const CbcOrClpParam rhs)

Assignment operator. This copies the data.

◆ append()

void CbcOrClpParam::append ( std::string  keyWord)

Insert string (only valid for keywords)

◆ addHelp()

void CbcOrClpParam::addHelp ( std::string  keyWord)

Adds one help line.

◆ name()

std::string CbcOrClpParam::name ( ) const
inline

Returns name.

Definition at line 332 of file CbcOrClpParam.hpp.

◆ shortHelp()

std::string CbcOrClpParam::shortHelp ( ) const
inline

Returns short help.

Definition at line 337 of file CbcOrClpParam.hpp.

◆ longHelp()

std::string CbcOrClpParam::longHelp ( ) const
inline

Returns long help.

Definition at line 342 of file CbcOrClpParam.hpp.

◆ definedKeywords()

const std::vector<std::string>& CbcOrClpParam::definedKeywords ( ) const
inline

Returns set of valid strings.

Definition at line 347 of file CbcOrClpParam.hpp.

◆ lowerDoubleValue()

double CbcOrClpParam::lowerDoubleValue ( ) const
inline

Returns the lower bound for a double-valued parameter.

Definition at line 352 of file CbcOrClpParam.hpp.

◆ upperDoubleValue()

double CbcOrClpParam::upperDoubleValue ( ) const
inline

Returns the upper bound for a double-valued parameter.

Definition at line 357 of file CbcOrClpParam.hpp.

◆ lowerIntValue()

int CbcOrClpParam::lowerIntValue ( ) const
inline

Returns the lower bound for an int-valued parameter.

Definition at line 362 of file CbcOrClpParam.hpp.

◆ upperIntValue()

int CbcOrClpParam::upperIntValue ( ) const
inline

Returns the upper bound for an int-valued parameter.

Definition at line 367 of file CbcOrClpParam.hpp.

◆ setDoubleParameter() [1/3]

int CbcOrClpParam::setDoubleParameter ( CbcModel &  model,
double  value 
)

Sets a double parameter (nonzero code if error)

◆ setDoubleParameterWithMessage() [1/3]

const char* CbcOrClpParam::setDoubleParameterWithMessage ( CbcModel &  model,
double  value,
int &  returnCode 
)

Sets double parameter and returns printable string and error code.

◆ doubleParameter() [1/3]

double CbcOrClpParam::doubleParameter ( CbcModel &  model) const

Gets a double parameter.

◆ setIntParameter() [1/3]

int CbcOrClpParam::setIntParameter ( CbcModel &  model,
int  value 
)

Sets a int parameter (nonzero code if error)

◆ setIntParameterWithMessage() [1/3]

const char* CbcOrClpParam::setIntParameterWithMessage ( CbcModel &  model,
int  value,
int &  returnCode 
)

Sets int parameter and returns printable string and error code.

◆ intParameter() [1/3]

int CbcOrClpParam::intParameter ( CbcModel &  model) const

Gets a int parameter.

◆ setDoubleParameter() [2/3]

int CbcOrClpParam::setDoubleParameter ( ClpSimplex model,
double  value 
)

Sets a double parameter (nonzero code if error)

◆ doubleParameter() [2/3]

double CbcOrClpParam::doubleParameter ( ClpSimplex model) const

Gets a double parameter.

◆ setDoubleParameterWithMessage() [2/3]

const char* CbcOrClpParam::setDoubleParameterWithMessage ( ClpSimplex model,
double  value,
int &  returnCode 
)

Sets double parameter and returns printable string and error code.

◆ setIntParameter() [2/3]

int CbcOrClpParam::setIntParameter ( ClpSimplex model,
int  value 
)

Sets a int parameter (nonzero code if error)

◆ setIntParameterWithMessage() [2/3]

const char* CbcOrClpParam::setIntParameterWithMessage ( ClpSimplex model,
int  value,
int &  returnCode 
)

Sets int parameter and returns printable string and error code.

◆ intParameter() [2/3]

int CbcOrClpParam::intParameter ( ClpSimplex model) const

Gets a int parameter.

◆ setDoubleParameter() [3/3]

int CbcOrClpParam::setDoubleParameter ( OsiSolverInterface model,
double  value 
)

Sets a double parameter (nonzero code if error)

◆ setDoubleParameterWithMessage() [3/3]

const char* CbcOrClpParam::setDoubleParameterWithMessage ( OsiSolverInterface model,
double  value,
int &  returnCode 
)

Sets double parameter and returns printable string and error code.

◆ doubleParameter() [3/3]

double CbcOrClpParam::doubleParameter ( OsiSolverInterface model) const

Gets a double parameter.

◆ setIntParameter() [3/3]

int CbcOrClpParam::setIntParameter ( OsiSolverInterface model,
int  value 
)

Sets a int parameter (nonzero code if error)

◆ setIntParameterWithMessage() [3/3]

const char* CbcOrClpParam::setIntParameterWithMessage ( OsiSolverInterface model,
int  value,
int &  returnCode 
)

Sets int parameter and returns printable string and error code.

◆ intParameter() [3/3]

int CbcOrClpParam::intParameter ( OsiSolverInterface model) const

Gets a int parameter.

◆ checkDoubleParameter()

int CbcOrClpParam::checkDoubleParameter ( double  value) const

Checks a double parameter (nonzero code if error)

◆ matchName()

std::string CbcOrClpParam::matchName ( ) const

Returns name which could match.

◆ lengthMatchName()

int CbcOrClpParam::lengthMatchName ( ) const

Returns length of name for ptinting.

◆ parameterOption()

int CbcOrClpParam::parameterOption ( std::string  check) const

Returns parameter option which matches (-1 if none)

◆ printOptions()

void CbcOrClpParam::printOptions ( ) const

Prints parameter options.

◆ currentOption()

std::string CbcOrClpParam::currentOption ( ) const
inline

Returns current parameter option.

Definition at line 418 of file CbcOrClpParam.hpp.

◆ setCurrentOption() [1/2]

void CbcOrClpParam::setCurrentOption ( int  value,
bool  printIt = false 
)

Sets current parameter option.

◆ setCurrentOptionWithMessage() [1/2]

const char* CbcOrClpParam::setCurrentOptionWithMessage ( int  value)

Sets current parameter option and returns printable string.

◆ setCurrentOption() [2/2]

void CbcOrClpParam::setCurrentOption ( const std::string  value)

Sets current parameter option using string.

◆ setCurrentOptionWithMessage() [2/2]

const char* CbcOrClpParam::setCurrentOptionWithMessage ( const std::string  value)

Sets current parameter option using string with message.

◆ currentOptionAsInteger() [1/2]

int CbcOrClpParam::currentOptionAsInteger ( ) const

Returns current parameter option position.

◆ currentOptionAsInteger() [2/2]

int CbcOrClpParam::currentOptionAsInteger ( int &  fakeInteger) const

Returns current parameter option position but if fake keyword returns a fake value and sets fakeInteger to true value.

If not fake then fakeInteger is -COIN_INT_MAX

◆ setIntValue()

void CbcOrClpParam::setIntValue ( int  value)

Sets int value.

◆ setIntValueWithMessage()

const char* CbcOrClpParam::setIntValueWithMessage ( int  value)

Sets int value with message.

◆ intValue()

int CbcOrClpParam::intValue ( ) const
inline

Definition at line 441 of file CbcOrClpParam.hpp.

◆ setDoubleValue()

void CbcOrClpParam::setDoubleValue ( double  value)

Sets double value.

◆ setDoubleValueWithMessage()

const char* CbcOrClpParam::setDoubleValueWithMessage ( double  value)

Sets double value with message.

◆ doubleValue()

double CbcOrClpParam::doubleValue ( ) const
inline

Definition at line 449 of file CbcOrClpParam.hpp.

◆ setStringValue()

void CbcOrClpParam::setStringValue ( std::string  value)

Sets string value.

◆ stringValue()

std::string CbcOrClpParam::stringValue ( ) const
inline

Definition at line 455 of file CbcOrClpParam.hpp.

◆ matches()

int CbcOrClpParam::matches ( std::string  input) const

Returns 1 if matches minimum, 2 if matches less, 0 if not matched.

◆ type()

CbcOrClpParameterType CbcOrClpParam::type ( ) const
inline

type

Definition at line 462 of file CbcOrClpParam.hpp.

◆ displayThis()

int CbcOrClpParam::displayThis ( ) const
inline

whether to display

Definition at line 467 of file CbcOrClpParam.hpp.

◆ setLonghelp()

void CbcOrClpParam::setLonghelp ( const std::string  help)
inline

Set Long help.

Definition at line 472 of file CbcOrClpParam.hpp.

◆ printLongHelp()

void CbcOrClpParam::printLongHelp ( ) const

Print Long help.

◆ printString()

void CbcOrClpParam::printString ( ) const

Print action and string.

◆ whereUsed()

int CbcOrClpParam::whereUsed ( ) const
inline

7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl

Definition at line 485 of file CbcOrClpParam.hpp.

◆ fakeKeyWord()

int CbcOrClpParam::fakeKeyWord ( ) const
inline

Gets value of fake keyword.

Definition at line 490 of file CbcOrClpParam.hpp.

◆ setFakeKeyWord() [1/2]

void CbcOrClpParam::setFakeKeyWord ( int  value,
int  fakeValue 
)
inline

Sets value of fake keyword.

Definition at line 495 of file CbcOrClpParam.hpp.

◆ setFakeKeyWord() [2/2]

void CbcOrClpParam::setFakeKeyWord ( int  fakeValue)

Sets value of fake keyword to current size of keywords.

◆ gutsOfConstructor()

void CbcOrClpParam::gutsOfConstructor ( )
private

gutsOfConstructor

Member Data Documentation

◆ type_

CbcOrClpParameterType CbcOrClpParam::type_
private

Definition at line 514 of file CbcOrClpParam.hpp.

◆ lowerDoubleValue_

double CbcOrClpParam::lowerDoubleValue_
private

If double == okay.

Definition at line 516 of file CbcOrClpParam.hpp.

◆ upperDoubleValue_

double CbcOrClpParam::upperDoubleValue_
private

Definition at line 517 of file CbcOrClpParam.hpp.

◆ lowerIntValue_

int CbcOrClpParam::lowerIntValue_
private

If int == okay.

Definition at line 519 of file CbcOrClpParam.hpp.

◆ upperIntValue_

int CbcOrClpParam::upperIntValue_
private

Definition at line 520 of file CbcOrClpParam.hpp.

◆ lengthName_

unsigned int CbcOrClpParam::lengthName_
private

Definition at line 522 of file CbcOrClpParam.hpp.

◆ lengthMatch_

unsigned int CbcOrClpParam::lengthMatch_
private

Definition at line 524 of file CbcOrClpParam.hpp.

◆ definedKeyWords_

std::vector< std::string > CbcOrClpParam::definedKeyWords_
private

set of valid strings

Definition at line 526 of file CbcOrClpParam.hpp.

◆ name_

std::string CbcOrClpParam::name_
private

Name.

Definition at line 528 of file CbcOrClpParam.hpp.

◆ shortHelp_

std::string CbcOrClpParam::shortHelp_
private

Short help.

Definition at line 530 of file CbcOrClpParam.hpp.

◆ longHelp_

std::string CbcOrClpParam::longHelp_
private

Long help.

Definition at line 532 of file CbcOrClpParam.hpp.

◆ action_

CbcOrClpParameterType CbcOrClpParam::action_
private

Action.

Definition at line 534 of file CbcOrClpParam.hpp.

◆ currentKeyWord_

int CbcOrClpParam::currentKeyWord_
private

Current keyWord (if a keyword parameter)

Definition at line 536 of file CbcOrClpParam.hpp.

◆ display_

int CbcOrClpParam::display_
private

Display on ?

Definition at line 538 of file CbcOrClpParam.hpp.

◆ intValue_

int CbcOrClpParam::intValue_
private

Integer parameter - current value.

Definition at line 540 of file CbcOrClpParam.hpp.

◆ doubleValue_

double CbcOrClpParam::doubleValue_
private

Double parameter - current value.

Definition at line 542 of file CbcOrClpParam.hpp.

◆ stringValue_

std::string CbcOrClpParam::stringValue_
private

String parameter - current value.

Definition at line 544 of file CbcOrClpParam.hpp.

◆ whereUsed_

int CbcOrClpParam::whereUsed_
private

7 if used everywhere, 1 - used by clp 2 - used by cbc 4 - used by ampl

Definition at line 550 of file CbcOrClpParam.hpp.

◆ fakeKeyWord_

int CbcOrClpParam::fakeKeyWord_
private

If >=0 then integers allowed as a fake keyword So minusnnnn would got to -nnnn in currentKeyword_ and plusnnnn would go to fakeKeyword_+nnnn.

Definition at line 555 of file CbcOrClpParam.hpp.

◆ fakeValue_

int CbcOrClpParam::fakeValue_
private

Return this as main value if an integer.

Definition at line 557 of file CbcOrClpParam.hpp.


The documentation for this class was generated from the following file: