00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CbcGenParam_H
00009 #define CbcGenParam_H
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 class CbcGenCtlBlk ;
00021
00029 class CbcGenParam : public CoinParam {
00030
00031 public:
00032
00035
00044 typedef enum { CBCGEN_FIRSTPARAM = 0,
00045
00046 GENERALQUERY, FULLGENERALQUERY, HELP,
00047 BAB, CLEARCUTS, CLIQUECUTS, COMBINE, COSTSTRATEGY,
00048 CPP, CUTDEPTH, CUTSTRATEGY,
00049 DEBUG, DIRECTORY, DJFIX, DUMMY,
00050 ERRORSALLOWED, EXIT, EXPORT,
00051 FLOWCUTS, FPUMP, FPUMPITS, GOMORYCUTS, GREEDY, HEURISTICSTRATEGY,
00052 IMPORT, INTPRINT, KNAPSACKCUTS, LOCALTREE, LOGLEVEL,
00053 MESSAGES, MIPLIB, MIXEDCUTS, ODDHOLECUTS, OUTDUPROWS, OUTPUTFORMAT,
00054 PREPROCESS, PRINTMASK, PRINTOPTIONS, PRINTVERSION, PRIORITYIN, PROBINGCUTS,
00055 REDSPLITCUTS, ROUNDING,
00056 SOLUTION, SOLVECONTINUOUS, SOLVER, SOS, STDIN, STRENGTHEN,
00057 TIGHTENFACTOR, TWOMIRCUTS,
00058 UNITTEST, USERCBC, USESOLUTION, VERBOSE, SHOWUNIMP,
00059
00060 CBCGEN_LASTPARAM
00061
00062 } CbcGenParamCode ;
00063
00065
00074 CbcGenParam() ;
00075
00082 CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00083 double lower, double upper, double dflt = 0.0,
00084 bool display = true) ;
00085
00090 CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00091 int lower, int upper, int dflt = 0,
00092 bool display = true) ;
00093
00103 CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00104 std::string firstValue, int dflt, bool display = true) ;
00105
00112 CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00113 std::string dflt, bool display = true) ;
00114
00117 CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00118 bool display = true) ;
00119
00122 CbcGenParam(const CbcGenParam &orig) ;
00123
00126 CbcGenParam *clone() ;
00127
00130 CbcGenParam &operator=(const CbcGenParam &rhs) ;
00131
00134 ~CbcGenParam() ;
00135
00137
00140
00143 inline CbcGenParamCode paramCode() const {
00144 return (paramCode_) ;
00145 }
00146
00149 inline void setParamCode(CbcGenParamCode code) {
00150 paramCode_ = code ;
00151 }
00152
00155 inline CbcGenCtlBlk *obj() const {
00156 return (obj_) ;
00157 }
00158
00161 inline void setObj(CbcGenCtlBlk *obj) {
00162 obj_ = obj ;
00163 }
00164
00166
00167
00168 private:
00169
00172
00174 CbcGenParamCode paramCode_ ;
00175
00177 CbcGenCtlBlk *obj_ ;
00178
00180
00181 } ;
00182
00183
00184
00185
00186
00187 namespace CbcGenParamUtils {
00188 void addCbcGenParams(int &numParams, CoinParamVec ¶mVec,
00189 CbcGenCtlBlk *ctlBlk) ;
00190 void loadGenParamObj(const CoinParamVec paramVec, int first, int last,
00191 CbcGenCtlBlk *ctlBlk) ;
00192
00193 void saveSolution(const OsiSolverInterface *osi, std::string fileName) ;
00194 bool readSolution(std::string fileName,
00195 int &numRows, int &numCols, double &objVal,
00196 double **rowActivity, double **dualVars,
00197 double **primalVars, double **reducedCosts) ;
00198
00199 int doBaCParam(CoinParam *param) ;
00200 int doDebugParam(CoinParam *param) ;
00201 int doExitParam(CoinParam *param) ;
00202 int doHelpParam(CoinParam *param) ;
00203 int doImportParam(CoinParam *param) ;
00204 int doPrintMaskParam(CoinParam *param) ;
00205 int doNothingParam(CoinParam *param) ;
00206 int doSolutionParam(CoinParam *param) ;
00207 int doUnimplementedParam(CoinParam *param) ;
00208 int doVersionParam(CoinParam *param) ;
00209
00210 int pushCbcGenDblParam(CoinParam *param) ;
00211 int pushCbcGenIntParam(CoinParam *param) ;
00212 int pushCbcGenKwdParam(CoinParam *param) ;
00213 int pushCbcGenStrParam(CoinParam *param) ;
00214
00215 int pushCbcGenCutParam(CoinParam *param) ;
00216 }
00217
00218
00219 #endif