Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.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: translateModel(Buildings.Electrical.DC.Storage.Examples.Battery,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|bat.terminal.i.1.|loa.i.1.|bat.SOC|sou.S.1.|bat.P|loa.S.1.",fileNamePrefix="Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery") translateModel(Buildings.Electrical.DC.Storage.Examples.Battery,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|bat.terminal.i.1.|loa.i.1.|bat.SOC|sou.S.1.|bat.P|loa.S.1.",fileNamePrefix="Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/package.mo): time 2.347/2.347, allocations: 390.3 MB / 402.8 MB, free: 6.68 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.001151/0.001152, allocations: 172.9 kB / 496.1 MB, free: 12.86 MB / 410.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.666/1.666, allocations: 221.3 MB / 0.7915 GB, free: 5.426 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.00101/0.00101, allocations: 91.89 kB / 0.9317 GB, free: 5.734 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 3.322e-05/3.331e-05, allocations: 7.984 kB / 1.079 GB, free: 140.5 MB / 0.7292 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3335/0.3335, allocations: 143 MB / 1.219 GB, free: 13.52 MB / 0.7448 GB Notification: Performance of FrontEnd - scodeFlatten: time 1.103/1.437, allocations: 176.5 MB / 1.391 GB, free: 11.54 MB / 0.8542 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002454/1.437, allocations: 85.14 kB / 1.391 GB, free: 11.5 MB / 0.8542 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/Electrical/Interfaces/Source.mo:28:9-28:50:writable] Warning: Ignoring overconstrained operator applied to array components having size zero: Connections.potentialRoot(terminal.theta);. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/Electrical/DC/Sensors/GeneralizedSensor.mo:39:3-39:57:writable] Warning: Ignoring overconstrained operator applied to array components having size zero: Connections.branch(terminal_p.theta, terminal_n.theta);. Notification: Performance of FrontEnd - DAE generated: time 0.0589/1.496, allocations: 24.17 MB / 1.415 GB, free: 7.305 MB / 0.8698 GB Notification: Performance of FrontEnd: time 1.903e-06/1.496, allocations: 0 / 1.415 GB, free: 7.305 MB / 0.8698 GB Notification: Performance of Transformations before backend: time 4.024e-05/1.496, allocations: 23.98 kB / 1.415 GB, free: 7.281 MB / 0.8698 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 191 * Number of variables: 191 Notification: Performance of Generate backend data structure: time 0.001319/1.498, allocations: 0.8009 MB / 1.416 GB, free: 6.477 MB / 0.8698 GB Notification: Performance of prepare preOptimizeDAE: time 5.056e-05/1.498, allocations: 12.03 kB / 1.416 GB, free: 6.465 MB / 0.8698 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006184/1.498, allocations: 123 kB / 1.416 GB, free: 6.344 MB / 0.8698 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006362/1.499, allocations: 421.1 kB / 1.416 GB, free: 5.945 MB / 0.8698 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.692e-05/1.499, allocations: 68.56 kB / 1.416 GB, free: 5.906 MB / 0.8698 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001163/1.499, allocations: 75.19 kB / 1.416 GB, free: 5.855 MB / 0.8698 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001279/1.5, allocations: 0.8538 MB / 1.417 GB, free: 5.176 MB / 0.8698 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.299e-05/1.5, allocations: 4 kB / 1.417 GB, free: 5.172 MB / 0.8698 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.162e-05/1.5, allocations: 36.8 kB / 1.417 GB, free: 5.156 MB / 0.8698 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.994e-05/1.501, allocations: 41.48 kB / 1.417 GB, free: 5.121 MB / 0.8698 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008738/1.501, allocations: 0.5529 MB / 1.418 GB, free: 4.742 MB / 0.8698 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003982/1.505, allocations: 3.714 MB / 1.421 GB, free: 1.312 MB / 0.8698 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0005892/1.506, allocations: 380.7 kB / 1.422 GB, free: 0.9805 MB / 0.8698 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003664/1.506, allocations: 217.1 kB / 1.422 GB, free: 0.8164 MB / 0.8698 GB Notification: Performance of preOpt evalFunc (simulation): time 4.102e-05/1.506, allocations: 15.94 kB / 1.422 GB, free: 0.8047 MB / 0.8698 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004071/1.507, allocations: 275.4 kB / 1.422 GB, free: 0.5703 MB / 0.8698 GB Notification: Performance of pre-optimization done (n=50): time 2.454e-06/1.507, allocations: 0 / 1.422 GB, free: 0.5703 MB / 0.8698 GB Notification: Performance of matching and sorting (n=50): time 0.000679/1.508, allocations: 370.8 kB / 1.423 GB, free: 280 kB / 0.8698 GB Notification: Performance of inlineWhenForInitialization (initialization): time 8.989e-05/1.508, allocations: 162.2 kB / 1.423 GB, free: 80 kB / 0.8698 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004202/1.508, allocations: 383.2 kB / 1.423 GB, free: 15.78 MB / 0.8855 GB Notification: Performance of collectPreVariables (initialization): time 7.068e-05/1.508, allocations: 55.02 kB / 1.423 GB, free: 15.73 MB / 0.8855 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002484/1.508, allocations: 331.7 kB / 1.423 GB, free: 15.46 MB / 0.8855 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001131/1.509, allocations: 135.6 kB / 1.424 GB, free: 15.36 MB / 0.8855 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.587e-05/1.509, allocations: 10.19 kB / 1.424 GB, free: 15.36 MB / 0.8855 GB Notification: Performance of setup shared object (initialization): time 0.0001636/1.509, allocations: 367.6 kB / 1.424 GB, free: 15.01 MB / 0.8855 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002519/1.509, allocations: 155.9 kB / 1.424 GB, free: 14.91 MB / 0.8855 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004137/1.509, allocations: 390.5 kB / 1.424 GB, free: 14.5 MB / 0.8855 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003182/1.51, allocations: 192 kB / 1.425 GB, free: 14.36 MB / 0.8855 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.558e-06/1.51, allocations: 3.938 kB / 1.425 GB, free: 14.36 MB / 0.8855 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0008654/1.511, allocations: 0.6042 MB / 1.425 GB, free: 13.88 MB / 0.8855 GB Notification: Performance of prepare postOptimizeDAE: time 0.001209/1.512, allocations: 2.704 MB / 1.428 GB, free: 11.01 MB / 0.8855 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.571e-05/1.512, allocations: 8 kB / 1.428 GB, free: 11 MB / 0.8855 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.7e-05/1.512, allocations: 12 kB / 1.428 GB, free: 10.99 MB / 0.8855 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003697/1.512, allocations: 103 kB / 1.428 GB, free: 10.89 MB / 0.8855 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.988e-05/1.512, allocations: 15.94 kB / 1.428 GB, free: 10.88 MB / 0.8855 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000364/1.513, allocations: 69.45 kB / 1.428 GB, free: 10.82 MB / 0.8855 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.899e-05/1.513, allocations: 39.06 kB / 1.428 GB, free: 10.79 MB / 0.8855 GB Notification: Performance of prepare postOptimizeDAE: time 8.917e-06/1.513, allocations: 4 kB / 1.428 GB, free: 10.79 MB / 0.8855 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0007278/1.513, allocations: 0.5233 MB / 1.429 GB, free: 10.39 MB / 0.8855 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.394e-06/1.514, allocations: 8 kB / 1.429 GB, free: 10.39 MB / 0.8855 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.189e-05/1.514, allocations: 12 kB / 1.429 GB, free: 10.38 MB / 0.8855 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003169/1.514, allocations: 106.9 kB / 1.429 GB, free: 10.28 MB / 0.8855 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.31e-05/1.514, allocations: 16.62 kB / 1.429 GB, free: 10.26 MB / 0.8855 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002813/1.514, allocations: 66.09 kB / 1.429 GB, free: 10.21 MB / 0.8855 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.486e-05/1.514, allocations: 27.75 kB / 1.429 GB, free: 10.19 MB / 0.8855 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 31 * Number of states: 0 () * Number of discrete variables: 56 ($PRE.toOn.enableFire,$PRE.toHold.enableFire,$PRE.toDischarge.enableFire,$PRE.toOff.enableFire,$PRE.toOn.t_start,toOn.t_start,$PRE.toHold.t_start,toHold.t_start,$PRE.toDischarge.t_start,toDischarge.t_start,$PRE.toOff.t_start,toOff.t_start,stateGraphRoot.resume,stateGraphRoot.suspend,$whenCondition1,$PRE.bat.cha.underCharged,bat.cha.underCharged,$PRE.bat.cha.overCharged,bat.cha.overCharged,startCharge.y,greaterEqualThreshold.y,startDischarge.y,lessEqualThreshold.y,$PRE.off.localActive,off.localActive,$PRE.off.newActive,off.newActive,$PRE.off.oldActive,off.oldActive,off.active,toOn.enableFire,$PRE.charge.localActive,charge.localActive,$PRE.charge.newActive,charge.newActive,$PRE.charge.oldActive,charge.oldActive,charge.active,toHold.enableFire,$PRE.hold.localActive,hold.localActive,$PRE.hold.newActive,hold.newActive,$PRE.hold.oldActive,hold.oldActive,hold.active,toDischarge.enableFire,$PRE.discharge.localActive,discharge.localActive,$PRE.discharge.newActive,discharge.newActive,$PRE.discharge.oldActive,discharge.oldActive,discharge.active,toOff.enableFire,stateGraphRoot.activeSteps) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (97): * Single equations (assignments): 97 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.000184/1.514, allocations: 179.4 kB / 1.429 GB, free: 10.03 MB / 0.8855 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.593e-05/1.514, allocations: 43.44 kB / 1.429 GB, free: 9.988 MB / 0.8855 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0006408/1.515, allocations: 383.2 kB / 1.429 GB, free: 9.719 MB / 0.8855 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.004e-05/1.515, allocations: 12 kB / 1.429 GB, free: 9.707 MB / 0.8855 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.999e-06/1.515, allocations: 0 / 1.429 GB, free: 9.707 MB / 0.8855 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.025e-05/1.515, allocations: 3.953 kB / 1.429 GB, free: 9.703 MB / 0.8855 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001515/1.517, allocations: 1.114 MB / 1.431 GB, free: 8.754 MB / 0.8855 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.739e-06/1.517, allocations: 4 kB / 1.431 GB, free: 8.75 MB / 0.8855 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002089/1.517, allocations: 43.36 kB / 1.431 GB, free: 8.711 MB / 0.8855 GB Notification: Performance of postOpt tearingSystem (simulation): time 8.746e-06/1.517, allocations: 7.953 kB / 1.431 GB, free: 8.703 MB / 0.8855 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.221e-05/1.517, allocations: 23.05 kB / 1.431 GB, free: 8.688 MB / 0.8855 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.338e-06/1.517, allocations: 4 kB / 1.431 GB, free: 8.684 MB / 0.8855 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.194e-06/1.517, allocations: 0 / 1.431 GB, free: 8.684 MB / 0.8855 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0009254/1.518, allocations: 0.7389 MB / 1.431 GB, free: 7.918 MB / 0.8855 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001674/1.518, allocations: 164.4 kB / 1.432 GB, free: 7.738 MB / 0.8855 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.121e-05/1.518, allocations: 15.95 kB / 1.432 GB, free: 7.723 MB / 0.8855 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001848/1.518, allocations: 19.98 kB / 1.432 GB, free: 7.703 MB / 0.8855 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001195/1.519, allocations: 44.38 kB / 1.432 GB, free: 7.66 MB / 0.8855 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.621e-05/1.519, allocations: 27.92 kB / 1.432 GB, free: 7.633 MB / 0.8855 GB Notification: Performance of sorting global known variables: time 0.0002717/1.519, allocations: 253.3 kB / 1.432 GB, free: 7.387 MB / 0.8855 GB Notification: Performance of sort global known variables: time 1.4e-07/1.519, allocations: 4 kB / 1.432 GB, free: 7.383 MB / 0.8855 GB Notification: Performance of remove unused functions: time 0.0008342/1.52, allocations: 243.7 kB / 1.432 GB, free: 7.145 MB / 0.8855 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 7 * Number of states: 1 (bat.cha.SOC) * Number of discrete variables: 36 (toOff.t_start,toDischarge.t_start,toHold.t_start,toOn.t_start,off.localActive,charge.localActive,hold.localActive,discharge.localActive,$cse1,$cse2,$cse3,$cse4,$whenCondition1,bat.cha.underCharged,bat.cha.overCharged,startCharge.y,greaterEqualThreshold.y,startDischarge.y,lessEqualThreshold.y,off.newActive,off.oldActive,off.active,toOn.enableFire,charge.newActive,charge.oldActive,charge.active,toHold.enableFire,hold.newActive,hold.oldActive,hold.active,toDischarge.enableFire,discharge.newActive,discharge.oldActive,discharge.active,toOff.enableFire,stateGraphRoot.activeSteps) * Number of discrete states: 10 (discharge.newActive,hold.newActive,charge.newActive,off.newActive,bat.cha.underCharged,bat.cha.overCharged,toOn.t_start,toHold.t_start,toDischarge.t_start,toOff.t_start) * Top-level inputs: 0 Notification: Strong component statistics for simulation (55): * Single equations (assignments): 47 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 8 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0002202/1.52, allocations: 146.8 kB / 1.432 GB, free: 6.992 MB / 0.8855 GB Notification: Performance of simCode: created initialization part: time 0.001136/1.521, allocations: 0.7412 MB / 1.433 GB, free: 6.254 MB / 0.8855 GB Notification: Performance of simCode: created event and clocks part: time 3.115e-06/1.521, allocations: 0 / 1.433 GB, free: 6.254 MB / 0.8855 GB Notification: Performance of simCode: created simulation system equations: time 0.0002898/1.521, allocations: 198.5 kB / 1.433 GB, free: 6.059 MB / 0.8855 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005108/1.522, allocations: 94.19 kB / 1.433 GB, free: 5.969 MB / 0.8855 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001418/1.523, allocations: 0.7638 MB / 1.434 GB, free: 5.164 MB / 0.8855 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004844/1.524, allocations: 0.9278 MB / 1.435 GB, free: 4.211 MB / 0.8855 GB Notification: Performance of simCode: alias equations: time 0.0004533/1.524, allocations: 128.7 kB / 1.435 GB, free: 4.082 MB / 0.8855 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001114/1.524, allocations: 43.42 kB / 1.435 GB, free: 4.043 MB / 0.8855 GB Notification: Performance of SimCode: time 5.31e-07/1.524, allocations: 0 / 1.435 GB, free: 4.043 MB / 0.8855 GB Notification: Performance of Templates: time 0.01134/1.536, allocations: 6.049 MB / 1.441 GB, free: 14.05 MB / 0.9011 GB make -j1 -f Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.makefile (rm -f Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; mkfifo Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; head -c 1048576 < Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe >> ../files/Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.sim & ./Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1) diffSimulationResults("Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat","/mnt/ReferenceFiles/Buildings/csv/master/Buildings_Electrical_DC_Storage_Examples_Battery.csv","../files/Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches