Cbc  2.10.8
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$
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$
22 */
23 
31 class CbcCbcParam : public CoinParam {
32 
33 public:
36 
45 
67 
69 
71 
73 
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 
135 
139 
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);
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 */
Class for control parameters that act on a CbcModel object.
CbcCbcParamCode paramCode() const
Get the parameter code
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, double lower, double upper, double dflt=0.0, bool display=true)
Constructor for a parameter with a double value.
void setParamCode(CbcCbcParamCode code)
Set the parameter code.
CbcModel * obj_
CbcModel object.
CbcCbcParam()
Default constructor.
CbcCbcParamCode paramCode_
Parameter code.
CbcCbcParamCode
Enumeration for parameters that control a CbcModel object.
CbcModel * obj() const
Get the underlying CbcModel object.
CbcCbcParam & operator=(const CbcCbcParam &rhs)
Assignment.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, std::string dflt, bool display=true)
Constructor for a string parameter.
~CbcCbcParam()
Destructor.
CbcCbcParam * clone()
Clone.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, bool display=true)
Constructor for an action parameter.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, int lower, int upper, int dflt=0, bool display=true)
Constructor for a parameter with an integer value.
CbcCbcParam(const CbcCbcParam &orig)
Copy constructor.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
Constructor for a parameter with keyword values.
void setObj(CbcModel *obj)
Set the underlying CbcModel object.
Simple Branch and bound class.
Definition: CbcModel.hpp:100
void setCbcModelDefaults(CbcModel *model)
void loadCbcParamObj(const CoinParamVec paramVec, int first, int last, CbcModel *model)
void addCbcCbcParams(int &numParams, CoinParamVec &paramVec, CbcModel *model)
int pushCbcCbcDbl(CoinParam *param)
int pushCbcCbcInt(CoinParam *param)