Bonmin
1.8.9
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Interfaces
BonStartPointReader.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 _BONSTARTPOINTREADER_H_
11
#define _BONSTARTPOINTREADER_H_
12
#include <string>
13
#include <list>
14
#include <fstream>
15
#include <iostream>
16
#include "
BonOsiTMINLPInterface.hpp
"
17
18
19
20
namespace
Bonmin
{
23
class
StartPointReader
24
{
25
public
:
27
StartPointReader
(std::string fileName =
""
):
28
fileName_(fileName),
29
primals_(NULL),
30
duals_(NULL)
31
{}
32
33
StartPointReader
(
const
char
* fileName):
34
fileName_(fileName),
35
primals_(NULL),
36
duals_(NULL)
37
{}
38
40
bool
readFile
();
42
bool
readFile
(
const
std::string &fileName)
43
{
44
fileName_=fileName;
45
return
readFile
();
46
}
47
48
bool
readAndApply
(
OsiTMINLPInterface
* solver);
49
~StartPointReader
()
50
{
51
gutsOfDestructor
();
52
}
53
54
56
void
gutsOfDestructor
()
57
{
58
if
(primals_!=NULL)
59
delete
[] primals_;
60
if
(duals_!=NULL)
61
delete
[] duals_;
62
}
63
65
const
double
*
getPrimals
()
66
{
67
return
primals_;
68
}
69
70
const
double
*
getDuals
()
71
{
72
return
duals_;
73
}
74
private
:
76
std::string fileName_;
77
79
double
* primals_;
81
double
* duals_;
82
};
83
84
}
85
#endif
/*_IPCBCINITPOINTREADER_H_*/
BonOsiTMINLPInterface.hpp
Bonmin::OsiTMINLPInterface
This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so ...
Definition
BonOsiTMINLPInterface.hpp:49
Bonmin::StartPointReader::StartPointReader
StartPointReader(std::string fileName="")
Constructor with fileName_ given by a string (and default).
Definition
BonStartPointReader.hpp:27
Bonmin::StartPointReader::getDuals
const double * getDuals()
Access dual variables values.
Definition
BonStartPointReader.hpp:70
Bonmin::StartPointReader::readFile
bool readFile()
Reads the .initP file.
Bonmin::StartPointReader::gutsOfDestructor
void gutsOfDestructor()
Dealocate arrays.
Definition
BonStartPointReader.hpp:56
Bonmin::StartPointReader::readFile
bool readFile(const std::string &fileName)
Reads the .initP file fileName.
Definition
BonStartPointReader.hpp:42
Bonmin::StartPointReader::readAndApply
bool readAndApply(OsiTMINLPInterface *solver)
Read warmstart info and apply to an IpoptInterface.
Bonmin::StartPointReader::StartPointReader
StartPointReader(const char *fileName)
Constructor with fileName_ given by a const char *.
Definition
BonStartPointReader.hpp:33
Bonmin::StartPointReader::getPrimals
const double * getPrimals()
Access primal variables values.
Definition
BonStartPointReader.hpp:65
Bonmin::StartPointReader::~StartPointReader
~StartPointReader()
Definition
BonStartPointReader.hpp:49
Bonmin
(C) Copyright International Business Machines Corporation 2007
Definition
BonAmplSetup.hpp:16
Generated by
1.17.0