Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 code is licensed under the terms of the Eclipse Public License (EPL).
6 
7  $Id: CbcGenOsiParam.hpp 1899 2013-04-09 18:12:08Z stefan $
8 */
9 /*
10  This file is part of cbc-generic.
11 */
12 
13 #ifndef CbcOsiParam_H
14 #define CbcOsiParam_H
15 
16 /* \file CbcGenOsiParam.hpp
17  \brief Declarations for parameters that act on a OsiSolverInterface object.
18 */
19 
20 /*
21  $Id: CbcGenOsiParam.hpp 1899 2013-04-09 18:12:08Z stefan $
22 */
23 
31 class CbcOsiParam : public CoinParam {
32 
33 public:
34 
37 
47 
57 
59 
60  } CbcOsiParamCode ;
61 
63 
72  CbcOsiParam() ;
73 
80  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
81  double lower, double upper, double dflt = 0.0,
82  bool display = true) ;
83 
88  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
89  int lower, int upper, int dflt = 0,
90  bool display = true) ;
91 
101  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
102  std::string firstValue, int dflt, bool display = true) ;
103 
110  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
111  std::string dflt, bool display = true) ;
112 
115  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
116  bool display = true) ;
117 
120  CbcOsiParam(const CbcOsiParam &orig) ;
121 
124  CbcOsiParam *clone() ;
125 
128  CbcOsiParam &operator=(const CbcOsiParam &rhs) ;
129 
132  ~CbcOsiParam() ;
133 
135 
138 
141  inline CbcOsiParamCode paramCode() const {
142  return (paramCode_) ;
143  }
144 
147  inline void setParamCode(CbcOsiParamCode code) {
148  paramCode_ = code ;
149  }
150 
153  inline OsiSolverInterface *obj() const {
154  return (obj_) ;
155  }
156 
159  inline void setObj(OsiSolverInterface *obj) {
160  obj_ = obj ;
161  }
162 
164 
165 
166 private:
167 
170 
173 
176 
178 
179 } ;
180 
181 
182 
183 /*
184  Declare the utility functions.
185 */
186 
187 namespace CbcOsiParamUtils {
188 void addCbcOsiParams(int &numParams, CoinParamVec &paramVec,
189  OsiSolverInterface *osi) ;
190 void loadOsiParamObj(const CoinParamVec paramVec,
191  CbcGenCtlBlk *ctlBlk) ;
193 
194 int pushCbcOsiLogLevel(CoinParam *param) ;
195 int pushCbcOsiInt(CoinParam *param) ;
196 int pushCbcOsiDbl(CoinParam *param) ;
197 int pushCbcOsiKwd(CoinParam *param) ;
198 int pushCbcOsiHint(CoinParam *param) ;
199 }
200 
201 
202 #endif
203 
CbcOsiParamCode
Enumeration for parameters that control an OsiSolverInterface object.
OsiSolverInterface * obj_
OsiSolverInterface object.
CbcOsiParam & operator=(const CbcOsiParam &rhs)
Assignment.
Class for control parameters that act on a OsiSolverInterface object.
void addCbcOsiParams(int &numParams, CoinParamVec &paramVec, OsiSolverInterface *osi)
int pushCbcOsiDbl(CoinParam *param)
A base class for `keyword value' command line parameters.
Definition: CoinParam.hpp:75
CbcOsiParam * clone()
Clone.
Abstract Base Class for describing an interface to a solver.
std::string name() const
Return the parameter keyword (name) string.
Definition: CoinParam.hpp:301
~CbcOsiParam()
Destructor.
int pushCbcOsiHint(CoinParam *param)
OsiSolverInterface * obj() const
Get the underlying OsiSolverInterface object.
void setObj(OsiSolverInterface *obj)
Set the underlying OsiSolverInterace object.
CbcOsiParamCode paramCode_
Parameter code.
CbcOsiParam()
Default constructor.
bool display() const
Get visibility of parameter.
Definition: CoinParam.hpp:334
void setOsiSolverInterfaceDefaults(OsiSolverInterface *osi)
void loadOsiParamObj(const CoinParamVec paramVec, CbcGenCtlBlk *ctlBlk)
void setParamCode(CbcOsiParamCode code)
Set the parameter code.
int pushCbcOsiLogLevel(CoinParam *param)
int pushCbcOsiKwd(CoinParam *param)
int pushCbcOsiInt(CoinParam *param)
CbcOsiParamCode paramCode() const
Get the parameter code.