Skip to content

Commit 28e2f05

Browse files
committed
Fixing the warnings for undefined vars for icon display
1 parent 6ed8d7d commit 28e2f05

6 files changed

Lines changed: 22 additions & 19 deletions

File tree

OpenIPSL/Electrical/ThreePhase/Buses/Bus_1Ph.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ equation
3636
fillPattern=FillPattern.Solid,
3737
extent={{-39.0262,-16.7966},{39.0262,16.7966}},
3838
fontName="Arial",
39-
textString=DynamicSelect("0.0", "%Va"),
39+
textString=DynamicSelect("0.0", String(V1, significantDigits=3)),
4040
lineColor={238,46,47}),Text(
4141
origin={0.9738,-140.937},
4242
fillPattern=FillPattern.Solid,
4343
extent={{-39.0262,-16.7966},{39.0262,16.7966}},
4444
fontName="Arial",
45-
textString=DynamicSelect("0.0", String(Vb, significantDigits=3)),
45+
textString=DynamicSelect("0.0", String(angle1, significantDigits=3)),
4646
lineColor={238,46,47})}),
4747
Documentation(info="<html>
4848
<p>This is a single-phase bus model.</p>

OpenIPSL/Electrical/ThreePhase/Buses/Bus_2Ph.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ equation
5252
fillPattern=FillPattern.Solid,
5353
extent={{-39.0262,-16.7966},{39.0262,16.7966}},
5454
fontName="Arial",
55-
textString=DynamicSelect("0.0", "%Va"),
55+
textString=DynamicSelect("0.0", String(V1, significantDigits=3)),
5656
lineColor={238,46,47}),Text(
5757
origin={0.9738,-140.937},
5858
fillPattern=FillPattern.Solid,
5959
extent={{-39.0262,-16.7966},{39.0262,16.7966}},
6060
fontName="Arial",
61-
textString=DynamicSelect("0.0", String(Vb, significantDigits=3)),
61+
textString=DynamicSelect("0.0", String(V2, significantDigits=3)),
6262
lineColor={238,46,47})}),
6363
Documentation(info="<html>
6464
<p>This is a two-phase bus model.</p>

OpenIPSL/Electrical/ThreePhase/Buses/InfiniteBus.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ model InfiniteBus "Three-phase infinite bus"
5050
Types.ReactivePower Qb "Reactive Power supplied by the Infinite bus (phase b)";
5151
Types.ActivePower Pc "Active Power supplied by the Infinite bus (phase c)";
5252
Types.ReactivePower Qc "Reactive Power supplied by the Infinite bus (phase c)";
53+
Types.ActivePower P = Pa + Pb + Pc "Active Power for icon display";
54+
Types.ReactivePower Q = Qa + Qb + Qc "Reactive Power for icon display";
55+
5356
equation
5457
// Equations for Phase A
5558
p1.vr = V_A*cos(angle_A);

OpenIPSL/Examples/IEEE9/Generation_Groups/Gen1.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ model Gen1 "18kV/100MVA generation unit connected to bus 2"
5353
annotation (Placement(transformation(extent={{-80,2},{-70,12}})));
5454
OpenIPSL.Interfaces.PwPin pwPin
5555
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
56-
//Real P_MW;
57-
//Real Q_MVA;
56+
Real P_MW "For icon display";
57+
Real Q_Mvar "For icon display";
5858
equation
59-
//P_MW = gen.P*S_b;
60-
// Q_MVA = gen.Q*S_b;
59+
P_MW = gen.P*S_b;
60+
Q_Mvar = gen.Q*S_b;
6161
connect(gen.v, AVR.v) annotation (Line(
6262
points={{39,17},{48,17},{48,-14},{-22,-14},{-22,4},{-18,4}},
6363
color={0,0,127},
@@ -98,7 +98,7 @@ equation
9898
lineColor={0,255,0},
9999
fillColor={0,0,255},
100100
fillPattern=FillPattern.Solid,
101-
textString=DynamicSelect("0.0", String(Q_MVA, significantDigits=3)))}),
101+
textString=DynamicSelect("0.0", String(Q_Mvar, significantDigits=3)))}),
102102
Documentation(info="<html>
103103
<p>18kV/100MVA Generation unit, identified as number 1, connected to bus 2, and composed of the following component models:</p>
104104
<ul>

OpenIPSL/Examples/IEEE9/Generation_Groups/Gen2.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ model Gen2 "13.8kV/100MVA generation unit connected to bus 3"
5353
annotation (Placement(transformation(extent={{-80,2},{-70,12}})));
5454
OpenIPSL.Interfaces.PwPin pwPin
5555
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
56-
//Real P_MW;
57-
//Real Q_MVA;
56+
Real P_MW "For icon display";
57+
Real Q_Mvar "For icon display";
5858
equation
59-
//P_MW = gen.P*S_b;
60-
//Q_MVA = gen.Q*S_b;
59+
P_MW = gen.P*S_b;
60+
Q_Mvar = gen.Q*S_b;
6161
connect(gen.v, AVR.v) annotation (Line(
6262
points={{39,17},{48,17},{48,-14},{-22,-14},{-22,4},{-18,4}},
6363
color={0,0,127},
@@ -98,7 +98,7 @@ equation
9898
lineColor={0,255,0},
9999
fillColor={0,0,255},
100100
fillPattern=FillPattern.Solid,
101-
textString=DynamicSelect("0.0", String(Q_MVA, significantDigits=3)))}),
101+
textString=DynamicSelect("0.0", String(Q_Mvar, significantDigits=3)))}),
102102
Documentation(info="<html>
103103
<p>13.8kV/100MVA Generation unit, identified as number 2, connected to bus 3, and composed of the following component models:</p>
104104
<ul>

OpenIPSL/Examples/IEEE9/Generation_Groups/Gen3.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ model Gen3 "16.5kV/100MVA generation unit connected to bus 1"
5252
annotation (Placement(transformation(extent={{-72,12},{-62,22}})));
5353
OpenIPSL.Interfaces.PwPin pwPin
5454
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
55-
//Real P_MW;
56-
//Real Q_MVA;
55+
Real P_MW "For icon display";
56+
Real Q_Mvar "For icon display";
5757
equation
58-
//P_MW = gen.P*S_b;
59-
//Q_MVA = gen.Q*S_b;
58+
P_MW = gen.P*S_b;
59+
Q_Mvar = gen.Q*S_b;
6060
connect(gen.v, AVR.v) annotation (Line(
6161
points={{39,17},{48,17},{48,-14},{-22,-14},{-22,4},{-18,4}},
6262
color={0,0,127},
@@ -97,7 +97,7 @@ equation
9797
lineColor={0,255,0},
9898
fillColor={0,0,255},
9999
fillPattern=FillPattern.Solid,
100-
textString=DynamicSelect("0.0", String(Q_MVA, significantDigits=3)))}),
100+
textString=DynamicSelect("0.0", String(Q_Mvar, significantDigits=3)))}),
101101
Documentation(info="<html>
102102
<p>16.5kV/100MVA Generation unit, identified as number 3, connected to bus 1, and composed of the following component models:</p>
103103
<ul>

0 commit comments

Comments
 (0)