Skip to content

Commit

Permalink
Use the model testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 12, 2015
1 parent 0bb8a1f commit 4c1eca3
Show file tree
Hide file tree
Showing 31 changed files with 61 additions and 225 deletions.
Expand Up @@ -7,16 +7,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainPrismaticJoint);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"bodyOfJoint.v_0[2]","bodyOfJoint.v_0[3]","bodyOfJoint.body.frame_a.r_0[2]","bodyOfJoint.body.frame_a.r_0[3]","bodyOfConstraint.v_0[2]","bodyOfConstraint.v_0[3]","bodyOfConstraint.body.frame_a.r_0[2]","bodyOfConstraint.body.frame_a.r_0[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -7,16 +7,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainUniversalJoint);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"joint.phi_a","joint.phi_b","joint.w_a","joint.w_b","freeMotionScalarInit.R_rel.w[1]","freeMotionScalarInit.angle_3"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"revolute1.phi","revolute1.w","revolute2.phi","revolute2.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulumInitTip);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"revolute1.phi","revolute1.w","revolute2.phi","revolute2.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.ForceAndTorque);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"revolute2.phi","revolute2.w","revolute1.phi","revolute1.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.FreeBody);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body.v_0[1]","body.v_0[2]","body.v_0[3]","body.body.frame_a.r_0[1]","body.body.frame_a.r_0[2]","body.body.frame_a.r_0[3]","body.body.w_a[1]","body.body.w_a[2]","body.body.w_a[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.HeatLosses);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body1.frame_a.r_0[1]","body1.frame_a.r_0[2]","body1.frame_a.r_0[3]","body1.v_0[1]","body1.v_0[2]","body1.v_0[3]","body1.w_a[1]","body1.w_a[2]","body1.w_a[3]","body2.frame_a.r_0[1]","body2.frame_a.r_0[2]","body2.frame_a.r_0[3]","body2.v_0[1]","body2.v_0[2]","body2.v_0[3]","body2.w_a[1]","body2.w_a[2]","body2.w_a[3]","springDamperSeries.s_damper","body3.frame_a.r_0[1]","body3.frame_a.r_0[2]","body3.frame_a.r_0[3]","body3.v_0[1]","body3.v_0[2]","body3.v_0[3]","body3.w_a[1]","body3.w_a[2]","body3.w_a[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.InitSpringConstant);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"rev.phi","rev.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.LineForceWithTwoMasses);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"revolute1.phi","revolute1.w","revolute2.phi","revolute2.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.Pendulum);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"rev.phi","rev.w"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.PendulumWithSpringDamper);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"revolute.phi","revolute.w","prismatic.s","prismatic.v"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravity);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body2.frame_a.r_0[1]","body2.frame_a.r_0[2]","body2.frame_a.r_0[3]","body2.v_0[1]","body2.v_0[2]","body2.v_0[3]","body2.w_a[1]","body2.w_a[2]","body2.w_a[3]","body1.frame_a.r_0[1]","body1.frame_a.r_0[2]","body1.frame_a.r_0[3]","body1.v_0[1]","body1.v_0[2]","body1.v_0[3]","body1.w_a[1]","body1.w_a[2]","body1.w_a[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body1.r_0[1]","body1.r_0[2]","body1.r_0[3]","body1.v_0[1]","body1.v_0[2]","body1.v_0[3]","body2.r_0[1]","body2.r_0[2]","body2.r_0[3]","body2.v_0[1]","body2.v_0[2]","body2.v_0[3]","body3.r_0[1]","body3.r_0[2]","body3.r_0[3]","body3.v_0[1]","body3.v_0[2]","body3.v_0[3]","body4.r_0[1]","body4.r_0[2]","body4.r_0[3]","body4.v_0[1]","body4.v_0[2]","body4.v_0[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.Compilation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.PointGravityWithPointMasses2);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"referenceSystem.pointMass1.frame_a.r_0[1]","referenceSystem.pointMass1.frame_a.r_0[2]","referenceSystem.pointMass1.frame_a.r_0[3]","referenceSystem.pointMass1.v_0[1]","referenceSystem.pointMass1.v_0[2]","referenceSystem.pointMass1.v_0[3]","referenceSystem.pointMass6.w_a[1]","referenceSystem.pointMass6.w_a[2]","referenceSystem.pointMass6.w_a[3]","freeMotion.r_rel_a[1]","freeMotion.r_rel_a[2]","freeMotion.r_rel_a[3]","freeMotion.v_rel_a[1]","freeMotion.v_rel_a[2]","freeMotion.v_rel_a[3]","freeMotion.w_rel_b[1]","freeMotion.w_rel_b[2]","freeMotion.w_rel_b[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,14 +8,9 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheel);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"wheel1.x","wheel1.y","wheel1.angles[1]","wheel1.angles[2]","wheel1.angles[3]","wheel1.der_angles[1]","wheel1.der_angles[2]","wheel1.der_angles[3]"};
runScript("ModelTestingDefaults.mos");getErrorString();
getErrorString();
Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheelSetDriving);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"wheelSet.x","wheelSet.y","wheelSet.phi","wheelSet.theta1","wheelSet.theta2","wheelSet.der_theta1","wheelSet.der_theta2"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.RollingWheelSetPulling);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"wheelSet.x","wheelSet.y","wheelSet.phi","wheelSet.theta1","wheelSet.theta2","wheelSet.der_theta1","wheelSet.der_theta2"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.SpringDamperSystem);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body1.frame_a.r_0[1]","body1.frame_a.r_0[2]","body1.frame_a.r_0[3]","body1.v_0[1]","body1.v_0[2]","body1.v_0[3]","body1.w_a[1]","body1.w_a[2]","body1.w_a[3]","p2.s","p2.v"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,17 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
simulationRuntime := OpenModelicaModelTesting.SimulationRuntime.Cpp;
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.SpringMassSystem);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"p1.s","p1.v","p2.s","p2.v"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down
Expand Up @@ -8,16 +8,11 @@
// Modelica Standard Library
//

loadFile("../../../../simulation/libraries/common/ModelTesting.mo");
loadModel(Modelica,{"3.2.1"});
runScript("ModelTestingDefaults.mos");
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Mechanics.MultiBody.Examples.Elementary.SpringWithMass);
stopTime := 0.0; // For reading stopTime from annotation
relTol := 0.01;
absTol := 0.0001;
outputFormat :="mat";
compareVars := {"body.frame_a.r_0[1]","body.frame_a.r_0[2]","body.frame_a.r_0[3]","body.v_0[1]","body.v_0[2]","body.v_0[3]","body.w_a[1]","body.w_a[2]","body.w_a[3]"};
runScript("../../../../simulation/libraries/common/ModelTesting.mos");
runScript(modelTesting);
getErrorString();


Expand Down

0 comments on commit 4c1eca3

Please sign in to comment.