-
Notifications
You must be signed in to change notification settings - Fork 298
/
PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.mos
35 lines (31 loc) · 2.72 KB
/
PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.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
// name: PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.mos [simulation checking]
// keywords: simulation PlanarMechanicsForTesting.Examples
// status: correct
// teardown_command: rm -rf _PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.* PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear_* PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.exe PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.cpp PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.makefile PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.libs PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.log PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.c PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear.o output.log
//
// Simulation Results
// Modelica Standard Library
//
loadModel(Modelica,{"3.1"}); getErrorString();
loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
// adrpo: stopTime=6 is got from the experiment annotation in the model
simulate(PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear); getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear_res.mat",
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//SimpleCarWithDifferentialGear.mat","PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear_diff.csv",0.01,0.025,
{"body1.frame_a.phi", "actuatedRevolute.phi", "actuatedRevolute.w", "WheelJoint3.f_lat", "WheelJoint3.f_long", "body.v[1]", "body1.r[1]", "body1.r[2]", "body1.w", "body2.v[2]", "inertia.phi", "inertia.w", "inertia1.phi", "inertia1.w", "inertia2.phi", "inertia2.w", "inertia3.phi", "inertia3.w"});
// Result:
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear', 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!"}
// endResult