Template Class OptimizationEvaluator
Defined in File OptimizationEvaluator.hpp
Inheritance Relationships
Derived Type
public GridKit::OptimalPowerFlow::Component< scalar_type, index_type >(Template Class Component)
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()andlambda(), 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 initialize() = 0
Set the bounds and the flat start.
-
virtual int evaluateGradient() = 0
Evaluate \(\nabla f\) into
gradient().
-
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.
-
virtual int allocate() = 0