Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_maint.8.0.x_Buildings.Controls.DemandResponse.Examples.ClientLBNL90.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.0.1-maint.8.0.x/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+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/ModelicaServices 3.2.3+maint.om/package.mo", uses=false) Using package ModelicaServices with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/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 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo) Using package Buildings with version 8.0.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.0.1-maint.8.0.x/package.mo) Running command: translateModel(Buildings.Controls.DemandResponse.Examples.ClientLBNL90,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_maint.8.0.x_Buildings.Controls.DemandResponse.Examples.ClientLBNL90") translateModel(Buildings.Controls.DemandResponse.Examples.ClientLBNL90,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_maint.8.0.x_Buildings.Controls.DemandResponse.Examples.ClientLBNL90") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 8.0.1-maint.8.0.x/package.mo): time 1.695/1.695, allocations: 288.3 MB / 303.2 MB, free: 8.203 MB / 234.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.001404/0.001404, allocations: 175.5 kB / 371.8 MB, free: 10.3 MB / 298.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.62/1.62, allocations: 205.4 MB / 0.6306 GB, free: 10.01 MB / 458.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.00103/0.00103, allocations: 103.8 kB / 0.7439 GB, free: 5.945 MB / 0.5573 GB Notification: Performance of FrontEnd - loaded program: time 0.0004882/0.0004883, allocations: 10.47 kB / 0.8668 GB, free: 142.1 MB / 0.6198 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3004/0.3009, allocations: 115.3 MB / 0.9794 GB, free: 27.71 MB / 0.6198 GB Notification: Performance of NFInst.instantiate(Buildings.Controls.DemandResponse.Examples.ClientLBNL90): time 0.004377/0.3053, allocations: 3.825 MB / 0.9831 GB, free: 23.86 MB / 0.6198 GB Notification: Performance of NFInst.instExpressions: time 0.00587/0.3112, allocations: 3.694 MB / 0.9868 GB, free: 20.16 MB / 0.6198 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.001135/0.3124, allocations: 31.81 kB / 0.9868 GB, free: 20.12 MB / 0.6198 GB Notification: Performance of NFTyping.typeComponents: time 0.0008763/0.3133, allocations: 238.5 kB / 0.987 GB, free: 19.89 MB / 0.6198 GB Notification: Performance of NFTyping.typeBindings: time 0.000668/0.314, allocations: 211.2 kB / 0.9872 GB, free: 19.68 MB / 0.6198 GB Notification: Performance of NFTyping.typeClassSections: time 0.003203/0.3172, allocations: 1.826 MB / 0.989 GB, free: 17.86 MB / 0.6198 GB Notification: Performance of NFFlatten.flatten: time 0.002909/0.3201, allocations: 1.888 MB / 0.9908 GB, free: 15.97 MB / 0.6198 GB Notification: Performance of NFFlatten.resolveConnections: time 0.002418/0.3225, allocations: 2.176 MB / 0.993 GB, free: 13.78 MB / 0.6198 GB Notification: Performance of NFEvalConstants.evaluate: time 0.001568/0.3241, allocations: 1.724 MB / 0.9946 GB, free: 12.05 MB / 0.6198 GB Notification: Performance of NFSimplifyModel.simplify: time 0.002237/0.3264, allocations: 1.954 MB / 0.9966 GB, free: 10.09 MB / 0.6198 GB Notification: Performance of NFPackage.collectConstants: time 0.0006869/0.3271, allocations: 60 kB / 0.9966 GB, free: 10.04 MB / 0.6198 GB Notification: Performance of NFFlatten.collectFunctions: time 0.001114/0.3282, allocations: 239.7 kB / 0.9968 GB, free: 9.801 MB / 0.6198 GB Notification: Performance of NFScalarize.scalarize: time 0.009285/0.3375, allocations: 14.34 MB / 1.011 GB, free: 11.43 MB / 0.6355 GB Notification: Performance of NFVerifyModel.verify: time 0.01586/0.3534, allocations: 9.411 MB / 1.02 GB, free: 1.996 MB / 0.6355 GB Notification: Performance of NFConvertDAE.convert: time 0.04479/0.3983, allocations: 41.16 MB / 1.06 GB, free: 8.75 MB / 0.6823 GB Notification: Performance of FrontEnd - DAE generated: time 7.875e-06/0.3983, allocations: 0 / 1.06 GB, free: 8.75 MB / 0.6823 GB Notification: Performance of FrontEnd: time 3.246e-06/0.3984, allocations: 0 / 1.06 GB, free: 8.75 MB / 0.6823 GB Notification: Performance of Transformations before backend: time 0.002372/0.4007, allocations: 0 / 1.06 GB, free: 8.75 MB / 0.6823 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 1.157/1.557, allocations: 35.16 MB / 1.095 GB, free: 39.5 MB / 0.6824 GB Notification: Performance of prepare preOptimizeDAE: time 5.781e-05/1.557, allocations: 9.719 kB / 1.095 GB, free: 39.5 MB / 0.6824 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.01546/1.573, allocations: 3.608 MB / 1.098 GB, free: 37.71 MB / 0.6824 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.03682/1.61, allocations: 10.56 MB / 1.108 GB, free: 32.92 MB / 0.6824 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.003666/1.613, allocations: 2.519 MB / 1.111 GB, free: 30.85 MB / 0.6824 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.009231/1.623, allocations: 3.747 MB / 1.115 GB, free: 27.1 MB / 0.6824 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.switch.y clientWeather.switch.u3 clientWeather.switch.u2 clientWeather.switch.u1 clientWeather.tri.y 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.t4.condition 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.outPort.set clientWeather.t3.outPort.occupied clientWeather.t3.inPort.reset clientWeather.t3.inPort.available clientWeather.t3.fire clientWeather.t3.enableFire clientWeather.t3.localCondition clientWeather.t3.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.t2.condition 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.outPort.set clientWeather.t1.outPort.occupied clientWeather.t1.inPort.reset clientWeather.t1.inPort.available clientWeather.t1.fire clientWeather.t1.enableFire clientWeather.t1.localCondition clientWeather.t1.condition clientWeather.comBasLin.stoHis.y clientWeather.comBasLin.stoHis.u 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.basLin.TOut clientWeather.comBasLin.isEventDay clientWeather.comBasLin.typeOfDay[2] clientWeather.comBasLin.typeOfDay[1] clientWeather.comBasLin.TOut 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.outPort.set clientWeather.transition.outPort.occupied clientWeather.transition.inPort.reset clientWeather.transition.inPort.available clientWeather.transition.fire clientWeather.transition.enableFire clientWeather.transition.localCondition clientWeather.transition.condition clientWeather.stateGraphRoot.activeSteps clientWeather.stateGraphRoot.subgraphStatePort.activeSteps clientWeather.stateGraphRoot.subgraphStatePort.resume clientWeather.stateGraphRoot.subgraphStatePort.suspend clientWeather.stateGraphRoot.resume clientWeather.stateGraphRoot.suspend 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.initialStep.active clientWeather.PPreNoShe[1] clientWeather.PPre clientWeather.TOut 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.outPort.set clientAverage.t4.outPort.occupied clientAverage.t4.inPort.reset clientAverage.t4.inPort.available clientAverage.t4.fire clientAverage.t4.enableFire clientAverage.t4.localCondition clientAverage.t4.condition 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.outPort.set clientAverage.t3.outPort.occupied clientAverage.t3.inPort.reset clientAverage.t3.inPort.available clientAverage.t3.fire clientAverage.t3.enableFire clientAverage.t3.localCondition clientAverage.t3.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.t2.condition 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.outPort.set clientAverage.t1.outPort.occupied clientAverage.t1.inPort.reset clientAverage.t1.inPort.available clientAverage.t1.fire clientAverage.t1.enableFire clientAverage.t1.localCondition clientAverage.t1.condition 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.outPort.set clientAverage.transition.outPort.occupied clientAverage.transition.inPort.reset clientAverage.transition.inPort.available clientAverage.transition.fire clientAverage.transition.enableFire clientAverage.transition.localCondition clientAverage.transition.condition clientAverage.stateGraphRoot.activeSteps clientAverage.stateGraphRoot.subgraphStatePort.activeSteps clientAverage.stateGraphRoot.subgraphStatePort.resume clientAverage.stateGraphRoot.subgraphStatePort.suspend clientAverage.stateGraphRoot.resume clientAverage.stateGraphRoot.suspend 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.initialStep.active clientAverage.PPreNoShe[1] clientAverage.PPre clientAverage.yShed clientAverage.shed clientAverage.ECon clientAverage.isEventDay clientAverage.typeOfDay[2] clientAverage.typeOfDay[1] equations: 1 : algorithm when clientAverage.comBasLin.basLin.sampleTrigger then clientAverage.comBasLin.basLin._storeHistory := if not pre(clientAverage.comBasLin.basLin._storeHistory) and not Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.isMidNight(time) then false else clientAverage.comBasLin.basLin.storeHistory; clientAverage.comBasLin.basLin._typeOfDay := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getTypeOfDays(time, clientAverage.comBasLin.basLin.typeOfDay, clientAverage.comBasLin.basLin.dt, 1); clientAverage.comBasLin.basLin.idxSam := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] - 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.DemandResponse.Examples.ClientLBNL90.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/* iter index 0 */ in 1:1 loop clientAverage.comBasLin.basLin.PPre[m] := Buildings.Controls.Predictors.BaseClasses.average(array(clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[m],clientAverage.comBasLin.basLin.iSam[m],i] for i in 1: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.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.idxSam + 1, 96)] := clientAverage.comBasLin.basLin.PPre[1]; clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.idxSam + 1, 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/* iter index 0 */ in -16:-5 loop if Modelica.Math.BooleanVectors.allTrue(array(clientAverage.comBasLin.basLin.PPreHisSet[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.iSam[1] + i, 96)] for i in -16:-5)) then clientAverage.comBasLin.basLin.EHisAve := clientAverage.comBasLin.basLin.EHisAve + clientAverage.comBasLin.basLin.dt * clientAverage.comBasLin.basLin.PPreHis[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.idxSam + i + 1, 96)]; clientAverage.comBasLin.basLin.EActAve := clientAverage.comBasLin.basLin.EActAve + clientAverage.comBasLin.basLin.dt * clientAverage.comBasLin.basLin.P[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.idxSam + i + 1, 96),clientAverage.comBasLin.basLin.iHis[clientAverage.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.getIndex(clientAverage.comBasLin.basLin.idxSam + i + 1, 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/* iter index 0 */ in 1:1 loop clientAverage.comBasLin.basLin.iSam[i] := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientAverage.comBasLin.basLin.incrementIndex(clientAverage.comBasLin.basLin.iSam[i], 96); end for; end when; 2 : algorithm when clientWeather.comBasLin.basLin.sampleTrigger then clientWeather.comBasLin.basLin._storeHistory := if not pre(clientWeather.comBasLin.basLin._storeHistory) and not Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.isMidNight(time) then false else clientWeather.comBasLin.basLin.storeHistory; clientWeather.comBasLin.basLin._typeOfDay := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getTypeOfDays(time, clientWeather.comBasLin.basLin.typeOfDay, clientWeather.comBasLin.basLin.dt, 1); clientWeather.comBasLin.basLin.idxSam := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] - 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.DemandResponse.Examples.ClientLBNL90.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; for m/* iter index 0 */ in 1:1 loop clientWeather.comBasLin.basLin.PPre[m] := Buildings.Controls.Predictors.BaseClasses.weatherRegression(array(clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],i] for i in 1: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 clientWeather.comBasLin.basLin.TOutFut_in_internal[m - 1], array(clientWeather.comBasLin.basLin.T[clientWeather.comBasLin.basLin._typeOfDay[m],clientWeather.comBasLin.basLin.iSam[m],i] for i in 1:10)); end for; if clientWeather.comBasLin.basLin._storeHistory or pre(clientWeather.comBasLin.basLin._storeHistory) then clientWeather.comBasLin.basLin.PPreHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.idxSam + 1, 96)] := clientWeather.comBasLin.basLin.PPre[1]; clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.idxSam + 1, 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/* iter index 0 */ in -16:-5 loop if Modelica.Math.BooleanVectors.allTrue(array(clientWeather.comBasLin.basLin.PPreHisSet[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.iSam[1] + i, 96)] for i in -16:-5)) then clientWeather.comBasLin.basLin.EHisAve := clientWeather.comBasLin.basLin.EHisAve + clientWeather.comBasLin.basLin.dt * clientWeather.comBasLin.basLin.PPreHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.idxSam + i + 1, 96)]; clientWeather.comBasLin.basLin.EActAve := clientWeather.comBasLin.basLin.EActAve + clientWeather.comBasLin.basLin.dt * clientWeather.comBasLin.basLin.P[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.idxSam + i + 1, 96),clientWeather.comBasLin.basLin.iHis[clientWeather.comBasLin.basLin._typeOfDay[1],Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.getIndex(clientWeather.comBasLin.basLin.idxSam + i + 1, 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/* iter index 0 */ in 1:1 loop clientWeather.comBasLin.basLin.iSam[i] := Buildings.Controls.DemandResponse.Examples.ClientLBNL90.clientWeather.comBasLin.basLin.incrementIndex(clientWeather.comBasLin.basLin.iSam[i], 96); end for; end when; 3 : clientAverage.she.outerStatePort.subgraphStatePort.resume = clientAverage.stateGraphRoot.subgraphStatePort.resume 4 : clientAverage.she.outerStatePort.subgraphStatePort.resume = clientAverage.norOpe.outerStatePort.subgraphStatePort.resume 5 : clientAverage.she.outerStatePort.subgraphStatePort.resume = clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume 6 : clientAverage.she.outerStatePort.subgraphStatePort.resume = clientAverage.initialStep.outerStatePort.subgraphStatePort.resume 7 : clientAverage.she.outerStatePort.subgraphStatePort.suspend = clientAverage.stateGraphRoot.subgraphStatePort.suspend 8 : clientAverage.she.outerStatePort.subgraphStatePort.suspend = clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend 9 : clientAverage.she.outerStatePort.subgraphStatePort.suspend = clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend 10 : clientAverage.she.outerStatePort.subgraphStatePort.suspend = clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend 11 : clientAverage.comBasLin.basLin.ECon = clientAverage.comBasLin.ECon 12 : clientAverage.comBasLin.basLin.PPre[1] = clientAverage.comBasLin.PPre[1] 13 : clientAverage.comBasLin.stoHis.u = clientAverage.comBasLin.isEventDay 14 : clientAverage.comBasLin.stoHis.y = clientAverage.comBasLin.basLin.storeHistory 15 : clientAverage.comBasLin.basLin.typeOfDay[1] = clientAverage.comBasLin.typeOfDay[1] 16 : clientAverage.comBasLin.basLin.typeOfDay[2] = clientAverage.comBasLin.typeOfDay[2] 17 : clientAverage.initialStep.outPort[1].available = clientAverage.transition.inPort.available 18 : clientAverage.initialStep.outPort[1].reset = clientAverage.transition.inPort.reset 19 : clientAverage.transition.outPort.occupied = clientAverage.comBasLin.inPort[1].occupied 20 : clientAverage.transition.outPort.set = clientAverage.comBasLin.inPort[1].set 21 : clientAverage.t1.inPort.available = clientAverage.comBasLin.outPort[1].available 22 : clientAverage.t1.inPort.reset = clientAverage.comBasLin.outPort[1].reset 23 : clientAverage.t1.outPort.occupied = clientAverage.norOpe.inPort[1].occupied 24 : clientAverage.t1.outPort.set = clientAverage.norOpe.inPort[1].set 25 : clientAverage.comBasLin.ECon = clientAverage.ECon 26 : clientAverage.comBasLin.PPre[1] = clientAverage.PPreNoShe[1] 27 : clientAverage.comBasLin.PPre[1] = clientAverage.norOpe.PCon 28 : clientAverage.t2.outPort.occupied = clientAverage.comBasLin.inPort[2].occupied 29 : clientAverage.t2.outPort.set = clientAverage.comBasLin.inPort[2].set 30 : clientAverage.t3.outPort.occupied = clientAverage.she.inPort[1].occupied 31 : clientAverage.t3.outPort.set = clientAverage.she.inPort[1].set 32 : clientAverage.t4.inPort.available = clientAverage.she.outPort[1].available 33 : clientAverage.t4.inPort.reset = clientAverage.she.outPort[1].reset 34 : clientAverage.t4.outPort.occupied = clientAverage.comBasLin.inPort[3].occupied 35 : clientAverage.t4.outPort.set = clientAverage.comBasLin.inPort[3].set 36 : clientAverage.t2.condition = clientAverage.tri.y 37 : clientAverage.t2.condition = clientAverage.t4.condition 38 : clientAverage.switch.u1 = clientAverage.she.PCon 39 : clientAverage.switch.u1 = clientAverage.norOpe.PPre 40 : clientAverage.norOpe.active = clientAverage.switch.u2 41 : clientAverage.norOpe.outPort[1].available = clientAverage.t2.inPort.available 42 : clientAverage.norOpe.outPort[1].reset = clientAverage.t2.inPort.reset 43 : clientAverage.norOpe.outPort[2].available = clientAverage.t3.inPort.available 44 : clientAverage.norOpe.outPort[2].reset = clientAverage.t3.inPort.reset 45 : clientAverage.shed = clientAverage.t3.condition 46 : clientAverage.switch.u3 = clientAverage.she.PPre 47 : clientAverage.isEventDay = clientAverage.comBasLin.isEventDay 48 : clientAverage.typeOfDay[1] = clientAverage.comBasLin.typeOfDay[1] 49 : clientAverage.typeOfDay[2] = clientAverage.comBasLin.typeOfDay[2] 50 : clientAverage.yShed = clientAverage.she.yShed 51 : clientAverage.switch.y = clientAverage.PPre 52 : clientWeather.she.outerStatePort.subgraphStatePort.resume = clientWeather.stateGraphRoot.subgraphStatePort.resume 53 : clientWeather.she.outerStatePort.subgraphStatePort.resume = clientWeather.norOpe.outerStatePort.subgraphStatePort.resume 54 : clientWeather.she.outerStatePort.subgraphStatePort.resume = clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume 55 : clientWeather.she.outerStatePort.subgraphStatePort.resume = clientWeather.initialStep.outerStatePort.subgraphStatePort.resume 56 : clientWeather.she.outerStatePort.subgraphStatePort.suspend = clientWeather.stateGraphRoot.subgraphStatePort.suspend 57 : clientWeather.she.outerStatePort.subgraphStatePort.suspend = clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend 58 : clientWeather.she.outerStatePort.subgraphStatePort.suspend = clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend 59 : clientWeather.she.outerStatePort.subgraphStatePort.suspend = clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend 60 : clientWeather.comBasLin.basLin.TOut = clientWeather.comBasLin.basLin.TOut_in_internal 61 : clientWeather.comBasLin.basLin.ECon = clientWeather.comBasLin.ECon 62 : clientWeather.comBasLin.TOut = clientWeather.comBasLin.basLin.TOut 63 : clientWeather.comBasLin.basLin.PPre[1] = clientWeather.comBasLin.PPre[1] 64 : clientWeather.comBasLin.stoHis.u = clientWeather.comBasLin.isEventDay 65 : clientWeather.comBasLin.stoHis.y = clientWeather.comBasLin.basLin.storeHistory 66 : clientWeather.comBasLin.basLin.typeOfDay[1] = clientWeather.comBasLin.typeOfDay[1] 67 : clientWeather.comBasLin.basLin.typeOfDay[2] = clientWeather.comBasLin.typeOfDay[2] 68 : clientWeather.initialStep.outPort[1].available = clientWeather.transition.inPort.available 69 : clientWeather.initialStep.outPort[1].reset = clientWeather.transition.inPort.reset 70 : clientWeather.transition.outPort.occupied = clientWeather.comBasLin.inPort[1].occupied 71 : clientWeather.transition.outPort.set = clientWeather.comBasLin.inPort[1].set 72 : clientWeather.t1.inPort.available = clientWeather.comBasLin.outPort[1].available 73 : clientWeather.t1.inPort.reset = clientWeather.comBasLin.outPort[1].reset 74 : clientWeather.t1.outPort.occupied = clientWeather.norOpe.inPort[1].occupied 75 : clientWeather.t1.outPort.set = clientWeather.norOpe.inPort[1].set 76 : clientWeather.comBasLin.ECon = clientWeather.ECon 77 : clientWeather.comBasLin.PPre[1] = clientWeather.PPreNoShe[1] 78 : clientWeather.comBasLin.PPre[1] = clientWeather.norOpe.PCon 79 : clientWeather.t2.outPort.occupied = clientWeather.comBasLin.inPort[2].occupied 80 : clientWeather.t2.outPort.set = clientWeather.comBasLin.inPort[2].set 81 : clientWeather.t3.outPort.occupied = clientWeather.she.inPort[1].occupied 82 : clientWeather.t3.outPort.set = clientWeather.she.inPort[1].set 83 : clientWeather.t4.inPort.available = clientWeather.she.outPort[1].available 84 : clientWeather.t4.inPort.reset = clientWeather.she.outPort[1].reset 85 : clientWeather.t4.outPort.occupied = clientWeather.comBasLin.inPort[3].occupied 86 : clientWeather.t4.outPort.set = clientWeather.comBasLin.inPort[3].set 87 : clientWeather.t2.condition = clientWeather.tri.y 88 : clientWeather.t2.condition = clientWeather.t4.condition 89 : clientWeather.switch.u1 = clientWeather.she.PCon 90 : clientWeather.switch.u1 = clientWeather.norOpe.PPre 91 : clientWeather.norOpe.active = clientWeather.switch.u2 92 : clientWeather.norOpe.outPort[1].available = clientWeather.t2.inPort.available 93 : clientWeather.norOpe.outPort[1].reset = clientWeather.t2.inPort.reset 94 : clientWeather.norOpe.outPort[2].available = clientWeather.t3.inPort.available 95 : clientWeather.norOpe.outPort[2].reset = clientWeather.t3.inPort.reset 96 : clientWeather.shed = clientWeather.t3.condition 97 : clientWeather.switch.u3 = clientWeather.she.PPre 98 : clientWeather.isEventDay = clientWeather.comBasLin.isEventDay 99 : clientWeather.comBasLin.TOut = clientWeather.TOut 100 : clientWeather.typeOfDay[1] = clientWeather.comBasLin.typeOfDay[1] 101 : clientWeather.typeOfDay[2] = clientWeather.comBasLin.typeOfDay[2] 102 : clientWeather.yShed = clientWeather.she.yShed 103 : clientWeather.switch.y = clientWeather.PPre 104 : drSig.y = clientWeather.shed 105 : drSig.y = clientWeather.isEventDay 106 : drSig.y = clientAverage.shed 107 : drSig.y = clientAverage.isEventDay 108 : drSig.u = bui90.y[3] 109 : clientAverage.PPre = errorAverage.u1 110 : clientWeather.PPre = errorWeather.u1 111 : clientWeather.TOut = bui90.y[1] 112 : relErrAverage.u = errorAverage.y 113 : relErrWeather.u = errorWeather.y 114 : errorAverage.u2 = bui90.y[2] 115 : errorAverage.u2 = errorWeather.u2 116 : errorAverage.u2 = ene.u 117 : ene.y = clientAverage.ECon 118 : ene.y = clientWeather.ECon 119 : dayType.y[1] = clientWeather.typeOfDay[1] 120 : dayType.y[1] = clientAverage.typeOfDay[1] 121 : dayType.y[2] = clientWeather.typeOfDay[2] 122 : dayType.y[2] = clientAverage.typeOfDay[2] 123 : clientWeather.yShed = yShed.y 124 : clientWeather.yShed = clientAverage.yShed 125 : clientAverage.she.outerStatePort.subgraphStatePort.activeSteps + clientAverage.norOpe.outerStatePort.subgraphStatePort.activeSteps + clientAverage.comBasLin.outerStatePort.subgraphStatePort.activeSteps + clientAverage.stateGraphRoot.subgraphStatePort.activeSteps + clientAverage.initialStep.outerStatePort.subgraphStatePort.activeSteps = 0.0 126 : clientWeather.she.outerStatePort.subgraphStatePort.activeSteps + clientWeather.norOpe.outerStatePort.subgraphStatePort.activeSteps + clientWeather.comBasLin.outerStatePort.subgraphStatePort.activeSteps + clientWeather.stateGraphRoot.subgraphStatePort.activeSteps + clientWeather.initialStep.outerStatePort.subgraphStatePort.activeSteps = 0.0 127 : clientAverage.initialStep.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.initialStep.outerStatePort.localActive then 1.0 else 0.0 128 : clientAverage.initialStep.active = clientAverage.initialStep.localActive 129 : clientAverage.initialStep.localActive = pre(clientAverage.initialStep.newActive) 130 : clientAverage.initialStep.newActive = if clientAverage.initialStep.outerStatePort.subgraphStatePort.resume then clientAverage.initialStep.oldActive else (Modelica.StateGraph.Temporary.anyTrue({}) or clientAverage.initialStep.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientAverage.initialStep.outPort[1].reset})) and not clientAverage.initialStep.outerStatePort.subgraphStatePort.suspend 131 : clientAverage.initialStep.outPort[1].available = clientAverage.initialStep.localActive 132 : clientAverage.stateGraphRoot.activeSteps = -integer(clientAverage.stateGraphRoot.subgraphStatePort.activeSteps) 133 : clientAverage.stateGraphRoot.suspend = clientAverage.stateGraphRoot.subgraphStatePort.suspend 134 : clientAverage.stateGraphRoot.resume = clientAverage.stateGraphRoot.subgraphStatePort.resume 135 : clientAverage.transition.fire = clientAverage.transition.enableFire 136 : clientAverage.transition.enableFire = clientAverage.transition.localCondition and clientAverage.transition.inPort.available and not clientAverage.transition.outPort.occupied 137 : clientAverage.transition.inPort.reset = clientAverage.transition.fire 138 : clientAverage.transition.outPort.set = clientAverage.transition.fire 139 : clientAverage.comBasLin.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.comBasLin.outerStatePort.localActive then 1.0 else 0.0 140 : clientAverage.comBasLin.basLin.sampleTrigger = sample(1, clientAverage.comBasLin.basLin.samStart, clientAverage.comBasLin.basLin.samplePeriod) 141 : clientAverage.comBasLin.basLin.intTOut = 0.0 142 : clientAverage.comBasLin.stoHis.y = not clientAverage.comBasLin.stoHis.u 143 : clientAverage.comBasLin.active = clientAverage.comBasLin.localActive 144 : clientAverage.comBasLin.localActive = pre(clientAverage.comBasLin.newActive) 145 : clientAverage.comBasLin.newActive = if clientAverage.comBasLin.outerStatePort.subgraphStatePort.resume then clientAverage.comBasLin.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientAverage.comBasLin.inPort[1].set, clientAverage.comBasLin.inPort[2].set, clientAverage.comBasLin.inPort[3].set}) or clientAverage.comBasLin.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientAverage.comBasLin.outPort[1].reset})) and not clientAverage.comBasLin.outerStatePort.subgraphStatePort.suspend 146 : clientAverage.comBasLin.inPort[1].occupied = clientAverage.comBasLin.localActive 147 : clientAverage.comBasLin.inPort[2].occupied = clientAverage.comBasLin.inPort[1].occupied or clientAverage.comBasLin.inPort[1].set 148 : clientAverage.comBasLin.inPort[3].occupied = clientAverage.comBasLin.inPort[2].occupied or clientAverage.comBasLin.inPort[2].set 149 : clientAverage.comBasLin.outPort[1].available = clientAverage.comBasLin.localActive 150 : clientAverage.t1.fire = clientAverage.t1.enableFire 151 : clientAverage.t1.enableFire = clientAverage.t1.localCondition and clientAverage.t1.inPort.available and not clientAverage.t1.outPort.occupied 152 : clientAverage.t1.inPort.reset = clientAverage.t1.fire 153 : clientAverage.t1.outPort.set = clientAverage.t1.fire 154 : clientAverage.norOpe.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.norOpe.outerStatePort.localActive then 1.0 else 0.0 155 : clientAverage.norOpe.PPre = clientAverage.norOpe.PCon 156 : clientAverage.norOpe.active = clientAverage.norOpe.localActive 157 : clientAverage.norOpe.localActive = pre(clientAverage.norOpe.newActive) 158 : clientAverage.norOpe.newActive = if clientAverage.norOpe.outerStatePort.subgraphStatePort.resume then clientAverage.norOpe.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientAverage.norOpe.inPort[1].set}) or clientAverage.norOpe.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientAverage.norOpe.outPort[1].reset, clientAverage.norOpe.outPort[2].reset})) and not clientAverage.norOpe.outerStatePort.subgraphStatePort.suspend 159 : clientAverage.norOpe.inPort[1].occupied = clientAverage.norOpe.localActive 160 : clientAverage.norOpe.outPort[1].available = clientAverage.norOpe.localActive 161 : clientAverage.norOpe.outPort[2].available = clientAverage.norOpe.outPort[1].available and not clientAverage.norOpe.outPort[1].reset 162 : clientAverage.t2.fire = clientAverage.t2.enableFire 163 : clientAverage.t2.enableFire = clientAverage.t2.localCondition and clientAverage.t2.inPort.available and not clientAverage.t2.outPort.occupied 164 : clientAverage.t2.inPort.reset = clientAverage.t2.fire 165 : clientAverage.t2.outPort.set = clientAverage.t2.fire 166 : clientAverage.t3.fire = clientAverage.t3.enableFire 167 : clientAverage.t3.enableFire = clientAverage.t3.localCondition and clientAverage.t3.inPort.available and not clientAverage.t3.outPort.occupied 168 : clientAverage.t3.inPort.reset = clientAverage.t3.fire 169 : clientAverage.t3.outPort.set = clientAverage.t3.fire 170 : clientAverage.she.outerStatePort.subgraphStatePort.activeSteps = if clientAverage.she.outerStatePort.localActive then 1.0 else 0.0 171 : clientAverage.she.PPre = clientAverage.she.yShed * clientAverage.she.PCon 172 : clientAverage.she.active = clientAverage.she.localActive 173 : clientAverage.she.localActive = pre(clientAverage.she.newActive) 174 : clientAverage.she.newActive = if clientAverage.she.outerStatePort.subgraphStatePort.resume then clientAverage.she.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientAverage.she.inPort[1].set}) or clientAverage.she.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientAverage.she.outPort[1].reset})) and not clientAverage.she.outerStatePort.subgraphStatePort.suspend 175 : clientAverage.she.inPort[1].occupied = clientAverage.she.localActive 176 : clientAverage.she.outPort[1].available = clientAverage.she.localActive 177 : clientAverage.t4.fire = clientAverage.t4.enableFire 178 : clientAverage.t4.enableFire = clientAverage.t4.localCondition and clientAverage.t4.inPort.available and not clientAverage.t4.outPort.occupied 179 : clientAverage.t4.inPort.reset = clientAverage.t4.fire 180 : clientAverage.t4.outPort.set = clientAverage.t4.fire 181 : clientAverage.tri.y = sample(2, clientAverage.tri.startTime, 900.0) 182 : clientAverage.switch.y = if clientAverage.switch.u2 then clientAverage.switch.u1 else clientAverage.switch.u3 183 : dayType.y[1] = dayType.days[mod(dayType.iDay + 1 - 2, 7) + 1] 184 : dayType.y[2] = dayType.days[mod(dayType.iDay + 2 - 2, 7) + 1] 185 : dayType.sampleTrigger = sample(3, dayType.firstSample, dayType.samplePeriod) 186 : bui90.timeScaled = time 187 : bui90.y[1] = Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 1, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 188 : bui90.y[2] = Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 2, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 189 : bui90.y[3] = Modelica.Blocks.Tables.Internal.getTimeTableValueNoDer(bui90.tableID, 3, bui90.timeScaled, bui90.nextTimeEventScaled, pre(bui90.nextTimeEventScaled)) 190 : drSig.y = drSig.u > drSig.threshold 191 : errorAverage.y = errorAverage.k1 * errorAverage.u1 + errorAverage.k2 * errorAverage.u2 192 : clientWeather.initialStep.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.initialStep.outerStatePort.localActive then 1.0 else 0.0 193 : clientWeather.initialStep.active = clientWeather.initialStep.localActive 194 : clientWeather.initialStep.localActive = pre(clientWeather.initialStep.newActive) 195 : clientWeather.initialStep.newActive = if clientWeather.initialStep.outerStatePort.subgraphStatePort.resume then clientWeather.initialStep.oldActive else (Modelica.StateGraph.Temporary.anyTrue({}) or clientWeather.initialStep.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientWeather.initialStep.outPort[1].reset})) and not clientWeather.initialStep.outerStatePort.subgraphStatePort.suspend 196 : clientWeather.initialStep.outPort[1].available = clientWeather.initialStep.localActive 197 : clientWeather.stateGraphRoot.activeSteps = -integer(clientWeather.stateGraphRoot.subgraphStatePort.activeSteps) 198 : clientWeather.stateGraphRoot.suspend = clientWeather.stateGraphRoot.subgraphStatePort.suspend 199 : clientWeather.stateGraphRoot.resume = clientWeather.stateGraphRoot.subgraphStatePort.resume 200 : clientWeather.transition.fire = clientWeather.transition.enableFire 201 : clientWeather.transition.enableFire = clientWeather.transition.localCondition and clientWeather.transition.inPort.available and not clientWeather.transition.outPort.occupied 202 : clientWeather.transition.inPort.reset = clientWeather.transition.fire 203 : clientWeather.transition.outPort.set = clientWeather.transition.fire 204 : clientWeather.comBasLin.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.comBasLin.outerStatePort.localActive then 1.0 else 0.0 205 : clientWeather.comBasLin.basLin.sampleTrigger = sample(4, clientWeather.comBasLin.basLin.samStart, clientWeather.comBasLin.basLin.samplePeriod) 206 : der(clientWeather.comBasLin.basLin.intTOut) = clientWeather.comBasLin.basLin.TOut_in_internal 207 : clientWeather.comBasLin.stoHis.y = not clientWeather.comBasLin.stoHis.u 208 : clientWeather.comBasLin.active = clientWeather.comBasLin.localActive 209 : clientWeather.comBasLin.localActive = pre(clientWeather.comBasLin.newActive) 210 : clientWeather.comBasLin.newActive = if clientWeather.comBasLin.outerStatePort.subgraphStatePort.resume then clientWeather.comBasLin.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientWeather.comBasLin.inPort[1].set, clientWeather.comBasLin.inPort[2].set, clientWeather.comBasLin.inPort[3].set}) or clientWeather.comBasLin.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientWeather.comBasLin.outPort[1].reset})) and not clientWeather.comBasLin.outerStatePort.subgraphStatePort.suspend 211 : clientWeather.comBasLin.inPort[1].occupied = clientWeather.comBasLin.localActive 212 : clientWeather.comBasLin.inPort[2].occupied = clientWeather.comBasLin.inPort[1].occupied or clientWeather.comBasLin.inPort[1].set 213 : clientWeather.comBasLin.inPort[3].occupied = clientWeather.comBasLin.inPort[2].occupied or clientWeather.comBasLin.inPort[2].set 214 : clientWeather.comBasLin.outPort[1].available = clientWeather.comBasLin.localActive 215 : clientWeather.t1.fire = clientWeather.t1.enableFire 216 : clientWeather.t1.enableFire = clientWeather.t1.localCondition and clientWeather.t1.inPort.available and not clientWeather.t1.outPort.occupied 217 : clientWeather.t1.inPort.reset = clientWeather.t1.fire 218 : clientWeather.t1.outPort.set = clientWeather.t1.fire 219 : clientWeather.norOpe.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.norOpe.outerStatePort.localActive then 1.0 else 0.0 220 : clientWeather.norOpe.PPre = clientWeather.norOpe.PCon 221 : clientWeather.norOpe.active = clientWeather.norOpe.localActive 222 : clientWeather.norOpe.localActive = pre(clientWeather.norOpe.newActive) 223 : clientWeather.norOpe.newActive = if clientWeather.norOpe.outerStatePort.subgraphStatePort.resume then clientWeather.norOpe.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientWeather.norOpe.inPort[1].set}) or clientWeather.norOpe.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientWeather.norOpe.outPort[1].reset, clientWeather.norOpe.outPort[2].reset})) and not clientWeather.norOpe.outerStatePort.subgraphStatePort.suspend 224 : clientWeather.norOpe.inPort[1].occupied = clientWeather.norOpe.localActive 225 : clientWeather.norOpe.outPort[1].available = clientWeather.norOpe.localActive 226 : clientWeather.norOpe.outPort[2].available = clientWeather.norOpe.outPort[1].available and not clientWeather.norOpe.outPort[1].reset 227 : clientWeather.t2.fire = clientWeather.t2.enableFire 228 : clientWeather.t2.enableFire = clientWeather.t2.localCondition and clientWeather.t2.inPort.available and not clientWeather.t2.outPort.occupied 229 : clientWeather.t2.inPort.reset = clientWeather.t2.fire 230 : clientWeather.t2.outPort.set = clientWeather.t2.fire 231 : clientWeather.t3.fire = clientWeather.t3.enableFire 232 : clientWeather.t3.enableFire = clientWeather.t3.localCondition and clientWeather.t3.inPort.available and not clientWeather.t3.outPort.occupied 233 : clientWeather.t3.inPort.reset = clientWeather.t3.fire 234 : clientWeather.t3.outPort.set = clientWeather.t3.fire 235 : clientWeather.she.outerStatePort.subgraphStatePort.activeSteps = if clientWeather.she.outerStatePort.localActive then 1.0 else 0.0 236 : clientWeather.she.PPre = clientWeather.she.yShed * clientWeather.she.PCon 237 : clientWeather.she.active = clientWeather.she.localActive 238 : clientWeather.she.localActive = pre(clientWeather.she.newActive) 239 : clientWeather.she.newActive = if clientWeather.she.outerStatePort.subgraphStatePort.resume then clientWeather.she.oldActive else (Modelica.StateGraph.Temporary.anyTrue({clientWeather.she.inPort[1].set}) or clientWeather.she.localActive and not Modelica.StateGraph.Temporary.anyTrue({clientWeather.she.outPort[1].reset})) and not clientWeather.she.outerStatePort.subgraphStatePort.suspend 240 : clientWeather.she.inPort[1].occupied = clientWeather.she.localActive 241 : clientWeather.she.outPort[1].available = clientWeather.she.localActive 242 : clientWeather.t4.fire = clientWeather.t4.enableFire 243 : clientWeather.t4.enableFire = clientWeather.t4.localCondition and clientWeather.t4.inPort.available and not clientWeather.t4.outPort.occupied 244 : clientWeather.t4.inPort.reset = clientWeather.t4.fire 245 : clientWeather.t4.outPort.set = clientWeather.t4.fire 246 : clientWeather.tri.y = sample(5, clientWeather.tri.startTime, 900.0) 247 : clientWeather.switch.y = if clientWeather.switch.u2 then clientWeather.switch.u1 else clientWeather.switch.u3 248 : errorWeather.y = errorWeather.k1 * errorWeather.u1 + errorWeather.k2 * errorWeather.u2 249 : relErrAverage.y = relErrAverage.k * relErrAverage.u 250 : relErrWeather.y = relErrWeather.k * relErrWeather.u 251 : der(ene.y) = ene.k * ene.u 252 : yShed.y = yShed.k 253 : clientAverage.initialStep.outerStatePort.localActive = clientAverage.initialStep.localActive 254 : clientAverage.stateGraphRoot.suspend = false 255 : clientAverage.stateGraphRoot.resume = false 256 : clientAverage.transition.condition = true 257 : clientAverage.transition.localCondition = clientAverage.transition.condition 258 : clientAverage.comBasLin.outerStatePort.localActive = clientAverage.comBasLin.localActive 259 : clientAverage.t1.condition = true 260 : clientAverage.t1.localCondition = clientAverage.t1.condition 261 : clientAverage.norOpe.outerStatePort.localActive = clientAverage.norOpe.localActive 262 : clientAverage.t2.localCondition = clientAverage.t2.condition 263 : clientAverage.t3.localCondition = clientAverage.t3.condition 264 : clientAverage.she.outerStatePort.localActive = clientAverage.she.localActive 265 : clientAverage.t4.localCondition = clientAverage.t4.condition 266 : clientWeather.initialStep.outerStatePort.localActive = clientWeather.initialStep.localActive 267 : clientWeather.stateGraphRoot.suspend = false 268 : clientWeather.stateGraphRoot.resume = false 269 : clientWeather.transition.condition = true 270 : clientWeather.transition.localCondition = clientWeather.transition.condition 271 : clientWeather.comBasLin.outerStatePort.localActive = clientWeather.comBasLin.localActive 272 : clientWeather.t1.condition = true 273 : clientWeather.t1.localCondition = clientWeather.t1.condition 274 : clientWeather.norOpe.outerStatePort.localActive = clientWeather.norOpe.localActive 275 : clientWeather.t2.localCondition = clientWeather.t2.condition 276 : clientWeather.t3.localCondition = clientWeather.t3.condition 277 : clientWeather.she.outerStatePort.localActive = clientWeather.she.localActive 278 : clientWeather.t4.localCondition = clientWeather.t4.condition 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 mod(pre(dayType.iDay), 7) + 1; 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.006365/1.629, allocations: 4.585 MB / 1.119 GB, free: 22.95 MB / 0.6824 GB Error: pre-optimization module clockPartitioning (simulation) failed.