Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_latest_Buildings.Controls.DemandResponse.Examples.ClientLBNL90.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/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 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+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 Buildings with version 10.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/package.mo) Running command: "" <> buildModelFMU(Buildings.Controls.DemandResponse.Examples.ClientLBNL90,fileNamePrefix="Buildings_latest_Buildings_Controls_DemandResponse_Examples_ClientLBNL90",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Buildings.Controls.DemandResponse.Examples.ClientLBNL90,fileNamePrefix="Buildings_latest_Buildings_Controls_DemandResponse_Examples_ClientLBNL90",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/package.mo): time 2.392/2.392, allocations: 390.5 MB / 398 MB, free: 10.95 MB / 314.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001043/0.001043, allocations: 183.9 kB / 491.2 MB, free: 1.566 MB / 394.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.531/1.531, allocations: 221.5 MB / 0.7868 GB, free: 13.29 MB / 0.5573 GB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008894/0.0008897, allocations: 91.78 kB / 0.9269 GB, free: 13.79 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 1.76e-05/1.763e-05, allocations: 0 / 1.073 GB, free: 182 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2537/0.2538, allocations: 143 MB / 1.212 GB, free: 39.45 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.9273/1.181, allocations: 162.5 MB / 1.371 GB, free: 17.2 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002312/1.182, allocations: 77.64 kB / 1.371 GB, free: 17.2 MB / 0.823 GB Notification: Performance of FrontEnd - DAE generated: time 0.4593/1.641, allocations: 263.7 MB / 1.629 GB, free: 13.3 MB / 1.042 GB Notification: Performance of FrontEnd: time 2.044e-06/1.641, allocations: 4 kB / 1.629 GB, free: 13.3 MB / 1.042 GB Notification: Performance of Transformations before backend: time 0.00169/1.643, allocations: 0.6718 MB / 1.629 GB, free: 12.63 MB / 1.042 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 11299 * Number of variables: 11299 Notification: Performance of Generate backend data structure: time 0.07889/1.721, allocations: 34.74 MB / 1.663 GB, free: 9.648 MB / 1.073 GB Notification: Performance of prepare preOptimizeDAE: time 6.317e-05/1.722, allocations: 8.031 kB / 1.663 GB, free: 9.641 MB / 1.073 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.01085/1.732, allocations: 3.622 MB / 1.667 GB, free: 5.977 MB / 1.073 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.02786/1.76, allocations: 11.19 MB / 1.678 GB, free: 10.71 MB / 1.089 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001274/1.76, allocations: 64 kB / 1.678 GB, free: 10.64 MB / 1.089 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.009593/1.77, allocations: 2.211 MB / 1.68 GB, free: 8.434 MB / 1.089 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.004682/1.775, allocations: 2.154 MB / 1.682 GB, free: 6.273 MB / 1.089 GB Error: An independent subset of the model has imbalanced number of equations (11256) and variables (312). variables: yShed.y ene.y ene.u relErrWeather.y relErrWeather.u relErrAverage.y relErrAverage.u errorWeather.y errorWeather.u2 errorWeather.u1 clientWeather.TOut clientWeather.switch.y clientWeather.switch.u3 clientWeather.switch.u2 clientWeather.switch.u1 clientWeather.tri.y clientWeather.t4.condition clientWeather.t4.outPort.set clientWeather.t4.outPort.occupied clientWeather.t4.inPort.reset clientWeather.t4.inPort.available clientWeather.t4.fire clientWeather.t4.enableFire clientWeather.t4.localCondition clientWeather.she.PPre clientWeather.she.yShed clientWeather.she.PCon clientWeather.she.oldActive clientWeather.she.newActive clientWeather.she.outerStatePort.localActive clientWeather.she.outerStatePort.subgraphStatePort.activeSteps clientWeather.she.outerStatePort.subgraphStatePort.resume clientWeather.she.outerStatePort.subgraphStatePort.suspend clientWeather.she.outPort[1].reset clientWeather.she.outPort[1].available clientWeather.she.inPort[1].set clientWeather.she.inPort[1].occupied clientWeather.she.localActive clientWeather.she.active clientWeather.t3.condition clientWeather.t3.outPort.set clientWeather.t3.outPort.occupied clientWeather.t3.inPort.reset clientWeather.t3.inPort.available clientWeather.t3.fire clientWeather.t3.enableFire clientWeather.t3.localCondition clientWeather.t2.condition clientWeather.t2.outPort.set clientWeather.t2.outPort.occupied clientWeather.t2.inPort.reset clientWeather.t2.inPort.available clientWeather.t2.fire clientWeather.t2.enableFire clientWeather.t2.localCondition clientWeather.norOpe.PPre clientWeather.norOpe.PCon clientWeather.norOpe.active clientWeather.norOpe.oldActive clientWeather.norOpe.newActive clientWeather.norOpe.outerStatePort.localActive clientWeather.norOpe.outerStatePort.subgraphStatePort.activeSteps clientWeather.norOpe.outerStatePort.subgraphStatePort.resume clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend clientWeather.norOpe.outPort[2].reset clientWeather.norOpe.outPort[2].available clientWeather.norOpe.outPort[1].reset clientWeather.norOpe.outPort[1].available clientWeather.norOpe.inPort[1].set clientWeather.norOpe.inPort[1].occupied clientWeather.norOpe.localActive clientWeather.t1.condition clientWeather.t1.outPort.set clientWeather.t1.outPort.occupied clientWeather.t1.inPort.reset clientWeather.t1.inPort.available clientWeather.t1.fire clientWeather.t1.enableFire clientWeather.t1.localCondition clientWeather.comBasLin.TOut clientWeather.comBasLin.stoHis.y clientWeather.comBasLin.stoHis.u clientWeather.comBasLin.basLin.TOut clientWeather.comBasLin.basLin.TOut_in_internal clientWeather.comBasLin.basLin.idxSam clientWeather.comBasLin.basLin.intTOutLast clientWeather.comBasLin.basLin.intTOut clientWeather.comBasLin.basLin.EHisAve clientWeather.comBasLin.basLin.EActAve clientWeather.comBasLin.basLin._storeHistory clientWeather.comBasLin.basLin._typeOfDay[1] clientWeather.comBasLin.basLin.iSam[1] clientWeather.comBasLin.basLin.tLast clientWeather.comBasLin.basLin.ELast clientWeather.comBasLin.basLin.sampleTrigger clientWeather.comBasLin.basLin.PAve clientWeather.comBasLin.basLin.adj clientWeather.comBasLin.basLin.storeHistory clientWeather.comBasLin.basLin.typeOfDay[2] clientWeather.comBasLin.basLin.typeOfDay[1] clientWeather.comBasLin.basLin.PPre[1] clientWeather.comBasLin.basLin.ECon clientWeather.comBasLin.isEventDay clientWeather.comBasLin.typeOfDay[2] clientWeather.comBasLin.typeOfDay[1] clientWeather.comBasLin.PPre[1] clientWeather.comBasLin.ECon clientWeather.comBasLin.oldActive clientWeather.comBasLin.newActive clientWeather.comBasLin.outerStatePort.localActive clientWeather.comBasLin.outerStatePort.subgraphStatePort.activeSteps clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend clientWeather.comBasLin.outPort[1].reset clientWeather.comBasLin.outPort[1].available clientWeather.comBasLin.inPort[3].set clientWeather.comBasLin.inPort[3].occupied clientWeather.comBasLin.inPort[2].set clientWeather.comBasLin.inPort[2].occupied clientWeather.comBasLin.inPort[1].set clientWeather.comBasLin.inPort[1].occupied clientWeather.comBasLin.localActive clientWeather.comBasLin.active clientWeather.transition.condition clientWeather.transition.outPort.set clientWeather.transition.outPort.occupied clientWeather.transition.inPort.reset clientWeather.transition.inPort.available clientWeather.transition.fire clientWeather.transition.enableFire clientWeather.transition.localCondition clientWeather.stateGraphRoot.activeSteps clientWeather.stateGraphRoot.subgraphStatePort.activeSteps clientWeather.stateGraphRoot.subgraphStatePort.resume clientWeather.stateGraphRoot.subgraphStatePort.suspend clientWeather.stateGraphRoot.resume clientWeather.stateGraphRoot.suspend clientWeather.initialStep.active clientWeather.initialStep.oldActive clientWeather.initialStep.newActive clientWeather.initialStep.outerStatePort.localActive clientWeather.initialStep.outerStatePort.subgraphStatePort.activeSteps clientWeather.initialStep.outerStatePort.subgraphStatePort.resume clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend clientWeather.initialStep.outPort[1].reset clientWeather.initialStep.outPort[1].available clientWeather.initialStep.localActive clientWeather.PPreNoShe[1] clientWeather.PPre clientWeather.yShed clientWeather.shed clientWeather.ECon clientWeather.isEventDay clientWeather.typeOfDay[2] clientWeather.typeOfDay[1] errorAverage.y errorAverage.u2 errorAverage.u1 drSig.y drSig.u bui90.timeScaled bui90.nextTimeEventScaled bui90.nextTimeEvent bui90.y[3] bui90.y[2] bui90.y[1] dayType.skipIDayIncrement dayType.sampleTrigger dayType.iDay dayType.y[2] dayType.y[1] clientAverage.switch.y clientAverage.switch.u3 clientAverage.switch.u2 clientAverage.switch.u1 clientAverage.tri.y clientAverage.t4.condition clientAverage.t4.outPort.set clientAverage.t4.outPort.occupied clientAverage.t4.inPort.reset clientAverage.t4.inPort.available clientAverage.t4.fire clientAverage.t4.enableFire clientAverage.t4.localCondition clientAverage.she.PPre clientAverage.she.yShed clientAverage.she.PCon clientAverage.she.oldActive clientAverage.she.newActive clientAverage.she.outerStatePort.localActive clientAverage.she.outerStatePort.subgraphStatePort.activeSteps clientAverage.she.outerStatePort.subgraphStatePort.resume clientAverage.she.outerStatePort.subgraphStatePort.suspend clientAverage.she.outPort[1].reset clientAverage.she.outPort[1].available clientAverage.she.inPort[1].set clientAverage.she.inPort[1].occupied clientAverage.she.localActive clientAverage.she.active clientAverage.t3.condition clientAverage.t3.outPort.set clientAverage.t3.outPort.occupied clientAverage.t3.inPort.reset clientAverage.t3.inPort.available clientAverage.t3.fire clientAverage.t3.enableFire clientAverage.t3.localCondition clientAverage.t2.condition clientAverage.t2.outPort.set clientAverage.t2.outPort.occupied clientAverage.t2.inPort.reset clientAverage.t2.inPort.available clientAverage.t2.fire clientAverage.t2.enableFire clientAverage.t2.localCondition clientAverage.norOpe.PPre clientAverage.norOpe.PCon clientAverage.norOpe.active clientAverage.norOpe.oldActive clientAverage.norOpe.newActive clientAverage.norOpe.outerStatePort.localActive clientAverage.norOpe.outerStatePort.subgraphStatePort.activeSteps clientAverage.norOpe.outerStatePort.subgraphStatePort.resume clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend clientAverage.norOpe.outPort[2].reset clientAverage.norOpe.outPort[2].available clientAverage.norOpe.outPort[1].reset clientAverage.norOpe.outPort[1].available clientAverage.norOpe.inPort[1].set clientAverage.norOpe.inPort[1].occupied clientAverage.norOpe.localActive clientAverage.t1.condition clientAverage.t1.outPort.set clientAverage.t1.outPort.occupied clientAverage.t1.inPort.reset clientAverage.t1.inPort.available clientAverage.t1.fire clientAverage.t1.enableFire clientAverage.t1.localCondition clientAverage.comBasLin.stoHis.y clientAverage.comBasLin.stoHis.u clientAverage.comBasLin.basLin.idxSam clientAverage.comBasLin.basLin.intTOutLast clientAverage.comBasLin.basLin.intTOut clientAverage.comBasLin.basLin.EHisAve clientAverage.comBasLin.basLin.EActAve clientAverage.comBasLin.basLin._storeHistory clientAverage.comBasLin.basLin._typeOfDay[1] clientAverage.comBasLin.basLin.iSam[1] clientAverage.comBasLin.basLin.tLast clientAverage.comBasLin.basLin.ELast clientAverage.comBasLin.basLin.sampleTrigger clientAverage.comBasLin.basLin.PAve clientAverage.comBasLin.basLin.adj clientAverage.comBasLin.basLin.storeHistory clientAverage.comBasLin.basLin.typeOfDay[2] clientAverage.comBasLin.basLin.typeOfDay[1] clientAverage.comBasLin.basLin.PPre[1] clientAverage.comBasLin.basLin.ECon clientAverage.comBasLin.isEventDay clientAverage.comBasLin.typeOfDay[2] clientAverage.comBasLin.typeOfDay[1] clientAverage.comBasLin.PPre[1] clientAverage.comBasLin.ECon clientAverage.comBasLin.oldActive clientAverage.comBasLin.newActive clientAverage.comBasLin.outerStatePort.localActive clientAverage.comBasLin.outerStatePort.subgraphStatePort.activeSteps clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend clientAverage.comBasLin.outPort[1].reset clientAverage.comBasLin.outPort[1].available clientAverage.comBasLin.inPort[3].set clientAverage.comBasLin.inPort[3].occupied clientAverage.comBasLin.inPort[2].set clientAverage.comBasLin.inPort[2].occupied clientAverage.comBasLin.inPort[1].set clientAverage.comBasLin.inPort[1].occupied clientAverage.comBasLin.localActive clientAverage.comBasLin.active clientAverage.transition.condition clientAverage.transition.outPort.set clientAverage.transition.outPort.occupied clientAverage.transition.inPort.reset clientAverage.transition.inPort.available clientAverage.transition.fire clientAverage.transition.enableFire clientAverage.transition.localCondition clientAverage.stateGraphRoot.activeSteps clientAverage.stateGraphRoot.subgraphStatePort.activeSteps clientAverage.stateGraphRoot.subgraphStatePort.resume clientAverage.stateGraphRoot.subgraphStatePort.suspend clientAverage.stateGraphRoot.resume clientAverage.stateGraphRoot.suspend clientAverage.initialStep.active clientAverage.initialStep.oldActive clientAverage.initialStep.newActive clientAverage.initialStep.outerStatePort.localActive clientAverage.initialStep.outerStatePort.subgraphStatePort.activeSteps clientAverage.initialStep.outerStatePort.subgraphStatePort.resume clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend clientAverage.initialStep.outPort[1].reset clientAverage.initialStep.outPort[1].available clientAverage.initialStep.localActive clientAverage.PPreNoShe[1] clientAverage.PPre clientAverage.yShed clientAverage.shed clientAverage.ECon clientAverage.isEventDay clientAverage.typeOfDay[2] clientAverage.typeOfDay[1] equations: 1 : clientAverage.initialStep.outerStatePort.localActive = clientAverage.initialStep.localActive 2 : clientAverage.initialStep.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.initialStep.outerStatePort.localActive then 1.0 else 0.0 3 : clientAverage.initialStep.active = clientAverage.initialStep.localActive 4 : clientAverage.initialStep.localActive = pre(clientAverage.initialStep.newActive) 5 : clientAverage.initialStep.newActive = if clientAverage.initialStep.outerStatePort.subgraphStatePort.resume then clientAverage.initialStep.oldActive else clientAverage.initialStep.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientAverage.initialStep.outPort[1].reset}) and not clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend 6 : clientAverage.initialStep.outPort[1].available = clientAverage.initialStep.localActive 7 : clientAverage.stateGraphRoot.suspend = false 8 : clientAverage.stateGraphRoot.resume = false 9 : clientAverage.stateGraphRoot.activeSteps = -integer(clientAverage.stateGraphRoot.subgraphStatePort.activeSteps) 10 : clientAverage.stateGraphRoot.suspend = clientAverage.stateGraphRoot.subgraphStatePort.suspend 11 : clientAverage.stateGraphRoot.resume = clientAverage.stateGraphRoot.subgraphStatePort.resume 12 : clientAverage.transition.localCondition = clientAverage.transition.condition 13 : clientAverage.transition.condition = true 14 : clientAverage.transition.fire = clientAverage.transition.enableFire 15 : clientAverage.transition.enableFire = clientAverage.transition.localCondition and clientAverage.transition.inPort.available and not clientAverage.transition.outPort.occupied 16 : clientAverage.transition.inPort.reset = clientAverage.transition.fire 17 : clientAverage.transition.outPort.set = clientAverage.transition.fire 18 : clientAverage.comBasLin.outerStatePort.localActive = clientAverage.comBasLin.localActive 19 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.comBasLin.outerStatePort.localActive then 1.0 else 0.0 20 : clientAverage.comBasLin.basLin.sampleTrigger = sample(1, clientAverage.comBasLin.basLin.samStart, 900.0) 21 : clientAverage.comBasLin.basLin.intTOut = 0.0 22 : algorithm when clientAverage.comBasLin.basLin.sampleTrigger then clientAverage.comBasLin.basLin._storeHistory := if not pre(clientAverage.comBasLin.basLin._storeHistory) and not Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.isMidNight(time) then false else clientAverage.comBasLin.basLin.storeHistory; clientAverage.comBasLin.basLin._typeOfDay := Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getTypeOfDays(time, {clientAverage.comBasLin.basLin.typeOfDay[1], clientAverage.comBasLin.basLin.typeOfDay[2]}, 900.0, 1); clientAverage.comBasLin.basLin.idxSam := Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(-1 + clientAverage.comBasLin.basLin.iSam[1], 96); if clientAverage.comBasLin.basLin._storeHistory or pre(clientAverage.comBasLin.basLin._storeHistory) then if time - clientAverage.comBasLin.basLin.tLast > 1e-05 then clientAverage.comBasLin.basLin.iHis[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam] := Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.incrementIndex(clientAverage.comBasLin.basLin.iHis[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam], 10); if clientAverage.comBasLin.basLin.iHis[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam] == 10 then clientAverage.comBasLin.basLin.historyComplete[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam] := true; end if; clientAverage.comBasLin.basLin.PAve := (clientAverage.comBasLin.basLin.ECon - clientAverage.comBasLin.basLin.ELast) / (time - clientAverage.comBasLin.basLin.tLast); clientAverage.comBasLin.basLin.P[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam,clientAverage.comBasLin.basLin.iHis[pre(clientAverage.comBasLin.basLin._typeOfDay[1]),clientAverage.comBasLin.basLin.idxSam]] := clientAverage.comBasLin.basLin.PAve; end if; end if; clientAverage.comBasLin.basLin.ELast := clientAverage.comBasLin.basLin.ECon; clientAverage.comBasLin.basLin.intTOutLast := clientAverage.comBasLin.basLin.intTOut; clientAverage.comBasLin.basLin.tLast := time; for m in 1:1 loop clientAverage.comBasLin.basLin.PPre[m] := Buildings.Controls.Predictors.BaseClasses.average({clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],1], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],2], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],3], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],4], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],5], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],6], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],7], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],8], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],9], clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],10]}, if clientAverage.comBasLin.basLin.historyComplete[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m]] then 10 else clientAverage.comBasLin.basLin.iHis[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m]]); end for; if clientAverage.comBasLin.basLin._storeHistory or pre(clientAverage.comBasLin.basLin._storeHistory) then clientAverage.comBasLin.basLin.PPreHis[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(1 + clientAverage.comBasLin.basLin.idxSam, 96)] := clientAverage.comBasLin.basLin.PPre[1]; clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(1 + clientAverage.comBasLin.basLin.idxSam, 96)] := clientAverage.comBasLin.basLin.iHis[clientAverage.comBasLin.basLin._typeOfDay[1],clientAverage.comBasLin.basLin.iSam[1]] > 0; end if; clientAverage.comBasLin.basLin.EHisAve := 0.0; clientAverage.comBasLin.basLin.EActAve := 0.0; for i in -16:-5 loop if Modelica.Math.BooleanVectors.allTrue({clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -16, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -15, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -14, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -13, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -12, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -11, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -10, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -9, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -8, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -7, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -6, 96)], clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + -5, 96)]}) then clientAverage.comBasLin.basLin.EHisAve := clientAverage.comBasLin.basLin.EHisAve + 900.0 * clientAverage.comBasLin.basLin.PPreHis[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(1 + clientAverage.comBasLin.basLin.idxSam + i, 96)]; clientAverage.comBasLin.basLin.EActAve := clientAverage.comBasLin.basLin.EActAve + 900.0 * clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(1 + clientAverage.comBasLin.basLin.idxSam + i, 96),clientAverage.comBasLin.basLin.iHis[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.getIndex(1 + clientAverage.comBasLin.basLin.idxSam + i, 96)]]; else clientAverage.comBasLin.basLin.EHisAve := 0.0; clientAverage.comBasLin.basLin.EActAve := 0.0; end if; end for; if clientAverage.comBasLin.basLin.EHisAve > 1e-15 or clientAverage.comBasLin.basLin.EHisAve < -1e-15 then clientAverage.comBasLin.basLin.adj := min(clientAverage.comBasLin.basLin.maxAdjFac, max(clientAverage.comBasLin.basLin.minAdjFac, clientAverage.comBasLin.basLin.EActAve / clientAverage.comBasLin.basLin.EHisAve)); else clientAverage.comBasLin.basLin.adj := 1.0; end if; clientAverage.comBasLin.basLin.PPre[:] := {clientAverage.comBasLin.basLin.PPre[1] * clientAverage.comBasLin.basLin.adj}; for i in 1:1 loop clientAverage.comBasLin.basLin.iSam[i] := Buildings.Controls.Predictors.ElectricalLoad$clientAverage$comBasLin$basLin.incrementIndex(clientAverage.comBasLin.basLin.iSam[i], 96); end for; end when; 23 : clientAverage.comBasLin.stoHis.y = not clientAverage.comBasLin.stoHis.u 24 : clientAverage.comBasLin.active = clientAverage.comBasLin.localActive 25 : clientAverage.comBasLin.localActive = pre(clientAverage.comBasLin.newActive) 26 : clientAverage.comBasLin.newActive = if clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume then clientAverage.comBasLin.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientAverage.comBasLin.inPort[1].set, clientAverage.comBasLin.inPort[2].set, clientAverage.comBasLin.inPort[3].set}) or clientAverage.comBasLin.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientAverage.comBasLin.outPort[1].reset})) and not clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend 27 : clientAverage.comBasLin.inPort[1].occupied = clientAverage.comBasLin.localActive 28 : clientAverage.comBasLin.inPort[2].occupied = clientAverage.comBasLin.inPort[1].occupied or clientAverage.comBasLin.inPort[1].set 29 : clientAverage.comBasLin.inPort[3].occupied = clientAverage.comBasLin.inPort[2].occupied or clientAverage.comBasLin.inPort[2].set 30 : clientAverage.comBasLin.outPort[1].available = clientAverage.comBasLin.localActive 31 : clientAverage.t1.localCondition = clientAverage.t1.condition 32 : clientAverage.t1.condition = true 33 : clientAverage.t1.fire = clientAverage.t1.enableFire 34 : clientAverage.t1.enableFire = clientAverage.t1.localCondition and clientAverage.t1.inPort.available and not clientAverage.t1.outPort.occupied 35 : clientAverage.t1.inPort.reset = clientAverage.t1.fire 36 : clientAverage.t1.outPort.set = clientAverage.t1.fire 37 : clientAverage.norOpe.outerStatePort.localActive = clientAverage.norOpe.localActive 38 : clientAverage.norOpe.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.norOpe.outerStatePort.localActive then 1.0 else 0.0 39 : clientAverage.norOpe.PPre = clientAverage.norOpe.PCon 40 : clientAverage.norOpe.active = clientAverage.norOpe.localActive 41 : clientAverage.norOpe.localActive = pre(clientAverage.norOpe.newActive) 42 : clientAverage.norOpe.newActive = if clientAverage.norOpe.outerStatePort.subgraphStatePort.resume then clientAverage.norOpe.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientAverage.norOpe.inPort[1].set}) or clientAverage.norOpe.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientAverage.norOpe.outPort[1].reset, clientAverage.norOpe.outPort[2].reset})) and not clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend 43 : clientAverage.norOpe.inPort[1].occupied = clientAverage.norOpe.localActive 44 : clientAverage.norOpe.outPort[1].available = clientAverage.norOpe.localActive 45 : clientAverage.norOpe.outPort[2].available = clientAverage.norOpe.outPort[1].available and not clientAverage.norOpe.outPort[1].reset 46 : clientAverage.t2.localCondition = clientAverage.t2.condition 47 : clientAverage.t2.fire = clientAverage.t2.enableFire 48 : clientAverage.t2.enableFire = clientAverage.t2.localCondition and clientAverage.t2.inPort.available and not clientAverage.t2.outPort.occupied 49 : clientAverage.t2.inPort.reset = clientAverage.t2.fire 50 : clientAverage.t2.outPort.set = clientAverage.t2.fire 51 : clientAverage.t3.localCondition = clientAverage.t3.condition 52 : clientAverage.t3.fire = clientAverage.t3.enableFire 53 : clientAverage.t3.enableFire = clientAverage.t3.localCondition and clientAverage.t3.inPort.available and not clientAverage.t3.outPort.occupied 54 : clientAverage.t3.inPort.reset = clientAverage.t3.fire 55 : clientAverage.t3.outPort.set = clientAverage.t3.fire 56 : clientAverage.she.outerStatePort.localActive = clientAverage.she.localActive 57 : clientAverage.she.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.she.outerStatePort.localActive then 1.0 else 0.0 58 : clientAverage.she.PPre = clientAverage.she.yShed * clientAverage.she.PCon 59 : clientAverage.she.active = clientAverage.she.localActive 60 : clientAverage.she.localActive = pre(clientAverage.she.newActive) 61 : clientAverage.she.newActive = if clientAverage.she.outerStatePort.subgraphStatePort.resume then clientAverage.she.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientAverage.she.inPort[1].set}) or clientAverage.she.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientAverage.she.outPort[1].reset})) and not clientAverage.she.outerStatePort.subgraphStatePort.suspend 62 : clientAverage.she.inPort[1].occupied = clientAverage.she.localActive 63 : clientAverage.she.outPort[1].available = clientAverage.she.localActive 64 : clientAverage.t4.localCondition = clientAverage.t4.condition 65 : clientAverage.t4.fire = clientAverage.t4.enableFire 66 : clientAverage.t4.enableFire = clientAverage.t4.localCondition and clientAverage.t4.inPort.available and not clientAverage.t4.outPort.occupied 67 : clientAverage.t4.inPort.reset = clientAverage.t4.fire 68 : clientAverage.t4.outPort.set = clientAverage.t4.fire 69 : clientAverage.tri.y = sample(2, clientAverage.tri.startTime, 900.0) 70 : clientAverage.switch.y = if clientAverage.switch.u2 then clientAverage.switch.u1 else clientAverage.switch.u3 71 : dayType.y[1] = dayType.days[1 + mod(-1 + dayType.iDay, 7)] 72 : dayType.y[2] = dayType.days[1 + mod(dayType.iDay, 7)] 73 : dayType.sampleTrigger = sample(3, dayType.firstSample, dayType.samplePeriod) 74 : bui90.timeScaled = time 75 : bui90.y[1] = bui90.p_offset[1] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 1, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 76 : bui90.y[2] = bui90.p_offset[2] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 2, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 77 : bui90.y[3] = bui90.p_offset[3] + Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 3, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 78 : drSig.y = drSig.u > drSig.threshold 79 : errorAverage.y = errorAverage.k1 * errorAverage.u1 + errorAverage.k2 * errorAverage.u2 80 : clientWeather.initialStep.outerStatePort.localActive = clientWeather.initialStep.localActive 81 : clientWeather.initialStep.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.initialStep.outerStatePort.localActive then 1.0 else 0.0 82 : clientWeather.initialStep.active = clientWeather.initialStep.localActive 83 : clientWeather.initialStep.localActive = pre(clientWeather.initialStep.newActive) 84 : clientWeather.initialStep.newActive = if clientWeather.initialStep.outerStatePort.subgraphStatePort.resume then clientWeather.initialStep.oldActive else clientWeather.initialStep.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientWeather.initialStep.outPort[1].reset}) and not clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend 85 : clientWeather.initialStep.outPort[1].available = clientWeather.initialStep.localActive 86 : clientWeather.stateGraphRoot.suspend = false 87 : clientWeather.stateGraphRoot.resume = false 88 : clientWeather.stateGraphRoot.activeSteps = -integer(clientWeather.stateGraphRoot.subgraphStatePort.activeSteps) 89 : clientWeather.stateGraphRoot.suspend = clientWeather.stateGraphRoot.subgraphStatePort.suspend 90 : clientWeather.stateGraphRoot.resume = clientWeather.stateGraphRoot.subgraphStatePort.resume 91 : clientWeather.transition.localCondition = clientWeather.transition.condition 92 : clientWeather.transition.condition = true 93 : clientWeather.transition.fire = clientWeather.transition.enableFire 94 : clientWeather.transition.enableFire = clientWeather.transition.localCondition and clientWeather.transition.inPort.available and not clientWeather.transition.outPort.occupied 95 : clientWeather.transition.inPort.reset = clientWeather.transition.fire 96 : clientWeather.transition.outPort.set = clientWeather.transition.fire 97 : clientWeather.comBasLin.outerStatePort.localActive = clientWeather.comBasLin.localActive 98 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.comBasLin.outerStatePort.localActive then 1.0 else 0.0 99 : clientWeather.comBasLin.basLin.sampleTrigger = sample(4, clientWeather.comBasLin.basLin.samStart, 900.0) 100 : der(clientWeather.comBasLin.basLin.intTOut) = clientWeather.comBasLin.basLin.TOut_in_internal 101 : algorithm when clientWeather.comBasLin.basLin.sampleTrigger then clientWeather.comBasLin.basLin._storeHistory := if not pre(clientWeather.comBasLin.basLin._storeHistory) and not Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.isMidNight(time) then false else clientWeather.comBasLin.basLin.storeHistory; clientWeather.comBasLin.basLin._typeOfDay := Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getTypeOfDays(time, {clientWeather.comBasLin.basLin.typeOfDay[1], clientWeather.comBasLin.basLin.typeOfDay[2]}, 900.0, 1); clientWeather.comBasLin.basLin.idxSam := Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(-1 + clientWeather.comBasLin.basLin.iSam[1], 96); if clientWeather.comBasLin.basLin._storeHistory or pre(clientWeather.comBasLin.basLin._storeHistory) then if time - clientWeather.comBasLin.basLin.tLast > 1e-05 then clientWeather.comBasLin.basLin.iHis[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam] := Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.incrementIndex(clientWeather.comBasLin.basLin.iHis[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam], 10); if clientWeather.comBasLin.basLin.iHis[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam] == 10 then clientWeather.comBasLin.basLin.historyComplete[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam] := true; end if; clientWeather.comBasLin.basLin.PAve := (clientWeather.comBasLin.basLin.ECon - clientWeather.comBasLin.basLin.ELast) / (time - clientWeather.comBasLin.basLin.tLast); clientWeather.comBasLin.basLin.P[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam,clientWeather.comBasLin.basLin.iHis[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam]] := clientWeather.comBasLin.basLin.PAve; clientWeather.comBasLin.basLin.T[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam,clientWeather.comBasLin.basLin.iHis[pre(clientWeather.comBasLin.basLin._typeOfDay[1]),clientWeather.comBasLin.basLin.idxSam]] := (clientWeather.comBasLin.basLin.intTOut - clientWeather.comBasLin.basLin.intTOutLast) / (time - clientWeather.comBasLin.basLin.tLast); end if; end if; clientWeather.comBasLin.basLin.ELast := clientWeather.comBasLin.basLin.ECon; clientWeather.comBasLin.basLin.intTOutLast := clientWeather.comBasLin.basLin.intTOut; clientWeather.comBasLin.basLin.tLast := time; if clientWeather.comBasLin.basLin.predictionModel == Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression then for m in 1:1 loop clientWeather.comBasLin.basLin.PPre[m] := Buildings.Controls.Predictors.BaseClasses.weatherRegression({clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],1], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],2], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],3], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],4], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],5], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],6], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],7], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],8], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],9], clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],10]}, if clientWeather.comBasLin.basLin.historyComplete[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m]] then 10 else clientWeather.comBasLin.basLin.iHis[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m]], if m == 1 then clientWeather.comBasLin.basLin.TOut_in_internal else {}[-1 + m], {clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],1], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],2], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],3], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],4], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],5], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],6], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],7], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],8], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],9], clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],10]}); end for; else clientWeather.comBasLin.basLin.PPre := {0.0}; assert(false, "Wrong value for prediction model."); end if; if clientWeather.comBasLin.basLin._storeHistory or pre(clientWeather.comBasLin.basLin._storeHistory) then clientWeather.comBasLin.basLin.PPreHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(1 + clientWeather.comBasLin.basLin.idxSam, 96)] := clientWeather.comBasLin.basLin.PPre[1]; clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(1 + clientWeather.comBasLin.basLin.idxSam, 96)] := clientWeather.comBasLin.basLin.iHis[clientWeather.comBasLin.basLin._typeOfDay[1],clientWeather.comBasLin.basLin.iSam[1]] > 0; end if; clientWeather.comBasLin.basLin.EHisAve := 0.0; clientWeather.comBasLin.basLin.EActAve := 0.0; for i in -16:-5 loop if Modelica.Math.BooleanVectors.allTrue({clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -16, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -15, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -14, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -13, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -12, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -11, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -10, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -9, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -8, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -7, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -6, 96)], clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + -5, 96)]}) then clientWeather.comBasLin.basLin.EHisAve := clientWeather.comBasLin.basLin.EHisAve + 900.0 * clientWeather.comBasLin.basLin.PPreHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(1 + clientWeather.comBasLin.basLin.idxSam + i, 96)]; clientWeather.comBasLin.basLin.EActAve := clientWeather.comBasLin.basLin.EActAve + 900.0 * clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(1 + clientWeather.comBasLin.basLin.idxSam + i, 96),clientWeather.comBasLin.basLin.iHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.getIndex(1 + clientWeather.comBasLin.basLin.idxSam + i, 96)]]; else clientWeather.comBasLin.basLin.EHisAve := 0.0; clientWeather.comBasLin.basLin.EActAve := 0.0; end if; end for; if clientWeather.comBasLin.basLin.EHisAve > 1e-15 or clientWeather.comBasLin.basLin.EHisAve < -1e-15 then clientWeather.comBasLin.basLin.adj := min(clientWeather.comBasLin.basLin.maxAdjFac, max(clientWeather.comBasLin.basLin.minAdjFac, clientWeather.comBasLin.basLin.EActAve / clientWeather.comBasLin.basLin.EHisAve)); else clientWeather.comBasLin.basLin.adj := 1.0; end if; clientWeather.comBasLin.basLin.PPre[:] := {clientWeather.comBasLin.basLin.PPre[1] * clientWeather.comBasLin.basLin.adj}; for i in 1:1 loop clientWeather.comBasLin.basLin.iSam[i] := Buildings.Controls.Predictors.ElectricalLoad$clientWeather$comBasLin$basLin.incrementIndex(clientWeather.comBasLin.basLin.iSam[i], 96); end for; end when; 102 : clientWeather.comBasLin.stoHis.y = not clientWeather.comBasLin.stoHis.u 103 : clientWeather.comBasLin.active = clientWeather.comBasLin.localActive 104 : clientWeather.comBasLin.localActive = pre(clientWeather.comBasLin.newActive) 105 : clientWeather.comBasLin.newActive = if clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume then clientWeather.comBasLin.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientWeather.comBasLin.inPort[1].set, clientWeather.comBasLin.inPort[2].set, clientWeather.comBasLin.inPort[3].set}) or clientWeather.comBasLin.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientWeather.comBasLin.outPort[1].reset})) and not clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend 106 : clientWeather.comBasLin.inPort[1].occupied = clientWeather.comBasLin.localActive 107 : clientWeather.comBasLin.inPort[2].occupied = clientWeather.comBasLin.inPort[1].occupied or clientWeather.comBasLin.inPort[1].set 108 : clientWeather.comBasLin.inPort[3].occupied = clientWeather.comBasLin.inPort[2].occupied or clientWeather.comBasLin.inPort[2].set 109 : clientWeather.comBasLin.outPort[1].available = clientWeather.comBasLin.localActive 110 : clientWeather.t1.localCondition = clientWeather.t1.condition 111 : clientWeather.t1.condition = true 112 : clientWeather.t1.fire = clientWeather.t1.enableFire 113 : clientWeather.t1.enableFire = clientWeather.t1.localCondition and clientWeather.t1.inPort.available and not clientWeather.t1.outPort.occupied 114 : clientWeather.t1.inPort.reset = clientWeather.t1.fire 115 : clientWeather.t1.outPort.set = clientWeather.t1.fire 116 : clientWeather.norOpe.outerStatePort.localActive = clientWeather.norOpe.localActive 117 : clientWeather.norOpe.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.norOpe.outerStatePort.localActive then 1.0 else 0.0 118 : clientWeather.norOpe.PPre = clientWeather.norOpe.PCon 119 : clientWeather.norOpe.active = clientWeather.norOpe.localActive 120 : clientWeather.norOpe.localActive = pre(clientWeather.norOpe.newActive) 121 : clientWeather.norOpe.newActive = if clientWeather.norOpe.outerStatePort.subgraphStatePort.resume then clientWeather.norOpe.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientWeather.norOpe.inPort[1].set}) or clientWeather.norOpe.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientWeather.norOpe.outPort[1].reset, clientWeather.norOpe.outPort[2].reset})) and not clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend 122 : clientWeather.norOpe.inPort[1].occupied = clientWeather.norOpe.localActive 123 : clientWeather.norOpe.outPort[1].available = clientWeather.norOpe.localActive 124 : clientWeather.norOpe.outPort[2].available = clientWeather.norOpe.outPort[1].available and not clientWeather.norOpe.outPort[1].reset 125 : clientWeather.t2.localCondition = clientWeather.t2.condition 126 : clientWeather.t2.fire = clientWeather.t2.enableFire 127 : clientWeather.t2.enableFire = clientWeather.t2.localCondition and clientWeather.t2.inPort.available and not clientWeather.t2.outPort.occupied 128 : clientWeather.t2.inPort.reset = clientWeather.t2.fire 129 : clientWeather.t2.outPort.set = clientWeather.t2.fire 130 : clientWeather.t3.localCondition = clientWeather.t3.condition 131 : clientWeather.t3.fire = clientWeather.t3.enableFire 132 : clientWeather.t3.enableFire = clientWeather.t3.localCondition and clientWeather.t3.inPort.available and not clientWeather.t3.outPort.occupied 133 : clientWeather.t3.inPort.reset = clientWeather.t3.fire 134 : clientWeather.t3.outPort.set = clientWeather.t3.fire 135 : clientWeather.she.outerStatePort.localActive = clientWeather.she.localActive 136 : clientWeather.she.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.she.outerStatePort.localActive then 1.0 else 0.0 137 : clientWeather.she.PPre = clientWeather.she.yShed * clientWeather.she.PCon 138 : clientWeather.she.active = clientWeather.she.localActive 139 : clientWeather.she.localActive = pre(clientWeather.she.newActive) 140 : clientWeather.she.newActive = if clientWeather.she.outerStatePort.subgraphStatePort.resume then clientWeather.she.oldActive else (Modelica.Math.BooleanVectors.anyTrue({clientWeather.she.inPort[1].set}) or clientWeather.she.localActive and not Modelica.Math.BooleanVectors.anyTrue({clientWeather.she.outPort[1].reset})) and not clientWeather.she.outerStatePort.subgraphStatePort.suspend 141 : clientWeather.she.inPort[1].occupied = clientWeather.she.localActive 142 : clientWeather.she.outPort[1].available = clientWeather.she.localActive 143 : clientWeather.t4.localCondition = clientWeather.t4.condition 144 : clientWeather.t4.fire = clientWeather.t4.enableFire 145 : clientWeather.t4.enableFire = clientWeather.t4.localCondition and clientWeather.t4.inPort.available and not clientWeather.t4.outPort.occupied 146 : clientWeather.t4.inPort.reset = clientWeather.t4.fire 147 : clientWeather.t4.outPort.set = clientWeather.t4.fire 148 : clientWeather.tri.y = sample(5, clientWeather.tri.startTime, 900.0) 149 : clientWeather.switch.y = if clientWeather.switch.u2 then clientWeather.switch.u1 else clientWeather.switch.u3 150 : errorWeather.y = errorWeather.k1 * errorWeather.u1 + errorWeather.k2 * errorWeather.u2 151 : relErrAverage.y = relErrAverage.k * relErrAverage.u 152 : relErrWeather.y = relErrWeather.k * relErrWeather.u 153 : der(ene.y) = ene.k * ene.u 154 : yShed.y = yShed.k 155 : clientAverage.stateGraphRoot.subgraphStatePort.activeSteps + clientAverage.initialStep.outerStatePort.subgraphStatePort.activeSteps + clientAverage.norOpe.outerStatePort.subgraphStatePort.activeSteps + clientAverage.she.outerStatePort.subgraphStatePort.activeSteps + clientAverage.comBasLin.outerStatePort.subgraphStatePort.activeSteps = 0.0 156 : clientAverage.comBasLin.ECon = clientAverage.comBasLin.basLin.ECon 157 : clientAverage.comBasLin.PPre[1] = clientAverage.comBasLin.basLin.PPre[1] 158 : clientAverage.comBasLin.isEventDay = clientAverage.comBasLin.stoHis.u 159 : clientAverage.comBasLin.basLin.storeHistory = clientAverage.comBasLin.stoHis.y 160 : clientAverage.comBasLin.basLin.typeOfDay[1] = clientAverage.comBasLin.typeOfDay[1] 161 : clientAverage.comBasLin.basLin.typeOfDay[2] = clientAverage.comBasLin.typeOfDay[2] 162 : clientAverage.initialStep.outPort[1].available = clientAverage.transition.inPort.available 163 : clientAverage.initialStep.outPort[1].reset = clientAverage.transition.inPort.reset 164 : clientAverage.comBasLin.inPort[1].occupied = clientAverage.transition.outPort.occupied 165 : clientAverage.comBasLin.inPort[1].set = clientAverage.transition.outPort.set 166 : clientAverage.comBasLin.outPort[1].available = clientAverage.t1.inPort.available 167 : clientAverage.comBasLin.outPort[1].reset = clientAverage.t1.inPort.reset 168 : clientAverage.norOpe.inPort[1].occupied = clientAverage.t1.outPort.occupied 169 : clientAverage.norOpe.inPort[1].set = clientAverage.t1.outPort.set 170 : clientAverage.ECon = clientAverage.comBasLin.ECon 171 : clientAverage.PPreNoShe[1] = clientAverage.comBasLin.PPre[1] 172 : clientAverage.PPreNoShe[1] = clientAverage.norOpe.PCon 173 : clientAverage.comBasLin.inPort[2].occupied = clientAverage.t2.outPort.occupied 174 : clientAverage.comBasLin.inPort[2].set = clientAverage.t2.outPort.set 175 : clientAverage.she.inPort[1].occupied = clientAverage.t3.outPort.occupied 176 : clientAverage.she.inPort[1].set = clientAverage.t3.outPort.set 177 : clientAverage.she.outPort[1].available = clientAverage.t4.inPort.available 178 : clientAverage.she.outPort[1].reset = clientAverage.t4.inPort.reset 179 : clientAverage.comBasLin.inPort[3].occupied = clientAverage.t4.outPort.occupied 180 : clientAverage.comBasLin.inPort[3].set = clientAverage.t4.outPort.set 181 : clientAverage.t2.condition = clientAverage.t4.condition 182 : clientAverage.t2.condition = clientAverage.tri.y 183 : clientAverage.norOpe.PPre = clientAverage.she.PCon 184 : clientAverage.norOpe.PPre = clientAverage.switch.u1 185 : clientAverage.norOpe.active = clientAverage.switch.u2 186 : clientAverage.norOpe.outPort[1].available = clientAverage.t2.inPort.available 187 : clientAverage.norOpe.outPort[1].reset = clientAverage.t2.inPort.reset 188 : clientAverage.norOpe.outPort[2].available = clientAverage.t3.inPort.available 189 : clientAverage.norOpe.outPort[2].reset = clientAverage.t3.inPort.reset 190 : clientAverage.shed = clientAverage.t3.condition 191 : clientAverage.she.PPre = clientAverage.switch.u3 192 : clientAverage.comBasLin.isEventDay = clientAverage.isEventDay 193 : clientAverage.comBasLin.typeOfDay[1] = clientAverage.typeOfDay[1] 194 : clientAverage.comBasLin.typeOfDay[2] = clientAverage.typeOfDay[2] 195 : clientAverage.she.yShed = clientAverage.yShed 196 : clientAverage.PPre = clientAverage.switch.y 197 : clientWeather.stateGraphRoot.subgraphStatePort.activeSteps + clientWeather.initialStep.outerStatePort.subgraphStatePort.activeSteps + clientWeather.norOpe.outerStatePort.subgraphStatePort.activeSteps + clientWeather.she.outerStatePort.subgraphStatePort.activeSteps + clientWeather.comBasLin.outerStatePort.subgraphStatePort.activeSteps = 0.0 198 : clientWeather.comBasLin.basLin.TOut = clientWeather.comBasLin.basLin.TOut_in_internal 199 : clientWeather.comBasLin.ECon = clientWeather.comBasLin.basLin.ECon 200 : clientWeather.comBasLin.TOut = clientWeather.comBasLin.basLin.TOut 201 : clientWeather.comBasLin.PPre[1] = clientWeather.comBasLin.basLin.PPre[1] 202 : clientWeather.comBasLin.isEventDay = clientWeather.comBasLin.stoHis.u 203 : clientWeather.comBasLin.basLin.storeHistory = clientWeather.comBasLin.stoHis.y 204 : clientWeather.comBasLin.basLin.typeOfDay[1] = clientWeather.comBasLin.typeOfDay[1] 205 : clientWeather.comBasLin.basLin.typeOfDay[2] = clientWeather.comBasLin.typeOfDay[2] 206 : clientWeather.initialStep.outPort[1].available = clientWeather.transition.inPort.available 207 : clientWeather.initialStep.outPort[1].reset = clientWeather.transition.inPort.reset 208 : clientWeather.comBasLin.inPort[1].occupied = clientWeather.transition.outPort.occupied 209 : clientWeather.comBasLin.inPort[1].set = clientWeather.transition.outPort.set 210 : clientWeather.comBasLin.outPort[1].available = clientWeather.t1.inPort.available 211 : clientWeather.comBasLin.outPort[1].reset = clientWeather.t1.inPort.reset 212 : clientWeather.norOpe.inPort[1].occupied = clientWeather.t1.outPort.occupied 213 : clientWeather.norOpe.inPort[1].set = clientWeather.t1.outPort.set 214 : clientWeather.ECon = clientWeather.comBasLin.ECon 215 : clientWeather.PPreNoShe[1] = clientWeather.comBasLin.PPre[1] 216 : clientWeather.PPreNoShe[1] = clientWeather.norOpe.PCon 217 : clientWeather.comBasLin.inPort[2].occupied = clientWeather.t2.outPort.occupied 218 : clientWeather.comBasLin.inPort[2].set = clientWeather.t2.outPort.set 219 : clientWeather.she.inPort[1].occupied = clientWeather.t3.outPort.occupied 220 : clientWeather.she.inPort[1].set = clientWeather.t3.outPort.set 221 : clientWeather.she.outPort[1].available = clientWeather.t4.inPort.available 222 : clientWeather.she.outPort[1].reset = clientWeather.t4.inPort.reset 223 : clientWeather.comBasLin.inPort[3].occupied = clientWeather.t4.outPort.occupied 224 : clientWeather.comBasLin.inPort[3].set = clientWeather.t4.outPort.set 225 : clientWeather.t2.condition = clientWeather.t4.condition 226 : clientWeather.t2.condition = clientWeather.tri.y 227 : clientWeather.norOpe.PPre = clientWeather.she.PCon 228 : clientWeather.norOpe.PPre = clientWeather.switch.u1 229 : clientWeather.norOpe.active = clientWeather.switch.u2 230 : clientWeather.norOpe.outPort[1].available = clientWeather.t2.inPort.available 231 : clientWeather.norOpe.outPort[1].reset = clientWeather.t2.inPort.reset 232 : clientWeather.norOpe.outPort[2].available = clientWeather.t3.inPort.available 233 : clientWeather.norOpe.outPort[2].reset = clientWeather.t3.inPort.reset 234 : clientWeather.shed = clientWeather.t3.condition 235 : clientWeather.she.PPre = clientWeather.switch.u3 236 : clientWeather.comBasLin.isEventDay = clientWeather.isEventDay 237 : clientWeather.TOut = clientWeather.comBasLin.TOut 238 : clientWeather.comBasLin.typeOfDay[1] = clientWeather.typeOfDay[1] 239 : clientWeather.comBasLin.typeOfDay[2] = clientWeather.typeOfDay[2] 240 : clientWeather.she.yShed = clientWeather.yShed 241 : clientWeather.PPre = clientWeather.switch.y 242 : clientAverage.isEventDay = clientAverage.shed 243 : clientAverage.isEventDay = clientWeather.isEventDay 244 : clientAverage.isEventDay = clientWeather.shed 245 : clientAverage.isEventDay = drSig.y 246 : bui90.y[3] = drSig.u 247 : clientAverage.PPre = errorAverage.u1 248 : clientWeather.PPre = errorWeather.u1 249 : bui90.y[1] = clientWeather.TOut 250 : errorAverage.y = relErrAverage.u 251 : errorWeather.y = relErrWeather.u 252 : bui90.y[2] = ene.u 253 : bui90.y[2] = errorAverage.u2 254 : bui90.y[2] = errorWeather.u2 255 : clientAverage.ECon = clientWeather.ECon 256 : clientAverage.ECon = ene.y 257 : clientAverage.typeOfDay[1] = clientWeather.typeOfDay[1] 258 : clientAverage.typeOfDay[1] = dayType.y[1] 259 : clientAverage.typeOfDay[2] = clientWeather.typeOfDay[2] 260 : clientAverage.typeOfDay[2] = dayType.y[2] 261 : clientAverage.yShed = clientWeather.yShed 262 : clientAverage.yShed = yShed.y 263 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend = clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend 264 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend = clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend 265 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend = clientWeather.she.outerStatePort.subgraphStatePort.suspend 266 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend = clientWeather.stateGraphRoot.subgraphStatePort.suspend 267 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume = clientWeather.initialStep.outerStatePort.subgraphStatePort.resume 268 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume = clientWeather.norOpe.outerStatePort.subgraphStatePort.resume 269 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume = clientWeather.she.outerStatePort.subgraphStatePort.resume 270 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume = clientWeather.stateGraphRoot.subgraphStatePort.resume 271 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend = clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend 272 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend = clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend 273 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend = clientAverage.she.outerStatePort.subgraphStatePort.suspend 274 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend = clientAverage.stateGraphRoot.subgraphStatePort.suspend 275 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume = clientAverage.initialStep.outerStatePort.subgraphStatePort.resume 276 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume = clientAverage.norOpe.outerStatePort.subgraphStatePort.resume 277 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume = clientAverage.she.outerStatePort.subgraphStatePort.resume 278 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume = clientAverage.stateGraphRoot.subgraphStatePort.resume 279 : when clientWeather.she.outerStatePort.subgraphStatePort.suspend then clientWeather.she.oldActive := clientWeather.she.localActive; end when; 280 : when clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend then clientWeather.norOpe.oldActive := clientWeather.norOpe.localActive; end when; 281 : when clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend then clientWeather.comBasLin.oldActive := clientWeather.comBasLin.localActive; end when; 282 : when clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend then clientWeather.initialStep.oldActive := clientWeather.initialStep.localActive; end when; 283 : when {time >= pre(bui90.nextTimeEvent), initial()} then bui90.nextTimeEventScaled := Modelica.Blocks.Tables.Internal.getNextTimeEvent(bui90.tableID, bui90.timeScaled); end when; 284 : when {time >= pre(bui90.nextTimeEvent), initial()} then bui90.nextTimeEvent := if bui90.nextTimeEventScaled < 9.999999999999999e+59 then bui90.nextTimeEventScaled else 9.999999999999999e+59; end when; 285 : when dayType.sampleTrigger then dayType.skipIDayIncrement := false; end when; 286 : when dayType.sampleTrigger then dayType.iDay := if pre(dayType.skipIDayIncrement) then pre(dayType.iDay) else 1 + mod(pre(dayType.iDay), 7); end when; 287 : when clientAverage.she.outerStatePort.subgraphStatePort.suspend then clientAverage.she.oldActive := clientAverage.she.localActive; end when; 288 : when clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend then clientAverage.norOpe.oldActive := clientAverage.norOpe.localActive; end when; 289 : when clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend then clientAverage.comBasLin.oldActive := clientAverage.comBasLin.localActive; end when; 290 : when clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend then clientAverage.initialStep.oldActive := clientAverage.initialStep.localActive; end when; Notification: Performance of preOpt clockPartitioning (simulation) : time 0.006675/1.781, allocations: 5.728 MB / 1.688 GB, free: 444 kB / 1.089 GB Error: pre-optimization module clockPartitioning (simulation) failed.