Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcGenCbcParam.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: CbcGenCbcParam.hpp 2465 2019-01-03 19:26:52Z unxusr $
8 */
9 /*
10  This file is part of cbc-generic.
11 */
12 
13 #ifndef CbcCbcParam_H
14 #define CbcCbcParam_H
15 
16 /* \file CbcGenCbcParam.hpp
17  \brief Declarations for parameters that act on a CbcModel object.
18 */
19 
20 /*
21  $Id: CbcGenCbcParam.hpp 2465 2019-01-03 19:26:52Z unxusr $
22 */
23 
31 class CbcCbcParam : public CoinParam {
32 
33 public:
36 
45 
67 
69 
71 
73 
82  CbcCbcParam();
83 
90  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
91  double lower, double upper, double dflt = 0.0,
92  bool display = true);
93 
98  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
99  int lower, int upper, int dflt = 0,
100  bool display = true);
101 
111  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
112  std::string firstValue, int dflt, bool display = true);
113 
120  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
121  std::string dflt, bool display = true);
122 
125  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
126  bool display = true);
127 
130  CbcCbcParam(const CbcCbcParam &orig);
131 
134  CbcCbcParam *clone();
135 
138  CbcCbcParam &operator=(const CbcCbcParam &rhs);
139 
142  ~CbcCbcParam();
143 
145 
148 
151  inline CbcCbcParamCode paramCode() const
152  {
153  return (paramCode_);
154  }
155 
158  inline void setParamCode(CbcCbcParamCode code)
159  {
160  paramCode_ = code;
161  }
162 
165  inline CbcModel *obj() const
166  {
167  return (obj_);
168  }
169 
172  inline void setObj(CbcModel *obj)
173  {
174  obj_ = obj;
175  }
176 
178 
179 private:
182 
185 
188 
190 };
191 
192 /*
193  Declare the utility functions.
194 */
195 
196 namespace CbcCbcParamUtils {
197 void addCbcCbcParams(int &numParams, CoinParamVec &paramVec,
198  CbcModel *model);
199 void loadCbcParamObj(const CoinParamVec paramVec, int first, int last,
200  CbcModel *model);
201 void setCbcModelDefaults(CbcModel *model);
202 
203 int pushCbcCbcDbl(CoinParam *param);
204 int pushCbcCbcInt(CoinParam *param);
205 }
206 
207 #endif
208 
209 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
210 */
CbcCbcParam & operator=(const CbcCbcParam &rhs)
Assignment.
CbcModel * obj() const
Get the underlying CbcModel object.
CbcCbcParamCode paramCode() const
Get the parameter code.
void loadCbcParamObj(const CoinParamVec paramVec, int first, int last, CbcModel *model)
void setCbcModelDefaults(CbcModel *model)
CbcCbcParam()
Default constructor.
void addCbcCbcParams(int &numParams, CoinParamVec &paramVec, CbcModel *model)
CbcModel * obj_
CbcModel object.
A base class for `keyword value' command line parameters.
Definition: CoinParam.hpp:75
std::string name() const
Return the parameter keyword (name) string.
Definition: CoinParam.hpp:298
CbcCbcParamCode paramCode_
Parameter code.
void setObj(CbcModel *obj)
Set the underlying CbcModel object.
int pushCbcCbcInt(CoinParam *param)
~CbcCbcParam()
Destructor.
CbcCbcParamCode
Enumeration for parameters that control a CbcModel object.
void setParamCode(CbcCbcParamCode code)
Set the parameter code.
Class for control parameters that act on a CbcModel object.
int pushCbcCbcDbl(CoinParam *param)
CbcCbcParam * clone()
Clone.
bool display() const
Get visibility of parameter.
Definition: CoinParam.hpp:335
Simple Branch and bound class.
Definition: CbcModel.hpp:100