Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_8_Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl.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.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl") translateModel(Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_8_Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001129/0.001129, allocations: 100.7 kB / 16.37 MB, free: 6.309 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.001106/0.001106, allocations: 194.6 kB / 17.3 MB, free: 5.895 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.142/1.142, 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.534/1.534, allocations: 292.3 MB / 0.5496 GB, free: 17.66 MB / 462.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 1.959e-05/1.962e-05, allocations: 5.797 kB / 0.6728 GB, free: 5.914 MB / 0.545 GB Notification: Performance of NFInst.instantiate(Buildings.Examples.ChillerPlant.BaseClasses.Controls.Examples.BatteryControl): time 0.003032/0.003065, allocations: 2.272 MB / 0.6751 GB, free: 3.625 MB / 0.545 GB Notification: Performance of NFInst.instExpressions: time 0.001363/0.004441, allocations: 0.9904 MB / 0.676 GB, free: 2.625 MB / 0.545 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001194/0.00457, allocations: 11.94 kB / 0.676 GB, free: 2.613 MB / 0.545 GB Notification: Performance of NFTyping.typeComponents: time 0.0001618/0.004738, allocations: 59.34 kB / 0.6761 GB, free: 2.555 MB / 0.545 GB Notification: Performance of NFTyping.typeBindings: time 0.0001853/0.00493, allocations: 59.39 kB / 0.6762 GB, free: 2.496 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004443/0.005389, allocations: 275.6 kB / 0.6764 GB, free: 2.227 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.000487/0.005886, allocations: 0.605 MB / 0.677 GB, free: 1.621 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0004911/0.006384, allocations: 0.4892 MB / 0.6775 GB, free: 1.125 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002332/0.006624, allocations: 271.3 kB / 0.6777 GB, free: 0.8594 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002178/0.00685, allocations: 259 kB / 0.678 GB, free: 0.6055 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 7.795e-05/0.006935, allocations: 72 kB / 0.6781 GB, free: 0.5352 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001059/0.007046, allocations: 87.98 kB / 0.6781 GB, free: 460 kB / 0.545 GB Notification: Performance of combineBinaries: time 0.0004003/0.007453, allocations: 0.7032 MB / 0.6788 GB, free: 15.73 MB / 0.5606 GB Notification: Performance of replaceArrayConstructors: time 0.0001899/0.007649, allocations: 441.2 kB / 0.6793 GB, free: 15.3 MB / 0.5606 GB Notification: Performance of NFVerifyModel.verify: time 7.26e-05/0.007727, allocations: 75.75 kB / 0.6793 GB, free: 15.22 MB / 0.5606 GB Notification: Performance of FrontEnd: time 6.822e-05/0.007801, allocations: 55.62 kB / 0.6794 GB, free: 15.17 MB / 0.5606 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 134 (131) * Number of variables: 128 (122) Notification: Performance of Bindings: time 0.001767/0.009573, allocations: 2.129 MB / 0.6815 GB, free: 12.92 MB / 0.5606 GB Notification: Performance of FunctionAlias: time 0.0002145/0.009796, allocations: 223.5 kB / 0.6817 GB, free: 12.7 MB / 0.5606 GB Notification: Performance of Early Inline: time 0.001291/0.01109, allocations: 1.565 MB / 0.6832 GB, free: 11.09 MB / 0.5606 GB Notification: Performance of simplify1: time 9.997e-05/0.0112, allocations: 115.8 kB / 0.6833 GB, free: 10.98 MB / 0.5606 GB Notification: Performance of Alias: time 0.002328/0.01354, allocations: 2.488 MB / 0.6857 GB, free: 8.227 MB / 0.5606 GB Notification: Performance of simplify2: time 6.982e-05/0.01361, allocations: 75.89 kB / 0.6858 GB, free: 8.152 MB / 0.5606 GB Notification: Performance of Events: time 0.0003702/0.01399, allocations: 343.1 kB / 0.6861 GB, free: 7.812 MB / 0.5606 GB Notification: Performance of Detect States: time 0.000499/0.0145, allocations: 0.6037 MB / 0.6867 GB, free: 7.195 MB / 0.5606 GB Notification: Performance of Partitioning: time 0.0005514/0.01506, allocations: 0.589 MB / 0.6873 GB, free: 6.598 MB / 0.5606 GB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency con.alternative.outPort.occupied could not be devided by the body size 2 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (2) con.alternative.join.occupied = {con.alternative.outPort.occupied for $i1 in 1:2} ($RES_SIM_65) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (106/114) **************************** (1) [ALGB] (1) protected flow Real con.discharge.outerStatePort.subgraphStatePort.activeSteps (2) [ALGB] (2) Real[2] con.multiSwitch1.expr = {2e5, -4e5} (3) [DISC] (2) Boolean[2] con.alternative.split.available (4) [DISC] (1) Boolean[1] con.charge.inPort.occupied (5) [DISC] (1) final Boolean con.t1.localCondition = con.t1.localCondition (6) [DISC] (2) Boolean[2] con.alternative.split.reset (7) [ALGB] (1) protected Real con.t1.t_dummy (8) [DISC] (1) Boolean con.t3.inPort.available (9) [ALGB] (1) Real $FUN_11 (10) [ALGB] (1) Real $FUN_10 (11) [DISC] (1) protected Boolean con.off.newActive (12) [DISC] (1) Boolean[1] con.discharge.inPort.occupied (13) [DISC] (1) protected Boolean con.discharge.newActive (14) [DISC] (1) Boolean[1] con.discharge.inPort.set (15) [DISC] (1) protected Boolean con.charge.newActive (16) [DISS] (1) protected Boolean con.off.oldActive (17) [DISC] (1) Boolean[1] con.charge.outPort.reset (18) [DISC] (1) Boolean con.alternative.inPort.available (19) [DISS] (1) protected Boolean con.discharge.oldActive (20) [DISC] (1) Boolean[1] con.charge.outPort.available (21) [DISS] (1) protected Boolean con.charge.oldActive (22) [DISC] (1) Boolean con.t2.inPort.available (23) [DISC] (1) Boolean[1] con.charge.inPort.set (24) [DISC] (1) Boolean $FUN_9 (25) [DISC] (1) Boolean $FUN_8 (26) [DISC] (1) Boolean $FUN_7 (27) [DISC] (1) Boolean[1] con.off.inPort.set (28) [DISC] (1) Boolean $FUN_6 (29) [DISC] (1) protected Boolean con.charge.outerStatePort.localActive = con.charge.outerStatePort.localActive (30) [DISC] (1) protected Boolean con.discharge.outerStatePort.localActive = con.discharge.outerStatePort.localActive (31) [DISC] (1) Boolean $FUN_3 (32) [DISC] (1) Boolean $FUN_2 (33) [DISC] (1) Boolean con.alternative.outPort.set (34) [DISC] (1) Boolean[1] con.off.outPort.reset (35) [ALGB] (1) Real SOC.y (36) [DISC] (2) Boolean[2] $SEV_9[$i1] (37) [DISC] (1) Boolean con.t4.outPort.set (38) [DISC] (1) Boolean con.t3.outPort.set (39) [DISC] (1) Boolean con.t2.outPort.set (40) [DISC] (1) Boolean con.not1.u (41) [DISC] (1) Boolean con.t1.enableFire (42) [DISC] (1) Boolean con.t1.outPort.occupied (43) [DISC] (2) Boolean[2] con.alternative.join.occupied (44) [DISC] (1) protected Integer con.multiSwitch1.firstActiveIndex (45) [DISC] (1) final Boolean con.t3.localCondition = con.t3.localCondition (46) [ALGB] (1) Real con.t1.t (47) [DISC] (1) Boolean $SEV_18 (48) [DISC] (1) Boolean[1] con.off.outPort.available (49) [DISC] (1) Boolean con.t1.outPort.set (50) [DISC] (1) Boolean con.t1.inPort.available (51) [DISC] (1) Boolean $SEV_17 (52) [DISC] (1) Boolean $SEV_16 (53) [DISC] (1) Boolean $SEV_15 (54) [DISC] (1) Boolean $SEV_14 (55) [DISC] (1) Integer con.stateGraphRoot.activeSteps (56) [DISC] (1) Boolean $SEV_13 (57) [ALGB] (1) protected flow Real con.charge.outerStatePort.subgraphStatePort.activeSteps (58) [DISC] (1) Boolean $SEV_12 (59) [DISC] (1) Boolean $SEV_11 (60) [DISC] (1) Boolean $SEV_10 (61) [DISC] (1) Boolean con.alternative.inPort.reset (62) [DISC] (1) Boolean con.t2.enableFire (63) [DISC] (1) Boolean con.lessThreshold.y (64) [DISC] (1) Boolean con.t2.outPort.occupied (65) [DISC] (2) Boolean[2] $SEV_8[$i1] (66) [DISC] (1) Boolean[1] con.discharge.outPort.available (67) [DISC] (1) protected Boolean con.off.outerStatePort.localActive = con.off.outerStatePort.localActive (68) [DISC] (1) Boolean con.alternative.outPort.occupied (69) [DISC] (1) final Boolean con.t2.localCondition = con.t2.localCondition (70) [DISC] (1) Boolean $SEV_7 (71) [DISC] (1) final Boolean con.t4.localCondition = con.t4.localCondition (72) [DISC] (1) Boolean $SEV_6 (73) [DISC] (1) Boolean $SEV_5 (74) [ALGB] (1) Real con.multiSwitch1.y (75) [DISC] (1) Boolean $SEV_4 (76) [DISC] (1) Boolean $TEV_9 (77) [DISC] (1) Boolean $SEV_3 (78) [DISC] (1) Boolean $TEV_8 (79) [DISC] (1) Boolean $SEV_2 (80) [DISC] (1) Boolean $TEV_7 (81) [DISC] (1) Boolean $SEV_1 (82) [DISC] (1) Boolean $TEV_6 (83) [DISC] (2) Boolean[2] con.multiSwitch1.u (84) [DISC] (1) Boolean $SEV_0 (85) [DISC] (1) Boolean $TEV_5 (86) [DISC] (1) Boolean $TEV_4 (87) [DISC] (1) Boolean $TEV_3 (88) [DISC] (1) Boolean $TEV_2 (89) [DISC] (1) Boolean con.t4.inPort.available (90) [DISC] (1) Boolean $TEV_1 (91) [DISC] (1) Boolean con.t4.outPort.occupied (92) [DISC] (1) Boolean[1] con.discharge.outPort.reset (93) [DISC] (1) Boolean $TEV_0 (94) [ALGB] (1) protected Real con.t2.t_dummy (95) [DISC] (2) Boolean[2] con.alternative.join.set (96) [DISC] (1) Boolean $TEV_14 (97) [DISC] (1) Boolean[1] con.off.inPort.occupied (98) [DISC] (1) Boolean $TEV_13 (99) [DISC] (1) Boolean $TEV_12 (100) [DISC] (1) Boolean $TEV_11 (101) [DISC] (1) Boolean $TEV_10 (102) [DISC] (1) Boolean con.t3.outPort.occupied (103) [ALGB] (1) flow Real con.stateGraphRoot.subgraphStatePort.activeSteps (104) [ALGB] (1) Real con.t2.t (105) [DISC] (1) Boolean con.greaterThreshold.y (106) [ALGB] (1) protected flow Real con.off.outerStatePort.subgraphStatePort.activeSteps System Equations (115/120) **************************** (1) [SCAL] (1) con.t2.enableFire = $SEV_4 ($RES_SIM_51) (2) [SCAL] (1) SOC.y = SOC.offset + (if $TEV_14 then 0.0 else SOC.amplitude * $FUN_10) ($RES_SIM_16) (3) [SCAL] (1) con.t2.outPort.set = $SEV_5 ($RES_SIM_52) (4) [SCAL] (1) con.t2.t = if con.t2.enableFire then con.t2.t_dummy else 0.0 ($RES_SIM_53) (5) [SCAL] (1) con.t4.outPort.set = $SEV_0 ($RES_SIM_19) (6) [SCAL] (1) con.t3.localCondition = $SEV_16 ($RES_SIM_90) (7) [WHEN] (1)when con.t2.enableFire then (7) [----] time - con.t2.t_dummy := time (7) [----] end when; (8) [SCAL] (1) con.lessThreshold.y = $SEV_17 ($RES_SIM_91) (9) [SCAL] (1) con.stateGraphRoot.subgraphStatePort.activeSteps + con.charge.outerStatePort.subgraphStatePort.activeSteps + con.discharge.outerStatePort.subgraphStatePort.activeSteps + con.off.outerStatePort.subgraphStatePort.activeSteps = 0.0 ($RES_SIM_92) (10) [SCAL] (1) con.t1.enableFire = $SEV_6 ($RES_SIM_58) (11) [SCAL] (1) con.discharge.outerStatePort.localActive = con.multiSwitch1.u[2] ($RES_SIM_94) (12) [SCAL] (1) con.t1.outPort.set = $SEV_7 ($RES_SIM_59) (13) [SCAL] (1) con.charge.outerStatePort.localActive = con.multiSwitch1.u[1] ($RES_SIM_95) (14) [SCAL] (1) con.t4.outPort.set = con.alternative.join[2].set ($RES_SIM_96) (15) [SCAL] (1) con.t4.outPort.occupied = con.alternative.join[2].occupied ($RES_SIM_97) (16) [SCAL] (1) $TEV_7 = $PRE.con.charge.newActive ($RES_EVT_170) (17) [SCAL] (1) con.t3.outPort.set = con.alternative.join[1].set ($RES_SIM_98) (18) [SCAL] (1) $TEV_8 = $PRE.con.t2.enableFire ($RES_EVT_171) (19) [SCAL] (1) con.t3.outPort.occupied = con.alternative.join[1].occupied ($RES_SIM_99) (20) [SCAL] (1) $TEV_9 = $PRE.con.t1.enableFire ($RES_EVT_172) (21) [SCAL] (1) $TEV_10 = $PRE.con.off.oldActive ($RES_EVT_173) (22) [SCAL] (1) $TEV_11 = $PRE.con.off.outerStatePort.localActive ($RES_EVT_174) (23) [SCAL] (1) $TEV_12 = $PRE.con.off.newActive ($RES_EVT_175) (24) [SCAL] (1) $TEV_13 = $PRE.con.multiSwitch1.u ($RES_EVT_176) (25) [SCAL] (1) $TEV_14 = time < SOC.startTime ($RES_EVT_177) (26) [SCAL] (1) $SEV_0 = (con.t4.localCondition and con.t4.inPort.available) and not con.t4.outPort.occupied ($RES_EVT_178) (27) [SCAL] (1) $SEV_1 = (con.t3.localCondition and con.t3.inPort.available) and not con.t3.outPort.occupied ($RES_EVT_179) (28) [SCAL] (1) con.t2.outPort.set = con.alternative.split[2].reset ($RES_SIM_100) (29) [SCAL] (1) con.t2.inPort.available = con.alternative.split[2].available ($RES_SIM_101) (30) [SCAL] (1) con.t1.outPort.set = con.alternative.split[1].reset ($RES_SIM_102) (31) [SCAL] (1) con.t1.inPort.available = con.alternative.split[1].available ($RES_SIM_103) (32) [SCAL] (1) con.t1.t = if con.t1.enableFire then con.t1.t_dummy else 0.0 ($RES_SIM_60) (33) [SCAL] (1) con.alternative.outPort.set = con.off.inPort[1].set ($RES_SIM_108) (34) [SCAL] (1) con.t3.outPort.set = $SEV_1 ($RES_SIM_26) (35) [WHEN] (1)when con.t1.enableFire then (35) [----] time - con.t1.t_dummy := time (35) [----] end when; (36) [SCAL] (1) con.alternative.outPort.occupied = con.off.inPort[1].occupied ($RES_SIM_109) (37) [ARRY] (2) con.alternative.join.occupied = {con.alternative.outPort.occupied for $i1 in 1:2} ($RES_SIM_65) (38) [FOR-] (2) ($RES_SIM_66) (38) [----] for $i1 in 1:2 loop (38) [----] [SCAL] (1) con.alternative.split[$i1].available = if $SEV_8[$i1] then con.alternative.inPort.available else $SEV_9[$i1] ($RES_SIM_67) (38) [----] end for; (39) [SCAL] (1) $SEV_2 = $FUN_8 or con.discharge.outerStatePort.localActive and not $FUN_9 ($RES_EVT_180) (40) [SCAL] (1) $SEV_3 = $FUN_6 or con.charge.outerStatePort.localActive and not $FUN_7 ($RES_EVT_181) (41) [SCAL] (1) $SEV_4 = (con.t2.localCondition and con.t2.inPort.available) and not con.t2.outPort.occupied ($RES_EVT_182) (42) [SCAL] (1) $SEV_5 = con.t2.enableFire and time >= ((time - con.t2.t_dummy) + con.t2.waitTime) ($RES_EVT_183) (43) [SCAL] (1) $SEV_6 = (con.t1.localCondition and con.t1.inPort.available) and not con.t1.outPort.occupied ($RES_EVT_184) (44) [SCAL] (1) $SEV_7 = con.t1.enableFire and time >= ((time - con.t1.t_dummy) + con.t1.waitTime) ($RES_EVT_185) (45) [FOR-] (2) ($RES_EVT_186) (45) [----] for $i1 in 1:2 loop (45) [----] [SCAL] (1) $SEV_8[$i1] = $i1 == 1 ($RES_EVT_187) (45) [----] end for; (46) [FOR-] (2) ($RES_EVT_188) (46) [----] for $i1 in 1:2 loop (46) [----] [SCAL] (1) $SEV_9[$i1] = con.alternative.split[$i1 - 1].available and not con.alternative.split[$i1 - 1].reset ($RES_EVT_189) (46) [----] end for; (47) [SCAL] (1) con.discharge.outPort[1].reset = con.t4.outPort.set ($RES_SIM_110) (48) [SCAL] (1) con.discharge.outPort[1].available = con.t4.inPort.available ($RES_SIM_111) (49) [SCAL] (1) con.charge.outPort[1].reset = con.t3.outPort.set ($RES_SIM_112) (50) [SCAL] (1) con.charge.outPort[1].available = con.t3.inPort.available ($RES_SIM_113) (51) [SCAL] (1) con.discharge.outPort[1].reset = false ($RES_SIM_31) (52) [SCAL] (1) con.t2.outPort.set = con.discharge.inPort[1].set ($RES_SIM_114) (53) [SCAL] (1) con.discharge.inPort[1].set = false ($RES_SIM_32) (54) [SCAL] (1) con.t2.outPort.occupied = con.discharge.inPort[1].occupied ($RES_SIM_115) (55) [SCAL] (1) con.discharge.outPort[1].available = con.discharge.outerStatePort.localActive ($RES_SIM_33) (56) [SCAL] (1) con.t1.outPort.set = con.charge.inPort[1].set ($RES_SIM_116) (57) [SCAL] (1) con.discharge.inPort[1].occupied = con.discharge.outerStatePort.localActive ($RES_SIM_34) (58) [SCAL] (1) con.multiSwitch1.firstActiveIndex = Modelica.Math.BooleanVectors.firstTrueIndex(con.multiSwitch1.u) ($RES_$AUX_160) (59) [SCAL] (1) con.t1.outPort.occupied = con.charge.inPort[1].occupied ($RES_SIM_117) (60) [WHEN] (1)when false then (60) [----] con.discharge.oldActive := con.discharge.outerStatePort.localActive (60) [----] end when; (61) [SCAL] (1) con.off.outPort[1].reset = con.alternative.inPort.reset ($RES_SIM_118) (62) [SCAL] (1) con.discharge.newActive = $SEV_2 ($RES_SIM_36) (63) [SCAL] (1) con.off.outPort[1].available = con.alternative.inPort.available ($RES_SIM_119) (64) [SCAL] (1) con.discharge.outerStatePort.localActive = $TEV_4 ($RES_SIM_37) (65) [SCAL] (1) con.stateGraphRoot.activeSteps = -integer(con.stateGraphRoot.subgraphStatePort.activeSteps) ($RES_SIM_73) (66) [SCAL] (1) con.off.outPort[1].reset = false ($RES_SIM_74) (67) [SCAL] (1) con.discharge.outerStatePort.subgraphStatePort.activeSteps = if con.discharge.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_39) (68) [SCAL] (1) con.off.inPort[1].set = false ($RES_SIM_75) (69) [SCAL] (1) con.off.outPort[1].available = con.off.outerStatePort.localActive ($RES_SIM_76) (70) [SCAL] (1) con.off.inPort[1].occupied = con.off.outerStatePort.localActive ($RES_SIM_77) (71) [WHEN] (1)when false then (71) [----] con.off.oldActive := con.off.outerStatePort.localActive (71) [----] end when; (72) [SCAL] (1) con.off.newActive = $SEV_10 ($RES_SIM_79) (73) [SCAL] (1) $SEV_10 = $FUN_2 or con.off.outerStatePort.localActive and not $FUN_3 ($RES_EVT_190) (74) [SCAL] (1) $SEV_11 = con.multiSwitch1.firstActiveIndex == 0 ($RES_EVT_191) (75) [SCAL] (1) $SEV_12 = SOC.y <= con.lessEqualThreshold.threshold ($RES_EVT_192) (76) [SCAL] (1) $SEV_13 = SOC.y > con.greaterThreshold.threshold ($RES_EVT_193) (77) [SCAL] (1) $SEV_14 = con.not1.u and con.greaterThreshold.y ($RES_EVT_194) (78) [SCAL] (1) $SEV_15 = not con.not1.u and con.lessThreshold.y ($RES_EVT_195) (79) [SCAL] (1) $SEV_16 = SOC.y >= con.greaterEqualThreshold.threshold ($RES_EVT_196) (80) [SCAL] (1) $SEV_17 = SOC.y < con.lessThreshold.threshold ($RES_EVT_197) (81) [SCAL] (1) $SEV_18 = $FUN_11 > 25200.0 and $FUN_11 <= 68400.0 ($RES_EVT_198) (82) [SCAL] (1) $FUN_2 = Modelica.StateGraph.Temporary.anyTrue(con.off.inPort.set) ($RES_$AUX_159) (83) [SCAL] (1) $FUN_3 = Modelica.StateGraph.Temporary.anyTrue(con.off.outPort.reset) ($RES_$AUX_158) (84) [SCAL] (1) con.alternative.inPort.reset = Modelica.StateGraph.Temporary.anyTrue(con.alternative.split.reset) ($RES_$AUX_157) (85) [SCAL] (1) con.alternative.outPort.set = Modelica.StateGraph.Temporary.anyTrue(con.alternative.join.set) ($RES_$AUX_156) (86) [SCAL] (1) $FUN_6 = Modelica.StateGraph.Temporary.anyTrue(con.charge.inPort.set) ($RES_$AUX_155) (87) [SCAL] (1) con.charge.outPort[1].reset = false ($RES_SIM_40) (88) [SCAL] (1) $FUN_7 = Modelica.StateGraph.Temporary.anyTrue(con.charge.outPort.reset) ($RES_$AUX_154) (89) [SCAL] (1) con.charge.inPort[1].set = false ($RES_SIM_41) (90) [SCAL] (1) $FUN_8 = Modelica.StateGraph.Temporary.anyTrue(con.discharge.inPort.set) ($RES_$AUX_153) (91) [SCAL] (1) con.charge.outPort[1].available = con.charge.outerStatePort.localActive ($RES_SIM_42) (92) [SCAL] (1) $FUN_9 = Modelica.StateGraph.Temporary.anyTrue(con.discharge.outPort.reset) ($RES_$AUX_152) (93) [SCAL] (1) con.charge.inPort[1].occupied = con.charge.outerStatePort.localActive ($RES_SIM_43) (94) [SCAL] (1) $FUN_10 = sin(6.283185307179586 * SOC.freqHz * (time - SOC.startTime) + SOC.phase) ($RES_$AUX_151) (95) [WHEN] (1)when false then (95) [----] con.charge.oldActive := con.charge.outerStatePort.localActive (95) [----] end when; (96) [SCAL] (1) con.not1.u = $SEV_18 ($RES_BND_139) (97) [SCAL] (1) $FUN_11 = mod(time, 86400.0) ($RES_$AUX_150) (98) [SCAL] (1) con.off.outerStatePort.localActive = $TEV_12 ($RES_SIM_80) (99) [SCAL] (1) con.charge.newActive = $SEV_3 ($RES_SIM_45) (100) [SCAL] (1) con.charge.outerStatePort.localActive = $TEV_7 ($RES_SIM_46) (101) [SCAL] (1) con.off.outerStatePort.subgraphStatePort.activeSteps = if con.off.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_82) (102) [SCAL] (1) con.multiSwitch1.y = if $SEV_11 then con.multiSwitch1.y_default else con.multiSwitch1.expr[con.multiSwitch1.firstActiveIndex] ($RES_SIM_83) (103) [SCAL] (1) con.charge.outerStatePort.subgraphStatePort.activeSteps = if con.charge.outerStatePort.localActive then 1.0 else 0.0 ($RES_SIM_48) (104) [SCAL] (1) con.t4.localCondition = $SEV_12 ($RES_SIM_85) (105) [SCAL] (1) con.greaterThreshold.y = $SEV_13 ($RES_SIM_86) (106) [SCAL] (1) con.t2.localCondition = $SEV_14 ($RES_SIM_87) (107) [SCAL] (1) con.t1.localCondition = $SEV_15 ($RES_SIM_88) (108) [SCAL] (1) $TEV_0 = $PRE.con.t4.outPort.set ($RES_EVT_163) (109) [SCAL] (1) $TEV_1 = $PRE.con.t3.outPort.set ($RES_EVT_164) (110) [SCAL] (1) $TEV_2 = $PRE.con.discharge.oldActive ($RES_EVT_165) (111) [SCAL] (1) $TEV_3 = $PRE.con.discharge.outerStatePort.localActive ($RES_EVT_166) (112) [SCAL] (1) $TEV_4 = $PRE.con.discharge.newActive ($RES_EVT_167) (113) [SCAL] (1) $TEV_5 = $PRE.con.charge.oldActive ($RES_EVT_168) (114) [SCAL] (1) $TEV_6 = $PRE.con.charge.outerStatePort.localActive ($RES_EVT_169) (115) [ARRY] (2) con.multiSwitch1.expr = {2e5, -4e5} ($RES_BND_140)