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.281/2.281, allocations: 393.5 MB / 408.4 MB, free: 11.09 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.001209/0.001209, allocations: 187.9 kB / 0.4902 GB, free: 2.293 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.6/1.6, allocations: 223.2 MB / 0.7992 GB, free: 15.68 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.0009427/0.0009425, allocations: 102.8 kB / 0.9396 GB, free: 2.883 MB / 0.6823 GB Notification: Performance of FrontEnd - loaded program: time 0.0004367/0.0004368, allocations: 8.344 kB / 1.09 GB, free: 212.9 MB / 0.8073 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3361/0.3365, allocations: 143 MB / 1.229 GB, free: 85.52 MB / 0.8073 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.2321/0.5687, allocations: 176.6 MB / 1.402 GB, free: 4.703 MB / 0.9011 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002643/0.569, allocations: 87.95 kB / 1.402 GB, free: 4.617 MB / 0.9011 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.8485/1.417, allocations: 24.32 MB / 1.425 GB, free: 171.9 MB / 0.9011 GB Notification: Performance of FrontEnd: time 1.443e-06/1.418, allocations: 0 / 1.425 GB, free: 171.9 MB / 0.9011 GB Notification: Performance of Transformations before backend: time 4.07e-05/1.418, allocations: 15.19 kB / 1.425 GB, free: 171.9 MB / 0.9011 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.001512/1.419, allocations: 0.847 MB / 1.426 GB, free: 171.3 MB / 0.9011 GB Notification: Performance of prepare preOptimizeDAE: time 4.965e-05/1.419, allocations: 9.156 kB / 1.426 GB, free: 171.3 MB / 0.9011 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000668/1.42, allocations: 128 kB / 1.426 GB, free: 171.2 MB / 0.9011 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006406/1.42, allocations: 420 kB / 1.427 GB, free: 171 MB / 0.9011 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 7.607e-05/1.421, allocations: 63.06 kB / 1.427 GB, free: 171 MB / 0.9011 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001363/1.421, allocations: 83.44 kB / 1.427 GB, free: 171 MB / 0.9011 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001432/1.422, allocations: 0.8682 MB / 1.428 GB, free: 170.8 MB / 0.9011 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.111e-05/1.422, allocations: 5.312 kB / 1.428 GB, free: 170.7 MB / 0.9011 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.279e-05/1.422, allocations: 30.66 kB / 1.428 GB, free: 170.7 MB / 0.9011 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.956e-05/1.422, allocations: 41.78 kB / 1.428 GB, free: 170.7 MB / 0.9011 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009938/1.423, allocations: 0.561 MB / 1.428 GB, free: 170.7 MB / 0.9011 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003983/1.427, allocations: 3.73 MB / 1.432 GB, free: 168.3 MB / 0.9011 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0008173/1.428, allocations: 383.5 kB / 1.432 GB, free: 168.2 MB / 0.9011 GB Notification: Performance of preOpt evalFunc (simulation): time 4.694e-05/1.428, allocations: 5.656 kB / 1.432 GB, free: 168.2 MB / 0.9011 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004918/1.429, allocations: 284.1 kB / 1.433 GB, free: 168.1 MB / 0.9011 GB Notification: Performance of pre-optimization done (n=50): time 1.994e-06/1.429, allocations: 0 / 1.433 GB, free: 168.1 MB / 0.9011 GB Notification: Performance of matching and sorting (n=50): time 0.001103/1.43, allocations: 492 kB / 1.433 GB, free: 168 MB / 0.9011 GB Notification: Performance of inlineWhenForInitialization (initialization): time 9.249e-05/1.43, allocations: 173.3 kB / 1.433 GB, free: 167.8 MB / 0.9011 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004821/1.43, allocations: 383.7 kB / 1.434 GB, free: 167.7 MB / 0.9011 GB Notification: Performance of collectPreVariables (initialization): time 6.505e-05/1.431, allocations: 50.97 kB / 1.434 GB, free: 167.6 MB / 0.9011 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002389/1.431, allocations: 333.3 kB / 1.434 GB, free: 167.4 MB / 0.9011 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001205/1.431, allocations: 137.4 kB / 1.434 GB, free: 167.4 MB / 0.9011 GB Notification: Performance of simplifyInitialFunctions (initialization): time 3.086e-05/1.431, allocations: 19 kB / 1.434 GB, free: 167.4 MB / 0.9011 GB Notification: Performance of setup shared object (initialization): time 0.0001354/1.431, allocations: 360.1 kB / 1.435 GB, free: 167 MB / 0.9011 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003235/1.431, allocations: 164.4 kB / 1.435 GB, free: 167 MB / 0.9011 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004718/1.432, allocations: 403.5 kB / 1.435 GB, free: 166.7 MB / 0.9011 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003891/1.432, allocations: 193.3 kB / 1.435 GB, free: 166.7 MB / 0.9011 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.121e-06/1.432, allocations: 6.312 kB / 1.435 GB, free: 166.7 MB / 0.9011 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.001156/1.433, allocations: 0.6123 MB / 1.436 GB, free: 166.5 MB / 0.9011 GB Notification: Performance of prepare postOptimizeDAE: time 0.0009113/1.434, allocations: 2.708 MB / 1.439 GB, free: 163.7 MB / 0.9011 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.284e-05/1.434, allocations: 7.312 kB / 1.439 GB, free: 163.7 MB / 0.9011 GB Notification: Performance of postOpt tearingSystem (initialization): time 4.32e-05/1.434, allocations: 11.69 kB / 1.439 GB, free: 163.7 MB / 0.9011 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000414/1.435, allocations: 111.2 kB / 1.439 GB, free: 163.6 MB / 0.9011 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.792e-05/1.435, allocations: 13.59 kB / 1.439 GB, free: 163.6 MB / 0.9011 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000396/1.435, allocations: 65.95 kB / 1.439 GB, free: 163.6 MB / 0.9011 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.35e-05/1.435, allocations: 33.72 kB / 1.439 GB, free: 163.6 MB / 0.9011 GB Notification: Performance of prepare postOptimizeDAE: time 1.178e-05/1.435, allocations: 4.438 kB / 1.439 GB, free: 163.6 MB / 0.9011 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0009912/1.436, allocations: 0.5487 MB / 1.439 GB, free: 163.5 MB / 0.9011 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.305e-05/1.436, allocations: 6.688 kB / 1.439 GB, free: 163.5 MB / 0.9011 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.744e-05/1.436, allocations: 11.62 kB / 1.439 GB, free: 163.5 MB / 0.9011 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003634/1.437, allocations: 107.8 kB / 1.439 GB, free: 163.5 MB / 0.9011 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.244e-05/1.437, allocations: 19.38 kB / 1.439 GB, free: 163.5 MB / 0.9011 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002958/1.437, allocations: 54.69 kB / 1.44 GB, free: 163.4 MB / 0.9011 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.917e-05/1.437, allocations: 34.94 kB / 1.44 GB, free: 163.4 MB / 0.9011 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 () * Number of clocked 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.0004117/1.438, allocations: 328.5 kB / 1.44 GB, free: 163.2 MB / 0.9011 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.285e-05/1.438, allocations: 54.88 kB / 1.44 GB, free: 163.2 MB / 0.9011 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0008015/1.439, allocations: 387.3 kB / 1.44 GB, free: 163.1 MB / 0.9011 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.186e-05/1.439, allocations: 7.062 kB / 1.44 GB, free: 163.1 MB / 0.9011 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 9.107e-06/1.439, allocations: 1.125 kB / 1.44 GB, free: 163.1 MB / 0.9011 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.328e-06/1.439, allocations: 8.984 kB / 1.44 GB, free: 163.1 MB / 0.9011 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001714/1.44, allocations: 1.049 MB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.558e-06/1.44, allocations: 1.031 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002314/1.441, allocations: 49.41 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.373e-06/1.441, allocations: 3.344 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.896e-05/1.441, allocations: 20.81 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.43e-06/1.441, allocations: 2.969 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.836e-06/1.441, allocations: 5.219 kB / 1.441 GB, free: 162.6 MB / 0.9011 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001045/1.442, allocations: 0.7142 MB / 1.442 GB, free: 162.2 MB / 0.9011 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000174/1.442, allocations: 159.8 kB / 1.442 GB, free: 162.1 MB / 0.9011 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.072e-05/1.442, allocations: 16.47 kB / 1.442 GB, free: 162.1 MB / 0.9011 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001919/1.442, allocations: 14.58 kB / 1.442 GB, free: 162.1 MB / 0.9011 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001326/1.442, allocations: 52.75 kB / 1.442 GB, free: 162.1 MB / 0.9011 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.764e-05/1.442, allocations: 15.91 kB / 1.442 GB, free: 162.1 MB / 0.9011 GB Notification: Performance of sorting global known variables: time 0.0002927/1.443, allocations: 261.1 kB / 1.443 GB, free: 162 MB / 0.9011 GB Notification: Performance of sort global known variables: time 1.5e-07/1.443, allocations: 4.938 kB / 1.443 GB, free: 161.9 MB / 0.9011 GB Notification: Performance of remove unused functions: time 0.000995/1.444, allocations: 240.7 kB / 1.443 GB, free: 161.9 MB / 0.9011 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 5 * 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) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (54): * Single equations (assignments): 46 * 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.0002333/1.444, allocations: 143.3 kB / 1.443 GB, free: 161.8 MB / 0.9011 GB Notification: Performance of simCode: created initialization part: time 0.001371/1.445, allocations: 0.7536 MB / 1.444 GB, free: 161.7 MB / 0.9011 GB Notification: Performance of simCode: created event and clocks part: time 3.557e-06/1.445, allocations: 1.906 kB / 1.444 GB, free: 161.7 MB / 0.9011 GB Notification: Performance of simCode: created simulation system equations: time 0.0003438/1.446, allocations: 201.2 kB / 1.444 GB, free: 161.6 MB / 0.9011 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005384/1.446, allocations: 92.38 kB / 1.444 GB, free: 161.5 MB / 0.9011 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002012/1.448, allocations: 1.211 MB / 1.445 GB, free: 160.7 MB / 0.9011 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004529/1.449, allocations: 0.9253 MB / 1.446 GB, free: 159.9 MB / 0.9011 GB Notification: Performance of simCode: alias equations: time 0.0004353/1.449, allocations: 112.7 kB / 1.446 GB, free: 159.8 MB / 0.9011 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001412/1.449, allocations: 50.86 kB / 1.446 GB, free: 159.8 MB / 0.9011 GB Notification: Performance of SimCode: time 1.022e-06/1.449, allocations: 4 kB / 1.446 GB, free: 159.8 MB / 0.9011 GB Notification: Performance of Templates: time 0.01295/1.462, allocations: 5.497 MB / 1.452 GB, free: 157.2 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