![]() |
MAiNGO
|
namespace holding all essentials of the upper bounding solvers More...
Classes | |
struct | DagObj |
Struct for storing all needed Directed acyclic Graph objects for the upper bounding solver. More... | |
class | IpoptProblem |
Class for representing problems to be solved by IpOpt, providing an interface to the problem definition in problem.h used by MC++. More... | |
class | KnitroProblem |
Class for representing problems to be solved by Knitro, providing an interface to the problem definition in problem.h. More... | |
class | UbpClp |
Wrapper for handling the upper bounding problems by interfacing CLP. More... | |
class | UbpCplex |
Wrapper for handling the upper bounding problems by interfacing CPLEX. More... | |
class | UbpIpopt |
Wrapper for handling the upper bounding problems by interfacing Ipopt. More... | |
class | UbpKnitro |
Wrapper for handling the upper bounding problems by interfacing Knitro. More... | |
class | UbpNLopt |
Wrapper for handling the upper bounding problems by interfacing NLopt. More... | |
struct | UbpQuadExpr |
Struct used to compute coefficients of linear and quadratic/bilinear terms in (MIQ)Ps. This struct is used to avoid the need of propagating the IloExpr object resulting in HUGE RAM usage. More... | |
struct | UbpStructure |
Struct for storing structure information for the upper bounding solver. More... | |
class | UpperBoundingSolver |
Base class for wrappers for handling the upper bounding problems. More... | |
Enumerations | |
enum | UBP_SOLVER { SOLVER_EVAL = 0, SOLVER_COBYLA, SOLVER_BOBYQA, SOLVER_LBFGS, SOLVER_SLSQP, SOLVER_IPOPT, SOLVER_KNITRO, SOLVER_CPLEX = 42, SOLVER_CLP } |
Enum for selecting the STRATegy so be used for solving the upper bounding problems. More... | |
Functions | |
std::shared_ptr< UpperBoundingSolver > | make_ubp_solver (mc::FFGraph &DAG, const std::vector< mc::FFVar > &DAGvars, const std::vector< mc::FFVar > &DAGfunctions, const std::vector< babBase::OptimizationVariable > &variables, const unsigned nineqIn, const unsigned neqIn, const unsigned nineqSquashIn, Settings *settingsIn, Logger *loggerIn, std::vector< Constraint > *constraintPropertiesIn, UpperBoundingSolver::UBS_USE useIn) |
Factory function for initializing different upper bounding solver wrappers. More... | |
double | evaluate_objective (const double *currentPoint, const unsigned nvar, const bool computeGradient, double *gradient, std::shared_ptr< DagObj > dagObj) |
Function for evaluating objective function at a given point. More... | |
void | evaluate_inequalities (const double *currentPoint, const unsigned nvar, const unsigned nineq, const bool computeGradient, double *result, double *gradient, std::shared_ptr< DagObj > dagObj) |
Function for evaluating residuals of inequality constraints at a given point. More... | |
void | evaluate_equalities (const double *currentPoint, const unsigned nvar, const unsigned neq, const bool computeGradient, double *result, double *gradient, std::shared_ptr< DagObj > dagObj) |
Function for evaluating residuals of equality constraints at a given point. More... | |
void | evaluate_constraints (const double *currentPoint, const unsigned nvar, const unsigned ncon, const bool computeGradient, double *result, double *gradient, std::shared_ptr< DagObj > dagObj) |
Function for evaluating residuals of inequality and equality constraints at a given point. More... | |
void | evaluate_problem (const double *currentPoint, const unsigned nvar, const unsigned ncon, const bool computeGradient, double *result, double *gradient, std::shared_ptr< DagObj > dagObj) |
Function for evaluating the objective function along with the residuals of inequality and equality constraints at a given point. More... | |
void | evaluate_hessian (const double *currentPoint, const unsigned nvar, const unsigned ncon, double *hessian, std::shared_ptr< DagObj > dagObj) |
Function for evaluating the Hessian of the Lagrangian at a given point. More... | |
std::vector< double > | operator- (const std::vector< double > &in) |
Operator- for a double vector. More... | |
std::vector< std::vector< double > > | operator- (const std::vector< std::vector< double >> &in) |
Operator- for a double matrix. More... | |
std::vector< double > | operator+ (const std::vector< double > &in1, const std::vector< double > &in2) |
Operator+ for addition of two double vectors. More... | |
std::vector< std::vector< double > > | operator+ (const std::vector< std::vector< double >> &in1, const std::vector< std::vector< double >> &in2) |
Operator+ for addition of two double matrices. More... | |
std::vector< double > | operator- (const std::vector< double > &in1, const std::vector< double > &in2) |
Operator- for subtraction of two double vectors. More... | |
std::vector< std::vector< double > > | operator- (const std::vector< std::vector< double >> &in1, const std::vector< std::vector< double >> &in2) |
Operator- for subtraction of two double matrices. More... | |
std::vector< double > | operator * (const std::vector< double > &in1, const double in2) |
Operator* for multiplication of a double vector with a double constant. More... | |
std::vector< std::vector< double > > | operator * (const std::vector< std::vector< double >> &in1, const double in2) |
Operator* for multiplication of a double matrix with a double constant. More... | |
UbpQuadExpr | operator+ (const UbpQuadExpr &in) |
Operator+ for UbpQuadExpr. More... | |
UbpQuadExpr | operator+ (const UbpQuadExpr &in1, const UbpQuadExpr &in2) |
Operator+ for two UbpQuadExpr objects. More... | |
UbpQuadExpr | operator+ (const UbpQuadExpr &in1, const double &in2) |
Operator+ for addition of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator+ (const UbpQuadExpr &in1, const int &in2) |
Operator+ for addition of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator+ (const double &in1, const UbpQuadExpr &in2) |
Operator+ for addition of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator+ (const int &in1, const UbpQuadExpr &in2) |
Operator+ for addition of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator- (const UbpQuadExpr &in) |
Operator- for UbpQuadExpr. More... | |
UbpQuadExpr | operator- (const UbpQuadExpr &in1, const UbpQuadExpr &in2) |
Operator- for two UbpQuadExpr objects. More... | |
UbpQuadExpr | operator- (const UbpQuadExpr &in1, const double &in2) |
Operator- for subtraction of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator- (const UbpQuadExpr &in1, const int &in2) |
Operator- for subtraction of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator- (const double &in1, const UbpQuadExpr &in2) |
Operator- for subtraction of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator- (const int &in1, const UbpQuadExpr &in2) |
Operator- for subtraction of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator * (const UbpQuadExpr &in1, const UbpQuadExpr &in2) |
Operator* for two UbpQuadExpr objects. More... | |
UbpQuadExpr | operator * (const UbpQuadExpr &in1, const double in2) |
Operator* for multiplication of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator * (const UbpQuadExpr &in1, const int in2) |
Operator* for subtraction of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator * (const double in1, const UbpQuadExpr &in2) |
Operator* for multiplication of an UbpQuadExpr and a double. More... | |
UbpQuadExpr | operator * (const int in1, const UbpQuadExpr &in2) |
Operator* for subtraction of an UbpQuadExpr and an int. More... | |
UbpQuadExpr | operator/ (const UbpQuadExpr &in1, const UbpQuadExpr &in2) |
Operator/ for two UbpQuadExpr. More... | |
UbpQuadExpr | operator/ (const UbpQuadExpr &in1, const double in2) |
Operator/ for division of an UbpQuadExpr by a double. More... | |
UbpQuadExpr | operator/ (const UbpQuadExpr &in1, const int in2) |
Operator/ for division of an UbpQuadExpr by a double. More... | |
UbpQuadExpr | operator/ (const double in1, const UbpQuadExpr &in2) |
Operator/ for division of a double by an UbpQuadExpr. More... | |
UbpQuadExpr | operator/ (const int in1, const UbpQuadExpr &in2) |
Operator/ for division of an int by an UbpQuadExpr. More... | |
namespace holding all essentials of the upper bounding solvers
Enum for selecting the STRATegy so be used for solving the upper bounding problems.
void maingo::ubp::evaluate_constraints | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const unsigned | ncon, | ||
const bool | computeGradient, | ||
double * | result, | ||
double * | gradient, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating residuals of inequality and equality constraints at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | ncon | is the number of constraints |
[in] | computeGradient | is a flag indicating whether the gradient of the equality constraints should be computed as well |
[out] | result | is an array containing the residuals of the constraints at currentPoint |
[out] | gradient | is a vector containing the gradients of the constraints at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
void maingo::ubp::evaluate_equalities | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const unsigned | neq, | ||
const bool | computeGradient, | ||
double * | result, | ||
double * | gradient, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating residuals of equality constraints at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | neq | is the number of equality constraints |
[in] | computeGradient | is a flag indicating whether the gradient of the equality constraints should be computed as well |
[out] | result | is an array containing the residuals of the inequality constraints at currentPoint |
[out] | gradient | is a vector containing the gradients of the equality constraints at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
void maingo::ubp::evaluate_hessian | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const unsigned | ncon, | ||
double * | hessian, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating the Hessian of the Lagrangian at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | ncon | is the number of constraints |
[out] | hessian | is an array containing the Hessian of the Lagrangian at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
void maingo::ubp::evaluate_inequalities | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const unsigned | nineq, | ||
const bool | computeGradient, | ||
double * | result, | ||
double * | gradient, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating residuals of inequality constraints at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | nineq | is the number of inequality constraints |
[in] | computeGradient | is a flag indicating whether the gradient of the inequality constraints should be computed as well |
[out] | result | is an array containing the residuals of the inequality constraints at currentPoint |
[out] | gradient | is an array containing the gradients of the inequality constraints at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
double maingo::ubp::evaluate_objective | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const bool | computeGradient, | ||
double * | gradient, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating objective function at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | computeGradient | is a flag indicating whether the gradient of the objective function should be computed as well |
[out] | gradient | is the gradient of the objective function at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
void maingo::ubp::evaluate_problem | ( | const double * | currentPoint, |
const unsigned | nvar, | ||
const unsigned | ncon, | ||
const bool | computeGradient, | ||
double * | result, | ||
double * | gradient, | ||
std::shared_ptr< DagObj > | dagObj | ||
) |
Function for evaluating the objective function along with the residuals of inequality and equality constraints at a given point.
[in] | currentPoint | is the point to be checked |
[in] | nvar | is the number of variables |
[in] | ncon | is the number of constraints |
[in] | computeGradient | is a flag indicating whether the gradient of the equality constraints should be computed as well |
[out] | result | is an array containing the objective function and the residuals of the constraints at currentPoint |
[out] | gradient | is a vector containing the gradients of the objective function and the constraints at currentPoint |
[in] | dagObj | is a pointer to the struct holding the DAG to be evaluated |
std::shared_ptr< UpperBoundingSolver > maingo::ubp::make_ubp_solver | ( | mc::FFGraph & | DAG, |
const std::vector< mc::FFVar > & | DAGvars, | ||
const std::vector< mc::FFVar > & | DAGfunctions, | ||
const std::vector< babBase::OptimizationVariable > & | variables, | ||
const unsigned | nineqIn, | ||
const unsigned | neqIn, | ||
const unsigned | nineqSquashIn, | ||
Settings * | settingsIn, | ||
Logger * | loggerIn, | ||
std::vector< Constraint > * | constraintPropertiesIn, | ||
UpperBoundingSolver::UBS_USE | useIn | ||
) |
Factory function for initializing different upper bounding solver wrappers.
[in] | DAG | is the directed acyclic graph constructed in MAiNGO.cpp needed to construct an own DAG for the lower bounding solver |
[in] | DAGvars | are the variables corresponding to the DAG |
[in] | DAGfunctions | are the functions corresponding to the DAG |
[in] | variables | is a vector containing the initial optimization variables defined in problem.h |
[in] | nineqIn | is the number of inequality constraints |
[in] | neqIn | is the number of equality |
[in] | nineqSquashIn | is the number of squash inequality constraints which are to be used only if the squash node has been used |
[in] | settingsIn | is a pointer to the MAiNGO settings |
[in] | loggerIn | is a pointer to the MAiNGO logger object |
[in] | constraintPropertiesIn | is a pointer to the constraint properties determined by MAiNGO |
[in] | useIn | communicates what the solver is to be used for |
|
inline |
Operator* for multiplication of a double vector with a double constant.
|
inline |
Operator* for multiplication of a double matrix with a double constant.
|
inline |
Operator* for two UbpQuadExpr objects.
|
inline |
Operator* for multiplication of an UbpQuadExpr and a double.
|
inline |
Operator* for subtraction of an UbpQuadExpr and an int.
|
inline |
Operator* for multiplication of an UbpQuadExpr and a double.
|
inline |
Operator* for subtraction of an UbpQuadExpr and an int.
|
inline |
Operator+ for addition of two double vectors.
|
inline |
Operator+ for addition of two double matrices.
|
inline |
Operator+ for UbpQuadExpr.
|
inline |
Operator+ for two UbpQuadExpr objects.
|
inline |
Operator+ for addition of an UbpQuadExpr and a double.
|
inline |
Operator+ for addition of an UbpQuadExpr and an int.
|
inline |
Operator+ for addition of an UbpQuadExpr and a double.
|
inline |
Operator+ for addition of an UbpQuadExpr and an int.
|
inline |
Operator- for a double vector.
|
inline |
Operator- for a double matrix.
|
inline |
Operator- for subtraction of two double vectors.
|
inline |
Operator- for subtraction of two double matrices.
|
inline |
Operator- for UbpQuadExpr.
|
inline |
Operator- for two UbpQuadExpr objects.
|
inline |
Operator- for subtraction of an UbpQuadExpr and a double.
|
inline |
Operator- for subtraction of an UbpQuadExpr and an int.
|
inline |
Operator- for subtraction of an UbpQuadExpr and a double.
|
inline |
Operator- for subtraction of an UbpQuadExpr and an int.
|
inline |
Operator/ for two UbpQuadExpr.
|
inline |
Operator/ for division of an UbpQuadExpr by a double.
|
inline |
Operator/ for division of an UbpQuadExpr by a double.
|
inline |
Operator/ for division of a double by an UbpQuadExpr.
|
inline |
Operator/ for division of an int by an UbpQuadExpr.