Cbc 2.10.8
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$
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$
22*/
23
31class CbcOsiParam : public CoinParam {
32
33public:
36
46
96
98
100
102
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
160
164
168
172
174
177
181 {
182 return (paramCode_);
183 }
184
188 {
189 paramCode_ = code;
190 }
191
194 inline OsiSolverInterface *obj() const
195 {
196 return (obj_);
197 }
198
201 inline void setObj(OsiSolverInterface *obj)
202 {
203 obj_ = obj;
204 }
205
207
208private:
211
214
216 OsiSolverInterface *obj_;
217
219};
220
221/*
222 Declare the utility functions.
223*/
224
226void addCbcOsiParams(int &numParams, CoinParamVec &paramVec,
227 OsiSolverInterface *osi);
228void loadOsiParamObj(const CoinParamVec paramVec,
229 CbcGenCtlBlk *ctlBlk);
230void setOsiSolverInterfaceDefaults(OsiSolverInterface *osi);
231
232int pushCbcOsiLogLevel(CoinParam *param);
233int pushCbcOsiInt(CoinParam *param);
234int pushCbcOsiDbl(CoinParam *param);
235int pushCbcOsiKwd(CoinParam *param);
236int pushCbcOsiHint(CoinParam *param);
237}
238
239#endif
240
241/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
242*/
Class for control parameters that act on a OsiSolverInterface object.
void setParamCode(CbcOsiParamCode code)
Set the parameter code.
OsiSolverInterface * obj() const
Get the underlying OsiSolverInterface object.
OsiSolverInterface * obj_
OsiSolverInterface object.
CbcOsiParam()
Default constructor.
CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help, std::string dflt, bool display=true)
Constructor for a string parameter.
CbcOsiParam & operator=(const CbcOsiParam &rhs)
Assignment.
CbcOsiParamCode paramCode_
Parameter code.
void setObj(OsiSolverInterface *obj)
Set the underlying OsiSolverInterace object.
CbcOsiParam(CbcOsiParamCode 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.
~CbcOsiParam()
Destructor.
CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help, bool display=true)
Constructor for an action parameter.
CbcOsiParam(CbcOsiParamCode 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.
CbcOsiParam(const CbcOsiParam &orig)
Copy constructor.
CbcOsiParam(CbcOsiParamCode code, std::string name, std::string help, std::string firstValue, int dflt, bool display=true)
Constructor for a parameter with keyword values.
CbcOsiParamCode
Enumeration for parameters that control an OsiSolverInterface object.
CbcOsiParam * clone()
Clone.
CbcOsiParamCode paramCode() const
Get the parameter code
int pushCbcOsiKwd(CoinParam *param)
void addCbcOsiParams(int &numParams, CoinParamVec &paramVec, OsiSolverInterface *osi)
int pushCbcOsiLogLevel(CoinParam *param)
int pushCbcOsiHint(CoinParam *param)
int pushCbcOsiInt(CoinParam *param)
int pushCbcOsiDbl(CoinParam *param)
void setOsiSolverInterfaceDefaults(OsiSolverInterface *osi)
void loadOsiParamObj(const CoinParamVec paramVec, CbcGenCtlBlk *ctlBlk)