/
TestSolve8.mos
47 lines (44 loc) · 1.38 KB
/
TestSolve8.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
// name: TestSolve
// status: correct
//
// Checks that the backend knows how to solve certain expressions
//
loadString("
model ModelTestSolve8
Real x(start=0);
Real y(start=4);
Real z(start=10);
Real w;
equation
tan(x) = time;
tan(y) = time;
tan(z) = time;
w = atan(time);
end ModelTestSolve8;
"); getErrorString();
simulate(ModelTestSolve8, simflags="-lv LOG_NLS_V"); getErrorString();
val(x,0.5);
val(y,0.5);
val(z,0.5);
val(w,0.5);
// Result:
// true
// ""
// record SimulationResult
// resultFile = "ModelTestSolve8_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ModelTestSolve8', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = '-lv LOG_NLS_V'",
// messages = "LOG_NLS | info | initialize mixed system solvers
// | | | | | 0 mixed systems
// LOG_NLS | info | initialize non-linear system solvers
// | | | | | 0 non-linear systems
// LOG_NLS | info | update static data of non-linear system solvers
// LOG_NLS | info | free mixed system solvers
// LOG_NLS | info | free non-linear system solvers
// "
// end SimulationResult;
// ""
// 0.4636476090008061
// 3.605240262590599
// 9.888425569770185
// 0.4636476090008061
// endResult