Skip to content

Commit

Permalink
update -cppruntime tests
Browse files Browse the repository at this point in the history
use VerifiedSimulation to suppress verbose solver logs
  • Loading branch information
rfranke authored and sjoelund committed May 5, 2015
1 parent 77feb89 commit ae6d4ac
Show file tree
Hide file tree
Showing 27 changed files with 1,878 additions and 1,871 deletions.
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.Translation;
modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelName := $TypeName(Modelica.Blocks.Examples.Interaction1);
compareVars :=
{
Expand All @@ -27,14 +27,16 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.Translation
// OpenModelicaModelTesting.Kind.VerifiedSimulation
// Modelica.Blocks.Examples.Interaction1
// {"integerValue.showNumber","realValue.showNumber","booleanValue.showActive","start.on","stop.on"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
// \"ReferenceFiles/Modelica.Blocks.Examples.Interaction1.mat\"
// "
// ""
// Translation succeeded
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Blocks.Examples.Interaction1', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Blocks.Examples.Interaction1_res.mat
// Files Equal!
// "true
// "
// ""
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelTestingType := OpenModelicaModelTesting.Kind.SuppressedSimulation;
modelName := $TypeName(Modelica.Electrical.Analog.Examples.ChuaCircuit);
compareVars :=
{
Expand All @@ -25,7 +25,7 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.SimpleSimulation
// OpenModelicaModelTesting.Kind.SuppressedSimulation
// Modelica.Electrical.Analog.Examples.ChuaCircuit
// {"L.i","C1.v","C2.v"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.Compilation;
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
modelName := $TypeName(Modelica.Electrical.Digital.Examples.Counter);
compareVars :=
{
Expand All @@ -32,14 +32,15 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.Compilation
// OpenModelicaModelTesting.Kind.SimpleSimulation
// Modelica.Electrical.Digital.Examples.Counter
// {"Enable.y","Clock.y","Counter.q[1]","Counter.q[2]","Counter.q[3]","Counter.q[4]","Q0.y[1]","Q1.y[1]","Q2.y[1]","Q3.y[1]"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
// \"ReferenceFiles/Modelica.Electrical.Digital.Examples.Counter.mat\"
// "
// ""
// Compilation succeeded
// Simulation options: startTime = 0.0, stopTime = 100.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Digital.Examples.Counter', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Digital.Examples.Counter_res.mat
// "true
// "
// ""
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.Compilation;
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
modelName := $TypeName(Modelica.Electrical.Digital.Examples.Counter3);
compareVars :=
{
Expand All @@ -28,14 +28,15 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.Compilation
// OpenModelicaModelTesting.Kind.SimpleSimulation
// Modelica.Electrical.Digital.Examples.Counter3
// {"Enable.y","Clock.y","Counter.q0","Counter.q1","Counter.q2","Counter.count"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
// \"ReferenceFiles/Modelica.Electrical.Digital.Examples.Counter3.mat\"
// "
// ""
// Compilation succeeded
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Digital.Examples.Counter3', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Digital.Examples.Counter3_res.mat
// "true
// "
// ""
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.Compilation;
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
modelName := $TypeName(Modelica.Electrical.Digital.Examples.FullAdder);
compareVars :=
{
Expand All @@ -31,14 +31,15 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.Compilation
// OpenModelicaModelTesting.Kind.SimpleSimulation
// Modelica.Electrical.Digital.Examples.FullAdder
// {"Enable.y","CLK.y","Counter.q0","Counter.q1","Counter.q2","Adder1.s","Adder1.c_out","s.y[1]","c_out.y[1]"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
// \"ReferenceFiles/Modelica.Electrical.Digital.Examples.FullAdder.mat\"
// "
// ""
// Compilation succeeded
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Digital.Examples.FullAdder', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Digital.Examples.FullAdder_res.mat
// "true
// "
// ""
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.Translation;
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
modelName := $TypeName(Modelica.Electrical.Digital.Examples.RAM);
compareVars :=
{
Expand All @@ -30,14 +30,15 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.Translation
// OpenModelicaModelTesting.Kind.SimpleSimulation
// Modelica.Electrical.Digital.Examples.RAM
// {"addr_1.y","addr_0.y","data_1.y","data_0.y","RE.y","WE.y","dLATRAM.dataOut[1]","dLATRAM.dataOut[2]"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
// \"ReferenceFiles/Modelica.Electrical.Digital.Examples.RAM.mat\"
// "
// ""
// Translation succeeded
// Simulation options: startTime = 0.0, stopTime = 400.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Digital.Examples.RAM', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Digital.Examples.RAM_res.mat
// "true
// "
// ""
Expand Down
Expand Up @@ -8,7 +8,7 @@

runScript("../common/ModelTestingDefaults.mos"); getErrorString();

modelTestingType := OpenModelicaModelTesting.Kind.VerifiedSimulation;
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
modelName := $TypeName(Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses);
compareVars :=
{
Expand All @@ -30,7 +30,7 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.VerifiedSimulation
// OpenModelicaModelTesting.Kind.SimpleSimulation
// Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses
// {"PI.x","aimc.i_0_s","aimc.idq_sr[1]","aimc.idq_sr[2]","aimc.idq_rr[1]","aimc.idq_rr[2]","loadInertia.phi","loadInertia.w"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
Expand All @@ -39,12 +39,6 @@ runScript(modelTesting);getErrorString();
// ""
// Simulation options: startTime = 0.0, stopTime = 5.0, numberOfIntervals = 5000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses_res.mat
// Files not Equal!
// aimc.idq_rr[2]
// aimc.idq_rr[1]
// aimc.idq_sr[2]
// aimc.idq_sr[1]
// PI.x
// [Modelica 3.2.1/Electrical/Machines.mo:12830:7-12831:75:writable] Error: Variable aimc.frictionParameters: Duplicate modification of element = (typed)6.283185307179586 * aimc.fsNominal / /*Real*/(aimc.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)153.1526418625024 DAE.PROP(Real(displayUnit = "1/min", min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 153.1526418625024 on component wRef.
// Error: Duplicate modification of element = (typed)6.283185307179586 * aimc.fsNominal / /*Real*/(aimc.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)153.1526418625024 DAE.PROP(Real(displayUnit = "1/min", min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 153.1526418625024 on component wRef.
// [Modelica 3.2.1/Electrical/Machines.mo:12962:7-12967:42:writable] Error: Variable aimc.statorCoreParameters: Duplicate modification of element final = (typed)3 DAE.PROP(Integer, C_CONST), value: 3 and = (typed)3 DAE.PROP(Integer, C_CONST), value: 3 on component m.
Expand All @@ -55,11 +49,8 @@ runScript(modelTesting);getErrorString();
// [Modelica 3.2.1/Electrical/Machines.mo:12968:7-12970:77:writable] Error: Variable aimc.strayLoadParameters: Duplicate modification of element = (typed)6.283185307179586 * aimc.fsNominal / /*Real*/(aimc.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)153.1526418625024 DAE.PROP(Real(displayUnit = "1/min", min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 153.1526418625024 on component wRef.
// Error: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)18.96595634287921 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 18.96595634287921 on component IRef.
// Error: Duplicate modification of element = (typed)6.283185307179586 * aimc.fsNominal / /*Real*/(aimc.p) DAE.PROP(Real, C_PARAM), value: 157.0796326794897 and = (typed)153.1526418625024 DAE.PROP(Real(displayUnit = "1/min", min = 1e-60, quantity = "AngularVelocity", unit = "rad/s"), C_CONST), value: 153.1526418625024 on component wRef.
// Warning: Files not Equal
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.aimc.idq_rr[2].html
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.aimc.idq_rr[1].html
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.aimc.idq_sr[2].html
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.aimc.idq_sr[1].html
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_withLosses.PI.x.html
// This test cannot succeed automated testing because the test kind is wrong
//
// "true
// "
// ""
// endResult
Expand Up @@ -37,4 +37,11 @@ runScript(modelTesting);getErrorString();
// \"ReferenceFiles/Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMEE_LoadDump.mat\"
// "
// ""
// Alarm clock// endResult
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 10000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMEE_LoadDump', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMEE_LoadDump_res.mat
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
// endResult
Expand Up @@ -26,7 +26,7 @@ runScript(modelTesting);getErrorString();
// "true
// "
// ""
// OpenModelicaModelTesting.Kind.SimpleSimulation
// OpenModelicaModelTesting.Kind.VerifiedSimulation
// Modelica.Electrical.Spice3.Examples.Spice3BenchmarkRtlInverter
// {"Q1.vbe","Q1.vbc","Q1.vbx","Q1.vcs"}
// "OpenModelicaModelTesting.SimulationRuntime.Cpp
Expand All @@ -35,5 +35,12 @@ runScript(modelTesting);getErrorString();
// ""
// Simulation options: startTime = 0.0, stopTime = 1e-07, numberOfIntervals = 999, tolerance = 1e-08, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Spice3.Examples.Spice3BenchmarkRtlInverter', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''
// Result file: Modelica.Electrical.Spice3.Examples.Spice3BenchmarkRtlInverter_res.mat
// Note: Result files are now equal. Please update the test to do verified simulation!
// Files Equal!
// Warning: Resultfile and Reference have different end time points!
// Reffile[1012]=0.000000
// File[23]=0.000000
//
// "true
// "
// ""
// endResult

0 comments on commit ae6d4ac

Please sign in to comment.