Global Views in PhasorDynamics SystemModel using new Vector#452
Global Views in PhasorDynamics SystemModel using new Vector#452lukelowry wants to merge 1 commit into
Conversation
|
I like the
That is, virtual std::vector<ScalarT>& y() = 0;
virtual const std::vector<ScalarT>& y() const = 0;
becomes virtual VectorView<ScalarT> y() = 0; // no `&` needed
virtual VectorView<const ScalarT> y() const = 0;
This means that the
|
5e78c32 to
289e3cb
Compare
289e3cb to
e7e6b07
Compare
Description
This PR updates PhasorDynamics so buses and components use their slices of the
SystemModelstate vectors directly. This removes the local state copy path and keeps component accessors consistent with the integrator-updated system state.Partially addresses #96. Related to #145.
Proposed changes
StateVectorsupport soGridElementcan own standalone state or aliasSystemModelstate.SystemModelallocation to bind each bus/component to global state and verify element sizes remain fixed.yData()accessor for live state pointers.Performance was measured with
application/PhasorDynamics/PDSimusing the app-reportedComplete intime. Each row reports the median of 3 trials after rebuildingPDSimon the corresponding branch.develop(s)Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
This work was motivated by the addition of IEEEST stabilizers: adding 333 stabilizers to the Texas case dramatically reduced performance, and this change removes avoidable state-copy overhead in PhasorDynamics system evaluation.
NOTE: I had to make a new PR but this is revival of #411