Bonmin 1.8.9
Loading...
Searching...
No Matches
BonBoundsReader.hpp
Go to the documentation of this file.
1// (C) Copyright Carnegie Mellon University 2005
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// Pierre Bonami, Carnegie Mellon University,
7//
8// Date : 26/05/2005
9
10#ifndef BoundsReader_HPP
11#define BoundsReader_HPP
12
13#include <string>
15
16
17namespace Bonmin {
21{
22public:
23 //Default constructor
25 fileName_(),
26 lowerBounds_(NULL),
27 upperBounds_(NULL),
28 nLower_(0),
29 nUpper_(0)
30 {}
31
32 // Constructor with name of the file to read passed.
33 BoundsReader(const std::string &fileName):
34 fileName_(fileName),
35 lowerBounds_(NULL),
36 upperBounds_(NULL),
37 indexLowers_(NULL),
38 indexUppers_(NULL),
39 nLower_(0),
40 nUpper_(0)
41 {}
42
43 // Set the name of the file to read.
44 void setFileName(const std::string &fileName)
45 {
46 fileName_ = fileName;
47 }
48
49 // Destructor
51
52 // Cleanup allocated data
54
55
56 // Read the file with given fileName
57 void read(const std::string &);
58
59 //Read the file named fileName_
60 void read();
61
62 //Read fileName_ and apply the bounds read to solver
64private:
65
67 std::string fileName_;
69 double * lowerBounds_;
71 double * upperBounds_;
73 int * indexLowers_;
75 int * indexUppers_;
77 int nLower_;
79 int nUpper_;
80};
81}
82#endif
Reads a file containing change bounds for variables.
BoundsReader(const std::string &fileName)
void readAndApply(OsiTMINLPInterface *solver)
void read(const std::string &)
void setFileName(const std::string &fileName)
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
(C) Copyright International Business Machines Corporation 2007