Skip to content

Commit 7ba327c

Browse files
committed
Update RunAndCompare.mo
The function was updated to fix the path to the models and the first diagram.
1 parent 47110b5 commit 7ba327c

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

OpenIPSL/Examples/Tutorial/Example_4/Experiments/RunAndCompare.mo

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,27 @@ function RunAndCompare
1010
input Real fixedstepsizein= 1e-3 "Time step - needed only for fixed time step solvers";
1111

1212
// MODELS TO SIMULATE
13-
input String modelA="SMIB.Experiments.SMIB";
14-
input String modelB="SMIB.Experiments.SMIB_VarLoad";
13+
input String modelA="OpenIPSL.Examples.Tutorial.Example_4.Experiments.SMIB";
14+
input String modelB="OpenIPSL.Examples.Tutorial.Example_4.Experiments.SMIBVarLoad";
1515

1616
algorithm
1717
removePlots(true);
1818
//Advanced.FilesToKeep :=10 annotation(__Dymola_interactive=true);
19-
createPlot(id=1, position={15, 15, 678, 703}, y={"B01.V"},
19+
simulateModel(
20+
modelA,
21+
stopTime=tsim,
22+
numberOfIntervals=numberOfIntervalsin,
23+
method = methodin,
24+
fixedstepsize=fixedstepsizein,
25+
resultFile="res_casea");
26+
simulateModel(
27+
modelB,
28+
stopTime=tsim,
29+
numberOfIntervals=numberOfIntervalsin,
30+
method = methodin,
31+
fixedstepsize=fixedstepsizein,
32+
resultFile="res_caseb");
33+
createPlot(id=1, position={15, 15, 678, 703}, y={"B01.v"},
2034
range={0.0, 10.0, 0.4, 1.4}, grid=true, filename="res_casea.mat",
2135
colors={{28,108,200}}, displayUnits={"1"});
2236
createPlot(id=1, position={15, 15, 678, 703}, y={"genunit.P"},
@@ -25,7 +39,7 @@ algorithm
2539
createPlot(id=1, position={15, 15, 678, 703}, y={"genunit.Q"},
2640
range={0.0, 10.0, -0.5, 2.0}, grid=true, subPlot=103,
2741
colors={{28,108,200}}, displayUnits={"1"});
28-
createPlot(id=1, position={15, 15, 678, 703}, y={"B01.V"},
42+
createPlot(id=1, position={15, 15, 678, 703}, y={"B01.v"},
2943
range={0.0, 10.0, 0.4, 1.4}, erase=false, grid=true,
3044
filename="res_caseb.mat", colors={{238,46,47}}, displayUnits={"1"},
3145
axes={2});

0 commit comments

Comments
 (0)