-
Notifications
You must be signed in to change notification settings - Fork 298
/
problem6-irksco.mos
42 lines (36 loc) · 1.4 KB
/
problem6-irksco.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
// name: problem6-irksco
// status: correct
// teardown_command: rm -f testSolver.problem6* output.log
loadFile("./testSolverPackage.mo");
getErrorString();
resfile := "testSolver.problem6_res.mat";
simulate(testSolver.problem6, stopTime=3.0, method="irksco"); getErrorString();
echo(false);
s:=readSimulationResultSize(resfile);
res:=readSimulationResult(resfile,{flying},s);
res2:=readSimulationResult(resfile,{n_bounce},s);
res3:=readSimulationResult(resfile,{h},s);
echo(true);
res[1,1];
res[1,s];
res2[1,s];
if res3[1,s] > -1e-2 then 1 else 0;
// Result:
// true
// ""
// "testSolver.problem6_res.mat"
// record SimulationResult
// resultFile = "testSolver.problem6_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 3.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'irksco', fileNamePrefix = 'testSolver.problem6', 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\").
// "
// true
// 1.0
// 0.0
// 15.0
// 1
// endResult