Template Class Component

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<typename scalar_type, typename index_type>
class Component : public GridKit::Model::OptimizationEvaluator<scalar_type, index_type>

Optimal power flow component, which views its blocks of the system vectors and reads and adds to those of the components at its ports.

Subclassed by GridKit::OptimalPowerFlow::Bus< ScalarT, IdxT >, GridKit::OptimalPowerFlow::Generator< ScalarT, IdxT >, GridKit::OptimalPowerFlow::Branch< scalar_type, index_type >, GridKit::OptimalPowerFlow::Bus< scalar_type, index_type >, GridKit::OptimalPowerFlow::Generator< scalar_type, index_type >, GridKit::OptimalPowerFlow::Load< scalar_type, index_type >, GridKit::OptimalPowerFlow::SystemModel< scalar_type, index_type >

Public Functions

virtual Model::ConfigurationChecks verify() const = 0

Every problem with the parameters.

int connect(IdxT port, Component &component, const Block &offset = {})

Read and add to the blocks of component from offset at port.

inline virtual int allocate() override

Nothing to allocate, since the system binds a component to its blocks.

inline virtual int tagInequality() override

Tag each internal constraint as an inequality or an equality.

inline virtual int initialize() override

Set the bounds and any nonzero initial value.

virtual int evaluateObjective() override

Evaluate the objective contribution into f().

inline virtual int evaluateGradient() override

Add the objective gradient.

virtual int evaluateConstraints() override

Add the constraint contributions.

inline virtual int evaluateJacobian() override

Evaluate the constraint Jacobian into jacobianEntries().

inline virtual int evaluateHessian(RealT sigma) override

Evaluate the lower Lagrangian Hessian into hessianEntries().

inline virtual ScalarT objective(const ScalarT *x, const ScalarT *external) const

Objective contribution.

inline virtual void internalConstraints(const ScalarT *x, const ScalarT *external, ScalarT *g) const

Contributions g to the internal constraints.

inline virtual void externalConstraints(const ScalarT *x, const ScalarT *external, ScalarT *g) const

Contributions g to the constraints at each port, in port order.

struct Block

Numbers of variables and constraints, or the first index of each.

struct Port

Blocks of component that a port reads and adds to.

struct CooBuffer

Derivative entries in global indices, with room for the dense local block.