Skip to content

Commit

Permalink
Expected Output
Browse files Browse the repository at this point in the history
Rename models and prefer tvars with start value
  • Loading branch information
ptaeuber committed Aug 10, 2016
1 parent b11d53d commit ad30452
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 53 deletions.
Expand Up @@ -15,6 +15,5 @@ simulate(ThermoPower.Examples.HRB.Simulators.ClosedLoopDigitalSimulator);getErro
// end SimulationResult;
// "Warning: The tearing heuristic was not able to avoid discrete iteration variables because otherwise the system could not have been torn. This may lead to problems during simulation.
// Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// endResult
Expand Up @@ -62,7 +62,6 @@ getErrorString();
// [ThermoSysPro 3.1/Properties/WaterSteam/Common.mo:1185:3-1241:26:writable] Warning: pro.x was used before it was defined (given a value). Additional such uses may exist for the variable, but some messages were suppressed.
// [ThermoSysPro 3.1/WaterSteam/Connectors.mo:91:3-133:18:writable] Warning: Connector .ThermoSysPro.WaterSteam.Connectors.FluidOutlet is not balanced: The number of potential variables (4) is not equal to the number of flow variables (0).
// [ThermoSysPro 3.1/WaterSteam/Connectors.mo:3:3-45:17:writable] Warning: Connector .ThermoSysPro.WaterSteam.Connectors.FluidInlet is not balanced: The number of potential variables (4) is not equal to the number of flow variables (0).
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// {"Files Equal!"}
// ""
Expand Down
Expand Up @@ -70,7 +70,6 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
// [ThermoSysPro 3.1/Properties/WaterSteam/Common.mo:1185:3-1241:26:writable] Warning: pro.x was used before it was defined (given a value). Additional such uses may exist for the variable, but some messages were suppressed.
// [ThermoSysPro 3.1/WaterSteam/Connectors.mo:3:3-45:17:writable] Warning: Connector .ThermoSysPro.WaterSteam.Connectors.FluidInlet is not balanced: The number of potential variables (4) is not equal to the number of flow variables (0).
// [ThermoSysPro 3.1/WaterSteam/Connectors.mo:91:3-133:18:writable] Warning: Connector .ThermoSysPro.WaterSteam.Connectors.FluidOutlet is not balanced: The number of potential variables (4) is not equal to the number of flow variables (0).
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// {"Files Equal!"}
// endResult
Expand Up @@ -37,8 +37,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings', options = '', outputFormat = 'mat', variableFilter = 'time|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.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -28,8 +28,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 0.4, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Analog.Examples.OvervoltageProtection', options = '', outputFormat = 'mat', variableFilter = 'time|CL.v|CL.p.i', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Electrical.Analog.Examples.OvervoltageProtection_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -29,8 +29,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 0.001, numberOfIntervals = 2000, tolerance = 1e-12, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Analog.Examples.SimpleTriacCircuit', options = '', outputFormat = 'mat', variableFilter = 'time|L.i|simpleTriac.thyristor.vControl|simpleTriac.thyristor1.vControl', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Electrical.Analog.Examples.SimpleTriacCircuit_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -32,8 +32,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 2.0, numberOfIntervals = 2000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Machines.Examples.DCMachines.DCPM_withLosses', options = '', outputFormat = 'mat', variableFilter = 'time|dcpm1.la.i|dcpm2.la.i|loadInertia1.phi|loadInertia1.w|loadInertia2.phi|loadInertia2.w', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Electrical.Machines.Examples.DCMachines.DCPM_withLosses_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -46,8 +46,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 200.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Fluid.Examples.IncompressibleFluidNetwork', options = '', outputFormat = 'mat', variableFilter = 'time|pipe1.mediums.1..T|pipe1.mediums.2..T|pipe2.mediums.1..T|pipe2.mediums.2..T|pipe3.mediums.1..T|pipe3.mediums.2..T|pipe4.mediums.1..T|pipe4.mediums.2..T|pipe6.mediums.1..T|pipe6.mediums.2..T|pipe7.mediums.1..T|pipe7.mediums.2..T|pipe8.mediums.1..T|pipe8.mediums.2..T|pipe9.mediums.1..T|pipe9.mediums.2..T|pipe10.mediums.1..T|pipe10.mediums.2..T|pipe5.mediums.1..T|pipe5.mediums.2..T', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Fluid.Examples.IncompressibleFluidNetwork_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -35,8 +35,6 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings', options = '', outputFormat = 'mat', variableFilter = 'time|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.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings_res.mat
// Files Equal!
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
//
// "true
// "
// ""
Expand Down
Expand Up @@ -41,7 +41,6 @@ res := OpenModelica.Scripting.compareSimulationResults("Modelica.Electrical.Anal
// simulationOptions = "startTime = 0.0, stopTime = 0.4, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Electrical.Analog.Examples.OvervoltageProtection', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// ""
// {"Files Equal!"}
// endResult
Expand Up @@ -50,7 +50,6 @@ res := OpenModelica.Scripting.compareSimulationResults("Modelica.Mechanics.Multi
// simulationOptions = "startTime = 0.0, stopTime = 10.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Elementary.ThreeSprings', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// ""
// {"Files Equal!"}
// endResult
Expand Up @@ -20,6 +20,5 @@ simulate(OverdeterminedInitialization.Fluid.DynamicPipeInitialValues); getErrorS
// "Warning: It was not possible to determine if the initialization problem is consistent, because of not evaluable parameters/start values during compile time: pipe.mediums[1].p = 10000000.0 (system.p_start = 10000000.0)
// Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// Warning: The initial conditions are over specified. Use +d=initialization for more information.
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// endResult
Expand Up @@ -15,6 +15,5 @@ buildModel(OverdeterminedInitialization.Fluid.TwoVolumesFullSteadyStatePressureA
// {"OverdeterminedInitialization.Fluid.TwoVolumesFullSteadyStatePressureAndTemperature","OverdeterminedInitialization.Fluid.TwoVolumesFullSteadyStatePressureAndTemperature_init.xml"}
// "Notification: The following equation is consistent and got removed from the initialization problem: $DER.V2.medium.p = 0.0
// Warning: The initial conditions are over specified. Use +d=initialization for more information.
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
// "
// endResult
8 changes: 4 additions & 4 deletions simulation/modelica/tearing/Makefile
Expand Up @@ -29,8 +29,8 @@ Tearing16-celMC3.mos \
Algorithm1-celMC3.mos \
Algorithm2-celMC3.mos \
MixedTearing1-celMC3.mos \
AnnotationTest-celMC3.mos \
AnnotationTest2-celMC3.mos \
tearingSelect-celMC3.mos \
tearingSelect2-celMC3.mos \
dynamicTearing1.mos \
dynamicTearing2.mos \
dynamicTearing3.mos \
Expand Down Expand Up @@ -73,8 +73,8 @@ Tearing16-omc.mos \
Algorithm1-omc.mos \
Algorithm2-omc.mos \
MixedTearing1-omc.mos \
AnnotationTest-omc.mos \
AnnotationTest2-omc.mos \
tearingSelect-omc.mos \
tearingSelect2-omc.mos \
totalTearing1.mos \
totalTearing2.mos \
totalTearing3.mos \
Expand Down
4 changes: 3 additions & 1 deletion simulation/modelica/tearing/Tearing12-omc.mos
Expand Up @@ -8,8 +8,8 @@ loadFile("Tearing12.mo"); getErrorString();

setDebugFlags("backenddaeinfo"); getErrorString();
setTearingMethod("omcTearing"); getErrorString();
setCommandLineOptions("+preferTVarsWithStartValue=false"); getErrorString();
simulate(Tearing12); getErrorString();
// buildModel(Tearing12); getErrorString();

// Result:
// true
Expand All @@ -20,6 +20,8 @@ simulate(Tearing12); getErrorString();
// ""
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "Tearing12_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing12', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
Expand Down
@@ -1,13 +1,13 @@
// name: AnnotationTest-celMC3
// name: tearingSelect-celMC3
// keywords: tearing, linear
// status: correct

loadFile("AnnotationTest.mo"); getErrorString();
loadFile("tearingSelect.mo"); getErrorString();

setDebugFlags("backenddaeinfo"); getErrorString();
setTearingMethod("cellier"); getErrorString();
setCommandLineOptions("+tearingHeuristic=MC3"); getErrorString();
simulate(AnnotationTest); getErrorString();
setCommandLineOptions("+tearingHeuristic=MC3 +preferTVarsWithStartValue=true"); getErrorString();
simulate(tearingSelect); getErrorString();

val(u1,0.0); getErrorString();
val(u2,0.0); getErrorString();
Expand All @@ -26,8 +26,8 @@ val(i3,0.0); getErrorString();
// true
// ""
// record SimulationResult
// resultFile = "AnnotationTest_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'AnnotationTest', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// resultFile = "tearingSelect_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'tearingSelect', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
Expand Down
@@ -1,12 +1,13 @@
// name: AnnotationTest-omc
// name: tearingSelect-omc
// keywords: tearing, linear
// status: correct

loadFile("AnnotationTest.mo"); getErrorString();
loadFile("tearingSelect.mo"); getErrorString();

setDebugFlags("backenddaeinfo"); getErrorString();
setTearingMethod("omcTearing"); getErrorString();
simulate(AnnotationTest); getErrorString();
setCommandLineOptions("+preferTVarsWithStartValue=true"); getErrorString();
simulate(tearingSelect); getErrorString();

val(u1,0.0); getErrorString();
val(u2,0.0); getErrorString();
Expand All @@ -22,9 +23,11 @@ val(i3,0.0); getErrorString();
// ""
// true
// ""
// true
// ""
// record SimulationResult
// resultFile = "AnnotationTest_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'AnnotationTest', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// resultFile = "tearingSelect_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'tearingSelect', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
Expand Down
@@ -1,10 +1,10 @@
model AnnotationTest
model tearingSelect
Real u0;
Real i1 annotation(tearingSelect=prefer);
Real i2;
Real i2 (start=1);
Real i3;
Real u1;
Real u2 annotation(tearingSelect=avoid);
Real u2 (start=1) annotation(tearingSelect=avoid);
Real u3;
parameter Real r1=10;
parameter Real r2=10;
Expand All @@ -17,4 +17,4 @@ equation
u1+u3=u0;
u2-u3=0;
i1-i2-i3=0;
end AnnotationTest;
end tearingSelect;
@@ -1,13 +1,13 @@
// name: AnnotationTest2-celMC3
// name: tearingSelect2-celMC3
// keywords: tearing, linear
// status: correct

loadFile("AnnotationTest2.mo"); getErrorString();
loadFile("tearingSelect2.mo"); getErrorString();

setDebugFlags("backenddaeinfo"); getErrorString();
setTearingMethod("cellier"); getErrorString();
setCommandLineOptions("+tearingHeuristic=MC3"); getErrorString();
simulate(AnnotationTest2); getErrorString();
simulate(tearingSelect2); getErrorString();

// Result:
// true
Expand All @@ -19,8 +19,8 @@ simulate(AnnotationTest2); getErrorString();
// true
// ""
// record SimulationResult
// resultFile = "AnnotationTest2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'AnnotationTest2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// resultFile = "tearingSelect2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'tearingSelect2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
Expand Down
@@ -1,12 +1,12 @@
// name: AnnotationTest2-omc
// name: tearingSelect2-omc
// keywords: tearing, linear
// status: correct

loadFile("AnnotationTest2.mo"); getErrorString();
loadFile("tearingSelect2.mo"); getErrorString();

setDebugFlags("backenddaeinfo"); getErrorString();
setTearingMethod("omcTearing"); getErrorString();
simulate(AnnotationTest2); getErrorString();
simulate(tearingSelect2); getErrorString();

// Result:
// true
Expand All @@ -16,8 +16,8 @@ simulate(AnnotationTest2); getErrorString();
// true
// ""
// record SimulationResult
// resultFile = "AnnotationTest2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'AnnotationTest2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// resultFile = "tearingSelect2_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'tearingSelect2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "Notification: Model statistics after passing the front-end and creating the data structures used by the back-end:
Expand Down
@@ -1,4 +1,4 @@
model AnnotationTest2
model tearingSelect2
Real x1 annotation(tearingSelect = avoid);
Real x2;
Real x3;
Expand All @@ -12,4 +12,4 @@ equation
0 = x1*x1 + x4 + x5;
0 = x1*x1 + x5 + x6;
0 = x1 + x6*x6;
end AnnotationTest2;
end tearingSelect2;

0 comments on commit ad30452

Please sign in to comment.