Cbc  2.10.5
 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 2465 2019-01-03 19:26:52Z unxusr $
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 2465 2019-01-03 19:26:52Z unxusr $
22 */
23 
31 class CbcOsiParam : public CoinParam {
32 
33 public:
36 
46 
66  KKT,
76  PFI,
96 
98 
100 
102 
111  CbcOsiParam();
112 
119  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
120  double lower, double upper, double dflt = 0.0,
121  bool display = true);
122 
127  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
128  int lower, int upper, int dflt = 0,
129  bool display = true);
130 
140  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
141  std::string firstValue, int dflt, bool display = true);
142 
149  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
150  std::string dflt, bool display = true);
151 
154  CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help,
155  bool display = true);
156 
159  CbcOsiParam(const CbcOsiParam &orig);
160 
163  CbcOsiParam *clone();
164 
167  CbcOsiParam &operator=(const CbcOsiParam &rhs);
168 
171  ~CbcOsiParam();
172 
174 
177 
180  inline CbcOsiParamCode paramCode() const
181  {
182  return (paramCode_);
183  }
184 
187  inline void setParamCode(CbcOsiParamCode code)
188  {
189  paramCode_ = code;
190  }
191 
194  inline OsiSolverInterface *obj() const
195  {
196  return (obj_);
197  }
198 
202  {
203  obj_ = obj;
204  }
205 
207 
208 private:
211 
214 
217 
219 };
220 
221 /*
222  Declare the utility functions.
223 */
224 
225 namespace CbcOsiParamUtils {
226 void addCbcOsiParams(int &numParams, CoinParamVec &paramVec,
227  OsiSolverInterface *osi);
228 void loadOsiParamObj(const CoinParamVec paramVec,
229  CbcGenCtlBlk *ctlBlk);
231 
232 int pushCbcOsiLogLevel(CoinParam *param);
233 int pushCbcOsiInt(CoinParam *param);
234 int pushCbcOsiDbl(CoinParam *param);
235 int pushCbcOsiKwd(CoinParam *param);
236 int pushCbcOsiHint(CoinParam *param);
237 }
238 
239 #endif
240 
241 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
242 */
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:298
~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:335
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.