diff --git a/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp b/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp index 405f78e6c..0f0e6bee2 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp +++ b/GridKit/Model/PhasorDynamics/BusFault/BusFault.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include namespace GridKit @@ -40,6 +41,8 @@ namespace GridKit using ModelDataT = BusFaultData; using MonitorT = Model::VariableMonitor; + using SignalPortsT = SignalPorts; + BusFault(BusT* bus); BusFault(BusT* bus, RealT R, RealT X, int status); BusFault(BusT* bus, const ModelDataT& data); @@ -63,6 +66,11 @@ namespace GridKit } public: + SignalPortsT& getPorts() + { + return ports_; + } + void setR(RealT R) { R_ = R; @@ -112,6 +120,8 @@ namespace GridKit const ScalarT*, const ScalarT*, const ScalarT*, ScalarT*); private: + SignalPortsT ports_; + BusT* bus_; RealT R_{0.0}; RealT X_{0.0}; diff --git a/GridKit/Model/PhasorDynamics/BusFault/BusFaultData.hpp b/GridKit/Model/PhasorDynamics/BusFault/BusFaultData.hpp index 9ecef10fb..cb70a7c99 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/BusFaultData.hpp +++ b/GridKit/Model/PhasorDynamics/BusFault/BusFaultData.hpp @@ -35,6 +35,8 @@ namespace GridKit /// Signal outputs supported for a bus fault enum class BusFaultSignalOutputs : size_t { + ir, ///< Real terminal current + ii, ///< Imaginary terminal current }; /// Variables able to be monitored for a bus fault diff --git a/GridKit/Model/PhasorDynamics/BusFault/BusFaultImpl.hpp b/GridKit/Model/PhasorDynamics/BusFault/BusFaultImpl.hpp index 89d121246..34bf75df1 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/BusFaultImpl.hpp +++ b/GridKit/Model/PhasorDynamics/BusFault/BusFaultImpl.hpp @@ -135,6 +135,15 @@ namespace GridKit this->setResidualIndex(j, j); } + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[0], &(this->getVariableIndex(0))); + } + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[1], &(this->getVariableIndex(1))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/BusFault/CMakeLists.txt b/GridKit/Model/PhasorDynamics/BusFault/CMakeLists.txt index 14fc6a421..1c3155459 100644 --- a/GridKit/Model/PhasorDynamics/BusFault/CMakeLists.txt +++ b/GridKit/Model/PhasorDynamics/BusFault/CMakeLists.txt @@ -28,6 +28,13 @@ gridkit_add_library( SOURCES BusFaultDependencyTracking.cpp LINK_LIBRARIES PUBLIC GridKit::phasor_dynamics_core) +target_link_libraries( + phasor_dynamics_bus_fault + PUBLIC GridKit::phasor_dynamics_signal) +target_link_libraries( + phasor_dynamics_bus_fault_dependency_tracking + PUBLIC GridKit::phasor_dynamics_signal_dependency_tracking) + # Link to interface target for all components target_link_libraries( phasor_dynamics_components diff --git a/GridKit/Model/PhasorDynamics/Converter/REGCA/README.md b/GridKit/Model/PhasorDynamics/Converter/REGCA/README.md index c7b849bca..64dc8c196 100644 --- a/GridKit/Model/PhasorDynamics/Converter/REGCA/README.md +++ b/GridKit/Model/PhasorDynamics/Converter/REGCA/README.md @@ -93,8 +93,8 @@ Name | Port | Init | Description `bus` | Bus | Known | Terminal bus voltage `ipcmd` | Input | Unknown | Active-current command input `iqcmd` | Input | Unknown | Reactive-current command input -`ibranchr` | Output | Known | Branch-current real-component output -`ibranchi` | Output | Known | Branch-current imaginary-component output +`ir` | Output | Known | Terminal-current real-component output +`ii` | Output | Known | Terminal-current imaginary-component output `pbranch` | Output | Known | Branch active-power output `qbranch` | Output | Known | Branch reactive-power output @@ -265,8 +265,8 @@ All internal derivatives initialize to zero. Monitor | Units | Description | Note --------|--------|-----------------------------|------ -`ir` | [p.u.] | Real current injection | System base; exported through `ibranchr` when assigned -`ii` | [p.u.] | Imaginary current injection | System base; exported through `ibranchi` when assigned +`ir` | [p.u.] | Real current injection | System base; exported through `ir` when assigned +`ii` | [p.u.] | Imaginary current injection | System base; exported through `ii` when assigned `p` | [p.u.] | Active-power output | System base; exported through `pbranch` when assigned `q` | [p.u.] | Reactive-power output | System base; exported through `qbranch` when assigned diff --git a/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaData.hpp b/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaData.hpp index 3d9275e73..df9db4799 100644 --- a/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaData.hpp +++ b/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaData.hpp @@ -55,10 +55,10 @@ namespace GridKit /// Signal outputs for the REGCA converter model. enum class RegcaSignalOutputs : size_t { - ibranchr, ///< Optional branch-current real-component output signal ID - ibranchi, ///< Optional branch-current imaginary-component output signal ID - pbranch, ///< Optional branch active-power output signal ID - qbranch, ///< Optional branch reactive-power output signal ID + ir, ///< Optional terminal-current real-component output signal ID + ii, ///< Optional terminal-current imaginary-component output signal ID + pbranch, ///< Optional branch active-power output signal ID + qbranch, ///< Optional branch reactive-power output signal ID }; /// Variables available through the monitor interface. diff --git a/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp b/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp index 233a5be86..ca43bcbae 100644 --- a/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp +++ b/GridKit/Model/PhasorDynamics/Converter/REGCA/RegcaImpl.hpp @@ -330,13 +330,13 @@ namespace GridKit auto* y = y_.getData(); - if (auto port = ports_.out.template port()) + if (auto port = ports_.out.template port()) { port.link(&y[static_cast(RegcaInternalVariables::IR)], &(this->getVariableIndex(static_cast(RegcaInternalVariables::IR)))); } - if (auto port = ports_.out.template port()) + if (auto port = ports_.out.template port()) { port.link(&y[static_cast(RegcaInternalVariables::II)], &(this->getVariableIndex(static_cast(RegcaInternalVariables::II)))); diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/CMakeLists.txt b/GridKit/Model/PhasorDynamics/Load/LoadZ/CMakeLists.txt index 6d8851463..813744539 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/CMakeLists.txt +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/CMakeLists.txt @@ -33,6 +33,13 @@ gridkit_add_library( SOURCES LoadZDependencyTracking.cpp LINK_LIBRARIES PUBLIC GridKit::phasor_dynamics_core) +target_link_libraries( + phasor_dynamics_loadz + PUBLIC GridKit::phasor_dynamics_signal) +target_link_libraries( + phasor_dynamics_loadz_dependency_tracking + PUBLIC GridKit::phasor_dynamics_signal_dependency_tracking) + # Link to interface target for all components target_link_libraries( phasor_dynamics_components diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp index c27866a38..2289370cd 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZ.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace GridKit @@ -43,6 +44,8 @@ namespace GridKit using ModelDataT = LoadZData; using MonitorT = Model::VariableMonitor; + using SignalPortsT = SignalPorts; + LoadZ(BusT* bus); LoadZ(BusT* bus, RealT R, RealT X); LoadZ(BusT* bus, const ModelDataT& data); @@ -62,6 +65,11 @@ namespace GridKit } public: + SignalPortsT& getPorts() + { + return ports_; + } + void setR(RealT R) { R_ = R; @@ -107,6 +115,8 @@ namespace GridKit const ScalarT*, const ScalarT*, const ScalarT*, ScalarT*); private: + SignalPortsT ports_; + BusT* bus_{nullptr}; RealT R_{0.1}; RealT X_{0.01}; diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZData.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZData.hpp index 45ed4ef31..d3b010c68 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZData.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZData.hpp @@ -33,6 +33,8 @@ namespace GridKit /// Signal outputs supported for a load enum class LoadZSignalOutputs : size_t { + ir, ///< Real terminal current + ii, ///< Imaginary terminal current }; /// Variables able to be monitored for a load diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZImpl.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZImpl.hpp index b3e24fc8a..5f412cc27 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZImpl.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZ/LoadZImpl.hpp @@ -105,6 +105,15 @@ namespace GridKit wb_.resize(2); h_.resize(2); + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[0], &(this->getVariableIndex(0))); + } + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[1], &(this->getVariableIndex(1))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZIP/CMakeLists.txt b/GridKit/Model/PhasorDynamics/Load/LoadZIP/CMakeLists.txt index 606f051bc..34b7e17c4 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZIP/CMakeLists.txt +++ b/GridKit/Model/PhasorDynamics/Load/LoadZIP/CMakeLists.txt @@ -28,6 +28,13 @@ gridkit_add_library( SOURCES LoadZIPDependencyTracking.cpp LINK_LIBRARIES PUBLIC GridKit::phasor_dynamics_core) +target_link_libraries( + phasor_dynamics_loadzip + PUBLIC GridKit::phasor_dynamics_signal) +target_link_libraries( + phasor_dynamics_loadzip_dependency_tracking + PUBLIC GridKit::phasor_dynamics_signal_dependency_tracking) + # Link to interface target for all components target_link_libraries( phasor_dynamics_components diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIP.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIP.hpp index 737cba8c7..5c5a807f7 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIP.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIP.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace GridKit @@ -43,6 +44,8 @@ namespace GridKit using ModelDataT = LoadZIPData; using MonitorT = Model::VariableMonitor; + using SignalPortsT = SignalPorts; + LoadZIP(BusT* bus); LoadZIP(BusT* bus, RealT Pnom, RealT Qnom, RealT alphaI, RealT alphaP); LoadZIP(BusT* bus, const ModelDataT& data); @@ -62,6 +65,11 @@ namespace GridKit } public: + SignalPortsT& getPorts() + { + return ports_; + } + void setPnom(RealT Pnom) { Pnom_ = Pnom; @@ -120,6 +128,8 @@ namespace GridKit const ScalarT*, const ScalarT*, const ScalarT*, ScalarT*); private: + SignalPortsT ports_; + BusT* bus_{nullptr}; RealT Pnom_{0}; RealT Qnom_{0}; diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPData.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPData.hpp index d405eb2bf..c1016795b 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPData.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPData.hpp @@ -30,6 +30,8 @@ namespace GridKit /// Signal outputs supported for a loadZIP enum class LoadZIPSignalOutputs : size_t { + ir, ///< Real terminal current + ii, ///< Imaginary terminal current }; /// Variables able to be monitored for a loadZIP diff --git a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPImpl.hpp b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPImpl.hpp index 929cfb746..1875407f0 100644 --- a/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPImpl.hpp +++ b/GridKit/Model/PhasorDynamics/Load/LoadZIP/LoadZIPImpl.hpp @@ -118,6 +118,15 @@ namespace GridKit wb_.resize(2); h_.resize(2); + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[0], &(this->getVariableIndex(0))); + } + if (auto port = ports_.out.template port()) + { + port.link(&y_.getData()[1], &(this->getVariableIndex(1))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/STATE.md b/GridKit/Model/PhasorDynamics/STATE.md new file mode 100644 index 000000000..5642700dd --- /dev/null +++ b/GridKit/Model/PhasorDynamics/STATE.md @@ -0,0 +1,95 @@ +# State Input Format + +A state file separates the model definition from its initial state. + +This also separates the case from the dispatch. One canonical `texas.case.json` can have multiple operating points in `examples/`: + +- `texas-summer2025.state.json` +- `texas-winter2025.state.json` +- `texas-summer2026.state.json` + +For example `texas-summer2025.state.json` might be structured as: + +```json +"header":{ + ... +}, +"buses":{ + ... +}, +"devices":{ + ... +} +``` + +Each entry gives initial outputs and operating settings. Models use these values and connected inputs to initialize their own state. + +Buses own their voltage and shunt outputs. Devices own their terminal current outputs. These values support initialization across PowerFlow, OPF, PhasorDynamics, and EMT. + +## Bus + +### RMS State (PowerFlow & PhasorDynamics) + +RMS voltages use real and imaginary parts: + +```json +"bus_id_2533":{ + "vr": 0.9289638822595822, + "vi": -0.39534548980249884 +} +``` + +### ABC State (EMT) + +EMT bus entries give instantaneous phase voltages. Device entries give currents. Each model defines any other initial states or history it needs. + +```json +"bus_id_2533":{ + "va": 0.9289638822595822, + "vb": -0.39534548980249884, + "vc": -0.39534548980249884 +} +``` + +## Devices + +Device entries give initial outputs and settings such as `online`, `open`, `tap`, and `phase`. + +Use `ir`/`ii` for one terminal and `ir1`/`ii1`, `ir2`/`ii2` for multiple terminals. Numbers follow the model's terminal numbering. Currents are positive into each connected bus. Phasor currents use the system base. EMT uses the model's phase output names and units. + +> At nonzero voltage, convert terminal power to initial current with `I = conj((P + jQ) / V)`. + +```json +"gen_id_2":{ + "online": true, + "ir": 0.8, + "ii": -0.2 +}, +"br_id_2":{ + "open": false, + "tap": 1, + "phase": 0 +} +``` + +# Migration + +- Initialize components from output values and connected inputs. +- Derive missing values and check the initialization equations. + +`Bus`: + +- Treat buses as components with `vr` and `vi` output ports. +- Move voltage initialization from the case to the state file. + +`Branch`: + +- Expose `ir1`, `ii1`, `ir2`, and `ii2` as output ports. +- Make `tap`, `phase`, and `open` input ports. + +`REGCA`, `LoadZ`, `LoadZIP`, `GENROU`, `GENSAL`, `GenClassical`: + +- Expose `ir` and `ii` as output ports. +- Initialize from terminal voltage and current. +- Remove generator and converter `p0`/`q0` parameters. +- Make `online` an input port. diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouData.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouData.hpp index 3af8dd628..961621be8 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouData.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouData.hpp @@ -53,6 +53,8 @@ namespace GridKit enum class GenrouSignalOutputs : size_t { speed, ///< Unique ID of the signal receiving speed deviation + ir, ///< Real terminal current + ii, ///< Imaginary terminal current }; /// Variables able to be monitored for a Genrou generator model diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouImpl.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouImpl.hpp index c052fec4f..717d74310 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouImpl.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENROU/GenrouImpl.hpp @@ -341,6 +341,15 @@ namespace GridKit speed_port.link(&y_.getData()[1], &(this->getVariableIndex(1))); } + if (auto ir_port = ports_.out.template port()) + { + ir_port.link(&y_.getData()[15], &(this->getVariableIndex(15))); + } + if (auto ii_port = ports_.out.template port()) + { + ii_port.link(&y_.getData()[16], &(this->getVariableIndex(16))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalData.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalData.hpp index ab3946d99..bb6750afe 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalData.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalData.hpp @@ -50,6 +50,8 @@ namespace GridKit enum class GensalSignalOutputs : size_t { speed, ///< \f$\omega\f$ Unique ID of the signal receiving speed deviation + ir, ///< \f$I_r\f$ Real terminal current + ii, ///< \f$I_i\f$ Imaginary terminal current }; /// Variables able to be monitored for a Gensal generator model diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalImpl.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalImpl.hpp index 8435bdb71..47070f5fe 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalImpl.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GENSAL/GensalImpl.hpp @@ -217,6 +217,15 @@ namespace GridKit speed_port.link(&y_.getData()[1], &(this->getVariableIndex(1))); } + if (auto ir_port = ports_.out.template port()) + { + ir_port.link(&y_.getData()[12], &(this->getVariableIndex(12))); + } + if (auto ii_port = ports_.out.template port()) + { + ii_port.link(&y_.getData()[13], &(this->getVariableIndex(13))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalData.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalData.hpp index f6d76ccb0..54c433e9c 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalData.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalData.hpp @@ -41,6 +41,8 @@ namespace GridKit enum class GenClassicalSignalOutputs : size_t { speed, ///< \f$\omega\f$ Unique ID of the signal receiving speed deviation + ir, ///< \f$I_r\f$ Real terminal current + ii, ///< \f$I_i\f$ Imaginary terminal current }; /// Variables able to be monitored for a classical generator model diff --git a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalImpl.hpp b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalImpl.hpp index 0c3b12cf1..a8f66ae06 100644 --- a/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalImpl.hpp +++ b/GridKit/Model/PhasorDynamics/SynchronousMachine/GenClassical/GenClassicalImpl.hpp @@ -158,6 +158,15 @@ namespace GridKit speed_port.link(&y_.getData()[1], &(this->getVariableIndex(1))); } + if (auto ir_port = ports_.out.template port()) + { + ir_port.link(&y_.getData()[3], &(this->getVariableIndex(3))); + } + if (auto ii_port = ports_.out.template port()) + { + ii_port.link(&y_.getData()[4], &(this->getVariableIndex(4))); + } + allocated_ = true; return 0; } diff --git a/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp b/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp index 598f1d23d..79bf547d7 100644 --- a/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp +++ b/GridKit/Model/PhasorDynamics/SystemModelImpl.hpp @@ -123,6 +123,7 @@ namespace GridKit bus_index = loaddata.buses.at(LoadZBuses::bus); } auto* load = new LoadZ(getBus(bus_index), loaddata); + load->getPorts().connect(loaddata, signal_nodes_); addComponent(load); } @@ -137,6 +138,7 @@ namespace GridKit } auto* loadzip = new LoadZIP(getBus(bus_index), loadzipdata); + loadzip->getPorts().connect(loadzipdata, signal_nodes_); addComponent(loadzip); } @@ -307,6 +309,7 @@ namespace GridKit bus_index = faultdata.buses.at(BusFaultBuses::bus); } auto* fault = new BusFault(getBus(bus_index), faultdata); + fault->getPorts().connect(faultdata, signal_nodes_); addFault(fault); } diff --git a/cases/PhasorDynamics/Hawaii/Hawaii.case.json b/cases/PhasorDynamics/Hawaii/Hawaii.case.json index 496e6faf0..6bb0fc9c1 100644 --- a/cases/PhasorDynamics/Hawaii/Hawaii.case.json +++ b/cases/PhasorDynamics/Hawaii/Hawaii.case.json @@ -3443,8 +3443,8 @@ "bus": 23, "ipcmd": 16, "iqcmd": 17, - "ibranchr": 18, - "ibranchi": 19, + "ir": 18, + "ii": 19, "pbranch": 20, "qbranch": 21 }, @@ -4306,8 +4306,8 @@ "bus": 23, "ipcmd": 51, "iqcmd": 52, - "ibranchr": 53, - "ibranchi": 54, + "ir": 53, + "ii": 54, "pbranch": 55, "qbranch": 56 }, @@ -4427,8 +4427,8 @@ "bus": 26, "ipcmd": 58, "iqcmd": 59, - "ibranchr": 60, - "ibranchi": 61, + "ir": 60, + "ii": 61, "pbranch": 62, "qbranch": 63 }, @@ -4548,8 +4548,8 @@ "bus": 26, "ipcmd": 65, "iqcmd": 66, - "ibranchr": 67, - "ibranchi": 68, + "ir": 67, + "ii": 68, "pbranch": 69, "qbranch": 70 }, @@ -4669,8 +4669,8 @@ "bus": 27, "ipcmd": 72, "iqcmd": 73, - "ibranchr": 74, - "ibranchi": 75, + "ir": 74, + "ii": 75, "pbranch": 76, "qbranch": 77 }, @@ -4790,8 +4790,8 @@ "bus": 27, "ipcmd": 79, "iqcmd": 80, - "ibranchr": 81, - "ibranchi": 82, + "ir": 81, + "ii": 82, "pbranch": 83, "qbranch": 84 }, @@ -4911,8 +4911,8 @@ "bus": 28, "ipcmd": 86, "iqcmd": 87, - "ibranchr": 88, - "ibranchi": 89, + "ir": 88, + "ii": 89, "pbranch": 90, "qbranch": 91 }, @@ -5032,8 +5032,8 @@ "bus": 28, "ipcmd": 93, "iqcmd": 94, - "ibranchr": 95, - "ibranchi": 96, + "ir": 95, + "ii": 96, "pbranch": 97, "qbranch": 98 }, @@ -5153,8 +5153,8 @@ "bus": 33, "ipcmd": 100, "iqcmd": 101, - "ibranchr": 102, - "ibranchi": 103, + "ir": 102, + "ii": 103, "pbranch": 104, "qbranch": 105 }, diff --git a/cases/PhasorDynamics/Hawaii/Hawaii.state.json b/cases/PhasorDynamics/Hawaii/Hawaii.state.json new file mode 100644 index 000000000..908c57a59 --- /dev/null +++ b/cases/PhasorDynamics/Hawaii/Hawaii.state.json @@ -0,0 +1,940 @@ +{ + "header": { + "version": 1, + "time": null, + "created": "2026-07-31T05:55:01-05:00", + "description": "Steady state solution at nominal dispatch" + }, + "buses": { + "bus_id_1": { + "vr": 0.9933554848330083, + "vi": -0.019418658335526237 + }, + "bus_id_2": { + "vr": 0.9888972890393228, + "vi": -0.06789088436732856 + }, + "bus_id_3": { + "vr": 0.9811930004560111, + "vi": -0.08120573241251416 + }, + "bus_id_4": { + "vr": 0.973882121818533, + "vi": -0.09799386875845349 + }, + "bus_id_5": { + "vr": 0.9883394508774866, + "vi": -0.035718999056302735 + }, + "bus_id_6": { + "vr": 0.9766427916739501, + "vi": -0.09452447564732258 + }, + "bus_id_7": { + "vr": 0.9757827875915684, + "vi": -0.09690307773461183 + }, + "bus_id_8": { + "vr": 0.9737759184819345, + "vi": -0.09723662816672486 + }, + "bus_id_9": { + "vr": 0.9857919157353446, + "vi": -0.043874258021844165 + }, + "bus_id_10": { + "vr": 0.9761721215093908, + "vi": -0.0966083630561868 + }, + "bus_id_11": { + "vr": 0.9686003345219932, + "vi": -0.11075118417485612 + }, + "bus_id_12": { + "vr": 0.9716135420181101, + "vi": -0.10552276091084352 + }, + "bus_id_13": { + "vr": 0.9734195116664179, + "vi": -0.10393945803713067 + }, + "bus_id_14": { + "vr": 0.9822907352895506, + "vi": -0.05382151209032174 + }, + "bus_id_15": { + "vr": 0.9732168267136281, + "vi": -0.10280037149327517 + }, + "bus_id_16": { + "vr": 0.9759580386148334, + "vi": -0.11043777731182759 + }, + "bus_id_17": { + "vr": 0.9682619523875232, + "vi": -0.11857720998414674 + }, + "bus_id_18": { + "vr": 0.9684321205816101, + "vi": -0.12098763685104205 + }, + "bus_id_19": { + "vr": 0.9894399665466365, + "vi": -0.060763253831496 + }, + "bus_id_20": { + "vr": 0.9890789809125838, + "vi": -0.03391634560838157 + }, + "bus_id_21": { + "vr": 0.9758027869300845, + "vi": -0.08997553646760098 + }, + "bus_id_22": { + "vr": 0.9962891675055405, + "vi": -0.014686502845308745 + }, + "bus_id_23": { + "vr": 0.9993245410953303, + "vi": -0.03674862670369486 + }, + "bus_id_24": { + "vr": 0.991323659034225, + "vi": -0.064225050960176 + }, + "bus_id_25": { + "vr": 0.9965716303889519, + "vi": -0.00919728361371664 + }, + "bus_id_26": { + "vr": 0.9931443749906678, + "vi": -0.06242880472410738 + }, + "bus_id_27": { + "vr": 1.0031325897695496, + "vi": 0.023862500418301104 + }, + "bus_id_28": { + "vr": 0.9999916562514691, + "vi": 0.0040850247788307755 + }, + "bus_id_29": { + "vr": 0.9953819154880136, + "vi": -0.001689904327326718 + }, + "bus_id_30": { + "vr": 0.9957712762493851, + "vi": -0.007340260721509001 + }, + "bus_id_31": { + "vr": 0.994545466811905, + "vi": -0.03649918854700933 + }, + "bus_id_32": { + "vr": 0.990953188522265, + "vi": -0.022853986350578673 + }, + "bus_id_33": { + "vr": 0.9942413119251227, + "vi": -0.052982437452907004 + }, + "bus_id_34": { + "vr": 0.9993384407366903, + "vi": -0.03636867973903476 + }, + "bus_id_35": { + "vr": 0.9999784225857238, + "vi": 0.006569198046003193 + }, + "bus_id_36": { + "vr": 0.9946436699675367, + "vi": -0.06197191489110113 + }, + "bus_id_37": { + "vr": 0.9999903715081334, + "vi": 0.004388267428635608 + } + }, + "devices": { + "BR_1_2_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_2_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_2_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_5_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_5_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_22_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_25_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_25_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_35_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_1_35_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_4_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_6_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_6_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_7_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_21_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_23_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_23_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_23_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_26_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_2_26_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_6_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_6_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_16_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_19_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_19_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_19_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_3_21_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_4_13_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_5_6_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_5_9_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_5_14_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_6_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_6_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_6_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_6_11_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_6_12_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_6_12_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_10_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_13_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_13_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_7_13_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_8_15_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_8_19_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_8_19_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_9_10_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_9_14_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_11_13_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_11_15_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_12_15_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_12_17_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_13_16_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_14_15_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_14_15_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_16_18_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_17_18_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_19_23_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_19_23_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_19_23_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_19_23_4": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_20_23_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_20_30_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_20_32_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_22_23_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_22_23_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_22_23_3": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_22_25_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_22_37_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_23_34_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_23_34_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_24_26_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_24_26_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_24_33_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_24_36_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_26_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_26_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_35_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_35_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_37_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_25_37_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_27_29_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_28_30_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_28_30_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_28_31_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_29_30_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_29_32_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_31_33_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_33_34_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_33_34_2": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "BR_35_37_1": { + "open": false, + "tap": 1.0, + "phase": 0.0 + }, + "load_2_1": { + "online": true, + "ir": -0.610935511520733, + "ii": 0.04194262905588723 + }, + "load_3_1": { + "online": true, + "ir": -0.6011658543315694, + "ii": 0.04975383383259113 + }, + "load_4_1": { + "online": true, + "ir": -0.22841344669983002, + "ii": 0.022983394824799833 + }, + "load_6_1": { + "online": true, + "ir": -0.27855793049688427, + "ii": 0.02696025869652013 + }, + "load_7_1": { + "online": true, + "ir": -0.37558120779428406, + "ii": 0.03729823423548919 + }, + "load_8_1": { + "online": true, + "ir": -0.6619314869082514, + "ii": 0.06609732757068487 + }, + "load_10_1": { + "online": true, + "ir": -0.3830651605923962, + "ii": 0.03791062794485951 + }, + "load_11_1": { + "online": true, + "ir": -0.6680160861395832, + "ii": 0.07638193995082874 + }, + "load_12_1": { + "online": true, + "ir": -0.5493991554963695, + "ii": 0.059667875367037805 + }, + "load_13_1": { + "online": true, + "ir": -0.6017158246368266, + "ii": 0.06424980797647038 + }, + "load_15_1": { + "online": true, + "ir": -0.6188549363276505, + "ii": 0.06536931504745712 + }, + "load_16_1": { + "online": true, + "ir": -0.24108330424197516, + "ii": 0.027280582990292273 + }, + "load_17_1": { + "online": true, + "ir": -0.12250918964151708, + "ii": 0.015002962647958957 + }, + "load_18_1": { + "online": true, + "ir": -0.36927559597500104, + "ii": 0.04613413862908995 + }, + "load_19_1": { + "online": true, + "ir": -0.489341447375825, + "ii": 0.030051321537927195 + }, + "load_20_1": { + "online": true, + "ir": -0.6559002868917456, + "ii": 0.02249136949036346 + }, + "load_21_1": { + "online": true, + "ir": -0.4912106628473196, + "ii": 0.04529290498066607 + }, + "load_23_1": { + "online": true, + "ir": -0.8669140465953358, + "ii": 0.0318794339300454 + }, + "load_24_1": { + "online": true, + "ir": -0.4679127922507071, + "ii": 0.03031474398230052 + }, + "load_26_1": { + "online": true, + "ir": -0.7550132079246857, + "ii": 0.04745993967100201 + }, + "load_27_1": { + "online": true, + "ir": -0.03935438151680202, + "ii": -0.0009361613359829214 + }, + "load_28_1": { + "online": true, + "ir": -0.08819926698135536, + "ii": -0.0003602991973394461 + }, + "load_29_1": { + "online": true, + "ir": -0.07735701891162759, + "ii": 0.00013133246543238852 + }, + "load_30_1": { + "online": true, + "ir": -0.4923553941670744, + "ii": 0.0036293645408612377 + }, + "load_31_1": { + "online": true, + "ir": -0.09659749899477392, + "ii": 0.00354506701466531 + }, + "load_32_1": { + "online": true, + "ir": -0.06727314621078469, + "ii": 0.0015514956539515819 + }, + "load_33_1": { + "online": true, + "ir": -0.5839139476638373, + "ii": 0.031116373700139695 + }, + "shunt_16_1": { + "online": true, + "ir": -0.035340087382711834, + "ii": -0.31230656036405424 + }, + "2_1": { + "online": true, + "ir": 0.0246093033740539, + "ii": -0.009779324786220393 + }, + "2_2": { + "online": true, + "ir": 0.0246093033740539, + "ii": -0.009779324786220393 + }, + "2_3": { + "online": true, + "ir": 0.0246093033740539, + "ii": -0.009779324786220393 + }, + "2_4": { + "online": true, + "ir": 0.0246093033740539, + "ii": -0.009779324786220393 + }, + "23_1": { + "online": true, + "ir": 0.6922632928921334, + "ii": -0.025898018478358098 + }, + "23_10": { + "online": true, + "ir": 0.3910188615598424, + "ii": -0.014820216724922371 + }, + "23_2": { + "online": true, + "ir": 0.6922632928921334, + "ii": -0.025898018478358098 + }, + "23_3": { + "online": true, + "ir": 0.47603570286263375, + "ii": -0.017946580619817964 + }, + "23_4": { + "online": true, + "ir": 0.470761902006154, + "ii": -0.017752644685079505 + }, + "23_5": { + "online": true, + "ir": 0.4450148693235363, + "ii": -0.016805837062658584 + }, + "23_6": { + "online": true, + "ir": 0.4450148693235363, + "ii": -0.016805837062658584 + }, + "23_7": { + "online": true, + "ir": 0.4358328407985501, + "ii": -0.016468182051927484 + }, + "23_8": { + "online": true, + "ir": 0.4315732129468594, + "ii": -0.016311540773362596 + }, + "23_9": { + "online": true, + "ir": 0.12521726396835825, + "ii": -0.005045770801249846 + }, + "26_1": { + "online": true, + "ir": 0.19680532669027573, + "ii": -0.07278530879187695 + }, + "26_2": { + "online": true, + "ir": 0.1003454953399798, + "ii": -0.03752168342480275 + }, + "27_1": { + "online": true, + "ir": 0.2976142195999607, + "ii": 0.06091101162781821 + }, + "27_2": { + "online": true, + "ir": 0.2737974801722077, + "ii": 0.056356949980188135 + }, + "28_1": { + "online": true, + "ir": 0.46277188213007686, + "ii": 0.05675838818316554 + }, + "28_2": { + "online": true, + "ir": 0.6897701053981816, + "ii": 0.057685689287133524 + }, + "33_1": { + "online": true, + "ir": 0.27237648426962385, + "ii": -0.09799549231444098 + }, + "34_1": { + "online": true, + "ir": 0.07250953231222808, + "ii": 0.007191975659428376 + }, + "34_2": { + "online": true, + "ir": 0.060717340110608954, + "ii": 0.007621126029432835 + }, + "34_3": { + "online": true, + "ir": 0.060717340110608954, + "ii": 0.007621126029432835 + }, + "34_4": { + "online": true, + "ir": 0.060717340110608954, + "ii": 0.007621126029432835 + }, + "34_5": { + "online": true, + "ir": 0.06040754519398059, + "ii": 0.0076324003201519355 + }, + "34_6": { + "online": true, + "ir": 0.07250953231222808, + "ii": 0.007191975659428376 + }, + "35_1": { + "online": true, + "ir": 0.5799909492808284, + "ii": 0.0032802670903971007 + }, + "35_2": { + "online": true, + "ir": 0.2799974404047251, + "ii": 0.0013095077941847884 + }, + "35_4": { + "online": true, + "ir": 0.19999916839782836, + "ii": 0.0007839719623290897 + }, + "35_5": { + "online": true, + "ir": 0.6699890407128228, + "ii": 0.0038714951339486026 + }, + "35_7": { + "online": true, + "ir": 0.4999926921736102, + "ii": 0.002754731356422453 + }, + "35_8": { + "online": true, + "ir": 0.56199133097443, + "ii": 0.0031620214815554167 + }, + "36_1": { + "online": true, + "ir": 0.019405957595724232, + "ii": -0.011262952241849757 + }, + "36_2": { + "online": true, + "ir": 0.02041747063915526, + "ii": -0.011325975213926575 + }, + "36_3": { + "online": true, + "ir": 0.019405957595724232, + "ii": -0.011262952241849757 + }, + "36_4": { + "online": true, + "ir": 0.02421314606711172, + "ii": -0.011562467217724517 + }, + "37_3": { + "online": true, + "ir": 0.58348337645191, + "ii": -0.053697727132094704 + }, + "37_5": { + "online": true, + "ir": 0.6850403090023958, + "ii": -0.05325206386176609 + } + } +} diff --git a/cases/PhasorDynamics/WECC240/WECC240.case.json b/cases/PhasorDynamics/WECC240/WECC240.case.json index 2261513e7..79b2e92dd 100644 --- a/cases/PhasorDynamics/WECC240/WECC240.case.json +++ b/cases/PhasorDynamics/WECC240/WECC240.case.json @@ -15533,8 +15533,8 @@ "bus": 1032, "ipcmd": 6, "iqcmd": 7, - "ibranchr": 8, - "ibranchi": 9, + "ir": 8, + "ii": 9, "pbranch": 10, "qbranch": 11 }, @@ -15794,8 +15794,8 @@ "bus": 1034, "ipcmd": 20, "iqcmd": 21, - "ibranchr": 22, - "ibranchi": 23, + "ir": 22, + "ii": 23, "pbranch": 24, "qbranch": 25 }, @@ -16516,8 +16516,8 @@ "bus": 1333, "ipcmd": 53, "iqcmd": 54, - "ibranchr": 55, - "ibranchi": 56, + "ir": 55, + "ii": 56, "pbranch": 57, "qbranch": 58 }, @@ -16777,8 +16777,8 @@ "bus": 1431, "ipcmd": 67, "iqcmd": 68, - "ibranchr": 69, - "ibranchi": 70, + "ir": 69, + "ii": 70, "pbranch": 71, "qbranch": 72 }, @@ -17283,8 +17283,8 @@ "bus": 2130, "ipcmd": 91, "iqcmd": 92, - "ibranchr": 93, - "ibranchi": 94, + "ir": 93, + "ii": 94, "pbranch": 95, "qbranch": 96 }, @@ -17616,8 +17616,8 @@ "bus": 2332, "ipcmd": 108, "iqcmd": 109, - "ibranchr": 110, - "ibranchi": 111, + "ir": 110, + "ii": 111, "pbranch": 112, "qbranch": 113 }, @@ -17739,8 +17739,8 @@ "bus": 2431, "ipcmd": 116, "iqcmd": 117, - "ibranchr": 118, - "ibranchi": 119, + "ir": 118, + "ii": 119, "pbranch": 120, "qbranch": 121 }, @@ -17862,8 +17862,8 @@ "bus": 2434, "ipcmd": 124, "iqcmd": 125, - "ibranchr": 126, - "ibranchi": 127, + "ir": 126, + "ii": 127, "pbranch": 128, "qbranch": 129 }, @@ -18125,8 +18125,8 @@ "bus": 2438, "ipcmd": 138, "iqcmd": 139, - "ibranchr": 140, - "ibranchi": 141, + "ir": 140, + "ii": 141, "pbranch": 142, "qbranch": 143 }, @@ -18396,8 +18396,8 @@ "bus": 2438, "ipcmd": 152, "iqcmd": 153, - "ibranchr": 154, - "ibranchi": 155, + "ir": 154, + "ii": 155, "pbranch": 156, "qbranch": 157 }, @@ -18618,8 +18618,8 @@ "bus": 2439, "ipcmd": 164, "iqcmd": 165, - "ibranchr": 166, - "ibranchi": 167, + "ir": 166, + "ii": 167, "pbranch": 168, "qbranch": 169 }, @@ -18741,8 +18741,8 @@ "bus": 2533, "ipcmd": 172, "iqcmd": 173, - "ibranchr": 174, - "ibranchi": 175, + "ir": 174, + "ii": 175, "pbranch": 176, "qbranch": 177 }, @@ -18963,8 +18963,8 @@ "bus": 2631, "ipcmd": 184, "iqcmd": 185, - "ibranchr": 186, - "ibranchi": 187, + "ir": 186, + "ii": 187, "pbranch": 188, "qbranch": 189 }, @@ -19730,8 +19730,8 @@ "bus": 3234, "ipcmd": 219, "iqcmd": 220, - "ibranchr": 221, - "ibranchi": 222, + "ir": 221, + "ii": 222, "pbranch": 223, "qbranch": 224 }, @@ -20063,8 +20063,8 @@ "bus": 3433, "ipcmd": 236, "iqcmd": 237, - "ibranchr": 238, - "ibranchi": 239, + "ir": 238, + "ii": 239, "pbranch": 240, "qbranch": 241 }, @@ -20754,8 +20754,8 @@ "bus": 3835, "ipcmd": 268, "iqcmd": 269, - "ibranchr": 270, - "ibranchi": 271, + "ir": 270, + "ii": 271, "pbranch": 272, "qbranch": 273 }, @@ -21122,8 +21122,8 @@ "bus": 3932, "ipcmd": 286, "iqcmd": 287, - "ibranchr": 288, - "ibranchi": 289, + "ir": 288, + "ii": 289, "pbranch": 290, "qbranch": 291 }, @@ -21531,8 +21531,8 @@ "bus": 3933, "ipcmd": 306, "iqcmd": 307, - "ibranchr": 308, - "ibranchi": 309, + "ir": 308, + "ii": 309, "pbranch": 310, "qbranch": 311 }, @@ -21654,8 +21654,8 @@ "bus": 3933, "ipcmd": 314, "iqcmd": 315, - "ibranchr": 316, - "ibranchi": 317, + "ir": 316, + "ii": 317, "pbranch": 318, "qbranch": 319 }, @@ -21925,8 +21925,8 @@ "bus": 4031, "ipcmd": 328, "iqcmd": 329, - "ibranchr": 330, - "ibranchi": 331, + "ir": 330, + "ii": 331, "pbranch": 332, "qbranch": 333 }, @@ -22048,8 +22048,8 @@ "bus": 4031, "ipcmd": 336, "iqcmd": 337, - "ibranchr": 338, - "ibranchi": 339, + "ir": 338, + "ii": 339, "pbranch": 340, "qbranch": 341 }, @@ -22387,8 +22387,8 @@ "bus": 4035, "ipcmd": 353, "iqcmd": 354, - "ibranchr": 355, - "ibranchi": 356, + "ir": 355, + "ii": 356, "pbranch": 357, "qbranch": 358 }, @@ -22658,8 +22658,8 @@ "bus": 4039, "ipcmd": 367, "iqcmd": 368, - "ibranchr": 369, - "ibranchi": 370, + "ir": 369, + "ii": 370, "pbranch": 371, "qbranch": 372 }, @@ -22956,8 +22956,8 @@ "bus": 4131, "ipcmd": 382, "iqcmd": 383, - "ibranchr": 384, - "ibranchi": 385, + "ir": 384, + "ii": 385, "pbranch": 386, "qbranch": 387 }, @@ -23295,8 +23295,8 @@ "bus": 4132, "ipcmd": 399, "iqcmd": 400, - "ibranchr": 401, - "ibranchi": 402, + "ir": 401, + "ii": 402, "pbranch": 403, "qbranch": 404 }, @@ -23782,8 +23782,8 @@ "bus": 4232, "ipcmd": 422, "iqcmd": 423, - "ibranchr": 424, - "ibranchi": 425, + "ir": 424, + "ii": 425, "pbranch": 426, "qbranch": 427 }, @@ -24259,8 +24259,8 @@ "bus": 5032, "ipcmd": 445, "iqcmd": 446, - "ibranchr": 447, - "ibranchi": 448, + "ir": 447, + "ii": 448, "pbranch": 449, "qbranch": 450 }, @@ -24382,8 +24382,8 @@ "bus": 5032, "ipcmd": 453, "iqcmd": 454, - "ibranchr": 455, - "ibranchi": 456, + "ir": 455, + "ii": 456, "pbranch": 457, "qbranch": 458 }, @@ -24721,8 +24721,8 @@ "bus": 6132, "ipcmd": 470, "iqcmd": 471, - "ibranchr": 472, - "ibranchi": 473, + "ir": 472, + "ii": 473, "pbranch": 474, "qbranch": 475 }, @@ -24844,8 +24844,8 @@ "bus": 6132, "ipcmd": 478, "iqcmd": 479, - "ibranchr": 480, - "ibranchi": 481, + "ir": 480, + "ii": 481, "pbranch": 482, "qbranch": 483 }, @@ -25282,8 +25282,8 @@ "bus": 6235, "ipcmd": 499, "iqcmd": 500, - "ibranchr": 501, - "ibranchi": 502, + "ir": 501, + "ii": 502, "pbranch": 503, "qbranch": 504 }, @@ -25473,8 +25473,8 @@ "bus": 6333, "ipcmd": 510, "iqcmd": 511, - "ibranchr": 512, - "ibranchi": 513, + "ir": 512, + "ii": 513, "pbranch": 514, "qbranch": 515 }, @@ -26018,8 +26018,8 @@ "bus": 6433, "ipcmd": 536, "iqcmd": 537, - "ibranchr": 538, - "ibranchi": 539, + "ir": 538, + "ii": 539, "pbranch": 540, "qbranch": 541 }, @@ -26386,8 +26386,8 @@ "bus": 6533, "ipcmd": 554, "iqcmd": 555, - "ibranchr": 556, - "ibranchi": 557, + "ir": 556, + "ii": 557, "pbranch": 558, "qbranch": 559 }, @@ -26509,8 +26509,8 @@ "bus": 6533, "ipcmd": 562, "iqcmd": 563, - "ibranchr": 564, - "ibranchi": 565, + "ir": 564, + "ii": 565, "pbranch": 566, "qbranch": 567 }, @@ -26867,8 +26867,8 @@ "bus": 7031, "ipcmd": 580, "iqcmd": 581, - "ibranchr": 582, - "ibranchi": 583, + "ir": 582, + "ii": 583, "pbranch": 584, "qbranch": 585 }, @@ -27206,8 +27206,8 @@ "bus": 7032, "ipcmd": 597, "iqcmd": 598, - "ibranchr": 599, - "ibranchi": 600, + "ir": 599, + "ii": 600, "pbranch": 601, "qbranch": 602 }, diff --git a/tests/IntegrationTests/PhasorDynamics/PDIntegrationTests.hpp b/tests/IntegrationTests/PhasorDynamics/PDIntegrationTests.hpp index a227299ee..3c7df1a36 100644 --- a/tests/IntegrationTests/PhasorDynamics/PDIntegrationTests.hpp +++ b/tests/IntegrationTests/PhasorDynamics/PDIntegrationTests.hpp @@ -736,8 +736,8 @@ namespace GridKit { IPCMD, IQCMD, - IBRANCHR, - IBRANCHI, + IR, + II, PBRANCH, QBRANCH, QEXT, @@ -783,37 +783,37 @@ namespace GridKit data.signal = {{"Active Current Command", signalId(LoopSignal::IPCMD)}, {"Reactive Current Command", signalId(LoopSignal::IQCMD)}, - {"Branch Current Real", signalId(LoopSignal::IBRANCHR)}, - {"Branch Current Imaginary", signalId(LoopSignal::IBRANCHI)}, + {"Branch Current Real", signalId(LoopSignal::IR)}, + {"Branch Current Imaginary", signalId(LoopSignal::II)}, {"Branch Active Power", signalId(LoopSignal::PBRANCH)}, {"Branch Reactive Power", signalId(LoopSignal::QBRANCH)}, {"Reactive Power Command", signalId(LoopSignal::QEXT)}, {"Active Power Command", signalId(LoopSignal::PEXT)}, {"Plant Active Power Reference", signalId(LoopSignal::PLANT_PREF)}}; - auto& converter = data.regca.emplace_back(); - converter.buses[RegcaBuses::bus] = RENEWABLE_BUS_ID; - converter.signal_inputs[RegcaSignalInputs::ipcmd] = signalId(LoopSignal::IPCMD); - converter.signal_inputs[RegcaSignalInputs::iqcmd] = signalId(LoopSignal::IQCMD); - converter.signal_outputs[RegcaSignalOutputs::ibranchr] = signalId(LoopSignal::IBRANCHR); - converter.signal_outputs[RegcaSignalOutputs::ibranchi] = signalId(LoopSignal::IBRANCHI); - converter.signal_outputs[RegcaSignalOutputs::pbranch] = signalId(LoopSignal::PBRANCH); - converter.signal_outputs[RegcaSignalOutputs::qbranch] = signalId(LoopSignal::QBRANCH); - converter.parameters[RegcaParameters::p0] = INITIAL_ACTIVE_POWER; - converter.parameters[RegcaParameters::q0] = INITIAL_REACTIVE_POWER; - converter.parameters[RegcaParameters::mva] = COMPONENT_MVA; - converter.parameters[RegcaParameters::Tg] = FAST_TIME_CONSTANT; - converter.parameters[RegcaParameters::TM] = FAST_TIME_CONSTANT; - converter.parameters[RegcaParameters::Rqmax] = static_cast(999.0); - converter.parameters[RegcaParameters::Rqmin] = static_cast(-999.0); - converter.parameters[RegcaParameters::Rpmax] = static_cast(999.0); - converter.parameters[RegcaParameters::sL] = true; - converter.parameters[RegcaParameters::IL1] = static_cast(1.1); - converter.parameters[RegcaParameters::VL0] = static_cast(0.4); - converter.parameters[RegcaParameters::VL1] = static_cast(0.9); - converter.parameters[RegcaParameters::VA0] = static_cast(0.4); - converter.parameters[RegcaParameters::VA1] = static_cast(0.9); - converter.parameters[RegcaParameters::Vhvmax] = static_cast(1.2); + auto& converter = data.regca.emplace_back(); + converter.buses[RegcaBuses::bus] = RENEWABLE_BUS_ID; + converter.signal_inputs[RegcaSignalInputs::ipcmd] = signalId(LoopSignal::IPCMD); + converter.signal_inputs[RegcaSignalInputs::iqcmd] = signalId(LoopSignal::IQCMD); + converter.signal_outputs[RegcaSignalOutputs::ir] = signalId(LoopSignal::IR); + converter.signal_outputs[RegcaSignalOutputs::ii] = signalId(LoopSignal::II); + converter.signal_outputs[RegcaSignalOutputs::pbranch] = signalId(LoopSignal::PBRANCH); + converter.signal_outputs[RegcaSignalOutputs::qbranch] = signalId(LoopSignal::QBRANCH); + converter.parameters[RegcaParameters::p0] = INITIAL_ACTIVE_POWER; + converter.parameters[RegcaParameters::q0] = INITIAL_REACTIVE_POWER; + converter.parameters[RegcaParameters::mva] = COMPONENT_MVA; + converter.parameters[RegcaParameters::Tg] = FAST_TIME_CONSTANT; + converter.parameters[RegcaParameters::TM] = FAST_TIME_CONSTANT; + converter.parameters[RegcaParameters::Rqmax] = static_cast(999.0); + converter.parameters[RegcaParameters::Rqmin] = static_cast(-999.0); + converter.parameters[RegcaParameters::Rpmax] = static_cast(999.0); + converter.parameters[RegcaParameters::sL] = true; + converter.parameters[RegcaParameters::IL1] = static_cast(1.1); + converter.parameters[RegcaParameters::VL0] = static_cast(0.4); + converter.parameters[RegcaParameters::VL1] = static_cast(0.9); + converter.parameters[RegcaParameters::VA0] = static_cast(0.4); + converter.parameters[RegcaParameters::VA1] = static_cast(0.9); + converter.parameters[RegcaParameters::Vhvmax] = static_cast(1.2); auto& controller = data.reecb.emplace_back(); controller.buses[ReecbBuses::bus] = RENEWABLE_BUS_ID; @@ -832,8 +832,8 @@ namespace GridKit auto& plant = data.repca.emplace_back(); plant.buses[RepcaBuses::bus] = RENEWABLE_BUS_ID; - plant.signal_inputs[RepcaSignalInputs::ir] = signalId(LoopSignal::IBRANCHR); - plant.signal_inputs[RepcaSignalInputs::ii] = signalId(LoopSignal::IBRANCHI); + plant.signal_inputs[RepcaSignalInputs::ir] = signalId(LoopSignal::IR); + plant.signal_inputs[RepcaSignalInputs::ii] = signalId(LoopSignal::II); plant.signal_inputs[RepcaSignalInputs::p] = signalId(LoopSignal::PBRANCH); plant.signal_inputs[RepcaSignalInputs::q] = signalId(LoopSignal::QBRANCH); plant.signal_inputs[RepcaSignalInputs::pref] = signalId(LoopSignal::PLANT_PREF); diff --git a/tests/UnitTests/PhasorDynamics/ComponentConnectionTests.hpp b/tests/UnitTests/PhasorDynamics/ComponentConnectionTests.hpp index 5cdb8db8b..2dffbd45e 100644 --- a/tests/UnitTests/PhasorDynamics/ComponentConnectionTests.hpp +++ b/tests/UnitTests/PhasorDynamics/ComponentConnectionTests.hpp @@ -279,8 +279,8 @@ namespace GridKit PhasorDynamics::Converter::Regca converter(&bus, converter_data); PhasorDynamics::Controller::Repca plant(&bus, plant_data); - converter.getPorts().out.template port().connect(&ir); - converter.getPorts().out.template port().connect(&ii); + converter.getPorts().out.template port().connect(&ir); + converter.getPorts().out.template port().connect(&ii); converter.getPorts().out.template port().connect(&p); converter.getPorts().out.template port().connect(&q); plant.getPorts().in.template port().connect(&ir);