Skip to content

Commit

Permalink
The OpenModelica testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 4, 2015
0 parents commit b190c2b
Show file tree
Hide file tree
Showing 6,742 changed files with 827,353 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added AVM/avm.xlsx
Binary file not shown.
17 changes: 17 additions & 0 deletions AVM/electrical/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CauerLowPassSC");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Electrical.Analog.Examples.CharacteristicThyristors");
exit();
@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.1"});
simulate(Modelica.Electrical.Analog.Examples.CauerLowPassSC, stopTime=1); getErrorString();
@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes);
getErrorString();
@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Electrical.Analog.Examples.CharacteristicThyristors);
getErrorString();
17 changes: 17 additions & 0 deletions AVM/fluid/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks");
exit();
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.DrumBoiler.DrumBoiler");
exit();
@@ -0,0 +1,2 @@
checkModel("Modelica.Fluid.Examples.Explanatory.MeasuringTemperature");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.DrumBoiler.DrumBoiler");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Fluid.Examples.Explanatory.MeasuringTemperature");
exit();
@@ -0,0 +1,8 @@
loadModel(Modelica,{"3.2.1"});

// adrpo: add missing stateGraphRoot inner class
addComponent(stateGraphRoot, StateGraph.StateGraphRoot, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
setComponentProperties(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, {false,false,false,false,false},{""},{true,false},{""}); getErrorString();
setComponentComment(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, "added to make the model complete"); getErrorString();

checkModel(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks); getErrorString();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2"});getErrorString();
checkModel(Modelica.Fluid.Examples.DrumBoiler.DrumBoiler);getErrorString();

@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.2.1"});
checkModel(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature); getErrorString();
@@ -0,0 +1,11 @@
loadModel(Modelica,{"3.2.1"});

// adrpo: add missing stateGraphRoot inner class
addComponent(stateGraphRoot, StateGraph.StateGraphRoot, Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
setComponentProperties(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, {false,false,false,false,false},{""},{true,false},{""}); getErrorString();
setComponentComment(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks, stateGraphRoot, "added to make the model complete"); getErrorString();

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks);
getErrorString();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2"});getErrorString();
simulate(Modelica.Fluid.Examples.DrumBoiler.DrumBoiler);getErrorString();

@@ -0,0 +1,6 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlusExt");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Fluid.Examples.Explanatory.MeasuringTemperature);
getErrorString();
17 changes: 17 additions & 0 deletions AVM/multibody/clean.cmd
@@ -0,0 +1,17 @@
@echo off
rem cleanup the mess
del *.exe 2> nul
del *.c 2> nul
del *.h 2> nul
del *.libs 2> nul
del *.makefile 2> nul
del *.mat 2> nul
del *.csv 2> nul
del *.o 2> nul
del *.log 2> nul
del *.xml 2> nul

rem cleanup dymola mess
del buildlog.txt 2> nul
del ds*.txt 2> nul
del dymosim.* 2> nul
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic");
exit();
@@ -0,0 +1,2 @@
simulateModel("Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot",stopTime=0.01);
exit();
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2.1"});
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a);

@@ -0,0 +1,2 @@
loadModel(Modelica,{"3.2.1"});
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic);
@@ -0,0 +1,5 @@
loadModel(Modelica,{"3.2.1"});

setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6, simflags="-iom kinsol", stopTime=0.1);
@@ -0,0 +1,4 @@
loadModel(Modelica,{"3.2.1"});
setMatchingAlgorithm("PFPlus");
setIndexReductionMethod("dynamicStateSelection");
simulate(Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic, simflags="-iom kinsol", stopTime=0.1);
@@ -0,0 +1,3 @@
loadModel(Modelica,{"3.2.1"}); getErrorString();
simulate(Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot, stopTime=1); getErrorString();

88 changes: 88 additions & 0 deletions AVM/performance-avm.txt
@@ -0,0 +1,88 @@
Test Computer:
Elitebook 8440p Core-i7 @ 2.67Ghz 8Gb RAM

Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
3032 equation(s)
DYM: 06.6s
OMC: 27.6s (17.7s backend, 3.6 compile, 0.6s simulation)
-------------
4 x faster

Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic
3326 equation(s)
DYM: 07.3s
OMC: 70.1s (21.6s backend, 4.8 compile, 34.9 simulation)
-------------
10 x faster

Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot
4828 equation(s)
DYM: 7.91s
OMC: 186.01s (simulation crashes)
-----------------
23 x faster

Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6
12491 equation(s)
DYM: 19.1s
OMC: goes into an infinite loop in the back-end (17 sec flattening).
-----------------
? x faster

Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic
9491
DYM: 11.30s
OMC:
-----------------
? x faster





Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
487 equation(s)
DYM: 5.6s flatten,compile,simulate; 4.0s -> check model only
OMC: 5.4s -> check model only
-----------------------------
about the same (no simulation as OMC cannot do it yet)

Modelica.Fluid.Examples.DrumBoiler.DrumBoiler
142 equation(s)
DYM: 5.9s flatten,compile,simulate; 04.5s -> check model only
OMC: 17.2s -> check model only
-------------------------------
4 x faster (no simulation as OMC cannot do it yet)

Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
444 equation(s)
DYM: 6.5s flatten,compile,simulate; 04.3s -> check model only
OMC: 25.3s -> check model only
-------------------------------
6 x faster (no simulation as OMC cannot do it yet)






Modelica.Electrical.Analog.Examples.CharacteristicThyristors
50 equation(s)
DYM: 4.68s
OMC: 5.26s (0.16s backend, 1.22s compile, 0.077 simulation)
---------------
about the same

Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes
80 equation(s)
DYM: 4.8s
OMC: 5.38s (0.2s backend, 1.26s compile, 0.099s simulation)
----------------
about the same

Modelica.Electrical.Analog.Examples.CauerLowPassSC
559 equation(s)
DYM: 5.26s
OMC: 7.65s (0.79s backend, 2.01s compile, 0.46s simulation)
----------------
about the same
44 changes: 44 additions & 0 deletions AVM/runAll.sh
@@ -0,0 +1,44 @@
#!/bin/sh

OMC='/c/bin/cygwin/home/adrpo/dev/OpenModelica/build/bin/omc.exe +locale=C +d=showStatement '

cd ./electrical

time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CauerLowPassSC.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CauerLowPassSC.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicIdealDiodes.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicThyristors.mos
time ${OMC} omc_simulate_Modelica.Electrical.Analog.Examples.CharacteristicThyristors.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

cd ../fluid

time ${OMC} omc_check_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_check_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.ControlledTankSystem.ControlledTanks.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.DrumBoiler.DrumBoiler.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
time ${OMC} omc_simulate_Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

cd ../multibody

time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1a.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.Engine1b_analytic.mos
#time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6.mos
#time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos
time ${OMC} omc_simulate_Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos
rm -f *.exe *.c *.h *.libs *.makefile *.mat *.o *.log *.xml

1 change: 1 addition & 0 deletions CMakeLists.txt
@@ -0,0 +1 @@
ADD_SUBDIRECTORY(mofiles)

0 comments on commit b190c2b

Please sign in to comment.