Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/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 9.1.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/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_9_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_9_Buildings.Electrical.DC.Storage.Examples.Battery") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/package.mo): time 2.241/2.241, allocations: 387.1 MB / 399.7 MB, free: 9.473 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.001424/0.001424, allocations: 179.1 kB / 492.3 MB, free: 0.6172 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.533/1.533, allocations: 221.3 MB / 0.7871 GB, free: 12.89 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.000947/0.000947, allocations: 86.78 kB / 0.9267 GB, free: 13.98 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 5.105e-05/5.107e-05, allocations: 4 kB / 1.073 GB, free: 180.4 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3017/0.3018, allocations: 142.3 MB / 1.212 GB, free: 38.52 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 1.049/1.351, allocations: 175.7 MB / 1.384 GB, free: 18.8 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002198/1.351, allocations: 82.61 kB / 1.384 GB, free: 18.79 MB / 0.823 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/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 9.1.1-maint.9.1.x/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.05051/1.402, allocations: 24.16 MB / 1.408 GB, free: 19.99 MB / 0.8386 GB Notification: Performance of FrontEnd: time 1.874e-06/1.402, allocations: 3.938 kB / 1.408 GB, free: 19.98 MB / 0.8386 GB Notification: Performance of Transformations before backend: time 3.377e-05/1.402, allocations: 20 kB / 1.408 GB, free: 19.96 MB / 0.8386 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.001152/1.403, allocations: 0.7959 MB / 1.408 GB, free: 19.16 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 4.246e-05/1.403, allocations: 8.031 kB / 1.408 GB, free: 19.16 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005738/1.404, allocations: 126.9 kB / 1.409 GB, free: 19.03 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0005185/1.404, allocations: 425.3 kB / 1.409 GB, free: 18.63 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 5.684e-05/1.404, allocations: 66.45 kB / 1.409 GB, free: 18.6 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 9.644e-05/1.405, allocations: 80.5 kB / 1.409 GB, free: 18.54 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0011/1.406, allocations: 0.8517 MB / 1.41 GB, free: 17.86 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.822e-05/1.406, allocations: 3.938 kB / 1.41 GB, free: 17.86 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.17e-05/1.406, allocations: 33.36 kB / 1.41 GB, free: 17.85 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.897e-05/1.406, allocations: 37.98 kB / 1.41 GB, free: 17.81 MB / 0.8386 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007575/1.407, allocations: 0.5499 MB / 1.411 GB, free: 17.44 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003425/1.41, allocations: 3.732 MB / 1.414 GB, free: 14 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006019/1.411, allocations: 373.1 kB / 1.415 GB, free: 13.68 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003652/1.411, allocations: 221.2 kB / 1.415 GB, free: 13.51 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 3.939e-05/1.411, allocations: 7.688 kB / 1.415 GB, free: 13.5 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004021/1.411, allocations: 272.2 kB / 1.415 GB, free: 13.27 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 2.855e-06/1.412, allocations: 0 / 1.415 GB, free: 13.27 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.0006589/1.412, allocations: 373.5 kB / 1.415 GB, free: 12.97 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 9.376e-05/1.412, allocations: 166.2 kB / 1.416 GB, free: 12.77 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004177/1.413, allocations: 386.1 kB / 1.416 GB, free: 12.48 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 5.993e-05/1.413, allocations: 51.31 kB / 1.416 GB, free: 12.43 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002149/1.413, allocations: 333.3 kB / 1.416 GB, free: 12.16 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001049/1.413, allocations: 135.9 kB / 1.416 GB, free: 12.05 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 3.051e-05/1.413, allocations: 14.81 kB / 1.416 GB, free: 12.05 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 0.0001485/1.413, allocations: 359.8 kB / 1.417 GB, free: 11.71 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002511/1.414, allocations: 156.3 kB / 1.417 GB, free: 11.61 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004408/1.414, allocations: 389.5 kB / 1.417 GB, free: 11.21 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003143/1.414, allocations: 193.9 kB / 1.417 GB, free: 11.07 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.65e-06/1.414, allocations: 4 kB / 1.418 GB, free: 11.06 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0008746/1.415, allocations: 0.5972 MB / 1.418 GB, free: 10.58 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.001104/1.416, allocations: 2.705 MB / 1.421 GB, free: 7.715 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.184e-05/1.416, allocations: 4 kB / 1.421 GB, free: 7.711 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.962e-05/1.416, allocations: 12 kB / 1.421 GB, free: 7.699 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003653/1.417, allocations: 103.6 kB / 1.421 GB, free: 7.605 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.44e-05/1.417, allocations: 19.92 kB / 1.421 GB, free: 7.586 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003763/1.417, allocations: 62.72 kB / 1.421 GB, free: 7.535 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.625e-05/1.417, allocations: 39.55 kB / 1.421 GB, free: 7.504 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 8.656e-06/1.417, allocations: 8 kB / 1.421 GB, free: 7.496 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0008/1.418, allocations: 0.5303 MB / 1.421 GB, free: 7.098 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.013e-05/1.418, allocations: 15.97 kB / 1.421 GB, free: 7.082 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.29e-05/1.418, allocations: 12 kB / 1.422 GB, free: 7.07 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003065/1.418, allocations: 95.64 kB / 1.422 GB, free: 6.98 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.399e-05/1.418, allocations: 19.92 kB / 1.422 GB, free: 6.961 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002956/1.419, allocations: 58.58 kB / 1.422 GB, free: 6.918 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.822e-05/1.419, allocations: 39.58 kB / 1.422 GB, free: 6.883 MB / 0.8386 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.0001829/1.419, allocations: 168.4 kB / 1.422 GB, free: 6.734 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.118e-05/1.419, allocations: 51.42 kB / 1.422 GB, free: 6.684 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0006617/1.42, allocations: 379.5 kB / 1.422 GB, free: 6.414 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.954e-06/1.42, allocations: 8 kB / 1.422 GB, free: 6.406 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.64e-06/1.42, allocations: 0 / 1.422 GB, free: 6.406 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.732e-05/1.42, allocations: 11.98 kB / 1.422 GB, free: 6.395 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001536/1.421, allocations: 1.113 MB / 1.423 GB, free: 5.445 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.593e-06/1.421, allocations: 7.984 kB / 1.423 GB, free: 5.438 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001986/1.422, allocations: 55.72 kB / 1.423 GB, free: 5.387 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.044e-06/1.422, allocations: 4 kB / 1.423 GB, free: 5.383 MB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.182e-05/1.422, allocations: 19.56 kB / 1.423 GB, free: 5.371 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.769e-06/1.422, allocations: 4 kB / 1.423 GB, free: 5.367 MB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.976e-06/1.422, allocations: 3.938 kB / 1.423 GB, free: 5.363 MB / 0.8386 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0009089/1.423, allocations: 0.7259 MB / 1.424 GB, free: 4.727 MB / 0.8386 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001692/1.423, allocations: 159.8 kB / 1.424 GB, free: 4.566 MB / 0.8386 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.242e-05/1.423, allocations: 19.69 kB / 1.424 GB, free: 4.555 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001833/1.423, allocations: 15.75 kB / 1.424 GB, free: 4.547 MB / 0.8386 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001191/1.423, allocations: 51.98 kB / 1.424 GB, free: 4.504 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.56e-05/1.423, allocations: 23.05 kB / 1.424 GB, free: 4.484 MB / 0.8386 GB Notification: Performance of sorting global known variables: time 0.0002712/1.423, allocations: 257.7 kB / 1.425 GB, free: 4.285 MB / 0.8386 GB Notification: Performance of sort global known variables: time 1.31e-07/1.423, allocations: 0 / 1.425 GB, free: 4.285 MB / 0.8386 GB Notification: Performance of remove unused functions: time 0.0008397/1.424, allocations: 250 kB / 1.425 GB, free: 4.07 MB / 0.8386 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.0002134/1.425, allocations: 143.5 kB / 1.425 GB, free: 3.934 MB / 0.8386 GB Notification: Performance of simCode: created initialization part: time 0.001124/1.426, allocations: 0.736 MB / 1.426 GB, free: 3.387 MB / 0.8386 GB Notification: Performance of simCode: created event and clocks part: time 2.635e-06/1.426, allocations: 0 / 1.426 GB, free: 3.387 MB / 0.8386 GB Notification: Performance of simCode: created simulation system equations: time 0.0002985/1.426, allocations: 192.4 kB / 1.426 GB, free: 3.25 MB / 0.8386 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005171/1.427, allocations: 94.25 kB / 1.426 GB, free: 3.18 MB / 0.8386 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001431/1.428, allocations: 0.7686 MB / 1.427 GB, free: 2.477 MB / 0.8386 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004867/1.428, allocations: 0.9216 MB / 1.428 GB, free: 1.535 MB / 0.8386 GB Notification: Performance of simCode: alias equations: time 0.0004697/1.429, allocations: 132.7 kB / 1.428 GB, free: 1.402 MB / 0.8386 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001153/1.429, allocations: 50.61 kB / 1.428 GB, free: 1.355 MB / 0.8386 GB Notification: Performance of SimCode: time 5.01e-07/1.429, allocations: 0 / 1.428 GB, free: 1.355 MB / 0.8386 GB Notification: Performance of Templates: time 0.01166/1.441, allocations: 6.041 MB / 1.434 GB, free: 11.38 MB / 0.8542 GB make -j1 -f Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.makefile (rm -f Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; mkfifo Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; head -c 1048576 < Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe >> ../files/Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.sim & ./Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1) diffSimulationResults("Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat","/mnt/ReferenceFiles/Buildings/csv/maint_9.1.x/Buildings_Electrical_DC_Storage_Examples_Battery.csv","../files/Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches