Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
CbcCbcParam Class Reference

Class for control parameters that act on a CbcModel object. More...

#include <CbcGenCbcParam.hpp>

+ Inheritance diagram for CbcCbcParam:
+ Collaboration diagram for CbcCbcParam:

Public Types

Subtypes
enum  CbcCbcParamCode {
  CBCCBC_FIRSTPARAM = CbcGenParam::CBCGEN_LASTPARAM + 1, ALLOWABLEGAP, COSTSTRATEGY, CUTDEPTH,
  CUTOFF, CUTPASS, DIRECTION, GAPRATIO,
  INCREMENT, INFEASIBILITYWEIGHT, INTEGERTOLERANCE, LOGLEVEL,
  MAXIMIZE, MAXNODES, MINIMIZE, MIPOPTIONS,
  MOREMIPOPTIONS, NUMBERANALYZE, NUMBERBEFORE, NUMBERMINI,
  STRONGBRANCHING, TIMELIMIT_BAB, CBCCBC_LASTPARAM
}
 Enumeration for parameters that control a CbcModel object. More...
 
- Public Types inherited from CoinParam
enum  CoinParamType {
  coinParamInvalid = 0, coinParamAct, coinParamInt, coinParamDbl,
  coinParamStr, coinParamKwd
}
 Enumeration for the types of parameters supported by CoinParam. More...
 
typedef int(* CoinParamFunc )(CoinParam *param)
 Type declaration for push and pull functions. More...
 

Public Member Functions

Constructors and Destructors

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

 CbcCbcParam ()
 Default constructor. More...
 
 CbcCbcParam (CbcCbcParamCode 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...
 
 CbcCbcParam (CbcCbcParamCode 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...
 
 CbcCbcParam (CbcCbcParamCode code, std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
 Constructor for a parameter with keyword values. More...
 
 CbcCbcParam (CbcCbcParamCode code, std::string name, std::string help, std::string dflt, bool display=true)
 Constructor for a string parameter. More...
 
 CbcCbcParam (CbcCbcParamCode code, std::string name, std::string help, bool display=true)
 Constructor for an action parameter. More...
 
 CbcCbcParam (const CbcCbcParam &orig)
 Copy constructor. More...
 
CbcCbcParamclone ()
 Clone. More...
 
CbcCbcParamoperator= (const CbcCbcParam &rhs)
 Assignment. More...
 
 ~CbcCbcParam ()
 Destructor. More...
 
Methods to query and manipulate a parameter object
CbcCbcParamCode paramCode () const
 Get the parameter code. More...
 
void setParamCode (CbcCbcParamCode code)
 Set the parameter code. More...
 
CbcModelobj () const
 Get the underlying CbcModel object. More...
 
void setObj (CbcModel *obj)
 Set the underlying CbcModel object. More...
 
- Public Member Functions inherited from CoinParam
 CoinParam ()
 Default constructor. More...
 
 CoinParam (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...
 
 CoinParam (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...
 
 CoinParam (std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
 Constructor for a parameter with keyword values. More...
 
 CoinParam (std::string name, std::string help, std::string dflt, bool display=true)
 Constructor for a string parameter. More...
 
 CoinParam (std::string name, std::string help, bool display=true)
 Constructor for an action parameter. More...
 
 CoinParam (const CoinParam &orig)
 Copy constructor. More...
 
CoinParamoperator= (const CoinParam &rhs)
 Assignment. More...
 
virtual ~CoinParam ()
 Destructor. More...
 
void appendKwd (std::string kwd)
 Add an additional value-keyword to a keyword parameter. More...
 
int kwdIndex (std::string kwd) const
 Return the integer associated with the specified value-keyword. More...
 
std::string kwdVal () const
 Return the value-keyword that is the current value of the keyword parameter. More...
 
void setKwdVal (int value, bool printIt=false)
 Set the value of the keyword parameter using the integer associated with a value-keyword. More...
 
void setKwdVal (const std::string value)
 Set the value of the keyword parameter using a value-keyword string. More...
 
void printKwds () const
 Prints the set of value-keywords defined for this keyword parameter. More...
 
void setStrVal (std::string value)
 Set the value of a string parameter. More...
 
std::string strVal () const
 Get the value of a string parameter. More...
 
void setDblVal (double value)
 Set the value of a double parameter. More...
 
double dblVal () const
 Get the value of a double parameter. More...
 
void setIntVal (int value)
 Set the value of a integer parameter. More...
 
int intVal () const
 Get the value of a integer parameter. More...
 
void setShortHelp (const std::string help)
 Add a short help string to a parameter. More...
 
std::string shortHelp () const
 Retrieve the short help string. More...
 
void setLongHelp (const std::string help)
 Add a long help message to a parameter. More...
 
std::string longHelp () const
 Retrieve the long help message. More...
 
void printLongHelp () const
 Print long help. More...
 
CoinParamType type () const
 Return the type of the parameter. More...
 
void setType (CoinParamType type)
 Set the type of the parameter. More...
 
std::string name () const
 Return the parameter keyword (name) string. More...
 
void setName (std::string name)
 Set the parameter keyword (name) string. More...
 
int matches (std::string input) const
 Check if the specified string matches the parameter keyword (name) string. More...
 
std::string matchName () const
 Return the parameter keyword (name) string formatted to show the minimum match length. More...
 
void setDisplay (bool display)
 Set visibility of parameter. More...
 
bool display () const
 Get visibility of parameter. More...
 
CoinParamFunc pushFunc ()
 Get push function. More...
 
void setPushFunc (CoinParamFunc func)
 Set push function. More...
 
CoinParamFunc pullFunc ()
 Get pull function. More...
 
void setPullFunc (CoinParamFunc func)
 Set pull function. More...
 

Private Attributes

Data
CbcCbcParamCode paramCode_
 Parameter code. More...
 
CbcModelobj_
 CbcModel object. More...
 

Additional Inherited Members

Detailed Description

Class for control parameters that act on a CbcModel object.

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

Definition at line 31 of file CbcGenCbcParam.hpp.

Member Enumeration Documentation

Enumeration for parameters that control a CbcModel object.

These are parameters that control the operation of a CbcModel object. CBCCBC_FIRSTPARAM and CBCCBC_LASTPARAM are markers to allow convenient separation of parameter groups.

Enumerator
CBCCBC_FIRSTPARAM 
ALLOWABLEGAP 
COSTSTRATEGY 
CUTDEPTH 
CUTOFF 
CUTPASS 
DIRECTION 
GAPRATIO 
INCREMENT 
INFEASIBILITYWEIGHT 
INTEGERTOLERANCE 
LOGLEVEL 
MAXIMIZE 
MAXNODES 
MINIMIZE 
MIPOPTIONS 
MOREMIPOPTIONS 
NUMBERANALYZE 
NUMBERBEFORE 
NUMBERMINI 
STRONGBRANCHING 
TIMELIMIT_BAB 
CBCCBC_LASTPARAM 

Definition at line 45 of file CbcGenCbcParam.hpp.

Constructor & Destructor Documentation

CbcCbcParam::CbcCbcParam ( )

Default constructor.

CbcCbcParam::CbcCbcParam ( CbcCbcParamCode  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.

CbcCbcParam::CbcCbcParam ( CbcCbcParamCode  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.

CbcCbcParam::CbcCbcParam ( CbcCbcParamCode  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.

CbcCbcParam::CbcCbcParam ( CbcCbcParamCode  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.

CbcCbcParam::CbcCbcParam ( CbcCbcParamCode  code,
std::string  name,
std::string  help,
bool  display = true 
)

Constructor for an action parameter.

CbcCbcParam::CbcCbcParam ( const CbcCbcParam orig)

Copy constructor.

CbcCbcParam::~CbcCbcParam ( )

Destructor.

Member Function Documentation

CbcCbcParam* CbcCbcParam::clone ( )
virtual

Clone.

Reimplemented from CoinParam.

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

Assignment.

CbcCbcParamCode CbcCbcParam::paramCode ( ) const
inline

Get the parameter code.

Definition at line 139 of file CbcGenCbcParam.hpp.

void CbcCbcParam::setParamCode ( CbcCbcParamCode  code)
inline

Set the parameter code.

Definition at line 145 of file CbcGenCbcParam.hpp.

CbcModel* CbcCbcParam::obj ( ) const
inline

Get the underlying CbcModel object.

Definition at line 151 of file CbcGenCbcParam.hpp.

void CbcCbcParam::setObj ( CbcModel obj)
inline

Set the underlying CbcModel object.

Definition at line 157 of file CbcGenCbcParam.hpp.

Member Data Documentation

CbcCbcParamCode CbcCbcParam::paramCode_
private

Parameter code.

Definition at line 169 of file CbcGenCbcParam.hpp.

CbcModel* CbcCbcParam::obj_
private

CbcModel object.

Definition at line 172 of file CbcGenCbcParam.hpp.


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