Skip to content

Commit 44ef6fe

Browse files
committed
Conflicts: simulation/libraries/msl32_cpp/Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_Transformer.mos simulation/libraries/msl32_cpp/Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Cooling.mos simulation/libraries/msl32_cpp/Modelica.Electrical.Machines.Examples.Transformers.Rectifier6pulse.mos simulation/libraries/msl32_cpp/Modelica.Electrical.Spice3.Examples.Graetz.mos simulation/libraries/msl32_cpp/Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.fullRobot.mos
2 parents 0754291 + da53bff commit 44ef6fe

9 files changed

+116
-71
lines changed

openmodelica/xml/SimpleTriggeredTrapezoid.mos

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -309,43 +309,7 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
309309
// </aliasVariables>
310310
// </variables>
311311
// <equations dimension=\"5\">
312-
// <equation id=\"1\">b = if time &gt; 5.0 then time &lt; 9.0 else false
313-
// <MathML>
314-
// <math xmlns=\"http://www.w3.org/1998/Math/MathML\">
315-
// <apply>
316-
// <equivalent/>
317-
// <ci> b
318-
// </ci>
319-
// <apply>
320-
// <piecewise>
321-
// <piece>
322-
// <apply>
323-
// <lt/>
324-
// <ci> time
325-
// </ci>
326-
// <cn type=\"real\"> 9.0
327-
// </cn>
328-
// </apply>
329-
// <apply>
330-
// <gt/>
331-
// <ci> time
332-
// </ci>
333-
// <cn type=\"real\"> 5.0
334-
// </cn>
335-
// </apply>
336-
// </piece>
337-
// <otherwise>
338-
// <apply>
339-
// <false/>
340-
// </apply>
341-
// </otherwise>
342-
// </piecewise>
343-
// </apply>
344-
// </apply>
345-
// </math>
346-
// </MathML>
347-
// </equation>
348-
// <whenEquation id=\"2\">
312+
// <whenEquation id=\"1\">
349313
// <WhenOperator>
350314
// tt.T := if b and not tt.rising &gt; 0.0 or not b and not tt.falling &gt; 0.0 or not abs(tt.amplitude) &gt; 0.0 or initial() then time else time + (tt.endValue - pre(tt.y)) / tt.rate
351315
// </WhenOperator>
@@ -469,7 +433,7 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
469433
// </MathML>
470434
// </whenEquationCondition>
471435
// </whenEquation>
472-
// <whenEquation id=\"3\">
436+
// <whenEquation id=\"2\">
473437
// <WhenOperator>
474438
// tt.rate := if b and tt.rising &gt; 0.0 then tt.amplitude / tt.rising else if not b and tt.falling &gt; 0.0 then (-tt.amplitude) / tt.falling else 0.0
475439
// </WhenOperator>
@@ -567,7 +531,7 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
567531
// </MathML>
568532
// </whenEquationCondition>
569533
// </whenEquation>
570-
// <whenEquation id=\"4\">
534+
// <whenEquation id=\"3\">
571535
// <WhenOperator>
572536
// tt.endValue := if b then tt.offset + tt.amplitude else tt.offset
573537
// </WhenOperator>
@@ -622,6 +586,42 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
622586
// </MathML>
623587
// </whenEquationCondition>
624588
// </whenEquation>
589+
// <equation id=\"4\">b = if time &gt; 5.0 then time &lt; 9.0 else false
590+
// <MathML>
591+
// <math xmlns=\"http://www.w3.org/1998/Math/MathML\">
592+
// <apply>
593+
// <equivalent/>
594+
// <ci> b
595+
// </ci>
596+
// <apply>
597+
// <piecewise>
598+
// <piece>
599+
// <apply>
600+
// <lt/>
601+
// <ci> time
602+
// </ci>
603+
// <cn type=\"real\"> 9.0
604+
// </cn>
605+
// </apply>
606+
// <apply>
607+
// <gt/>
608+
// <ci> time
609+
// </ci>
610+
// <cn type=\"real\"> 5.0
611+
// </cn>
612+
// </apply>
613+
// </piece>
614+
// <otherwise>
615+
// <apply>
616+
// <false/>
617+
// </apply>
618+
// </otherwise>
619+
// </piecewise>
620+
// </apply>
621+
// </apply>
622+
// </math>
623+
// </MathML>
624+
// </equation>
625625
// <equation id=\"5\">tt.y = if time &lt; tt.T then tt.endValue + (time - tt.T) * tt.rate else tt.endValue
626626
// <MathML>
627627
// <math xmlns=\"http://www.w3.org/1998/Math/MathML\">
@@ -683,7 +683,7 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
683683
// </MathML>
684684
// <involvedEquations>
685685
// <equationId>
686-
// 1
686+
// 4
687687
// </equationId>
688688
// </involvedEquations>
689689
// </zeroCrossingElement>
@@ -701,7 +701,7 @@ readFile("SimpleTriggeredTrapezoid.xml"); getErrorString();
701701
// </MathML>
702702
// <involvedEquations>
703703
// <equationId>
704-
// 1
704+
// 4
705705
// </equationId>
706706
// </involvedEquations>
707707
// </zeroCrossingElement>

simulation/libraries/3rdParty/ThermoSysPro/ThermoSysPro.Examples.SimpleExamples.TestCheckValve.mos

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
8080
// [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).
8181
// [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).
8282
// [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).
83-
// Warning: Alias set with different nominal values
84-
// * candidate: checkValve3.pro.T(nominal = 320.0)
85-
// * candidate: checkValve3.T(nominal = 300.0)
86-
// => select value from checkValve3.T(nominal = 300.0) for variable: checkValve3.T
8783
// Warning: Alias set with several free start values
8884
// * candidate: perteDP.Q(start = 100.0)
8985
// * candidate: perteDP.C1.Q(start = 500.0)
@@ -122,6 +118,10 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
122118
// * candidate: volumeD.pro.T(nominal = 320.0)
123119
// * candidate: volumeD.T(nominal = 300.0)
124120
// => select value from volumeD.T(nominal = 300.0) for variable: volumeD.T
121+
// Warning: Alias set with different nominal values
122+
// * candidate: checkValve3.pro.T(nominal = 320.0)
123+
// * candidate: checkValve3.T(nominal = 300.0)
124+
// => select value from checkValve3.T(nominal = 300.0) for variable: checkValve3.T
125125
// Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
126126
// "
127127
// {"Files Equal!"}

simulation/libraries/3rdParty/ThermoSysPro/ThermoSysPro.Examples.SimpleExamples.TestIdealCheckValve.mos

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,6 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
8181
// [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).
8282
// [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).
8383
// Warning: Alias set with several free start values
84-
// * candidate: sourceP1.C.Q(start = 500.0)
85-
// * candidate: perteDP2.C1.Q(start = 500.0)
86-
// * candidate: perteDP2.Q(start = 100.0)
87-
// * candidate: perteDP2.C2.Q(start = 500.0)
88-
// * candidate: idealCheckValve3.C1.Q(start = 500.0)
89-
// * candidate: idealCheckValve3.C2.Q(start = 500.0)
90-
// * candidate: perteDP3.C1.Q(start = 500.0)
91-
// * candidate: perteDP3.Q(start = 100.0)
92-
// * candidate: perteDP3.C2.Q(start = 500.0)
93-
// * candidate: puitsP1.C.Q(start = 500.0)
94-
// => select value from perteDP2.Q(start = 100.0) for variable: sourceP1.Q
95-
// Warning: Alias set with different nominal values
96-
// * candidate: perteDP3.pro.T(nominal = 320.0)
97-
// * candidate: perteDP3.T(nominal = 300.0)
98-
// => select value from perteDP3.T(nominal = 300.0) for variable: perteDP3.T
99-
// Warning: Alias set with different nominal values
100-
// * candidate: perteDP2.pro.T(nominal = 320.0)
101-
// * candidate: perteDP2.T(nominal = 300.0)
102-
// => select value from perteDP2.T(nominal = 300.0) for variable: perteDP2.T
103-
// Warning: Alias set with several free start values
10484
// * candidate: perteDP.Q(start = 100.0)
10585
// * candidate: perteDP.C1.Q(start = 500.0)
10686
// * candidate: sourceP.C.Q(start = 500.0)
@@ -130,6 +110,26 @@ getEnvironmentVar("REFERENCEFILES")+"/ThermoSysPro/ThermoSysPro.Examples.SimpleE
130110
// * candidate: volumeD.pro.T(nominal = 320.0)
131111
// * candidate: volumeD.T(nominal = 300.0)
132112
// => select value from volumeD.T(nominal = 300.0) for variable: volumeD.T
113+
// Warning: Alias set with several free start values
114+
// * candidate: sourceP1.C.Q(start = 500.0)
115+
// * candidate: perteDP2.C1.Q(start = 500.0)
116+
// * candidate: perteDP2.Q(start = 100.0)
117+
// * candidate: perteDP2.C2.Q(start = 500.0)
118+
// * candidate: idealCheckValve3.C1.Q(start = 500.0)
119+
// * candidate: idealCheckValve3.C2.Q(start = 500.0)
120+
// * candidate: perteDP3.C1.Q(start = 500.0)
121+
// * candidate: perteDP3.Q(start = 100.0)
122+
// * candidate: perteDP3.C2.Q(start = 500.0)
123+
// * candidate: puitsP1.C.Q(start = 500.0)
124+
// => select value from perteDP2.Q(start = 100.0) for variable: sourceP1.Q
125+
// Warning: Alias set with different nominal values
126+
// * candidate: perteDP3.pro.T(nominal = 320.0)
127+
// * candidate: perteDP3.T(nominal = 300.0)
128+
// => select value from perteDP3.T(nominal = 300.0) for variable: perteDP3.T
129+
// Warning: Alias set with different nominal values
130+
// * candidate: perteDP2.pro.T(nominal = 320.0)
131+
// * candidate: perteDP2.T(nominal = 300.0)
132+
// => select value from perteDP2.T(nominal = 300.0) for variable: perteDP2.T
133133
// Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
134134
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
135135
// "

simulation/libraries/msl32/Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Cooling.mos

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ runScript(modelTesting);getErrorString();
3939
// [Modelica 3.2.1/Electrical/Machines.mo:13497:7-13501:42:writable] Error: Variable dcpm.coreParameters: Duplicate modification of element final = (typed)1 DAE.PROP(Integer, C_CONST), value: 1 and = (typed)1 DAE.PROP(Integer, C_CONST), value: 1 on component m.
4040
// Error: Duplicate modification of element = (typed)dcpm.ViNominal, type:
4141
// DAE.PROP(Real(quantity = "ElectricPotential", unit = "V"), C_PARAM) and = (typed)95.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 95.0 on component VRef.
42+
// Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.
4243
//
4344
// "true
4445
// "

simulation/libraries/msl32_cpp/Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_Transformer.mos

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,16 @@ runScript(modelTesting);getErrorString();
4343
// [Modelica 3.2.1/Electrical/Machines.mo:12962:7-12967:42:writable] Error: Variable aimc.statorCoreParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 100.0 on component VRef.
4444
// [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.
4545
// Error: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 100.0 on component VRef.
46-
// [Modelica 3.2.1/Electrical/Machines.mo:12968:7-12970:77:writable] Error: Variable aimc.strayLoadParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 100.0 on component IRef.
46+
// [Modelica 3.2.1/Electrical/Machines.mo:12949:7-12951:77:writable] Error: Variable aimc.strayLoadParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 100.0 on component IRef.
4747
// Error: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 100.0 on component IRef.
48-
//
49-
// "true
50-
// "
51-
// ""
48+
// Warning: Files not Equal
49+
// Failed variables: aimc.idq_rr[2]aimc.idq_rr[1]
50+
// [Modelica 3.2.1/Electrical/Machines.mo:12943:7-12948: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.
51+
// [Modelica 3.2.1/Electrical/Machines.mo:12943:7-12948:42:writable] Error: Variable aimc.statorCoreParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 100.0 on component VRef.
52+
// [Modelica 3.2.1/Electrical/Machines.mo:12943:7-12948: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.
53+
// Error: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricPotential", unit = "V"), C_CONST), value: 100.0 on component VRef.
54+
// [Modelica 3.2.1/Electrical/Machines.mo:12949:7-12951:77:writable] Error: Variable aimc.strayLoadParameters: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 100.0 on component IRef.
55+
// Error: Duplicate modification of element {start = (typed)100 DAE.PROP(Integer, C_CONST), value: 100} and = (typed)100.0 DAE.PROP(Real(min = 1e-60, quantity = "ElectricCurrent", unit = "A"), C_CONST), value: 100.0 on component IRef.
56+
// Created diff file Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_Transformer.aimc.idq_rr[1].html
57+
// This test cannot succeed automated testing because the test kind is wrong
5258
// endResult

simulation/libraries/msl32_cpp/Modelica.Electrical.Machines.Examples.Transformers.Rectifier6pulse.mos

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ runScript(modelTesting);getErrorString();
3737
// "
3838
// ""
3939
// endResult
40+

simulation/libraries/msl32_cpp/Modelica.Electrical.Spice3.Examples.Graetz.mos

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

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

11+
1112
modelTestingType := OpenModelicaModelTesting.Kind.SimpleSimulation;
1213
modelName := $TypeName(Modelica.Electrical.Spice3.Examples.Graetz);
1314
compareVars :=

simulation/modelica/events/Reinit.mos

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,39 @@ package TestReinit
1818
reinit(x, x+1);
1919
end when;
2020
end test1;
21+
model test2
22+
Real x, y, z;
23+
initial equation
24+
x = 0;
25+
y = -1;
26+
z = 0;
27+
equation
28+
der(x) = sin(time*10);
29+
der(y) = cos(time*10);
30+
der(z) = sin(time*10);
31+
when {time > 0.1, time > 0.2} then
32+
reinit(x, x+1);
33+
reinit(y, y+1);
34+
elsewhen time>0.5 then
35+
reinit(x, x-1);
36+
reinit(y, y-1);
37+
elsewhen time>0.7 then
38+
reinit(z, 0);
39+
end when;
40+
end test2;
41+
2142
end TestReinit;
2243
"); getErrorString();
2344

45+
2446
simulate(TestReinit.test1); getErrorString();
2547
val(x, 1.0); getErrorString();
2648

49+
simulate(TestReinit.test2); getErrorString();
50+
val(x, 1.0);
51+
val(y, 1.0);
52+
val(z, 1.0);
53+
2754
// Result:
2855
// true
2956
// ""
@@ -35,4 +62,13 @@ val(x, 1.0); getErrorString();
3562
// ""
3663
// 2.0
3764
// ""
65+
// record SimulationResult
66+
// resultFile = "TestReinit.test2_res.mat",
67+
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'TestReinit.test2', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
68+
// messages = ""
69+
// end SimulationResult;
70+
// ""
71+
// 1.183906246342699
72+
// -0.05440157804372458
73+
// 0.1592945666777535
3874
// endResult

simulation/modelica/start_value_selection/asmaFlow.mos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ val(aimc.inertiaRotor.flange_b.tau, 0);
16111611
// simulationOptions = "startTime = 0.0, stopTime = 20.0, numberOfIntervals = 10000, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'asmaFlow', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
16121612
// messages = ""
16131613
// end SimulationResult;
1614-
// "[Modelica 3.2.1/Electrical/Machines.mo:15354:7-15356:33:writable] Warning: Parameter terminalBox.terminalConnection has no value, and is fixed during initialization (fixed=true), using available start value (start="Y") as default value.
1614+
// "[Modelica 3.2.1/Electrical/Machines.mo:15353:7-15355:33:writable] Warning: Parameter terminalBox.terminalConnection has no value, and is fixed during initialization (fixed=true), using available start value (start="Y") as default value.
16151615
// [Modelica 3.2.1/Electrical/Machines.mo:12921:7-12923:69:writable] Warning: Parameter aimc.TsOperational has no value, and is fixed during initialization (fixed=true), using available start value (start=293.15) as default value.
16161616
// [Modelica 3.2.1/Electrical/Machines.mo:12927:7-12929:71:writable] Warning: Parameter aimc.TsRef has no value, and is fixed during initialization (fixed=true), using available start value (start=293.15) as default value.
16171617
// [Modelica 3.2.1/Electrical/Machines.mo:12930:7-12932:71:writable] Warning: Parameter aimc.alpha20s has no value, and is fixed during initialization (fixed=true), using available start value (start=0.0) as default value.

0 commit comments

Comments
 (0)