Template Class SystemModel

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

template<typename scalar_type, typename index_type>
class SystemModel : public GridKit::OptimalPowerFlow::Component<scalar_type, index_type>

AC optimal power flow in Cartesian coordinates.

allocate() gives each component a contiguous block of the system vectors. Each evaluation loops over the components, which gather, evaluate, and scatter as described in ComponentImpl.hpp.

Todo:

Address thread safety. Constraint and gradient scatters and the derivative refill add to entries shared by devices at the same bus.

Todo:

Replace the temporary STL containers of system-level data.

Public Functions

explicit SystemModel(const SystemModelData<RealT, IdxT> &data)
Throws:

std::invalid_argument – for a duplicate bus, an invalid parameter, or a port without a bus of this system

virtual Model::ConfigurationChecks verify() const override

Every problem with the data.

virtual int allocate() override

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

virtual int tagInequality() override

Tag each internal constraint as an inequality or an equality.

virtual int initialize() override

Equalities at zero and inequalities unbounded until the components set their limits.

virtual int evaluateObjective() override

Evaluate the objective contribution into f().

virtual int evaluateGradient() override

Add the objective gradient.

virtual int evaluateConstraints() override

Add the constraint contributions.

virtual int evaluateJacobian() override

Evaluate the constraint Jacobian into jacobianEntries().

virtual int evaluateHessian(RealT sigma) override

Evaluate the lower Lagrangian Hessian into hessianEntries().

BusT *getBus(IdxT number)

Bus by number, which views its solution after allocate().

Throws:

std::out_of_range – for an unknown bus

GeneratorT *getGenerator(const std::string &id)

Generator by case-file id, which views its solution after allocate().

Throws:

std::out_of_range – for an unknown generator