OBOE 0.1
Accpm::Parameters Class Reference

#include <Parameters.h>

List of all members.

Public Member Functions

 Parameters ()
 Parameters (const char *fileName)
virtual ~Parameters ()
bool setIntParameter (const char *name, int value)
int getIntParameter (const char *name) const
bool setRealParameter (const char *name, Real value)
Real getRealParameter (const char *name) const
bool setStringParameter (const char *name, const string &value)
const string getStringParameter (const char *name) const
bool setOptimizationType (const string &value)
const string & getOptimizationType (void) const
const OptType getOptType (void) const
bool setStartingPoint (const StdRealVector &v)
bool setVariableLB (const StdRealVector &v)
bool setVariableUB (const StdRealVector &v)
bool setPi (const StdRealVector &pi)
bool setB (const StdRealVector &v)
bool setB (const AccpmVector &v)
bool setCenterBall (const StdRealVector &v)
const AccpmVectorgetStartingPoint () const
const AccpmVectorgetVariableLB () const
const AccpmVectorgetVariableUB () const
const AccpmVectorgetPi () const
const AccpmVectorgetB () const
const AccpmVectorgetCenterBall () const
bool setOracle (Oracle *oracle)
const OraclegetOracle (void) const
bool setActiveVariableIndex (const StdIntSet &v)
const StdIntSetgetActiveVariableIndex () const
bool hasVariableDimension () const
void addEqualityConstraints (const AccpmGenMatrix &constraints, const AccpmVector &rhs)
void removeEqualityConstraints ()
bool hasEqualityConstraints () const
void getEqualityConstraints (AccpmGenMatrix *&constraints, AccpmVector *&rhs) const
void output (std::ostream &os) const

Friends

std::ostream & operator<< (std::ostream &, const Parameters &P)

Detailed Description

Manages the parameters used for tuning OBOE. It can read the parameters from a file with a specified format or can be used to set the individual parameters.


Constructor & Destructor Documentation

Accpm::Parameters::Parameters ( )
Accpm::Parameters::Parameters ( const char *  fileName)

References AccpmError(), and AccpmWarning().

Accpm::Parameters::~Parameters ( ) [virtual]

Member Function Documentation

void Accpm::Parameters::addEqualityConstraints ( const AccpmGenMatrix constraints,
const AccpmVector rhs 
)

Add Equality constraints (D^t)*y = d The constraints matrix represents D and should have dimension number of variables(n) * number of constraints. The vector rhs is the vector with dimension number of constraints and represents the vector d, right hand side of the constraint.

References Accpm::AccpmVector::append(), Accpm::AccpmGenMatrix::assignColumn(), and Accpm::AccpmGenMatrix::getColumn().

const StdIntSet * Accpm::Parameters::getActiveVariableIndex ( ) const
Returns:
The index of the active variables at the current iteration.

Get the vector of indices of variables which are active.

const AccpmVector* Accpm::Parameters::getB ( ) const [inline]
const AccpmVector* Accpm::Parameters::getCenterBall ( ) const [inline]
void Accpm::Parameters::getEqualityConstraints ( AccpmGenMatrix *&  constraints,
AccpmVector *&  rhs 
) const
Returns:
A pointer to Equality constraint matrix D^t and corresponding rhs vector d if constraints (D^t)*y = d have been added.
const string & Accpm::Parameters::getOptimizationType ( void  ) const

Referenced by output(), and Accpm::Manager::output().

const Oracle * Accpm::Parameters::getOracle ( void  ) const
const AccpmVector* Accpm::Parameters::getStartingPoint ( ) const [inline]

Referenced by Accpm::Manager::Manager().

const string Accpm::Parameters::getStringParameter ( const char *  name) const
const AccpmVector* Accpm::Parameters::getVariableLB ( ) const [inline]
const AccpmVector* Accpm::Parameters::getVariableUB ( ) const [inline]
bool Accpm::Parameters::hasEqualityConstraints ( ) const

Whether the problem has Equality Constraints of the type (D^t)*y = d

bool Accpm::Parameters::hasVariableDimension ( ) const
Returns:
True if the dimension of the problem can change from one iteration to the next. This is possible if some of the variables are de-activated by not making them part of the active set specified by Parameters::setActiveVariableIndex();

Is the Active Set strategy supported.

void Accpm::Parameters::output ( std::ostream &  os) const

References getOptimizationType().

Referenced by Accpm::operator<<().

void Accpm::Parameters::removeEqualityConstraints ( )

Remove the constraints (D^t)*y = d if they exist

Referenced by ~Parameters().

bool Accpm::Parameters::setActiveVariableIndex ( const StdIntSet v)

Set the variables whose indices are specified in the set v to be active, all the other variables are considered to be put to 0 and hence de-activated.

Set the vector of indices of variables which are active.

References AccpmError().

bool Accpm::Parameters::setB ( const StdRealVector v)

Set the linear component of the objective function. Note: The user can either specify the linear component or provide a smooth oracle, f2, but not both. If the smooth function f2 is completely linear then the user should use the setB() function and not write a smooth oracle.

References AccpmError(), and Accpm::AccpmVector::copy().

Referenced by main().

bool Accpm::Parameters::setB ( const AccpmVector v)

Same as setB(const StdRealVector& v), with the difference that the linear component is specified as an AccpmVector instead of vector<double>.

References AccpmError().

bool Accpm::Parameters::setCenterBall ( const StdRealVector v)

Set the center of the ball, yr, if there are ball constraints: |y - yr|^2 <= R^2 where R is specified by RadiusBall parameter.

References AccpmError(), and Accpm::AccpmVector::copy().

Referenced by setStartingPoint().

bool Accpm::Parameters::setIntParameter ( const char *  name,
int  value 
)

Referenced by main().

bool Accpm::Parameters::setOptimizationType ( const string &  value)

References AccpmWarning(), Accpm::OPT_MAX, and Accpm::OPT_MIN.

Referenced by main().

bool Accpm::Parameters::setOracle ( Oracle oracle)
bool Accpm::Parameters::setPi ( const StdRealVector pi)

Set the vector of weights on the non-smooth function, f1. The vector pi should be the same size as the NumSubProblems.

References AccpmError(), and Accpm::AccpmVector::copy().

Referenced by main().

bool Accpm::Parameters::setRealParameter ( const char *  name,
Real  value 
)

Referenced by main().

bool Accpm::Parameters::setStartingPoint ( const StdRealVector v)

Set the starting point for the problem. This sets the first query point given to the Oracle::eval() function by OBOE. It is the user responsibility to ensure the starting point is feasible with respect to the variable bounds which are set by setVariableLB() and setVariableUB().

Returns:
Returns true if it is successful in setting the specified point.

If no starting point is specified the starting point is set to 0 for all the variables.

References AccpmError(), Accpm::AccpmVector::copy(), and setCenterBall().

Referenced by main().

bool Accpm::Parameters::setStringParameter ( const char *  name,
const string &  value 
)

Referenced by main().

bool Accpm::Parameters::setVariableLB ( const StdRealVector v)

Set the lower bound on the variables. Currently the user needs to specify the bound on all the variables if they choose to set the lower bound. Ofcourse the bound can be set ACCPM_MINUS_INF for variables with no lower bounds.

The default lower bound on all variables is ACCPM_MINUS_INF.

References AccpmError(), and Accpm::AccpmVector::copy().

bool Accpm::Parameters::setVariableUB ( const StdRealVector v)

Set the upper bound on the variables. Currently the user needs to specify the bound on all the variables if they choose to set the upper bound. Ofcourse the bound can be set ACCPM_PLUS_INF for variables with no upper bounds.

The default lower bound on all variables is ACCPM_PLUS_INF.

References AccpmError(), and Accpm::AccpmVector::copy().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Parameters P 
) [friend]

The documentation for this class was generated from the following files: