Skip to content

Commit 0ac5391

Browse files
Update example2
1 parent 1ad154c commit 0ac5391

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/PhasorDynamics/Example2/example2.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ int main()
114114
std::vector<double>& yval = sys.y();
115115

116116
output.push_back({.t = t,
117-
.gen2speed = 1 + yval[5],
118-
.gen3speed = 1 + yval[26],
119-
.v2mag = sqrt(yval[0] * yval[0] + yval[1] * yval[1]),
120-
.v3mag = sqrt(yval[2] * yval[2] + yval[3] * yval[3])});
117+
.gen2speed = 1 + gen2.y()[1],
118+
.gen3speed = 1 + gen3.y()[1],
119+
.v2mag = sqrt(bus2.Vr() * bus2.Vr() + bus2.Vi() * bus2.Vi()),
120+
.v3mag = sqrt(bus3.Vr() * bus3.Vr() + bus3.Vi() * bus3.Vi())});
121121
};
122122

123123
/* Set up simulation */

0 commit comments

Comments
 (0)