-
Notifications
You must be signed in to change notification settings - Fork 298
/
PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.mos
39 lines (35 loc) · 2.74 KB
/
PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.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
// name: PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.mos [simulation checking]
// keywords: simulation PlanarMechanicsForTesting.Examples
// status: correct
// teardown_command: rm -rf _PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.* PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_* PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.exe PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.cpp PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.makefile PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.libs PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.log PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.c PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection.o output.log
//
// Simulation Results
// Modelica Standard Library
//
loadModel(Modelica,{"3.1"}); getErrorString();
loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
// adrpo: stopTime=3 is got from the experiment annotation in the model
simulate(PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection, tolerance=0.0001); getErrorString();
res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_res.mat",
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//KinematicLoop.mat","PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_diff.csv",0.01,0.001,
{"actuatedPrismatic.s", "actuatedPrismatic.v", "revolute3.w", "revolute3.phi"});
// Result:
// true
// ""
// true
// ""
// true
// true
// record SimulationResult
// resultFile = "PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 6.0, numberOfIntervals = 500, tolerance = 0.0001, method = 'dassl', fileNamePrefix = 'PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection', 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: There are nonlinear iteration variables with default zero start attribute found in NLSJac3. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions(\"-d=initialization\").
// "
// {"Files Equal!"}
// endResult