Bonmin::StartPointReader Class Reference

This class reads a file with a starting point for Ipopt initalization. More...

#include <BonStartPointReader.hpp>

Collaboration diagram for Bonmin::StartPointReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StartPointReader (std::string fileName="")
 Constructor with fileName_ given by a string (and default).
 StartPointReader (const char *fileName)
 Constructor with fileName_ given by a const char *.
bool readFile ()
 Reads the .initP file.
bool readFile (const std::string &fileName)
 Reads the .initP file fileName.
bool readAndApply (OsiTMINLPInterface *solver)
 Read warmstart info and apply to an IpoptInterface.
 ~StartPointReader ()
void gutsOfDestructor ()
 Dealocate arrays.
const double * getPrimals ()
 Access primal variables values.
const double * getDuals ()
 Access dual variables values.

Private Attributes

std::string fileName_
 Name of the file with initial point.
double * primals_
 Primal variables values.
double * duals_
 Dual variables values.

Detailed Description

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.


Constructor & Destructor Documentation

Bonmin::StartPointReader::StartPointReader ( std::string  fileName = ""  )  [inline]

Constructor with fileName_ given by a string (and default).

Definition at line 27 of file BonStartPointReader.hpp.

Bonmin::StartPointReader::StartPointReader ( const char *  fileName  )  [inline]

Constructor with fileName_ given by a const char *.

Definition at line 33 of file BonStartPointReader.hpp.

Bonmin::StartPointReader::~StartPointReader (  )  [inline]

Definition at line 49 of file BonStartPointReader.hpp.

References gutsOfDestructor().


Member Function Documentation

bool Bonmin::StartPointReader::readFile (  ) 

Reads the .initP file.

Definition at line 14 of file BonStartPointReader.cpp.

References duals_, fileName_, gutsOfDestructor(), and primals_.

Referenced by readAndApply(), and readFile().

bool Bonmin::StartPointReader::readFile ( const std::string &  fileName  )  [inline]

Reads the .initP file fileName.

Definition at line 42 of file BonStartPointReader.hpp.

References fileName_, and readFile().

bool Bonmin::StartPointReader::readAndApply ( OsiTMINLPInterface solver  ) 

Read warmstart info and apply to an IpoptInterface.

Definition at line 36 of file BonStartPointReader.cpp.

References duals_, Bonmin::TNLPSolver::enableWarmStart(), primals_, readFile(), Bonmin::OsiTMINLPInterface::setColSolution(), Bonmin::OsiTMINLPInterface::setRowPrice(), and Bonmin::OsiTMINLPInterface::solver().

Referenced by main().

void Bonmin::StartPointReader::gutsOfDestructor (  )  [inline]

Dealocate arrays.

Definition at line 56 of file BonStartPointReader.hpp.

References duals_, and primals_.

Referenced by readFile(), and ~StartPointReader().

const double* Bonmin::StartPointReader::getPrimals (  )  [inline]

Access primal variables values.

Definition at line 65 of file BonStartPointReader.hpp.

References primals_.

const double* Bonmin::StartPointReader::getDuals (  )  [inline]

Access dual variables values.

Definition at line 70 of file BonStartPointReader.hpp.

References duals_.


Member Data Documentation

std::string Bonmin::StartPointReader::fileName_ [private]

Name of the file with initial point.

Definition at line 76 of file BonStartPointReader.hpp.

Referenced by readFile().

double* Bonmin::StartPointReader::primals_ [private]

Primal variables values.

Definition at line 79 of file BonStartPointReader.hpp.

Referenced by getPrimals(), gutsOfDestructor(), readAndApply(), and readFile().

double* Bonmin::StartPointReader::duals_ [private]

Dual variables values.

Definition at line 81 of file BonStartPointReader.hpp.

Referenced by getDuals(), gutsOfDestructor(), readAndApply(), and readFile().


The documentation for this class was generated from the following files:
Generated on Tue Mar 30 03:14:40 2010 by  doxygen 1.4.7