-
Notifications
You must be signed in to change notification settings - Fork 298
/
problem1-symSolverExpSsc.mos
63 lines (59 loc) · 1.78 KB
/
problem1-symSolverExpSsc.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// name: problem1-symSolverExpSsc
// status: correct
// teardown_command: rm -f testSolver.problem1* output.log
loadFile("testSolverPackage.mo"); getErrorString();
setCommandLineOptions("--symSolver=expEuler"); getErrorString();
simulate(testSolver.problem1, stopTime=2e-6, numberOfIntervals=1000, method="symSolverSsc", simflags =""); getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("testSolver.problem1_res.mat",
getEnvironmentVar("REFERENCEFILES")+"/solver/testSolver.problem1.mat",
"testSolver.problem1_diff.csv",0.01,0.0001,
{
"u[1]",
"u[5]",
"u[15]",
"u[20]",
"u[25]",
"u[30]",
"u[35]",
"u[40]",
"u[45]",
"u[50]",
"u[55]",
"u[60]",
"u[65]",
"u[70]",
"u[75]",
"u[80]",
"u[85]",
"u[90]",
"u[95]",
"u[100]",
"u[105]",
"u[115]",
"u[120]",
"u[125]",
"u[130]",
"u[135]",
"u[140]",
"u[145]",
"u[150]"
});
getErrorString();
// Result:
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "testSolver.problem1_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 2e-06, numberOfIntervals = 1000, tolerance = 1e-06, method = 'symSolverSsc', fileNamePrefix = 'testSolver.problem1', 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!"}
// "Warning: 'compareSimulationResults' is deprecated. It is recommended to use 'diffSimulationResults' instead.
// "
// endResult