/home/coin/SVN-release/CoinAll-1.1.0/Cbc/src/CbcGenParam.hpp

Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2007, Lou Hafer, International Business Machines Corporation
00003   and others.  All Rights Reserved.
00004 
00005   This file is part of cbc-generic.
00006 */
00007 
00008 #ifndef CbcGenParam_H
00009 #define CbcGenParam_H
00010 
00011 /* \file CbcGenParam.hpp
00012    \brief Declarations for parameters that control the cbc-generic main
00013           program.
00014 */
00015 
00016 /*
00017   $Id$
00018 */
00019 
00020 class CbcGenCtlBlk ;
00021 
00029 class CbcGenParam : public CoinParam
00030 {
00031 
00032 public:
00033 
00036 
00045   typedef enum
00046   { CBCGEN_FIRSTPARAM = 0,
00047   
00048     GENERALQUERY, FULLGENERALQUERY, HELP,
00049     BAB, CLEARCUTS, CLIQUECUTS, COMBINE, COSTSTRATEGY,
00050     CPP, CUTDEPTH, CUTSTRATEGY,
00051     DEBUG, DIRECTORY, DJFIX, DUMMY,
00052     ERRORSALLOWED, EXIT, EXPORT,
00053     FLOWCUTS, FPUMP, FPUMPITS, GOMORYCUTS, GREEDY, HEURISTICSTRATEGY,
00054     IMPORT, INTPRINT, KNAPSACKCUTS, LOCALTREE, LOGLEVEL,
00055     MESSAGES, MIPLIB, MIXEDCUTS, ODDHOLECUTS, OUTDUPROWS, OUTPUTFORMAT,
00056     PREPROCESS, PRINTMASK, PRINTOPTIONS, PRINTVERSION, PRIORITYIN, PROBINGCUTS,
00057     REDSPLITCUTS, ROUNDING,
00058     SOLUTION, SOLVECONTINUOUS, SOLVER, SOS, STDIN, STRENGTHEN,
00059     TIGHTENFACTOR, TWOMIRCUTS,
00060     UNITTEST, USERCBC, USESOLUTION, VERBOSE, SHOWUNIMP,
00061 
00062     CBCGEN_LASTPARAM
00063 
00064   } CbcGenParamCode ;
00065 
00067 
00076   CbcGenParam() ;
00077 
00084   CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00085                double lower, double upper, double dflt = 0.0,
00086                bool display = true) ;
00087 
00092   CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00093                int lower, int upper, int dflt = 0,
00094                bool display = true) ;
00095 
00105   CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00106                std::string firstValue, int dflt, bool display = true) ;
00107 
00114   CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00115                std::string dflt, bool display = true) ;
00116 
00119   CbcGenParam(CbcGenParamCode code, std::string name, std::string help,
00120                bool display = true) ;
00121 
00124   CbcGenParam(const CbcGenParam &orig) ;
00125 
00128   CbcGenParam *clone() ;
00129 
00132   CbcGenParam &operator=(const CbcGenParam &rhs) ;
00133 
00136   ~CbcGenParam() ;
00137 
00139 
00142 
00145   inline CbcGenParamCode paramCode() const { return (paramCode_) ; } 
00146 
00149   inline void setParamCode(CbcGenParamCode code) { paramCode_ = code ; } 
00150 
00153   inline CbcGenCtlBlk *obj() const { return (obj_) ; } 
00154 
00157   inline void setObj(CbcGenCtlBlk *obj) { obj_ = obj ; } 
00158 
00160 
00161 
00162 private:
00163 
00166 
00168   CbcGenParamCode paramCode_ ;
00169 
00171   CbcGenCtlBlk *obj_ ;
00172 
00174 
00175 } ;
00176 
00177 /*
00178   Declare the utility functions.
00179 */
00180 
00181 namespace CbcGenParamUtils
00182 { void addCbcGenParams(int &numParams, CoinParamVec &paramVec,
00183                        CbcGenCtlBlk *ctlBlk) ;
00184   void loadGenParamObj(const CoinParamVec paramVec, int first, int last,
00185                        CbcGenCtlBlk *ctlBlk) ;
00186  
00187   void saveSolution(const OsiSolverInterface *osi, std::string fileName) ;
00188   bool readSolution(std::string fileName,
00189                     int &numRows, int &numCols, double &objVal,
00190                     double **rowActivity, double **dualVars,
00191                     double **primalVars, double **reducedCosts) ;
00192 
00193   int doBaCParam(CoinParam *param) ;
00194   int doDebugParam(CoinParam *param) ;
00195   int doExitParam(CoinParam *param) ;
00196   int doHelpParam(CoinParam *param) ;
00197   int doImportParam(CoinParam *param) ;
00198   int doPrintMaskParam(CoinParam *param) ;
00199   int doNothingParam(CoinParam *param) ;
00200   int doSolutionParam(CoinParam *param) ;
00201   int doUnimplementedParam(CoinParam *param) ;
00202   int doVersionParam(CoinParam *param) ;
00203 
00204   int pushCbcGenDblParam(CoinParam *param) ;
00205   int pushCbcGenIntParam(CoinParam *param) ;
00206   int pushCbcGenKwdParam(CoinParam *param) ;
00207   int pushCbcGenStrParam(CoinParam *param) ;
00208 
00209   int pushCbcGenCutParam(CoinParam *param) ;
00210 }
00211 
00212 
00213 #endif

Generated on Sun Nov 14 14:06:31 2010 for Coin-All by  doxygen 1.4.7