source: branches/devel/Cbc/src/CbcGenOsiParam.cpp @ 591

Last change on this file since 591 was 591, checked in by lou, 13 years ago

Initial commit of cbc-generic source.

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1/*
2  Copyright (C) 2007, Lou Hafer, International Business Machines Corporation
3  and others.  All Rights Reserved.
4
5  This file is part of cbc-generic.
6*/
7
8#if defined(_MSC_VER)
9// Turn off compiler warning about long names
10#  pragma warning(disable:4786)
11#endif
12
13#include <string>
14#include <cassert>
15
16#include "CoinParam.hpp"
17
18#include "CbcModel.hpp"
19#include "CbcGenCtlBlk.hpp"
20
21#include "CbcGenParam.hpp"
22#include "CbcGenCbcParam.hpp"
23#include "CbcGenOsiParam.hpp"
24
25/*
26  Constructors and destructors
27
28  There's a generic constructor and one for integer, double, keyword, string,
29  and action parameters.
30*/
31
32/*
33  Default constructor.
34*/
35CbcOsiParam::CbcOsiParam () 
36  : CoinParam(),
37    paramCode_(CbcOsiParamCode(0)),
38    obj_(0)
39{
40  /* Nothing to be done here */
41}
42
43
44/*
45  Constructor for double parameter
46*/
47CbcOsiParam::CbcOsiParam (CbcOsiParamCode code,
48                          std::string name, std::string help,
49                          double lower, double upper, double dflt,
50                          bool display)
51  : CoinParam(name,help,lower,upper,dflt,display),
52    paramCode_(code),
53    obj_(0)
54{
55  /* Nothing to be done here */
56}
57
58/*
59  Constructor for integer parameter
60*/
61CbcOsiParam::CbcOsiParam (CbcOsiParamCode code,
62                          std::string name, std::string help,
63                          int lower, int upper, int dflt,
64                          bool display)
65  : CoinParam(name,help,lower,upper,dflt,display),
66    paramCode_(code),
67    obj_(0)
68{
69  /* Nothing to be done here */
70}
71
72/*
73  Constructor for keyword parameter.
74*/
75CbcOsiParam::CbcOsiParam (CbcOsiParamCode code,
76                          std::string name, std::string help,
77                          std::string firstValue, int dflt,
78                          bool display)
79  : CoinParam(name,help,firstValue,dflt,display),
80    paramCode_(code),
81    obj_(0)
82{
83  /* Nothing to be done here */
84}
85
86/*
87  Constructor for string parameter.
88*/
89CbcOsiParam::CbcOsiParam (CbcOsiParamCode code,
90                          std::string name, std::string help,
91                          std::string dflt,
92                          bool display)
93  : CoinParam(name,help,dflt,display),
94    paramCode_(code),
95    obj_(0)
96{
97  /* Nothing to be done here */
98}
99
100/*
101  Constructor for action parameter.
102*/
103CbcOsiParam::CbcOsiParam (CbcOsiParamCode code,
104                          std::string name, std::string help,
105                          bool display)
106  : CoinParam(name,help,display),
107    paramCode_(code),
108    obj_(0)
109{
110  /* Nothing to be done here */
111}
112
113
114/*
115  Copy constructor.
116*/
117CbcOsiParam::CbcOsiParam (const CbcOsiParam &orig)
118  : CoinParam(orig),
119    paramCode_(orig.paramCode_),
120    obj_(orig.obj_)
121{
122  /* Nothing to be done here */
123}
124
125/*
126  Clone
127*/
128
129CbcOsiParam *CbcOsiParam::clone ()
130{
131  return (new CbcOsiParam(*this)) ;
132}
133
134CbcOsiParam &CbcOsiParam::operator= (const CbcOsiParam &rhs)
135{
136  if (this != &rhs)
137  { CoinParam::operator=(rhs) ;
138 
139    paramCode_ = rhs.paramCode_ ;
140    obj_ = rhs.obj_ ; }
141
142  return *this ; }
143
144/*
145  Destructor
146*/
147CbcOsiParam::~CbcOsiParam ()
148{ /* Nothing more to do */ }
149
150
Note: See TracBrowser for help on using the repository browser.