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.349/2.349, allocations: 390.5 MB / 398 MB, free: 10.98 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.001063/0.001063, allocations: 171.8 kB / 491.2 MB, free: 1.613 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.627/1.627, allocations: 221.5 MB / 0.7868 GB, free: 13.31 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.0009098/0.0009098, allocations: 90.14 kB / 0.9269 GB, free: 13.8 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 1.961e-05/1.963e-05, allocations: 5.641 kB / 1.073 GB, free: 182 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3257/0.3257, allocations: 143 MB / 1.212 GB, free: 39.54 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 1.073/1.399, allocations: 175.8 MB / 1.384 GB, free: 17.43 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.000265/1.399, allocations: 91 kB / 1.384 GB, free: 17.42 MB / 0.823 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.04899/1.448, allocations: 23.99 MB / 1.408 GB, free: 20.39 MB / 0.8386 GB Notification: Performance of FrontEnd: time 1.503e-06/1.448, allocations: 0 / 1.408 GB, free: 20.39 MB / 0.8386 GB Notification: Performance of Transformations before backend: time 3.383e-05/1.448, allocations: 20 kB / 1.408 GB, free: 20.38 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.001149/1.449, allocations: 0.802 MB / 1.408 GB, free: 19.58 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 4.201e-05/1.45, allocations: 8.031 kB / 1.408 GB, free: 19.57 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005708/1.45, allocations: 130.3 kB / 1.408 GB, free: 19.45 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0005183/1.451, allocations: 425.7 kB / 1.409 GB, free: 19.05 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 4.008e-05/1.451, allocations: 24 kB / 1.409 GB, free: 19.03 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.596e-05/1.451, allocations: 51.98 kB / 1.409 GB, free: 18.98 MB / 0.8386 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007107/1.451, allocations: 496.9 kB / 1.409 GB, free: 18.67 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0009474/1.452, allocations: 0.7498 MB / 1.41 GB, free: 18.04 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.169e-05/1.452, allocations: 0 / 1.41 GB, free: 18.04 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.294e-05/1.453, allocations: 7.938 kB / 1.41 GB, free: 18.03 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.537e-05/1.453, allocations: 45.61 kB / 1.41 GB, free: 17.99 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003179/1.456, allocations: 3.564 MB / 1.414 GB, free: 14.69 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0005771/1.456, allocations: 351.4 kB / 1.414 GB, free: 14.38 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003793/1.457, allocations: 206.8 kB / 1.414 GB, free: 14.23 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 4.551e-05/1.457, allocations: 12.2 kB / 1.414 GB, free: 14.22 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004312/1.457, allocations: 260.2 kB / 1.414 GB, free: 14 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 1.864e-06/1.457, allocations: 0 / 1.414 GB, free: 14 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.000678/1.458, allocations: 322.2 kB / 1.415 GB, free: 13.73 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001158/1.458, allocations: 173.3 kB / 1.415 GB, free: 13.53 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003592/1.458, allocations: 308.9 kB / 1.415 GB, free: 13.29 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 5.996e-05/1.459, allocations: 40.08 kB / 1.415 GB, free: 13.25 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002728/1.459, allocations: 345.7 kB / 1.416 GB, free: 12.97 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001304/1.459, allocations: 127.5 kB / 1.416 GB, free: 12.87 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.321e-05/1.459, allocations: 0 / 1.416 GB, free: 12.87 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 0.0001719/1.459, allocations: 357.4 kB / 1.416 GB, free: 12.53 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002243/1.459, allocations: 135.5 kB / 1.416 GB, free: 12.45 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004341/1.46, allocations: 371 kB / 1.417 GB, free: 12.06 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002875/1.46, allocations: 183.6 kB / 1.417 GB, free: 11.93 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.759e-06/1.46, allocations: 0 / 1.417 GB, free: 11.93 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0008144/1.461, allocations: 0.5193 MB / 1.417 GB, free: 11.5 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.001433/1.462, allocations: 2.703 MB / 1.42 GB, free: 8.641 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.48e-05/1.462, allocations: 8 kB / 1.42 GB, free: 8.633 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 3.477e-05/1.462, allocations: 16 kB / 1.42 GB, free: 8.617 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003657/1.463, allocations: 103.6 kB / 1.42 GB, free: 8.523 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.182e-05/1.463, allocations: 19.92 kB / 1.42 GB, free: 8.504 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003422/1.463, allocations: 39.53 kB / 1.42 GB, free: 8.465 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.464e-05/1.463, allocations: 35.92 kB / 1.42 GB, free: 8.434 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 9.678e-06/1.463, allocations: 4 kB / 1.42 GB, free: 8.43 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0006913/1.464, allocations: 449.4 kB / 1.421 GB, free: 8.086 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.896e-06/1.464, allocations: 8.156 kB / 1.421 GB, free: 8.078 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.308e-05/1.464, allocations: 16 kB / 1.421 GB, free: 8.062 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003239/1.464, allocations: 103.7 kB / 1.421 GB, free: 7.965 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.193e-05/1.464, allocations: 12 kB / 1.421 GB, free: 7.953 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002453/1.465, allocations: 27.73 kB / 1.421 GB, free: 7.926 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.974e-05/1.465, allocations: 35.56 kB / 1.421 GB, free: 7.898 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.0001919/1.465, allocations: 161.7 kB / 1.421 GB, free: 7.738 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.944e-05/1.465, allocations: 43.09 kB / 1.421 GB, free: 7.699 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.000687/1.466, allocations: 339.7 kB / 1.421 GB, free: 7.449 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.129e-05/1.466, allocations: 8 kB / 1.421 GB, free: 7.441 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.903e-06/1.466, allocations: 0 / 1.421 GB, free: 7.441 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.156e-05/1.466, allocations: 3.984 kB / 1.421 GB, free: 7.438 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001473/1.467, allocations: 0.9893 MB / 1.422 GB, free: 6.602 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.815e-06/1.467, allocations: 0 / 1.422 GB, free: 6.602 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002156/1.467, allocations: 47.78 kB / 1.422 GB, free: 6.559 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.183e-06/1.467, allocations: 4 kB / 1.422 GB, free: 6.555 MB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.013e-05/1.468, allocations: 7.984 kB / 1.422 GB, free: 6.547 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.151e-06/1.468, allocations: 7.953 kB / 1.422 GB, free: 6.539 MB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.027e-06/1.468, allocations: 4 kB / 1.422 GB, free: 6.535 MB / 0.8386 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0008782/1.468, allocations: 0.6989 MB / 1.423 GB, free: 5.914 MB / 0.8386 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001513/1.469, allocations: 147.9 kB / 1.423 GB, free: 5.766 MB / 0.8386 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.01e-05/1.469, allocations: 4 kB / 1.423 GB, free: 5.762 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001732/1.469, allocations: 11.98 kB / 1.423 GB, free: 5.75 MB / 0.8386 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000127/1.469, allocations: 68 kB / 1.423 GB, free: 5.695 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.292e-05/1.469, allocations: 19.94 kB / 1.423 GB, free: 5.68 MB / 0.8386 GB Notification: Performance of sorting global known variables: time 0.0001833/1.469, allocations: 192.5 kB / 1.423 GB, free: 5.527 MB / 0.8386 GB Notification: Performance of sort global known variables: time 1.4e-07/1.469, allocations: 0 / 1.423 GB, free: 5.527 MB / 0.8386 GB Notification: Performance of remove unused functions: time 0.0008203/1.47, allocations: 219.5 kB / 1.424 GB, free: 5.312 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.0002331/1.47, allocations: 130.7 kB / 1.424 GB, free: 5.18 MB / 0.8386 GB Notification: Performance of simCode: created initialization part: time 0.0009831/1.471, allocations: 0.6695 MB / 1.424 GB, free: 4.691 MB / 0.8386 GB Notification: Performance of simCode: created event and clocks part: time 2.525e-06/1.471, allocations: 1.5 kB / 1.424 GB, free: 4.691 MB / 0.8386 GB Notification: Performance of simCode: created simulation system equations: time 0.0002432/1.472, allocations: 178.2 kB / 1.425 GB, free: 4.57 MB / 0.8386 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005336/1.472, allocations: 85.45 kB / 1.425 GB, free: 4.504 MB / 0.8386 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001393/1.473, allocations: 0.7345 MB / 1.425 GB, free: 3.82 MB / 0.8386 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000497/1.474, allocations: 0.9238 MB / 1.426 GB, free: 2.875 MB / 0.8386 GB Notification: Performance of simCode: alias equations: time 0.0004359/1.474, allocations: 112.6 kB / 1.426 GB, free: 2.766 MB / 0.8386 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001134/1.475, allocations: 50.42 kB / 1.426 GB, free: 2.719 MB / 0.8386 GB Notification: Performance of SimCode: time 5.21e-07/1.475, allocations: 0 / 1.426 GB, free: 2.719 MB / 0.8386 GB Notification: Performance of Templates: time 0.0114/1.486, allocations: 5.532 MB / 1.432 GB, free: 13.26 MB / 0.8542 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