Cbc
2.10.3
|
Class for control parameters that act on a OsiSolverInterface object. More...
#include <CbcGenOsiParam.hpp>
Public Types | |
Subtypes | |
enum | CbcOsiParamCode { CBCOSI_FIRSTPARAM = CbcCbcParam::CBCCBC_LASTPARAM + 1, ALGORITHM, ALLSLACK, AUTOSCALE, BARRIER, BARRIERSCALE, BASISIN, BASISOUT, BIASLU, CHOLESKY, CRASH, CROSSOVER, DUALBOUND, DUALPIVOT, DUALSIMPLEX, DUALTOLERANCE, FAKEBOUND, GAMMA, IDIOT, KEEPNAMES, KKT, MAXITERATION, MAXHOTITS, NETLIB_BARRIER, NETLIB_DUAL, NETLIB_PRIMAL, NETWORK, OBJSCALE, PERTURBATION, PERTVALUE, PFI, PLUSMINUS, PRESOLVE, PRESOLVEOPTIONS, PRESOLVEPASS, PRIMALPIVOT, PRIMALSIMPLEX, PRIMALTOLERANCE, REALLY_SCALE, RESTORE, REVERSE, RHSSCALE, SAVE, SCALING, SLPVALUE, SOLVERLOGLEVEL, SPARSEFACTOR, SPECIALOPTIONS, SPRINT, TIGHTEN, CBCOSI_LASTPARAM } |
Enumeration for parameters that control an OsiSolverInterface object. More... | |
![]() | |
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. | |
CbcOsiParam () | |
Default constructor. More... | |
CbcOsiParam (CbcOsiParamCode 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... | |
CbcOsiParam (CbcOsiParamCode 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... | |
CbcOsiParam (CbcOsiParamCode code, std::string name, std::string help, std::string firstValue, int dflt, bool display=true) | |
Constructor for a parameter with keyword values. More... | |
CbcOsiParam (CbcOsiParamCode code, std::string name, std::string help, std::string dflt, bool display=true) | |
Constructor for a string parameter. More... | |
CbcOsiParam (CbcOsiParamCode code, std::string name, std::string help, bool display=true) | |
Constructor for an action parameter. More... | |
CbcOsiParam (const CbcOsiParam &orig) | |
Copy constructor. More... | |
CbcOsiParam * | clone () |
Clone. More... | |
CbcOsiParam & | operator= (const CbcOsiParam &rhs) |
Assignment. More... | |
~CbcOsiParam () | |
Destructor. More... | |
Methods to query and manipulate a parameter object | |
CbcOsiParamCode | paramCode () const |
Get the parameter code. More... | |
void | setParamCode (CbcOsiParamCode code) |
Set the parameter code. More... | |
OsiSolverInterface * | obj () const |
Get the underlying OsiSolverInterface object. More... | |
void | setObj (OsiSolverInterface *obj) |
Set the underlying OsiSolverInterace object. More... | |
![]() | |
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) | |
CoinParam & | operator= (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 ¶m) |
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 ¶mVec, 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 ¶mVec, int *matchCnt=0, int *shortCnt=0, int *queryCnt=0) |
void | printIt (const char *msg) |
void | shortOrHelpOne (CoinParamVec ¶mVec, int matchNdx, std::string name, int numQuery) |
void | shortOrHelpMany (CoinParamVec ¶mVec, std::string name, int numQuery) |
void | printGenericHelp () |
void | printHelp (CoinParamVec ¶mVec, 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) | |
CoinParam & | operator= (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 | |
![]() | |
coinParamInvalid | |
coinParamAct | |
coinParamInt | |
coinParamDbl | |
coinParamStr | |
coinParamKwd | |
Class for control parameters that act on a OsiSolverInterface object.
Adds parameter type codes and push/pull functions to the generic parameter object.
Definition at line 31 of file CbcGenOsiParam.hpp.
Enumeration for parameters that control an OsiSolverInterface object.
These are parameters that control the operation of an OsiSolverInterface object. CBCOSI_FIRSTPARAM and CBCOSI_LASTPARAM are markers to allow convenient separation of parameter groups.
Definition at line 45 of file CbcGenOsiParam.hpp.
CbcOsiParam::CbcOsiParam | ( | ) |
Default constructor.
CbcOsiParam::CbcOsiParam | ( | CbcOsiParamCode | 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.
CbcOsiParam::CbcOsiParam | ( | CbcOsiParamCode | 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.
CbcOsiParam::CbcOsiParam | ( | CbcOsiParamCode | 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.
CbcOsiParam::CbcOsiParam | ( | CbcOsiParamCode | 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.
CbcOsiParam::CbcOsiParam | ( | CbcOsiParamCode | code, |
std::string | name, | ||
std::string | help, | ||
bool | display = true |
||
) |
Constructor for an action parameter.
CbcOsiParam::CbcOsiParam | ( | const CbcOsiParam & | orig | ) |
Copy constructor.
CbcOsiParam::~CbcOsiParam | ( | ) |
Destructor.
|
virtual |
Clone.
Reimplemented from CoinParam.
CbcOsiParam& CbcOsiParam::operator= | ( | const CbcOsiParam & | rhs | ) |
Assignment.
|
inline |
Get the parameter code.
Definition at line 180 of file CbcGenOsiParam.hpp.
|
inline |
Set the parameter code.
Definition at line 187 of file CbcGenOsiParam.hpp.
|
inline |
Get the underlying OsiSolverInterface object.
Definition at line 194 of file CbcGenOsiParam.hpp.
|
inline |
Set the underlying OsiSolverInterace object.
Definition at line 201 of file CbcGenOsiParam.hpp.