OBOE 0.1
|
#include <Oracle.h>
Public Member Functions | |
virtual | ~OracleFunction () |
virtual int | eval (const AccpmVector &y, AccpmVector &functionValue, AccpmGenMatrix &subGradients, AccpmGenMatrix *info)=0 |
virtual Accpm::OracleFunction::~OracleFunction | ( | ) | [inline, virtual] |
virtual int Accpm::OracleFunction::eval | ( | const AccpmVector & | y, |
AccpmVector & | functionValue, | ||
AccpmGenMatrix & | subGradients, | ||
AccpmGenMatrix * | info | ||
) | [pure virtual] |
The evaluate function which is called by OBOE. At every iteration, i.e. call to QpGenerator::run() function, OBOE asks the Oracle to provide it with the cut information at the current query point y.
For a given query point, y, the eval function should return the following:
For the non-smooth function f1(.) : For optimality cuts, i.e *info = 1, functionValue is typically the function evaluation at the current query point, y. For feasiblity cuts, i.e *info = 0, however, this is a value which would make the cut described by the subGradients matrix valid in the form : functionValue + subGradients^T*(y' - y) <= 0, for all feasible points y'
For the smooth function f2(.) : It again represents the function value f2(y).
The subgradient vector(with abuse of name) is also used to provide a valid cuts incase the given point, y, is not feasible. Hence the eval function is responsible for providing both optimality and feasibility cuts.
For the smooth function f2, this vector has the Hessian information. It is a vector of dimension NumVariables x NumVariables (if parameter diagHessian is false) otherwise its has dimension NumVariables x 1
The return value is 0 on success and 1 to terminate the Outer Iterations and hence the Query point generation process.
Note: The number of cuts, NumCuts, returned at every iteration is controlled by the user by providing the vectors and matrices of corresponding size.
Referenced by Accpm::Manager::callSmoothOracle(), and Accpm::QpGenerator::run().