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 9.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 9.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.0.0-master/package.mo) Running command: translateModel(Buildings.Electrical.DC.Storage.Examples.Battery,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery") translateModel(Buildings.Electrical.DC.Storage.Examples.Battery,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.0.0-master/package.mo): time 1.649/1.649, allocations: 297.8 MB / 313.7 MB, free: 144 kB / 234.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0009299/0.0009299, allocations: 176.5 kB / 384.6 MB, free: 10.88 MB / 314.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.326/1.326, allocations: 223.2 MB / 0.6626 GB, free: 4.262 MB / 490.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0007502/0.0007501, allocations: 96.84 kB / 0.7808 GB, free: 50.55 MB / 0.5573 GB Notification: Performance of FrontEnd - loaded program: time 0.0003748/0.0003748, allocations: 18.53 kB / 0.9088 GB, free: 2.887 MB / 0.6198 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.7409/0.7413, allocations: 120.3 MB / 1.026 GB, free: 55.82 MB / 0.7292 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.2123/0.9536, allocations: 167.7 MB / 1.19 GB, free: 10.12 MB / 0.7605 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002988/0.954, allocations: 95.22 kB / 1.19 GB, free: 10.03 MB / 0.7605 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.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 9.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.05375/1.008, allocations: 23.17 MB / 1.213 GB, free: 3.059 MB / 0.7761 GB Notification: Performance of FrontEnd: time 1.653e-06/1.008, allocations: 0 / 1.213 GB, free: 3.059 MB / 0.7761 GB Notification: Performance of Transformations before backend: time 4.218e-05/1.008, allocations: 20 kB / 1.213 GB, free: 3.039 MB / 0.7761 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.001773/1.01, allocations: 0.8206 MB / 1.214 GB, free: 2.156 MB / 0.7761 GB Notification: Performance of prepare preOptimizeDAE: time 4.231e-05/1.01, allocations: 8.031 kB / 1.214 GB, free: 2.148 MB / 0.7761 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0007672/1.01, allocations: 143.8 kB / 1.214 GB, free: 2.008 MB / 0.7761 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007685/1.011, allocations: 430.9 kB / 1.214 GB, free: 1.551 MB / 0.7761 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 7.724e-05/1.011, allocations: 63 kB / 1.214 GB, free: 1.488 MB / 0.7761 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001568/1.011, allocations: 84.36 kB / 1.214 GB, free: 1.406 MB / 0.7761 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001474/1.013, allocations: 0.8747 MB / 1.215 GB, free: 484 kB / 0.7761 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.407e-05/1.013, allocations: 192 / 1.215 GB, free: 484 kB / 0.7761 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.066e-05/1.013, allocations: 36.86 kB / 1.215 GB, free: 448 kB / 0.7761 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.315e-05/1.013, allocations: 49.98 kB / 1.215 GB, free: 396 kB / 0.7761 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001053/1.014, allocations: 0.562 MB / 1.216 GB, free: 15.82 MB / 0.7917 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004252/1.018, allocations: 3.712 MB / 1.219 GB, free: 11.9 MB / 0.7917 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006363/1.019, allocations: 384.2 kB / 1.22 GB, free: 11.47 MB / 0.7917 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003952/1.02, allocations: 233.8 kB / 1.22 GB, free: 11.23 MB / 0.7917 GB Notification: Performance of preOpt evalFunc (simulation): time 3.102e-05/1.02, allocations: 8.375 kB / 1.22 GB, free: 11.22 MB / 0.7917 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004187/1.02, allocations: 279.9 kB / 1.22 GB, free: 10.92 MB / 0.7917 GB Notification: Performance of pre-optimization done (n=50): time 2.395e-06/1.02, allocations: 4 kB / 1.22 GB, free: 10.91 MB / 0.7917 GB Notification: Performance of matching and sorting (n=50): time 0.0008827/1.021, allocations: 483.4 kB / 1.221 GB, free: 10.44 MB / 0.7917 GB Notification: Performance of inlineWhenForInitialization (initialization): time 9.645e-05/1.021, allocations: 175.5 kB / 1.221 GB, free: 10.23 MB / 0.7917 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004422/1.021, allocations: 417.2 kB / 1.221 GB, free: 9.816 MB / 0.7917 GB Notification: Performance of collectPreVariables (initialization): time 6.798e-05/1.022, allocations: 57.62 kB / 1.221 GB, free: 9.754 MB / 0.7917 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002434/1.022, allocations: 332.1 kB / 1.222 GB, free: 9.426 MB / 0.7917 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001258/1.022, allocations: 138.3 kB / 1.222 GB, free: 9.289 MB / 0.7917 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.744e-05/1.022, allocations: 16 kB / 1.222 GB, free: 9.273 MB / 0.7917 GB Notification: Performance of setup shared object (initialization): time 0.0001658/1.022, allocations: 358.8 kB / 1.222 GB, free: 8.914 MB / 0.7917 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003181/1.022, allocations: 161.9 kB / 1.222 GB, free: 8.754 MB / 0.7917 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004639/1.023, allocations: 407.6 kB / 1.223 GB, free: 8.258 MB / 0.7917 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006912/1.024, allocations: 0.4993 MB / 1.223 GB, free: 7.664 MB / 0.7917 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.773e-06/1.024, allocations: 8 kB / 1.223 GB, free: 7.656 MB / 0.7917 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.000975/1.025, allocations: 0.6115 MB / 1.224 GB, free: 7.039 MB / 0.7917 GB Notification: Performance of prepare postOptimizeDAE: time 0.0002235/1.025, allocations: 293.4 kB / 1.224 GB, free: 6.652 MB / 0.7917 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.605e-05/1.025, allocations: 9 kB / 1.224 GB, free: 6.645 MB / 0.7917 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.68e-05/1.025, allocations: 16.75 kB / 1.224 GB, free: 6.629 MB / 0.7917 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003281/1.025, allocations: 103.8 kB / 1.224 GB, free: 6.527 MB / 0.7917 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.762e-05/1.025, allocations: 11.94 kB / 1.224 GB, free: 6.516 MB / 0.7917 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003428/1.026, allocations: 67.52 kB / 1.224 GB, free: 6.449 MB / 0.7917 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.51e-05/1.026, allocations: 32 kB / 1.224 GB, free: 6.418 MB / 0.7917 GB Notification: Performance of prepare postOptimizeDAE: time 6.933e-06/1.026, allocations: 0 / 1.224 GB, free: 6.418 MB / 0.7917 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0008652/1.027, allocations: 0.5445 MB / 1.225 GB, free: 5.875 MB / 0.7917 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.39e-05/1.027, allocations: 13.75 kB / 1.225 GB, free: 5.863 MB / 0.7917 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.349e-05/1.027, allocations: 20.06 kB / 1.225 GB, free: 5.848 MB / 0.7917 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003112/1.027, allocations: 103.7 kB / 1.225 GB, free: 5.746 MB / 0.7917 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.681e-05/1.027, allocations: 15.92 kB / 1.225 GB, free: 5.73 MB / 0.7917 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003249/1.027, allocations: 55.53 kB / 1.225 GB, free: 5.676 MB / 0.7917 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.335e-05/1.027, allocations: 39.98 kB / 1.225 GB, free: 5.637 MB / 0.7917 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.0003424/1.028, allocations: 330.1 kB / 1.225 GB, free: 5.305 MB / 0.7917 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.958e-05/1.028, allocations: 47.42 kB / 1.225 GB, free: 5.258 MB / 0.7917 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0006543/1.028, allocations: 385.1 kB / 1.226 GB, free: 4.875 MB / 0.7917 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.847e-06/1.029, allocations: 13.81 kB / 1.226 GB, free: 4.863 MB / 0.7917 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.541e-06/1.029, allocations: 0 / 1.226 GB, free: 4.863 MB / 0.7917 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.01e-05/1.029, allocations: 7.984 kB / 1.226 GB, free: 4.855 MB / 0.7917 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001561/1.03, allocations: 1.112 MB / 1.227 GB, free: 3.668 MB / 0.7917 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.143e-06/1.03, allocations: 5.812 kB / 1.227 GB, free: 3.664 MB / 0.7917 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001988/1.03, allocations: 47.91 kB / 1.227 GB, free: 3.617 MB / 0.7917 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.244e-06/1.03, allocations: 4 kB / 1.227 GB, free: 3.613 MB / 0.7917 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.936e-05/1.03, allocations: 12 kB / 1.227 GB, free: 3.602 MB / 0.7917 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.544e-06/1.03, allocations: 12.05 kB / 1.227 GB, free: 3.59 MB / 0.7917 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.563e-06/1.03, allocations: 3.938 kB / 1.227 GB, free: 3.586 MB / 0.7917 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0009158/1.031, allocations: 0.6718 MB / 1.228 GB, free: 2.875 MB / 0.7917 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000184/1.032, allocations: 160.4 kB / 1.228 GB, free: 2.699 MB / 0.7917 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.594e-05/1.032, allocations: 15.98 kB / 1.228 GB, free: 2.684 MB / 0.7917 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001845/1.032, allocations: 16 kB / 1.228 GB, free: 2.668 MB / 0.7917 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000132/1.032, allocations: 56.23 kB / 1.228 GB, free: 2.613 MB / 0.7917 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.41e-05/1.032, allocations: 23.98 kB / 1.228 GB, free: 2.59 MB / 0.7917 GB Notification: Performance of sorting global known variables: time 0.0002679/1.032, allocations: 255.2 kB / 1.228 GB, free: 2.34 MB / 0.7917 GB Notification: Performance of sort global known variables: time 1.3e-07/1.032, allocations: 4.062 kB / 1.228 GB, free: 2.336 MB / 0.7917 GB Notification: Performance of remove unused functions: time 0.000782/1.033, allocations: 235.6 kB / 1.228 GB, free: 2.105 MB / 0.7917 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) * Number of clocked states: 0 () * 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.0002093/1.033, allocations: 142.4 kB / 1.229 GB, free: 1.953 MB / 0.7917 GB Notification: Performance of simCode: created initialization part: time 0.001194/1.034, allocations: 0.747 MB / 1.229 GB, free: 1.215 MB / 0.7917 GB Notification: Performance of simCode: created event and clocks part: time 3.126e-06/1.034, allocations: 0.875 kB / 1.229 GB, free: 1.215 MB / 0.7917 GB Notification: Performance of simCode: created simulation system equations: time 0.0003157/1.035, allocations: 202.5 kB / 1.229 GB, free: 1.016 MB / 0.7917 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0007089/1.035, allocations: 102.4 kB / 1.23 GB, free: 0.9219 MB / 0.7917 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001872/1.037, allocations: 1.228 MB / 1.231 GB, free: 15.65 MB / 0.8073 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005499/1.038, allocations: 0.9155 MB / 1.232 GB, free: 14.71 MB / 0.8073 GB Notification: Performance of simCode: alias equations: time 0.0004291/1.038, allocations: 114.4 kB / 1.232 GB, free: 14.6 MB / 0.8073 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001204/1.039, allocations: 47.42 kB / 1.232 GB, free: 14.55 MB / 0.8073 GB Notification: Performance of SimCode: time 2.3e-07/1.039, allocations: 0 / 1.232 GB, free: 14.55 MB / 0.8073 GB Notification: Performance of Templates: time 0.0117/1.05, allocations: 5.557 MB / 1.237 GB, free: 9.121 MB / 0.8073 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 -lv LOG_STATS > Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1)