CbcGenOsiParam.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007, Lou Hafer, International Business Machines Corporation
3  and others. All Rights Reserved.
4 
5  This file is part of cbc-generic.
6 */
7 
8 #ifndef CbcOsiParam_H
9 #define CbcOsiParam_H
10 
11 /* \file CbcGenOsiParam.hpp
12  \brief Declarations for parameters that act on a OsiSolverInterface object.
13 */
14 
15 /*
16  $Id: CbcGenOsiParam.hpp 1173 2009-06-04 09:44:10Z forrest $
17 */
18 
26 class CbcOsiParam : public CoinParam {
27 
28 public:
29 
32 
42 
52 
54 
55  } CbcOsiParamCode ;
56 
58 
67  CbcOsiParam() ;
68 
75  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
76  double lower, double upper, double dflt = 0.0,
77  bool display = true) ;
78 
83  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
84  int lower, int upper, int dflt = 0,
85  bool display = true) ;
86 
96  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
97  std::string firstValue, int dflt, bool display = true) ;
98 
105  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
106  std::string dflt, bool display = true) ;
107 
110  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
111  bool display = true) ;
112 
115  CbcOsiParam(const CbcOsiParam &orig) ;
116 
119  CbcOsiParam *clone() ;
120 
123  CbcOsiParam &operator=(const CbcOsiParam &rhs) ;
124 
127  ~CbcOsiParam() ;
128 
130 
133 
136  inline CbcOsiParamCode paramCode() const {
137  return (paramCode_) ;
138  }
139 
142  inline void setParamCode(CbcOsiParamCode code) {
143  paramCode_ = code ;
144  }
145 
148  inline OsiSolverInterface *obj() const {
149  return (obj_) ;
150  }
151 
154  inline void setObj(OsiSolverInterface *obj) {
155  obj_ = obj ;
156  }
157 
159 
160 
161 private:
162 
165 
168 
170  OsiSolverInterface *obj_ ;
171 
173 
174 } ;
175 
176 
177 
178 /*
179  Declare the utility functions.
180 */
181 
182 namespace CbcOsiParamUtils {
183 void addCbcOsiParams(int &numParams, CoinParamVec &paramVec,
184  OsiSolverInterface *osi) ;
185 void loadOsiParamObj(const CoinParamVec paramVec,
186  CbcGenCtlBlk *ctlBlk) ;
187 void setOsiSolverInterfaceDefaults(OsiSolverInterface *osi) ;
188 
189 int pushCbcOsiLogLevel(CoinParam *param) ;
190 int pushCbcOsiInt(CoinParam *param) ;
191 int pushCbcOsiDbl(CoinParam *param) ;
192 int pushCbcOsiKwd(CoinParam *param) ;
193 int pushCbcOsiHint(CoinParam *param) ;
194 }
195 
196 
197 #endif
198