/
testDAEp7.mos
81 lines (67 loc) · 3.16 KB
/
testDAEp7.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// name: testDAE.p7
// status: correct
// teardown_command: rm -f testDAE.p7* output.log
loadFile("./testDAEPackage.mo");
getErrorString();
simulate(testDAE.p7);
getErrorString();
val(x,0.0);
val(y,0.0);
val(x,1.0);
val(y,1.0);
setCommandLineOptions("+daeMode=dynamic");
simulate(testDAE.p7, simflags="-daeMode", method="ida");
getErrorString();
val(x,0.0);
val(y,0.0);
val(x,1.0);
val(y,1.0);
setCommandLineOptions("+daeMode=all");
simulate(testDAE.p7, simflags="-daeMode", method="ida");
getErrorString();
val(x,0.0);
val(y,0.0);
val(x,1.0);
val(y,1.0);
// Result:
// true
// ""
// record SimulationResult
// resultFile = "testDAE.p7_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'testDAE.p7', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// 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").
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// 0.9
// 0.0
// 2.391669920617771
// 0.4103029387651521
// true
// record SimulationResult
// resultFile = "testDAE.p7_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'ida', fileNamePrefix = 'testDAE.p7', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-daeMode'",
// messages = ""
// 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").
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// 0.9
// 0.0
// 2.391665238603284
// 0.4103115806759719
// true
// record SimulationResult
// resultFile = "testDAE.p7_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'ida', fileNamePrefix = 'testDAE.p7', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-daeMode'",
// messages = ""
// 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").
// Warning: There are iteration variables with default zero start attribute. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization").
// "
// 0.9
// 0.0
// 2.391659403667771
// 0.4103081681124501
// endResult