List of all members | Public Member Functions | Protected Member Functions
ipo::FaceOracleBase Class Reference

Detailed Description

This class adds the ability to optimize over faces of $ P $ by tilting objective vectors. If $ \left<a,x\right> \leq \beta $ defines the face, then this implementation attempts to optimize a given objective vector $ \left<c,x\right> $ over $ F $ by optimizing $ \left<c + M \dfrac{ ||a||_{\infty} }{ ||c||_{\infty} } a,x\right> $ over $ P $ for sufficiently large $ M \in \mathbb{Q} $, doubling $ M $ a certain nummber of times before giving up.

#include <ipo/oracles.h>

+ Inheritance diagram for ipo::FaceOracleBase:

Public Member Functions

virtual ~FaceOracleBase ()
 
virtual void setFace (const LinearConstraint &newFace)
 Restricts the oracle to the face defined by newFace. More...
 
- Public Member Functions inherited from ipo::OracleBase
const std::string & name () const
 Returns the name of the oracle. More...
 
const Spacespace () const
 Returns the ambient space. More...
 
std::size_t heuristicLevel () const
 Returns the heuristic level of this oracle. More...
 
void maximize (OracleResult &result, const soplex::VectorRational &objective, const ObjectiveBound &objectiveBound=ObjectiveBound(), std::size_t minHeuristic=0, std::size_t maxHeuristic=std::numeric_limits< std::size_t >::max())
 Runs the oracle to maximize the dense rational objective. More...
 
void maximize (OracleResult &result, const Vector &objective, const ObjectiveBound &objectiveBound=ObjectiveBound(), std::size_t minHeuristic=0, std::size_t maxHeuristic=std::numeric_limits< std::size_t >::max())
 Runs the oracle to maximize the sparse rational objective. More...
 

Protected Member Functions

 FaceOracleBase (const std::string &name, const std::shared_ptr< OracleBase > &nextOracle=NULL, std::size_t maxInfeasibleIterations=4, double initialM=16)
 Constructs an oracle with given name, optionally associated to nextOracle. More...
 
void initializeSpace (const Space &space)
 Initializes datastructures that require the oracle's ambient space. More...
 
virtual std::size_t maximizeController (OracleResult &result, const soplex::VectorRational &objective, const ObjectiveBound &objectiveBound, std::size_t maxHeuristic, std::size_t minHeuristic, bool &sort, bool &checkDups)
 Wrapper method that calls the oracle's implementation. More...
 
virtual const LinearConstraintcurrentFace ()
 Returns the current face. More...
 
- Protected Member Functions inherited from ipo::OracleBase
 OracleBase (const std::string &name, const std::shared_ptr< OracleBase > &nextOracle=NULL)
 Constructs an oracle with given name, optionally associated to nextOracle. More...
 
void initializeSpace (const Space &space)
 Initializes datastructures that require the oracle's ambient space. More...
 
virtual std::size_t maximizeImplementation (OracleResult &result, const soplex::VectorRational &objective, const ObjectiveBound &objectiveBound, std::size_t minHeuristic, std::size_t maxHeuristic, bool &sort, bool &checkDups)=0
 Oracle's implementation to maximize the dense rational objective. More...
 

Constructor & Destructor Documentation

virtual ipo::FaceOracleBase::~FaceOracleBase ( )
virtual

Destructor.

ipo::FaceOracleBase::FaceOracleBase ( const std::string &  name,
const std::shared_ptr< OracleBase > &  nextOracle = NULL,
std::size_t  maxInfeasibleIterations = 4,
double  initialM = 16 
)
protected

Constructs an oracle with given name that is optionally associated to nextOracle. If not associated, then the space will be the emptySpace() initially.

Parameters
nameName of the oracle.
nextOracleNext oracle to forward calls to.
maxInfeasibleIterationsMaximum number of iterations before (heuristically) checking if the face is empty.
initialMInitial value of $ M $.

Member Function Documentation

virtual void ipo::FaceOracleBase::setFace ( const LinearConstraint newFace)
virtual

Restricts the optimization oracle to the face $ F $ of $ P $ defined by newFace. For newFace equal to NULL we define $ F := P $.

This implementation also calls OracleBase::setFace(), which in turn calls setFace() for the next oracle.

Reimplemented from ipo::OracleBase.

void ipo::FaceOracleBase::initializeSpace ( const Space space)
protected

Initializes datastructures that require the oracle's ambient space. Should be called before the constructor ends.

virtual std::size_t ipo::FaceOracleBase::maximizeController ( OracleResult result,
const soplex::VectorRational &  objective,
const ObjectiveBound &  objectiveBound,
std::size_t  maxHeuristic,
std::size_t  minHeuristic,
bool &  sort,
bool &  checkDups 
)
protectedvirtual

This method is called by maximize(), forwards the call to the next oracle if requested, calls the maximizeImplementation() method, and finally forwards the call to the next oracle if necessary.

Parameters
resultAfter the call, contains the oracle's answer.
objectiveObjective vector $ c \in \mathbb{Q}^n $ to be maximized.
objectiveBoundObjective value $ \gamma $ that should be exceeded.
sortSet this variable to true if points must be sorted.
checkDupsSet this variable to true if points or rays must be checked for duplicates.

The maximizeImplementation() function is called repeatedly with titled objective vectors (see FaceOracleBase).

Reimplemented from ipo::OracleBase.

virtual const LinearConstraint& ipo::FaceOracleBase::currentFace ( )
protectedvirtual

Returns the current face.

See also
setFace(). Since handling of faces is done via modifications of the objective vector, this implementation always returns NULL in order to remove face-handling from maximizeImplementation()'s requirements. To actually access the current face, call OracleBase::currentFace().

Reimplemented from ipo::OracleBase.