Cbc  2.9.9
 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 1899 2013-04-09 18:12:08Z stefan $
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 1899 2013-04-09 18:12:08Z stefan $
22 */
23 
31 class CbcCbcParam : public CoinParam {
32 
33 public:
34 
37 
46 
55 
57 
58  } CbcCbcParamCode ;
59 
61 
70  CbcCbcParam() ;
71 
78  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
79  double lower, double upper, double dflt = 0.0,
80  bool display = true) ;
81 
86  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
87  int lower, int upper, int dflt = 0,
88  bool display = true) ;
89 
99  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
100  std::string firstValue, int dflt, bool display = true) ;
101 
108  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
109  std::string dflt, bool display = true) ;
110 
113  CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
114  bool display = true) ;
115 
118  CbcCbcParam(const CbcCbcParam &orig) ;
119 
122  CbcCbcParam *clone() ;
123 
126  CbcCbcParam &operator=(const CbcCbcParam &rhs) ;
127 
130  ~CbcCbcParam() ;
131 
133 
136 
139  inline CbcCbcParamCode paramCode() const {
140  return (paramCode_) ;
141  }
142 
145  inline void setParamCode(CbcCbcParamCode code) {
146  paramCode_ = code ;
147  }
148 
151  inline CbcModel *obj() const {
152  return (obj_) ;
153  }
154 
157  inline void setObj(CbcModel *obj) {
158  obj_ = obj ;
159  }
160 
162 
163 private:
164 
167 
170 
173 
175 
176 } ;
177 
178 
179 /*
180  Declare the utility functions.
181 */
182 
183 namespace CbcCbcParamUtils {
184 void addCbcCbcParams(int &numParams, CoinParamVec &paramVec,
185  CbcModel *model) ;
186 void loadCbcParamObj(const CoinParamVec paramVec, int first, int last,
187  CbcModel *model) ;
188 void setCbcModelDefaults (CbcModel *model) ;
189 
190 int pushCbcCbcDbl(CoinParam *param) ;
191 int pushCbcCbcInt(CoinParam *param) ;
192 }
193 
194 #endif
195 
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:301
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:334
Simple Branch and bound class.
Definition: CbcModel.hpp:101