Cbc  2.10.3
List of all members
CbcGenParam Class Reference

Class for cbc-generic control parameters. More...

#include <CbcGenParam.hpp>

+ Inheritance diagram for CbcGenParam:
+ Collaboration diagram for CbcGenParam:

Public Types

Subtypes
enum  CbcGenParamCode {
  CBCGEN_FIRSTPARAM = 0, GENERALQUERY, FULLGENERALQUERY, HELP,
  BAB, CLEARCUTS, CLIQUECUTS, COMBINE,
  COSTSTRATEGY, CPP, CUTDEPTH, CUTSTRATEGY,
  DEBUG, DIRECTORY, DJFIX, DUMMY,
  ERRORSALLOWED, EXIT, EXPORT, FLOWCUTS,
  FPUMP, FPUMPITS, GOMORYCUTS, GREEDY,
  HEURISTICSTRATEGY, IMPORT, INTPRINT, KNAPSACKCUTS,
  LOCALTREE, LOGLEVEL, MESSAGES, MIPLIB,
  MIXEDCUTS, ODDHOLECUTS, OUTDUPROWS, OUTPUTFORMAT,
  PREPROCESS, PRINTMASK, PRINTOPTIONS, PRINTVERSION,
  PRIORITYIN, PROBINGCUTS, REDSPLITCUTS, ROUNDING,
  SOLUTION, SOLVECONTINUOUS, SOLVER, SOS,
  STDIN, STRENGTHEN, TIGHTENFACTOR, TWOMIRCUTS,
  UNITTEST, USERCBC, USESOLUTION, VERBOSE,
  SHOWUNIMP, CBCGEN_LASTPARAM
}
 Enumeration for cbc-generic parameters. More...
 
- Public Types inherited from CoinParam
enum  CoinParamType
 
enum  CoinParamType
 
typedef int(* CoinParamFunc) (CoinParam *param)
 
typedef std::vector< CoinParam * > CoinParamVec
 
typedef int(* CoinParamFunc) (CoinParam *param)
 

Public Member Functions

Constructors and Destructors

Be careful how you specify parameters for the constructors! There's great potential for confusion.

 CbcGenParam ()
 Default constructor. More...
 
 CbcGenParam (CbcGenParamCode code, std::string name, std::string help, double lower, double upper, double dflt=0.0, bool display=true)
 Constructor for a parameter with a double value. More...
 
 CbcGenParam (CbcGenParamCode code, std::string name, std::string help, int lower, int upper, int dflt=0, bool display=true)
 Constructor for a parameter with an integer value. More...
 
 CbcGenParam (CbcGenParamCode code, std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
 Constructor for a parameter with keyword values. More...
 
 CbcGenParam (CbcGenParamCode code, std::string name, std::string help, std::string dflt, bool display=true)
 Constructor for a string parameter. More...
 
 CbcGenParam (CbcGenParamCode code, std::string name, std::string help, bool display=true)
 Constructor for an action parameter. More...
 
 CbcGenParam (const CbcGenParam &orig)
 Copy constructor. More...
 
CbcGenParamclone ()
 Clone. More...
 
CbcGenParamoperator= (const CbcGenParam &rhs)
 Assignment. More...
 
 ~CbcGenParam ()
 Destructor. More...
 
Methods to query and manipulate a parameter object
CbcGenParamCode paramCode () const
 Get the parameter code. More...
 
void setParamCode (CbcGenParamCode code)
 Set the parameter code. More...
 
CbcGenCtlBlkobj () const
 Get the underlying cbc-generic control object. More...
 
void setObj (CbcGenCtlBlk *obj)
 Set the underlying cbc-generic control object. More...
 
- Public Member Functions inherited from CoinParam
 CoinParam ()
 
 CoinParam (std::string name, std::string help, double lower, double upper, double dflt=0.0, bool display=true)
 
 CoinParam (std::string name, std::string help, int lower, int upper, int dflt=0, bool display=true)
 
 CoinParam (std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
 
 CoinParam (std::string name, std::string help, std::string dflt, bool display=true)
 
 CoinParam (std::string name, std::string help, bool display=true)
 
 CoinParam (const CoinParam &orig)
 
CoinParamoperator= (const CoinParam &rhs)
 
virtual ~CoinParam ()
 
void appendKwd (std::string kwd)
 
int kwdIndex (std::string kwd) const
 
std::string kwdVal () const
 
void setKwdVal (int value, bool printIt=false)
 
void setKwdVal (const std::string value)
 
void printKwds () const
 
void setStrVal (std::string value)
 
std::string strVal () const
 
void setDblVal (double value)
 
double dblVal () const
 
void setIntVal (int value)
 
int intVal () const
 
void setShortHelp (const std::string help)
 
std::string shortHelp () const
 
void setLongHelp (const std::string help)
 
std::string longHelp () const
 
void printLongHelp () const
 
CoinParamType type () const
 
void setType (CoinParamType type)
 
std::string name () const
 
void setName (std::string name)
 
int matches (std::string input) const
 
std::string matchName () const
 
void setDisplay (bool display)
 
bool display () const
 
CoinParamFunc pushFunc ()
 
void setPushFunc (CoinParamFunc func)
 
CoinParamFunc pullFunc ()
 
void setPullFunc (CoinParamFunc func)
 
std::ostream & operator<< (std::ostream &s, const CoinParam &param)
 
void setInputSrc (FILE *src)
 
bool isCommandLine ()
 
bool isInteractive ()
 
std::string getStringField (int argc, const char *argv[], int *valid)
 
int getIntField (int argc, const char *argv[], int *valid)
 
double getDoubleField (int argc, const char *argv[], int *valid)
 
int matchParam (const CoinParamVec &paramVec, std::string name, int &matchNdx, int &shortCnt)
 
std::string getCommand (int argc, const char *argv[], const std::string prompt, std::string *pfx=0)
 
int lookupParam (std::string name, CoinParamVec &paramVec, int *matchCnt=0, int *shortCnt=0, int *queryCnt=0)
 
void printIt (const char *msg)
 
void shortOrHelpOne (CoinParamVec &paramVec, int matchNdx, std::string name, int numQuery)
 
void shortOrHelpMany (CoinParamVec &paramVec, std::string name, int numQuery)
 
void printGenericHelp ()
 
void printHelp (CoinParamVec &paramVec, int firstParam, int lastParam, std::string prefix, bool shortHelp, bool longHelp, bool hidden)
 
 CoinParam ()
 
 CoinParam (std::string name, std::string help, double lower, double upper, double dflt=0.0, bool display=true)
 
 CoinParam (std::string name, std::string help, int lower, int upper, int dflt=0, bool display=true)
 
 CoinParam (std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
 
 CoinParam (std::string name, std::string help, std::string dflt, bool display=true)
 
 CoinParam (std::string name, std::string help, bool display=true)
 
 CoinParam (const CoinParam &orig)
 
CoinParamoperator= (const CoinParam &rhs)
 
virtual ~CoinParam ()
 
void appendKwd (std::string kwd)
 
int kwdIndex (std::string kwd) const
 
std::string kwdVal () const
 
void setKwdVal (int value, bool printIt=false)
 
void setKwdVal (const std::string value)
 
void printKwds () const
 
void setStrVal (std::string value)
 
std::string strVal () const
 
void setDblVal (double value)
 
double dblVal () const
 
void setIntVal (int value)
 
int intVal () const
 
void setShortHelp (const std::string help)
 
std::string shortHelp () const
 
void setLongHelp (const std::string help)
 
std::string longHelp () const
 
void printLongHelp () const
 
CoinParamType type () const
 
void setType (CoinParamType type)
 
std::string name () const
 
void setName (std::string name)
 
int matches (std::string input) const
 
std::string matchName () const
 
void setDisplay (bool display)
 
bool display () const
 
CoinParamFunc pushFunc ()
 
void setPushFunc (CoinParamFunc func)
 
CoinParamFunc pullFunc ()
 
void setPullFunc (CoinParamFunc func)
 

Additional Inherited Members

- Public Attributes inherited from CoinParam
 coinParamInvalid
 
 coinParamAct
 
 coinParamInt
 
 coinParamDbl
 
 coinParamStr
 
 coinParamKwd
 

Detailed Description

Class for cbc-generic control parameters.

Adds parameter type codes and push/pull functions to the generic parameter object.

Definition at line 34 of file CbcGenParam.hpp.

Member Enumeration Documentation

◆ CbcGenParamCode

Enumeration for cbc-generic parameters.

These are parameters that control the operation of the cbc-generic main program by operating on a CbcGenCtlBlk object. CBCGEN_FIRSTPARAM and CBCGEN_LASTPARM are markers to allow convenient separation of parameter groups.

Enumerator
CBCGEN_FIRSTPARAM 
GENERALQUERY 
FULLGENERALQUERY 
HELP 
BAB 
CLEARCUTS 
CLIQUECUTS 
COMBINE 
COSTSTRATEGY 
CPP 
CUTDEPTH 
CUTSTRATEGY 
DEBUG 
DIRECTORY 
DJFIX 
DUMMY 
ERRORSALLOWED 
EXIT 
EXPORT 
FLOWCUTS 
FPUMP 
FPUMPITS 
GOMORYCUTS 
GREEDY 
HEURISTICSTRATEGY 
IMPORT 
INTPRINT 
KNAPSACKCUTS 
LOCALTREE 
LOGLEVEL 
MESSAGES 
MIPLIB 
MIXEDCUTS 
ODDHOLECUTS 
OUTDUPROWS 
OUTPUTFORMAT 
PREPROCESS 
PRINTMASK 
PRINTOPTIONS 
PRINTVERSION 
PRIORITYIN 
PROBINGCUTS 
REDSPLITCUTS 
ROUNDING 
SOLUTION 
SOLVECONTINUOUS 
SOLVER 
SOS 
STDIN 
STRENGTHEN 
TIGHTENFACTOR 
TWOMIRCUTS 
UNITTEST 
USERCBC 
USESOLUTION 
VERBOSE 
SHOWUNIMP 
CBCGEN_LASTPARAM 

Definition at line 48 of file CbcGenParam.hpp.

Constructor & Destructor Documentation

◆ CbcGenParam() [1/7]

CbcGenParam::CbcGenParam ( )

Default constructor.

◆ CbcGenParam() [2/7]

CbcGenParam::CbcGenParam ( CbcGenParamCode  code,
std::string  name,
std::string  help,
double  lower,
double  upper,
double  dflt = 0.0,
bool  display = true 
)

Constructor for a parameter with a double value.

The default value is 0.0. Be careful to clearly indicate that lower and upper are real (double) values to distinguish this constructor from the constructor for an integer parameter.

◆ CbcGenParam() [3/7]

CbcGenParam::CbcGenParam ( CbcGenParamCode  code,
std::string  name,
std::string  help,
int  lower,
int  upper,
int  dflt = 0,
bool  display = true 
)

Constructor for a parameter with an integer value.

The default value is 0.

◆ CbcGenParam() [4/7]

CbcGenParam::CbcGenParam ( CbcGenParamCode  code,
std::string  name,
std::string  help,
std::string  firstValue,
int  dflt,
bool  display = true 
)

Constructor for a parameter with keyword values.

The string supplied as firstValue becomes the first keyword. Additional keywords can be added using appendKwd(). Keywords are numbered from zero. It's necessary to specify both the first keyword (firstValue) and the default keyword index (dflt) in order to distinguish this constructor from the string and action parameter constructors.

◆ CbcGenParam() [5/7]

CbcGenParam::CbcGenParam ( CbcGenParamCode  code,
std::string  name,
std::string  help,
std::string  dflt,
bool  display = true 
)

Constructor for a string parameter.

The default string value must be specified explicitly to distinguish a string constructor from an action parameter constructor.

◆ CbcGenParam() [6/7]

CbcGenParam::CbcGenParam ( CbcGenParamCode  code,
std::string  name,
std::string  help,
bool  display = true 
)

Constructor for an action parameter.

◆ CbcGenParam() [7/7]

CbcGenParam::CbcGenParam ( const CbcGenParam orig)

Copy constructor.

◆ ~CbcGenParam()

CbcGenParam::~CbcGenParam ( )

Destructor.

Member Function Documentation

◆ clone()

CbcGenParam* CbcGenParam::clone ( )
virtual

Clone.

Reimplemented from CoinParam.

◆ operator=()

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

Assignment.

◆ paramCode()

CbcGenParamCode CbcGenParam::paramCode ( ) const
inline

Get the parameter code.

Definition at line 190 of file CbcGenParam.hpp.

◆ setParamCode()

void CbcGenParam::setParamCode ( CbcGenParamCode  code)
inline

Set the parameter code.

Definition at line 197 of file CbcGenParam.hpp.

◆ obj()

CbcGenCtlBlk* CbcGenParam::obj ( ) const
inline

Get the underlying cbc-generic control object.

Definition at line 204 of file CbcGenParam.hpp.

◆ setObj()

void CbcGenParam::setObj ( CbcGenCtlBlk obj)
inline

Set the underlying cbc-generic control object.

Definition at line 211 of file CbcGenParam.hpp.


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