Cbc 2.10.12
Loading...
Searching...
No Matches
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
30
31class CbcCbcParam : public CoinParam {
32
33public:
36
45
67
69
71
73
80
81
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
119
120 CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
121 std::string dflt, bool display = true);
122
124
125 CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help,
126 bool display = true);
127
129
131
133
135
137
139
141
143
145
148
150
152 {
153 return (paramCode_);
154 }
155
157
159 {
160 paramCode_ = code;
161 }
162
164
165 inline CbcModel *obj() const
166 {
167 return (obj_);
168 }
169
171
172 inline void setObj(CbcModel *obj)
173 {
174 obj_ = obj;
175 }
176
178
179private:
182
185
188
190};
191
192/*
193 Declare the utility functions.
194*/
195
197void addCbcCbcParams(int &numParams, CoinParamVec &paramVec,
198 CbcModel *model);
199void loadCbcParamObj(const CoinParamVec paramVec, int first, int last,
200 CbcModel *model);
202
203int pushCbcCbcDbl(CoinParam *param);
204int pushCbcCbcInt(CoinParam *param);
205}
206
207#endif
208
209/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
210*/
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.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, std::string dflt, bool display=true)
Constructor for a string parameter.
~CbcCbcParam()
Destructor.
CbcCbcParam(CbcCbcParamCode code, std::string name, std::string help, bool display=true)
Constructor for an action parameter.
CbcCbcParam & operator=(const CbcCbcParam &rhs)
Assignment.
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 * clone()
Clone.
CbcModel * obj() const
Get the underlying CbcModel object.
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)