Template Class OptimizationEvaluator

Inheritance Relationships

Derived Type

Class Documentation

template<typename scalar_type, typename index_type>
class OptimizationEvaluator

Minimize \(f(x)\) subject to \(g_l \le g(x) \le g_u\) and \(x_l \le x \le x_u\).

Evaluations are at x() and lambda(), and return 0 on success.

Subclassed by GridKit::OptimalPowerFlow::Component< scalar_type, index_type >

Public Functions

virtual int allocate() = 0

Size the problem, tag the inequalities, and set the sparsity patterns.

virtual int tagInequality() = 0

Fill tag(), true for an inequality and false for an equality.

virtual int initialize() = 0

Set the bounds and the flat start.

virtual int evaluateObjective() = 0

Evaluate \(f\) into f().

virtual int evaluateGradient() = 0

Evaluate \(\nabla f\) into gradient().

virtual int evaluateConstraints() = 0

Evaluate \(g\) into g().

virtual int evaluateJacobian() = 0

Evaluate the Jacobian of \(g\) into getCsrJacobian().

virtual int evaluateHessian(RealT sigma) = 0

Evaluate the lower Hessian of \(\sigma f + \lambda^T g\) into getCsrHessian().

inline IdxT size() const

Number of variables.

inline IdxT sizeConstraints() const

Number of constraints.

inline const ScalarT &f() const

Objective.

inline VectorT &x()

Variables.

inline const RealVectorT &xLower() const

Variable lower bounds.

inline const RealVectorT &xUpper() const

Variable upper bounds.

inline const RealVectorT &gradient() const

Objective gradient.

inline const VectorT &g() const

Constraints.

inline const RealVectorT &gLower() const

Constraint lower bounds.

inline const RealVectorT &gUpper() const

Constraint upper bounds.

inline const std::vector<bool> &tag() const

True for each inequality.

inline RealVectorT &lambda()

Constraint multipliers.

inline RealVectorT &zLower()

Lower-bound multipliers.

inline RealVectorT &zUpper()

Upper-bound multipliers.

inline CsrMatrixT *getCsrJacobian() const

Constraint Jacobian.

inline CsrMatrixT *getCsrHessian() const

Lower Lagrangian Hessian.