Cbc trunk
CbcGenCbcParam.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 code is licensed under the terms of the Eclipse Public License (EPL).
00006 
00007   $Id$
00008 */
00009 /*
00010   This file is part of cbc-generic.
00011 */
00012 
00013 #ifndef CbcCbcParam_H
00014 #define CbcCbcParam_H
00015 
00016 /* \file CbcGenCbcParam.hpp
00017    \brief Declarations for parameters that act on a CbcModel object.
00018 */
00019 
00020 /*
00021   $Id: CbcGenCbcParam.hpp 1173 2009-06-04 09:44:10Z forrest $
00022 */
00023 
00031 class CbcCbcParam : public CoinParam {
00032 
00033 public:
00034 
00037 
00045     typedef enum { CBCCBC_FIRSTPARAM = CbcGenParam::CBCGEN_LASTPARAM + 1,
00046 
00047                    ALLOWABLEGAP, COSTSTRATEGY,
00048                    CUTDEPTH, CUTOFF, CUTPASS, DIRECTION,
00049                    GAPRATIO,
00050                    INCREMENT, INFEASIBILITYWEIGHT, INTEGERTOLERANCE,
00051                    LOGLEVEL, MAXIMIZE, MAXNODES, MINIMIZE,
00052                    MIPOPTIONS, MOREMIPOPTIONS, NUMBERANALYZE,
00053                    NUMBERBEFORE, NUMBERMINI,
00054                    STRONGBRANCHING, TIMELIMIT_BAB,
00055 
00056                    CBCCBC_LASTPARAM
00057 
00058                  } CbcCbcParamCode ;
00059 
00061 
00070     CbcCbcParam() ;
00071 
00078     CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
00079                 double lower, double upper, double dflt = 0.0,
00080                 bool display = true) ;
00081 
00086     CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
00087                 int lower, int upper, int dflt = 0,
00088                 bool display = true) ;
00089 
00099     CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
00100                 std::string firstValue, int dflt, bool display = true) ;
00101 
00108     CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
00109                 std::string dflt, bool display = true) ;
00110 
00113     CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
00114                 bool display = true) ;
00115 
00118     CbcCbcParam(const CbcCbcParam &orig) ;
00119 
00122     CbcCbcParam *clone() ;
00123 
00126     CbcCbcParam &operator=(const CbcCbcParam &rhs) ;
00127 
00130     ~CbcCbcParam() ;
00131 
00133 
00136 
00139     inline CbcCbcParamCode paramCode() const {
00140         return (paramCode_) ;
00141     }
00142 
00145     inline void setParamCode(CbcCbcParamCode code) {
00146         paramCode_ = code ;
00147     }
00148 
00151     inline CbcModel *obj() const {
00152         return (obj_) ;
00153     }
00154 
00157     inline void setObj(CbcModel *obj) {
00158         obj_ = obj ;
00159     }
00160 
00162 
00163 private:
00164 
00167 
00169     CbcCbcParamCode paramCode_ ;
00170 
00172     CbcModel *obj_ ;
00173 
00175 
00176 } ;
00177 
00178 
00179 /*
00180   Declare the utility functions.
00181 */
00182 
00183 namespace CbcCbcParamUtils {
00184 void addCbcCbcParams(int &numParams, CoinParamVec &paramVec,
00185                      CbcModel *model) ;
00186 void loadCbcParamObj(const CoinParamVec paramVec, int first, int last,
00187                      CbcModel *model) ;
00188 void setCbcModelDefaults (CbcModel *model) ;
00189 
00190 int pushCbcCbcDbl(CoinParam *param) ;
00191 int pushCbcCbcInt(CoinParam *param) ;
00192 }
00193 
00194 #endif
00195 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines