Failed
tests / 03 testsuite-gcc 3/3 / simulation_modelica_synchronous.SynchronousFeatures.ControlledMassBasic.mos (from (result.xml))
Stacktrace
Output mismatch (see stdout for details)
Standard Output
+ SynchronousFeatures.ControlledMassBasic ... equation mismatch [time: 1] ==== Log /tmp/omc-rtest-unknown/simulation/modelica/synchronous/SynchronousFeatures.ControlledMassBasic.mos_temp1556/log-SynchronousFeatures.ControlledMassBasic.mos true "" true "" "class SynchronousFeatures.ControlledMassBasic \"Discrete-time State Variables\" parameter Real m(quantity = \"Mass\", unit = \"kg\", min = 0.0) = 1.0; parameter Real k(unit = \"N/m\") = 1.0; parameter Real d(unit = \"N.s/m\") = 0.1; Real x(quantity = \"Length\", unit = \"m\", start = 1.0, fixed = true) \"Position\"; Real v(quantity = \"Velocity\", unit = \"m/s\", start = 0.0, fixed = true) \"Velocity\"; Real f(quantity = \"Force\", unit = \"N\") \"Force\"; parameter Real KOuter = 10.0 \"Gain of position PI controller\"; parameter Real KInner = 20.0 \"Gain of speed P controller\"; parameter Real Ti = 10.0 \"Integral time for pos. PI controller\"; parameter Real xref = 10.0 \"Position reference\"; discrete Real xd; discrete Real eOuter; discrete Real intE(start = 0.0); discrete Real uOuter; discrete Real vd; discrete Real vref; discrete Real uInner(start = 0.0); equation xd = sample(x, Clock(0.01)); eOuter = xref - xd; intE = previous(intE) + eOuter; uOuter = KOuter * (eOuter + intE / Ti); vd = sample(v, Clock()); vref = uOuter; uInner = KInner * (vref - vd); f = hold(uInner); der(x) = v; m * der(v) = f + (-k) * x - d * v; end SynchronousFeatures.ControlledMassBasic; " "" synchronous features pre-phase: synchronousFeatures ######################################## clock partitioning (2 partitions) ######################################## continuous time partition ======================================== Variables (3) ======================================== 1: f:VARIABLE(unit = "N" ) "Force" type: Real 2: v:STATE(1)(start = 0.0 unit = "m/s" fixed = true ) "Velocity" type: Real 3: x:STATE(1)(start = 1.0 unit = "m" fixed = true ) "Position" type: Real Equations (3, 3) ======================================== 1/1 (1): f = $getPart(uInner) [dynamic |0|0|0|0|] 2/2 (1): der(x) = v [dynamic |0|0|0|0|] 3/3 (1): m * der(v) = f + (-k) * x - d * v [dynamic |0|0|0|0|] no matching clocked partition(1) ======================================== Variables (7) ======================================== 1: uInner:DISCRETE(start = 0.0 ) type: Real 2: vref:DISCRETE() type: Real 3: vd:DISCRETE() type: Real 4: uOuter:DISCRETE() type: Real 5: intE:DISCRETE(start = 0.0 ) type: Real 6: eOuter:DISCRETE() type: Real 7: xd:DISCRETE() type: Real Equations (7, 7) ======================================== 1/1 (1): xd = $getPart(x) [dynamic |0|0|0|0|] 2/2 (1): eOuter = xref - xd [dynamic |0|0|0|0|] 3/3 (1): intE = previous(intE) + eOuter [dynamic |0|0|0|0|] 4/4 (1): uOuter = KOuter * (eOuter + intE / Ti) [dynamic |0|0|0|0|] 5/5 (1): vd = $getPart(v) [dynamic |0|0|0|0|] 6/6 (1): vref = uOuter [dynamic |0|0|0|0|] 7/7 (1): uInner = KInner * (vref - vd) [dynamic |0|0|0|0|] no matching Base clocks (1) ======================================== 1: Clock(0.01)[1] Sub clocks (1) ======================================== 1: factor(1/1) shift(0/1) event(true) synchronous features post-phase: synchronousFeatures ######################################## clock partitioning (2 partitions) ######################################## continuous time partition ======================================== Variables (3) ======================================== 1: f:VARIABLE(unit = "N" ) "Force" type: Real 2: v:STATE(1)(start = 0.0 unit = "m/s" fixed = true ) "Velocity" type: Real 3: x:STATE(1,v)(start = 1.0 unit = "m" fixed = true ) "Position" type: Real Equations (3, 3) ======================================== 1/1 (1): f = $getPart(uInner) [dynamic |0|0|0|0|] 2/2 (1): der(x) = v [dynamic |0|0|0|0|] 3/3 (1): m * der(v) = f + (-k) * x - d * v [dynamic |0|0|0|0|] Matching ======================================== 3 variables and equations var 1 is solved in eqn 1 var 2 is solved in eqn 3 var 3 is solved in eqn 2 StrongComponents ======================================== {2:3} {1:1} {3:2} clocked partition(1) ======================================== Variables (7) ======================================== 1: uInner:DISCRETE(start = 0.0 ) type: Real 2: vref:DISCRETE() type: Real 3: vd:DISCRETE() type: Real 4: uOuter:DISCRETE() type: Real 5: intE:CLOCKED_STATE(start = 0.0 fixed = true ) type: Real 6: eOuter:DISCRETE() type: Real 7: xd:DISCRETE() type: Real Equations (7, 7) ======================================== 1/1 (1): xd = $getPart(x) [dynamic |0|0|0|0|] 2/2 (1): eOuter = xref - xd [dynamic |0|0|0|0|] 3/3 (1): intE = previous(intE) + eOuter [dynamic |0|0|0|0|] 4/4 (1): uOuter = KOuter * (eOuter + intE / Ti) [dynamic |0|0|0|0|] 5/5 (1): vd = $getPart(v) [dynamic |0|0|0|0|] 6/6 (1): vref = uOuter [dynamic |0|0|0|0|] 7/7 (1): uInner = KInner * (vref - vd) [dynamic |0|0|0|0|] no matching Base clocks (1) ======================================== 1: Clock(0.01)[1] Sub clocks (1) ======================================== 1: factor(1/1) shift(0/1) event(true) true "[BackEnd/Differentiate.mo:268:5-268:157:writable] Error: Derivative of expression \"intE = previous(intE) + eOuter\" w.r.t. \"dummyVarA\" is non-existent. Error: Internal error SymbolicJacobian.deriveAll failed [BackEnd/SymbolicJacobian.mo:0:0-0:0:writable] Error: Internal error function generateSymbolicJacobian failed [BackEnd/SymbolicJacobian.mo:0:0-0:0:writable] Error: Internal error function createJacobian failed " Equation mismatch: diff says: --- /tmp/omc-rtest-unknown/simulation/modelica/synchronous/SynchronousFeatures.ControlledMassBasic.mos_temp1556/equations-expected2024-01-20 04:11:34.885409654 +0000 +++ /tmp/omc-rtest-unknown/simulation/modelica/synchronous/SynchronousFeatures.ControlledMassBasic.mos_temp1556/equations-got2024-01-20 04:11:35.165450061 +0000 @@ -177,6 +177,10 @@ Sub clocks (1) ======================================== 1: factor(1/1) shift(0/1) event(true) true -"" +"[BackEnd/Differentiate.mo:268:5-268:157:writable] Error: Derivative of expression \"intE = previous(intE) + eOuter\" w.r.t. \"dummyVarA\" is non-existent. +Error: Internal error SymbolicJacobian.deriveAll failed +[BackEnd/SymbolicJacobian.mo:0:0-0:0:writable] Error: Internal error function generateSymbolicJacobian failed +[BackEnd/SymbolicJacobian.mo:0:0-0:0:writable] Error: Internal error function createJacobian failed +" Equation mismatch: omc-diff says: Failed '"' '[' Line 182: Text differs: expected: "" got: "[BackEnd/Differentiate.mo: == 1 out of 1 tests failed [simulation/modelica/synchronous/SynchronousFeatures.ControlledMassBasic.mos_temp1556, time: 1]