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.327/2.327, allocations: 390.3 MB / 405.3 MB, free: 13.45 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.001141/0.001141, allocations: 181.2 kB / 498.1 MB, free: 5.699 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.564/1.564, allocations: 223.2 MB / 0.7948 GB, free: 17.86 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.001092/0.001092, allocations: 102.8 kB / 0.9346 GB, free: 6.188 MB / 0.6823 GB Notification: Performance of FrontEnd - loaded program: time 0.0004227/0.000423, allocations: 12.12 kB / 1.084 GB, free: 221.4 MB / 0.823 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3853/0.3858, allocations: 142.3 MB / 1.223 GB, free: 114.2 MB / 0.823 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.2386/0.6245, allocations: 175.8 MB / 1.395 GB, free: 2.234 MB / 0.8855 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002517/0.6248, allocations: 87.95 kB / 1.395 GB, free: 2.148 MB / 0.8855 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.06391/0.6887, allocations: 24.32 MB / 1.418 GB, free: 9.562 MB / 0.9167 GB Notification: Performance of FrontEnd: time 3.035e-06/0.6888, allocations: 0 / 1.418 GB, free: 9.562 MB / 0.9167 GB Notification: Performance of Transformations before backend: time 4.717e-05/0.6888, allocations: 20 kB / 1.418 GB, free: 9.543 MB / 0.9167 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.001641/0.6905, allocations: 0.8394 MB / 1.419 GB, free: 8.645 MB / 0.9167 GB Notification: Performance of prepare preOptimizeDAE: time 5.399e-05/0.6905, allocations: 11.97 kB / 1.419 GB, free: 8.633 MB / 0.9167 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006337/0.6912, allocations: 127 kB / 1.419 GB, free: 8.508 MB / 0.9167 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000665/0.6918, allocations: 413.9 kB / 1.42 GB, free: 8.066 MB / 0.9167 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.811e-05/0.6919, allocations: 61.98 kB / 1.42 GB, free: 8.008 MB / 0.9167 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001161/0.692, allocations: 84 kB / 1.42 GB, free: 7.926 MB / 0.9167 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001341/0.6934, allocations: 0.8669 MB / 1.421 GB, free: 6.996 MB / 0.9167 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.209e-05/0.6934, allocations: 3.938 kB / 1.421 GB, free: 6.992 MB / 0.9167 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.815e-05/0.6935, allocations: 32 kB / 1.421 GB, free: 6.961 MB / 0.9167 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.788e-05/0.6936, allocations: 37.98 kB / 1.421 GB, free: 6.926 MB / 0.9167 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009401/0.6945, allocations: 0.5697 MB / 1.421 GB, free: 6.355 MB / 0.9167 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00423/0.6988, allocations: 3.732 MB / 1.425 GB, free: 2.406 MB / 0.9167 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000633/0.6994, allocations: 375.5 kB / 1.425 GB, free: 1.988 MB / 0.9167 GB Notification: Performance of preOpt evalFunc (simulation): time 3.789e-05/0.6995, allocations: 8.375 kB / 1.425 GB, free: 1.98 MB / 0.9167 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004399/0.6999, allocations: 283.9 kB / 1.426 GB, free: 1.676 MB / 0.9167 GB Notification: Performance of pre-optimization done (n=50): time 2.725e-06/0.6999, allocations: 4 kB / 1.426 GB, free: 1.672 MB / 0.9167 GB Notification: Performance of matching and sorting (n=50): time 0.0008842/0.7008, allocations: 490.5 kB / 1.426 GB, free: 1.188 MB / 0.9167 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001057/0.7009, allocations: 170.2 kB / 1.426 GB, free: 0.9844 MB / 0.9167 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004105/0.7013, allocations: 380.3 kB / 1.427 GB, free: 0.6094 MB / 0.9167 GB Notification: Performance of collectPreVariables (initialization): time 6.471e-05/0.7014, allocations: 49.7 kB / 1.427 GB, free: 0.5547 MB / 0.9167 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002557/0.7017, allocations: 340 kB / 1.427 GB, free: 220 kB / 0.9167 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001513/0.7018, allocations: 138.3 kB / 1.427 GB, free: 80 kB / 0.9167 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.727e-05/0.7019, allocations: 16 kB / 1.427 GB, free: 64 kB / 0.9167 GB Notification: Performance of setup shared object (initialization): time 0.7267/1.429, allocations: 358.8 kB / 1.427 GB, free: 185.9 MB / 0.9167 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.00058/1.429, allocations: 162.7 kB / 1.428 GB, free: 185.9 MB / 0.9167 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004473/1.43, allocations: 403.6 kB / 1.428 GB, free: 185.6 MB / 0.9167 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004013/1.43, allocations: 195.7 kB / 1.428 GB, free: 185.6 MB / 0.9167 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.003e-06/1.43, allocations: 2.188 kB / 1.428 GB, free: 185.6 MB / 0.9167 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.001024/1.431, allocations: 0.6112 MB / 1.429 GB, free: 185.5 MB / 0.9167 GB Notification: Performance of prepare postOptimizeDAE: time 0.0005521/1.432, allocations: 2.706 MB / 1.431 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.518e-05/1.432, allocations: 6.781 kB / 1.431 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt tearingSystem (initialization): time 3.446e-05/1.432, allocations: 11.62 kB / 1.431 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004081/1.432, allocations: 109.8 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.697e-05/1.432, allocations: 18.83 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.000404/1.433, allocations: 60.95 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.479e-05/1.433, allocations: 33.59 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of prepare postOptimizeDAE: time 9.588e-06/1.433, allocations: 5.594 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0008796/1.434, allocations: 0.5484 MB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.113e-05/1.434, allocations: 8.891 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.588e-05/1.434, allocations: 11.91 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003402/1.434, allocations: 108.5 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.071e-05/1.434, allocations: 14.55 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002876/1.434, allocations: 55.27 kB / 1.432 GB, free: 182.7 MB / 0.9167 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.24e-05/1.434, allocations: 32.47 kB / 1.432 GB, free: 182.7 MB / 0.9167 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.00045/1.435, allocations: 331.8 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.792e-05/1.435, allocations: 50.03 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0007673/1.436, allocations: 399.6 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.072e-05/1.436, allocations: 6 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.995e-06/1.436, allocations: 2.656 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.808e-06/1.436, allocations: 8.141 kB / 1.433 GB, free: 182.5 MB / 0.9167 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001643/1.437, allocations: 1.048 MB / 1.434 GB, free: 182.2 MB / 0.9167 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.087e-06/1.437, allocations: 2.438 kB / 1.434 GB, free: 182.2 MB / 0.9167 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002313/1.438, allocations: 44.47 kB / 1.434 GB, free: 182.2 MB / 0.9167 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.823e-06/1.438, allocations: 3.656 kB / 1.434 GB, free: 182.2 MB / 0.9167 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.558e-05/1.438, allocations: 13.92 kB / 1.434 GB, free: 182.2 MB / 0.9167 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.514e-06/1.438, allocations: 11.44 kB / 1.434 GB, free: 182.1 MB / 0.9167 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.569e-06/1.438, allocations: 3.656 kB / 1.434 GB, free: 182.1 MB / 0.9167 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00101/1.439, allocations: 0.7132 MB / 1.435 GB, free: 181.9 MB / 0.9167 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001629/1.439, allocations: 154 kB / 1.435 GB, free: 181.8 MB / 0.9167 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.612e-05/1.439, allocations: 17.95 kB / 1.435 GB, free: 181.8 MB / 0.9167 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001918/1.439, allocations: 14.83 kB / 1.435 GB, free: 181.8 MB / 0.9167 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001409/1.439, allocations: 50.2 kB / 1.435 GB, free: 181.8 MB / 0.9167 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.455e-05/1.439, allocations: 16.58 kB / 1.435 GB, free: 181.8 MB / 0.9167 GB Notification: Performance of sorting global known variables: time 0.0003069/1.44, allocations: 267.1 kB / 1.435 GB, free: 181.7 MB / 0.9167 GB Notification: Performance of sort global known variables: time 1.5e-07/1.44, allocations: 0 / 1.435 GB, free: 181.7 MB / 0.9167 GB Notification: Performance of remove unused functions: time 0.0009287/1.441, allocations: 243.1 kB / 1.436 GB, free: 181.7 MB / 0.9167 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.0002186/1.441, allocations: 152.8 kB / 1.436 GB, free: 181.6 MB / 0.9167 GB Notification: Performance of simCode: created initialization part: time 0.001419/1.442, allocations: 0.7491 MB / 1.437 GB, free: 181.6 MB / 0.9167 GB Notification: Performance of simCode: created event and clocks part: time 2.816e-06/1.442, allocations: 0.9375 kB / 1.437 GB, free: 181.6 MB / 0.9167 GB Notification: Performance of simCode: created simulation system equations: time 0.000347/1.443, allocations: 198.1 kB / 1.437 GB, free: 181.5 MB / 0.9167 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005096/1.443, allocations: 90.14 kB / 1.437 GB, free: 181.5 MB / 0.9167 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001811/1.445, allocations: 1.218 MB / 1.438 GB, free: 180.9 MB / 0.9167 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005027/1.445, allocations: 0.9232 MB / 1.439 GB, free: 180.2 MB / 0.9167 GB Notification: Performance of simCode: alias equations: time 0.0004267/1.446, allocations: 119.7 kB / 1.439 GB, free: 180.1 MB / 0.9167 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001425/1.446, allocations: 57.06 kB / 1.439 GB, free: 180.1 MB / 0.9167 GB Notification: Performance of SimCode: time 2.4e-07/1.446, allocations: 0 / 1.439 GB, free: 180.1 MB / 0.9167 GB Notification: Performance of Templates: time 0.01338/1.459, allocations: 5.494 MB / 1.444 GB, free: 179.9 MB / 0.9167 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