-
Notifications
You must be signed in to change notification settings - Fork 298
/
DrModelicaForTesting.WhenSet.mos
36 lines (30 loc) · 1.79 KB
/
DrModelicaForTesting.WhenSet.mos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// name: DrModelicaForTesting.WhenSet.mos [simulation checking]
// keywords: simulation DrModelicaForTesting.WhenSet
// status: correct
// teardown_command: rm -rf _DrModelicaForTesting.WhenSet.* DrModelicaForTesting.WhenSet_* DrModelicaForTesting.WhenSet DrModelicaForTesting.WhenSet.exe DrModelicaForTesting.WhenSet.cpp DrModelicaForTesting.WhenSet.makefile DrModelicaForTesting.WhenSet.libs DrModelicaForTesting.WhenSet.log DrModelicaForTesting.WhenSet.c DrModelicaForTesting.WhenSet.o output.log
//
// Simulation Results
// Modelica Standard Library
//
loadModel(Modelica,{"3.1"}); getErrorString();
loadFile("DrModelicaForTesting.mo"); getErrorString();
simulate(DrModelicaForTesting.WhenSet, numberOfIntervals=200, stopTime=1.0); getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("DrModelicaForTesting.WhenSet_res.mat",
"ReferenceFiles/WhenSet_ref.mat","DrModelicaForTesting.WhenSet_diff.csv",0.01,0.013,
{"x","y1", "y2", "y3"});
// Result:
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "DrModelicaForTesting.WhenSet_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 200, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'DrModelicaForTesting.WhenSet', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
// LOG_SUCCESS | info | The simulation finished successfully.
// "
// end SimulationResult;
// "Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions(\"-d=initialization\").
// "
// {"Files Equal!"}
// endResult