-
Notifications
You must be signed in to change notification settings - Fork 298
/
TestSpace.mos
37 lines (32 loc) · 1.1 KB
/
TestSpace.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
// name: TestSpace.mos
// status: correct
// cflags: -d=initialization
loadString("model TestSpace
Real 'a x';
Real 'b_x';
equation
der('a x')=1;
der('b_x')=-1;
end TestSpace;");
getErrorString();
simulate(TestSpace);
getErrorString();
readSimulationResultVars("TestSpace_res.mat");
getErrorString();
// Result:
// true
// ""
// record SimulationResult
// resultFile = "TestSpace_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'TestSpace', 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: Assuming fixed start value for the following 2 variables:
// 'a x':VARIABLE(fixed = true ) type: Real
// 'b_x':VARIABLE(fixed = true ) type: Real
// "
// {"'a x'","'b_x'","der('a x')","der('b_x')","time"}
// ""
// endResult