Skip to content

Commit a73c206

Browse files
committed
reference external resources according to Modelica standard
1 parent fc13902 commit a73c206

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

PowerSystems/Examples/PowerWorld/package.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
within PowerSystems.Examples;
22
package PowerWorld "Demonstrate stabilization of wind power in Eurosyslib work package 5.3"
33

4-
54
extends Modelica.Icons.ExamplesPackage;
65

6+
constant string PowerWorldResources = Modelica.Utilities.Files.loadResource("modelica://PowerSystems.Examples.PowerWorld/Resources/");
77

88
model PowerWorld "Interoperation of wind power and thermal power"
99
extends Modelica.Icons.Example;
@@ -618,7 +618,7 @@ The following switches/features are provided:
618618

619619
Modelica.Blocks.Sources.CombiTimeTable wind(
620620
tableName="tab",
621-
fileName="Examples/PowerWorld/Resources/LoadData.txt",
621+
fileName=PowerWorldResources + "LoadData.txt",
622622
tableOnFile=true,
623623
table=fill(
624624
0.0,
@@ -706,7 +706,7 @@ The following switches/features are provided:
706706

707707
Modelica.Blocks.Sources.CombiTimeTable data(
708708
tableName="tab",
709-
fileName="Examples/PowerWorld/Resources/LoadData.txt",
709+
fileName=PowerWorldResources + "LoadData.txt",
710710
tableOnFile=true,
711711
table=fill(
712712
0.0,
@@ -877,7 +877,7 @@ The following switches/features are provided:
877877
extends PowerSystems.Generic.Ports.PartialLoad;
878878
Modelica.Blocks.Sources.CombiTimeTable data(
879879
tableName="tab",
880-
fileName="Examples/PowerWorld/Resources/LoadData.txt",
880+
fileName=PowerWorldResources + "LoadData.txt",
881881
tableOnFile=true,
882882
table=fill(
883883
0.0,
@@ -1351,6 +1351,6 @@ The following switches/features are provided:
13511351
annotation (preferredView="info",Documentation(info="<html>
13521352
<p>The example demonstrates power/frequency control exploiting a thermal power plant and a pump store for the stabilization of fluctuating wind power.
13531353
The demonstrator developed for Eurosyslib WP5.3 complements the model with a 3D animation using DLR&apos;s SimVis software.</p>
1354-
<p><img src=\"modelica://PowerSystems/Examples/PowerWorld/Resources/PowerWorld.png\"/></p>
1354+
<p><img src=\"modelica://PowerSystems.Examples.PowerWorld/Resources/PowerWorld.png\"/></p>
13551355
</html>"));
13561356
end PowerWorld;

PowerSystems/package.mo

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ The following table summerizes the PhaseSystems that are predefined in the Power
7373
</html>",
7474
revisions="<html>
7575
<ul>
76+
<li><i>15 Aug 2014</i>
77+
by <a href=\"mailto:Ruediger.Franke@de.abb.com\">Ruediger Franke</a>:<br>
78+
Version 0.2.1
79+
<ul>
80+
<li>use Modelica.Utilities.Files.loadResource() instead of deprecated classDirectory()</li>
81+
<li>fix references to Connections package</li>
82+
</ul>
83+
</li>
7684
<li><i>18 Apr 2013</i>
7785
by <a href=\"mailto:Ruediger.Franke@de.abb.com\">Ruediger Franke</a>:<br>
7886
Version 0.2
@@ -119,25 +127,12 @@ The following table summerizes the PhaseSystems that are predefined in the Power
119127
PhaseSystems.ThreePhase_dq "Default phase system"
120128
annotation (choicesAllMatching=true);
121129

122-
123-
124-
125-
126-
127-
128-
129-
130-
131-
132-
133-
134-
constant String TableDir=classDirectory() + "Resources/Tables/"
130+
constant String TableDir=Modelica.Utilities.Files.loadResource("modelica://PowerSystems/Resources/Tables/")
135131
"Directory of example tables";
136132

137-
138133
annotation (preferedView="info",
139-
version="0.2",
140-
versionDate="2013-04-18",
134+
version="0.2.1",
135+
versionDate="2014-08-15",
141136
Documentation(info="<html>
142137
<h3><font color=\"#000080\" size=5>Modelica PowerSystems library</font></h3>
143138
<p>The library is intended to model electrical <b>power systems</b> at different <b>levels of detail</b> both in <b>transient</b> and <b>steady-state</b> mode.</p>
@@ -154,7 +149,7 @@ by funding of the IST Programme, Contract No. IST-1999-11979. </i></p>
154149
<p/>
155150
</html>
156151
"),
157-
uses(Modelica(version="3.2")),
152+
uses(Modelica(version="3.2.1")),
158153
Icon(graphics={
159154
Line(
160155
points={{-60,-16},{38,-16}},

0 commit comments

Comments
 (0)