Skip to content

Commit 0deba64

Browse files
committed
- there is no array indexing applied to function calls in Modelica grammar!
1 parent 0ec829c commit 0deba64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PowerSystems/Generic.mo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ package Generic "Simple components for basic investigations"
544544
extends Modelica.Icons.SensorsPackage;
545545
model PMeter "measure power flow"
546546
extends Ports.PartialTwoTerminal;
547+
SI.Power P_arr[PhaseSystem.n];
547548
Modelica.Blocks.Interfaces.RealOutput P(quantity="Power",
548549
unit="W")
549550
"Active power flow from terminal_p to terminal_n"
@@ -553,7 +554,8 @@ package Generic "Simple components for basic investigations"
553554
extent={{10,-10},{-10,10}},
554555
rotation=270)));
555556
equation
556-
P = (PhaseSystem.phasePowers_vi(terminal_p.v, i))[1];
557+
P_arr = PhaseSystem.phasePowers_vi(terminal_p.v, i);
558+
P = P_arr[1];
557559
v = zeros(PhaseSystem.n);
558560
zeros(PhaseSystem.n) = terminal_p.i + terminal_n.i;
559561
if PhaseSystem.m > 0 then

0 commit comments

Comments
 (0)