This class reads a file with a starting point for Ipopt initalization. More...
#include <BonStartPointReader.hpp>
Public Member Functions | |
StartPointReader (std::string fileName="") | |
Constructor with fileName_ given by a string (and default) More... | |
StartPointReader (const char *fileName) | |
Constructor with fileName_ given by a const char *. More... | |
bool | readFile () |
Reads the .initP file. More... | |
bool | readFile (const std::string &fileName) |
Reads the .initP file fileName. More... | |
bool | readAndApply (OsiTMINLPInterface *solver) |
Read warmstart info and apply to an IpoptInterface. More... | |
~StartPointReader () | |
void | gutsOfDestructor () |
Dealocate arrays. More... | |
const double * | getPrimals () |
Access primal variables values. More... | |
const double * | getDuals () |
Access dual variables values. More... | |
Private Attributes | |
std::string | fileName_ |
Name of the file with initial point. More... | |
double * | primals_ |
Primal variables values. More... | |
double * | duals_ |
Dual variables values. More... | |
This class reads a file with a starting point for Ipopt initalization.
File format is number of primals number of duals then values one after another Numbering of variables is first variables, then duals on lower bounds duals on upper bounds and to finish duals on constraints
Definition at line 23 of file BonStartPointReader.hpp.
|
inline |
Constructor with fileName_ given by a string (and default)
Definition at line 27 of file BonStartPointReader.hpp.
|
inline |
Constructor with fileName_ given by a const char *.
Definition at line 33 of file BonStartPointReader.hpp.
|
inline |
Definition at line 49 of file BonStartPointReader.hpp.
bool Bonmin::StartPointReader::readFile | ( | ) |
Reads the .initP file.
Definition at line 14 of file BonStartPointReader.cpp.
|
inline |
Reads the .initP file fileName.
Definition at line 42 of file BonStartPointReader.hpp.
bool Bonmin::StartPointReader::readAndApply | ( | OsiTMINLPInterface * | solver | ) |
Read warmstart info and apply to an IpoptInterface.
Definition at line 36 of file BonStartPointReader.cpp.
|
inline |
Dealocate arrays.
Definition at line 56 of file BonStartPointReader.hpp.
|
inline |
Access primal variables values.
Definition at line 65 of file BonStartPointReader.hpp.
|
inline |
Access dual variables values.
Definition at line 70 of file BonStartPointReader.hpp.
|
private |
Name of the file with initial point.
Definition at line 76 of file BonStartPointReader.hpp.
|
private |
Primal variables values.
Definition at line 79 of file BonStartPointReader.hpp.
|
private |
Dual variables values.
Definition at line 81 of file BonStartPointReader.hpp.