-
Notifications
You must be signed in to change notification settings - Fork 298
/
functionTest4.mos
52 lines (50 loc) · 1.96 KB
/
functionTest4.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
// name: functionTest4
// keywords: evalConstFunc
// status: correct
//
loadFile("PartEvalFunc.mo"); getErrorString();
setDebugFlags("dumpeqninorder");getErrorString();
simulate(PartEvalFunc.functionTest4);getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("PartEvalFunc.functionTest4_res.mat",
"ReferenceFiles/functionTest4.mat",
"PartEvalFunc.functionTest4_diff.csv", 0.01, 0.0001,
{"a","b","c","d","r1.x","r1.y","r2.x","r2.y"});
getErrorString();
// Result:
// true
// ""
// true
// ""
//
// indxdae: eqns in order
// ========================================
// SingleEquation: 3
// 1: a:VARIABLE() type: Real
// 1/1 (1): a = time [dynamic |0|0|0|0|]
//
// SingleEquation: 4
// 1: r2.y:VARIABLE() type: Real
// 1/1 (1): r2.y = PartEvalFunc.recfunc_eval1(PartEvalFunc.record1(2.0, a), a) [unknown |0|0|0|0|]
//
// SingleEquation: 2
// 1: c:VARIABLE() type: Real
// 1/1 (1): c = r2.y + a [dynamic |0|0|0|0|]
//
// SingleEquation: 1
// 1: d:STATE(1,c)(fixed = true ) type: Real
// 1/1 (1): der(d) = c [dynamic |0|0|0|0|]
//
//
// record SimulationResult
// resultFile = "PartEvalFunc.functionTest4_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'PartEvalFunc.functionTest4', 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