Skip to content

Commit

Permalink
Add PlanarMechanics minimal reference files
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 7, 2015
1 parent 33ed58a commit 1cc7d08
Show file tree
Hide file tree
Showing 32 changed files with 20 additions and 27 deletions.
Binary file not shown.
Binary file added ReferenceFiles/PlanarMechanics/CounterSpin.mat.xz
Binary file not shown.
Binary file added ReferenceFiles/PlanarMechanics/CraneCrab.mat.xz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added ReferenceFiles/PlanarMechanics/Pendulum.mat.xz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.ControlledCraneCrab); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.ControlledCraneCrab_res.mat",
"ReferenceFiles/ControlledCraneCrab.mat","PlanarMechanicsForTesting.Examples.ControlledCraneCrab_diff.csv",0.01,0.0001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//ControlledCraneCrab.mat","PlanarMechanicsForTesting.Examples.ControlledCraneCrab_diff.csv",0.01,0.0001,
{"actuatedPrismatic.v", "actuatedPrismatic.s", "actuatedRevolute.phi", "actuatedRevolute.w"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.CounterSpin, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.CounterSpin_res.mat",
"ReferenceFiles/CounterSpin.mat","PlanarMechanicsForTesting.Examples.CounterSpin_diff.csv",0.01,0.0001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//CounterSpin.mat","PlanarMechanicsForTesting.Examples.CounterSpin_diff.csv",0.01,0.0001,
{"body.frame_a.x", "body.frame_a.y", "body.w"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.CraneCrab, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.CraneCrab_res.mat",
"ReferenceFiles/CraneCrab.mat","PlanarMechanicsForTesting.Examples.CraneCrab_diff.csv",0.01,0.002,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//CraneCrab.mat","PlanarMechanicsForTesting.Examples.CraneCrab_diff.csv",0.01,0.002,
{"prismatic.s", "revolute.phi", "revolute.w"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.DoublePendulum, tolerance=0.0001, stopTime=9.5); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.DoublePendulum_res.mat",
"ReferenceFiles/DoublePendulum.mat","PlanarMechanicsForTesting.Examples.DoublePendulum_diff.csv",0.01,0.4,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//DoublePendulum.mat","PlanarMechanicsForTesting.Examples.DoublePendulum_diff.csv",0.01,0.4,
{"revolute1.phi", "revolute.phi", "revolute.w", "revolute1.w"});
getErrorString();

Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.FreeBody); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.FreeBody_res.mat",
"ReferenceFiles/FreeBody.mat","PlanarMechanicsForTesting.Examples.FreeBody_diff.csv",0.01,0.00001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//FreeBody.mat","PlanarMechanicsForTesting.Examples.FreeBody_diff.csv",0.01,0.00001,
{"body.r[1]", "body.r[2]", "body.v[2]"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.InvertedCraneCrab, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.InvertedCraneCrab_res.mat",
"ReferenceFiles/InvertedCraneCrab.mat","PlanarMechanicsForTesting.Examples.InvertedCraneCrab_diff.csv",0.01,0.006,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//InvertedCraneCrab.mat","PlanarMechanicsForTesting.Examples.InvertedCraneCrab_diff.csv",0.01,0.006,
{"actuatedPrismatic.v", "actuatedPrismatic.s", "actuatedRevolute.phi", "actuatedRevolute.w", "force.f"});

// Result:
Expand Down
Expand Up @@ -16,7 +16,7 @@ setIndexReductionMethod("dynamicStateSelection");
simulate(PlanarMechanicsForTesting.Examples.KinematicLoop); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.KinematicLoop_res.mat",
"ReferenceFiles/KinematicLoop.mat","PlanarMechanicsForTesting.Examples.KinematicLoop_diff.csv",0.01,0.001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//KinematicLoop.mat","PlanarMechanicsForTesting.Examples.KinematicLoop_diff.csv",0.01,0.001,
{"actuatedPrismatic.s", "actuatedPrismatic.v", "revolute3.w", "revolute3.phi"});

// Result:
Expand Down
Expand Up @@ -16,7 +16,7 @@ setIndexReductionMethod("dynamicStateSelection");
simulate(PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_res.mat",
"ReferenceFiles/KinematicLoop.mat","PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_diff.csv",0.01,0.001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//KinematicLoop.mat","PlanarMechanicsForTesting.Examples.KinematicLoop_DynamicStateSelection_diff.csv",0.01,0.001,
{"actuatedPrismatic.s", "actuatedPrismatic.v", "revolute3.w", "revolute3.phi"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.Pendulum); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.Pendulum_res.mat",
"ReferenceFiles/Pendulum.mat","PlanarMechanicsForTesting.Examples.Pendulum_diff.csv",0.01,0.013,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//Pendulum.mat","PlanarMechanicsForTesting.Examples.Pendulum_diff.csv",0.01,0.013,
{"revolute.phi", "revolute.w", "revolute.z", "body.r[1]", "body.r[2]"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.PistonEngine); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.PistonEngine_res.mat",
"ReferenceFiles/PistonEngine.mat","PlanarMechanicsForTesting.Examples.PistonEngine_diff.csv",0.01,0.001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//PistonEngine.mat","PlanarMechanicsForTesting.Examples.PistonEngine_diff.csv",0.01,0.001,
{"prismatic.s", "prismatic.v", "revoluteDrive.w"});
getErrorString();

Expand Down
Expand Up @@ -16,7 +16,7 @@ setIndexReductionMethod("dynamicStateSelection");
simulate(PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection,stopTime=0.000001,steps=2); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_res.mat",
"ReferenceFiles/PistonEngine.mat","PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_diff.csv",0.01,0.001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//PistonEngine.mat","PlanarMechanicsForTesting.Examples.PistonEngine_DynamicStateSelection_diff.csv",0.01,0.001,
{"prismatic.s", "prismatic.v", "revoluteDrive.w"});

// Result:
Expand Down
Expand Up @@ -3,7 +3,7 @@
// 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
// Simulation Results
// Modelica Standard Library
//

Expand All @@ -14,10 +14,8 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.SimpleCarWithDifferentialGear_res.mat",
"ReferenceFiles/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"});
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
Expand Down
Expand Up @@ -3,7 +3,7 @@
// status: correct
// teardown_command: rm -rf _PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.* PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_* PlanarMechanicsForTesting.Examples.SingleTrackWithEngine PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.exe PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.cpp PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.makefile PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.libs PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.log PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.c PlanarMechanicsForTesting.Examples.SingleTrackWithEngine.o output.log
//
// Simulation Results
// Simulation Results
// Modelica Standard Library
//

Expand All @@ -14,13 +14,9 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.SingleTrackWithEngine); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_res.mat",
"ReferenceFiles/SingleTrackWithEngine.mat","PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_diff.csv",0.01,0.0002,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//SingleTrackWithEngine.mat","PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_diff.csv",0.01,0.0002,
{"revolute.phi", "revolute.w"});

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_res.mat",
"ReferenceFiles/SingleTrackWithEngine.mat","PlanarMechanicsForTesting.Examples.SingleTrackWithEngine_diff.csv",0.01,0.003,
{"bodyRear.frame_a.x", "bodyRear.frame_a.y"});

// Result:
// true
// ""
Expand All @@ -33,5 +29,4 @@ res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTestin
// end SimulationResult;
// ""
// {"Files Equal!"}
// {"Files Equal!"}
// endResult
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.TestDryFrictionWheel, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.TestDryFrictionWheel_res.mat",
"ReferenceFiles/TestDryFrictionWheel.mat","PlanarMechanicsForTesting.Examples.TestDryFrictionWheel_diff.csv",0.01,0.45,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//TestDryFrictionWheel.mat","PlanarMechanicsForTesting.Examples.TestDryFrictionWheel_diff.csv",0.01,0.45,
{"revolute.w", "prismatic.s", "dryFrictionWheelJoint.f_lat", "dryFrictionWheelJoint.f_long"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.TestIdealWheel); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.TestIdealWheel_res.mat",
"ReferenceFiles/TestIdealWheel.mat","PlanarMechanicsForTesting.Examples.TestIdealWheel_diff.csv",0.01,0.001,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//TestIdealWheel.mat","PlanarMechanicsForTesting.Examples.TestIdealWheel_diff.csv",0.01,0.001,
{"revolute.w", "revolute.phi", "prismatic.s", "body.frame_a.fx", "body.frame_a.fy"});

// Result:
Expand Down
Expand Up @@ -14,7 +14,7 @@ loadFile("PlanarMechanicsForTesting.mo"); getErrorString();
simulate(PlanarMechanicsForTesting.Examples.TestSlipBasedWheel, tolerance=0.0001); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.TestSlipBasedWheel_res.mat",
"ReferenceFiles/TestSlipBasedWheel.mat","PlanarMechanicsForTesting.Examples.TestSlipBasedWheel_diff.csv",0.01,0.34,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//TestSlipBasedWheel.mat","PlanarMechanicsForTesting.Examples.TestSlipBasedWheel_diff.csv",0.01,0.34,
{"revolute.w", "prismatic.s", "slipBasedWheelJoint.f_lat", "slipBasedWheelJoint.f_long"});

// Result:
Expand Down
Expand Up @@ -16,7 +16,7 @@ setIndexReductionMethod("dynamicStateSelection");
simulate(PlanarMechanicsForTesting.Examples.WheelBasedCranCrab); getErrorString();

res := OpenModelica.Scripting.compareSimulationResults("PlanarMechanicsForTesting.Examples.WheelBasedCranCrab_res.mat",
"ReferenceFiles/WheelBasedCranCrab.mat","PlanarMechanicsForTesting.Examples.WheelBasedCranCrab_diff.csv",0.01,0.035,
getEnvironmentVar("REFERENCEFILES")+"/PlanarMechanics//WheelBasedCranCrab.mat","PlanarMechanicsForTesting.Examples.WheelBasedCranCrab_diff.csv",0.01,0.035,
{"revolute.phi", "der(revolute.phi)", "idealRolling.w", "idealRolling.vx", "idealRolling.phi"});

// Result:
Expand Down

0 comments on commit 1cc7d08

Please sign in to comment.