Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo", uses=false) Using package Buildings with version 8.1.4 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean") translateModel(Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001322/0.001322, allocations: 104 kB / 16.37 MB, free: 6.371 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001351/0.001351, allocations: 191.9 kB / 17.31 MB, free: 5.91 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.539/1.539, allocations: 205.1 MB / 223.2 MB, free: 12.26 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.1.4-maint.8.1.x/package.mo): time 1.845/1.845, allocations: 292.3 MB / 0.5496 GB, free: 17.61 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 3.645e-05/3.668e-05, allocations: 6.219 kB / 0.6729 GB, free: 5.895 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Controls.OBC.CDL.Discrete.Examples.TriggeredMovingMean): time 0.002143/0.002195, allocations: 0.8762 MB / 0.6737 GB, free: 5.016 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.002499/0.004709, allocations: 1.316 MB / 0.675 GB, free: 3.684 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 8.234e-05/0.004804, allocations: 3.938 kB / 0.675 GB, free: 3.68 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0001479/0.00496, allocations: 11.88 kB / 0.675 GB, free: 3.668 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.0001884/0.005156, allocations: 39.7 kB / 0.6751 GB, free: 3.629 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0009173/0.006108, allocations: 258.7 kB / 0.6753 GB, free: 3.383 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0004568/0.006572, allocations: 319.3 kB / 0.6756 GB, free: 3.07 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001829/0.006762, allocations: 33.09 kB / 0.6756 GB, free: 3.035 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002184/0.006986, allocations: 127.7 kB / 0.6758 GB, free: 2.91 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002084/0.007203, allocations: 119.6 kB / 0.6759 GB, free: 2.793 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 4.515e-05/0.007256, allocations: 24 kB / 0.6759 GB, free: 2.77 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001016/0.007364, allocations: 39.98 kB / 0.6759 GB, free: 2.73 MB / 0.545 GB Notification: Performance of combineBinaries: time 0.0002459/0.007616, allocations: 273.5 kB / 0.6762 GB, free: 2.461 MB / 0.545 GB Notification: Performance of replaceArrayConstructors: time 9.247e-05/0.007715, allocations: 122.2 kB / 0.6763 GB, free: 2.34 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 5.325e-05/0.007776, allocations: 27.94 kB / 0.6763 GB, free: 2.312 MB / 0.545 GB Notification: Performance of FrontEnd: time 2.615e-05/0.007808, allocations: 11.88 kB / 0.6763 GB, free: 2.301 MB / 0.545 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 28 (24) * Number of variables: 28 (24) Notification: Performance of Bindings: time 0.001019/0.008831, allocations: 0.8818 MB / 0.6772 GB, free: 1.316 MB / 0.545 GB Notification: Performance of FunctionAlias: time 0.0001682/0.009006, allocations: 95.8 kB / 0.6773 GB, free: 1.223 MB / 0.545 GB Notification: Performance of Early Inline: time 0.0009299/0.009944, allocations: 0.812 MB / 0.6781 GB, free: 392 kB / 0.545 GB Notification: Performance of simplify1: time 3.293e-05/0.00999, allocations: 27.95 kB / 0.6781 GB, free: 364 kB / 0.545 GB Notification: Performance of Alias: time 0.0007033/0.0107, allocations: 494.5 kB / 0.6786 GB, free: 15.81 MB / 0.5606 GB Notification: Performance of simplify2: time 2.611e-05/0.01074, allocations: 27.94 kB / 0.6786 GB, free: 15.79 MB / 0.5606 GB Notification: Performance of Events: time 0.0004267/0.01117, allocations: 315.3 kB / 0.6789 GB, free: 15.48 MB / 0.5606 GB Notification: Performance of Detect States: time 0.0005643/0.01174, allocations: 495.5 kB / 0.6794 GB, free: 14.98 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.000193/0.01195, allocations: 143.3 kB / 0.6795 GB, free: 14.84 MB / 0.5606 GB Error: Internal error NBSorting.tarjan failed to sort system: system vars Variables (24/28) ******************************* (1) [DISS] (1) protected Integer triMovMea.index (fixed = true, start = 0) (2) [DISS] (1) protected Integer triMovMea2.counter (fixed = true, start = 0) (3) [DISS] (1) Real triMovMea2.y (4) [DISS] (3) protected Real[3] triMovMea.ySample (fixed = {true for $i1 in 1:3}, start = {0.0 for $i1 in 1:3}) (5) [ALGB] (1) Real triMovMea.u (6) [DISS] (1) protected Integer triMovMea1.index (fixed = true, start = 0) (7) [DISS] (1) protected Integer triMovMea.iSample (fixed = true, start = 0) (8) [DISS] (1) Real triMovMea.y (9) [DISS] (1) Boolean triMovMea.trigger (10) [DISS] (1) protected Integer triMovMea2.index (fixed = true, start = 0) (11) [DISS] (1) Real triMovMea1.y (12) [ALGB] (1) Real $FUN_1 (13) [DISS] (1) protected Integer triMovMea1.iSample (fixed = true, start = 0) (14) [DISC] (1) Boolean $TEV_28 (15) [DISC] (1) Boolean $TEV_27 (16) [DISC] (1) Boolean $TEV_26 (17) [DISC] (1) Boolean $TEV_25 (18) [DISS] (1) protected Real[1] triMovMea1.ySample (fixed = {true for $i1 in 1:1}, start = {0.0 for $i1 in 1:1}) (19) [DISS] (1) protected Integer triMovMea2.iSample (fixed = true, start = 0) (20) [DISC] (1) Boolean $TEV_24 (21) [DISS] (1) Boolean booPul1.y (22) [DISS] (3) protected Real[3] triMovMea2.ySample (fixed = {true for $i1 in 1:3}, start = {0.0 for $i1 in 1:3}) (23) [DISS] (1) protected Integer triMovMea1.counter (fixed = true, start = 0) (24) [DISS] (1) protected Integer triMovMea.counter (fixed = true, start = 0) system eqns Equations (24/28) ******************************* (1) [WHEN] (1)when {initial(), triMovMea.trigger} then (1) [----] triMovMea1.y := sum(triMovMea1.ySample) / triMovMea1.counter (1) [----] end when; (2) [WHEN] (1)when {initial(), triMovMea.trigger} then (2) [----] triMovMea1.counter := if $PRE.triMovMea1.counter == 1 then 1 else $PRE.triMovMea1.counter + 1 (2) [----] end when; (3) [SCAL] (1) $FUN_1 = sin(6.283185307179586 * sin.freqHz * (time - sin.startTime) + sin.phase) ($RES_$AUX_26) (4) [WHEN] (1)when {initial(), booPul1.y} then (4) [----] triMovMea2.y := sum(triMovMea2.ySample) / triMovMea2.counter (4) [----] end when; (5) [WHEN] (1)when {initial(), booPul1.y} then (5) [----] triMovMea2.counter := if $PRE.triMovMea2.counter == 3 then 3 else $PRE.triMovMea2.counter + 1 (5) [----] end when; (6) [WHEN] (1)when {initial(), triMovMea.trigger} then (6) [----] triMovMea1.index := mod($PRE.triMovMea1.iSample, 1) + 1 (6) [----] end when; (7) [WHEN] (3)when {initial(), booPul1.y} then (7) [----] triMovMea2.ySample := {if i == triMovMea2.index then triMovMea.u else $PRE.triMovMea2.ySample for i in 1:3} (7) [----] end when; (8) [WHEN] (1)when {initial(), triMovMea.trigger} then (8) [----] triMovMea1.iSample := $PRE.triMovMea1.iSample + 1 (8) [----] end when; (9) [WHEN] (1)when {initial(), booPul1.y} then (9) [----] triMovMea2.iSample := $PRE.triMovMea2.iSample + 1 (9) [----] end when; (10) [WHEN] (1)when {initial(), triMovMea.trigger} then (10) [----] triMovMea1.ySample := {if 1 == triMovMea1.index then triMovMea.u else $PRE.triMovMea1.ySample} (10) [----] end when; (11) [WHEN] (1)when {initial(), booPul1.y} then (11) [----] triMovMea2.index := mod($PRE.triMovMea2.iSample, 3) + 1 (11) [----] end when; (12) [WHEN] (1)when {initial(), triMovMea.trigger} then (12) [----] triMovMea.iSample := $PRE.triMovMea.iSample + 1 (12) [----] end when; (13) [WHEN] (1)when $TEV_24 then (13) [----] booPul1.y := false (13) [----] else when $TEV_25 then (13) [----] booPul1.y := true (13) [----] end when; (14) [WHEN] (1)when {initial(), triMovMea.trigger} then (14) [----] triMovMea.y := sum(triMovMea.ySample) / triMovMea.counter (14) [----] end when; (15) [SCAL] (1) $TEV_25 = sample(6, booPul1.t0, booPul1.period) ($RES_EVT_30) (16) [WHEN] (1)when {initial(), triMovMea.trigger} then (16) [----] triMovMea.index := mod($PRE.triMovMea.iSample, 3) + 1 (16) [----] end when; (17) [SCAL] (1) $TEV_26 = sample(7, booPul.t1, booPul.period) ($RES_EVT_31) (18) [WHEN] (1)when {initial(), triMovMea.trigger} then (18) [----] triMovMea.counter := if $PRE.triMovMea.counter == 3 then 3 else $PRE.triMovMea.counter + 1 (18) [----] end when; (19) [SCAL] (1) $TEV_27 = sample(8, booPul.t0, booPul.period) ($RES_EVT_32) (20) [WHEN] (3)when {initial(), triMovMea.trigger} then (20) [----] triMovMea.ySample := {if i == triMovMea.index then triMovMea.u else $PRE.triMovMea.ySample for i in 1:3} (20) [----] end when; (21) [SCAL] (1) $TEV_28 = time < sin.startTime ($RES_EVT_33) (22) [WHEN] (1)when $TEV_26 then (22) [----] triMovMea.trigger := false (22) [----] else when $TEV_27 then (22) [----] triMovMea.trigger := true (22) [----] end when; (23) [SCAL] (1) triMovMea.u = sin.offset + (if $TEV_28 then 0.0 else sin.amplitude * $FUN_1) ($RES_SIM_19) (24) [SCAL] (1) $TEV_24 = sample(5, booPul1.t1, booPul1.period) ($RES_EVT_29) =================== Scalar Matching =================== variable to equation ********************** var 1 --> eqn 18 var 2 --> eqn 5 var 3 --> eqn 4 var 4 --> eqn 24 var 5 --> eqn 23 var 6 --> eqn 22 var 7 --> eqn 27 var 8 --> eqn 6 var 9 --> eqn 14 var 10 --> eqn 16 var 11 --> eqn 26 var 12 --> eqn 13 var 13 --> eqn 1 var 14 --> eqn 3 var 15 --> eqn 10 var 16 --> eqn 25 var 17 --> eqn 21 var 18 --> eqn 19 var 19 --> eqn 17 var 20 --> eqn 12 var 21 --> eqn 11 var 22 --> eqn 28 var 23 --> eqn 15 var 24 --> eqn 8 var 25 --> eqn 7 var 26 --> eqn 9 var 27 --> eqn 2 var 28 --> eqn 20 equation to variable ********************** eqn 1 --> var 13 eqn 2 --> var 27 eqn 3 --> var 14 eqn 4 --> var 3 eqn 5 --> var 2 eqn 6 --> var 8 eqn 7 --> var 25 eqn 8 --> var 24 eqn 9 --> var 26 eqn 10 --> var 15 eqn 11 --> var 21 eqn 12 --> var 20 eqn 13 --> var 12 eqn 14 --> var 9 eqn 15 --> var 23 eqn 16 --> var 10 eqn 17 --> var 19 eqn 18 --> var 1 eqn 19 --> var 18 eqn 20 --> var 28 eqn 21 --> var 17 eqn 22 --> var 6 eqn 23 --> var 5 eqn 24 --> var 4 eqn 25 --> var 16 eqn 26 --> var 11 eqn 27 --> var 7 eqn 28 --> var 22