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.197/2.197, allocations: 387.4 MB / 394.9 MB, free: 13.47 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.00156/0.00156, allocations: 188.6 kB / 487.4 MB, free: 5.078 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.449/1.449, allocations: 221.5 MB / 0.7824 GB, free: 0.9883 MB / 0.5417 GB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001015/0.001015, allocations: 99.81 kB / 0.9219 GB, free: 2.215 MB / 0.6823 GB Notification: Performance of FrontEnd - loaded program: time 1.839e-05/1.84e-05, allocations: 0 / 1.067 GB, free: 185.7 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2991/0.2991, allocations: 142.4 MB / 1.206 GB, free: 43.96 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 1.007/1.306, allocations: 175.1 MB / 1.377 GB, free: 18.4 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003217/1.306, allocations: 92.59 kB / 1.377 GB, free: 18.4 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.05175/1.358, allocations: 23.99 MB / 1.4 GB, free: 25.42 MB / 0.8386 GB Notification: Performance of FrontEnd: time 1.463e-06/1.358, allocations: 4 kB / 1.4 GB, free: 25.42 MB / 0.8386 GB Notification: Performance of Transformations before backend: time 5.509e-05/1.358, allocations: 19.31 kB / 1.4 GB, free: 25.41 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.001927/1.36, allocations: 0.795 MB / 1.401 GB, free: 24.8 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 5.579e-05/1.36, allocations: 11.22 kB / 1.401 GB, free: 24.8 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0009293/1.361, allocations: 130.9 kB / 1.401 GB, free: 24.73 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007932/1.362, allocations: 419.7 kB / 1.402 GB, free: 24.43 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.431e-05/1.362, allocations: 30.38 kB / 1.402 GB, free: 24.43 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001347/1.362, allocations: 48.88 kB / 1.402 GB, free: 24.43 MB / 0.8386 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0009685/1.363, allocations: 495.8 kB / 1.402 GB, free: 24.38 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001194/1.364, allocations: 0.744 MB / 1.403 GB, free: 24.07 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.474e-05/1.365, allocations: 3.844 kB / 1.403 GB, free: 24.07 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.961e-05/1.365, allocations: 6.5 kB / 1.403 GB, free: 24.06 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.289e-05/1.365, allocations: 44.67 kB / 1.403 GB, free: 24.05 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00376/1.368, allocations: 3.564 MB / 1.407 GB, free: 21.29 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0004898/1.369, allocations: 345.4 kB / 1.407 GB, free: 21.13 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.000314/1.369, allocations: 212.6 kB / 1.407 GB, free: 21.08 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 3.509e-05/1.369, allocations: 12.16 kB / 1.407 GB, free: 21.07 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0003448/1.37, allocations: 260.4 kB / 1.407 GB, free: 20.94 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 4.288e-06/1.37, allocations: 4 kB / 1.407 GB, free: 20.94 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.0005671/1.37, allocations: 320.3 kB / 1.408 GB, free: 20.77 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.687e-05/1.37, allocations: 162.2 kB / 1.408 GB, free: 20.57 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002928/1.371, allocations: 307.8 kB / 1.408 GB, free: 20.33 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 5.483e-05/1.371, allocations: 44.52 kB / 1.408 GB, free: 20.29 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001947/1.371, allocations: 343 kB / 1.408 GB, free: 20.01 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 9.794e-05/1.371, allocations: 128.5 kB / 1.409 GB, free: 19.91 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.363e-05/1.371, allocations: 4.125 kB / 1.409 GB, free: 19.91 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 0.0001465/1.371, allocations: 359 kB / 1.409 GB, free: 19.57 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002309/1.371, allocations: 139.2 kB / 1.409 GB, free: 19.48 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003027/1.372, allocations: 370 kB / 1.409 GB, free: 19.09 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002765/1.372, allocations: 175.6 kB / 1.41 GB, free: 18.97 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.332e-06/1.372, allocations: 4 kB / 1.41 GB, free: 18.96 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0007291/1.373, allocations: 0.5137 MB / 1.41 GB, free: 18.54 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.001065/1.374, allocations: 2.708 MB / 1.413 GB, free: 15.67 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.729e-05/1.374, allocations: 12 kB / 1.413 GB, free: 15.66 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.82e-05/1.374, allocations: 12 kB / 1.413 GB, free: 15.65 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003415/1.374, allocations: 95.14 kB / 1.413 GB, free: 15.56 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.618e-05/1.374, allocations: 19.92 kB / 1.413 GB, free: 15.54 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003403/1.375, allocations: 47.45 kB / 1.413 GB, free: 15.49 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.431e-05/1.375, allocations: 35 kB / 1.413 GB, free: 15.46 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 1.035e-05/1.375, allocations: 4 kB / 1.413 GB, free: 15.46 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0006324/1.375, allocations: 455.7 kB / 1.413 GB, free: 15.11 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.586e-06/1.375, allocations: 4 kB / 1.413 GB, free: 15.11 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.199e-05/1.375, allocations: 12 kB / 1.413 GB, free: 15.09 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003133/1.376, allocations: 107.2 kB / 1.414 GB, free: 15 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.088e-05/1.376, allocations: 15.94 kB / 1.414 GB, free: 14.98 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002962/1.376, allocations: 31.73 kB / 1.414 GB, free: 14.95 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.372e-05/1.376, allocations: 27.38 kB / 1.414 GB, free: 14.93 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.0001726/1.376, allocations: 160.7 kB / 1.414 GB, free: 14.77 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.603e-05/1.376, allocations: 39.53 kB / 1.414 GB, free: 14.73 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005761/1.377, allocations: 343.5 kB / 1.414 GB, free: 14.47 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.913e-06/1.377, allocations: 8 kB / 1.414 GB, free: 14.46 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.003e-06/1.377, allocations: 3.984 kB / 1.414 GB, free: 14.46 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.856e-06/1.377, allocations: 4 kB / 1.414 GB, free: 14.46 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001342/1.378, allocations: 0.9803 MB / 1.415 GB, free: 13.63 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.879e-06/1.378, allocations: 4 kB / 1.415 GB, free: 13.62 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002035/1.378, allocations: 47.16 kB / 1.415 GB, free: 13.58 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.304e-06/1.379, allocations: 4 kB / 1.415 GB, free: 13.58 MB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.784e-05/1.379, allocations: 8.047 kB / 1.415 GB, free: 13.57 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.027e-06/1.379, allocations: 8 kB / 1.415 GB, free: 13.56 MB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.959e-06/1.379, allocations: 7.891 kB / 1.415 GB, free: 13.55 MB / 0.8386 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007601/1.379, allocations: 0.6905 MB / 1.416 GB, free: 12.95 MB / 0.8386 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001477/1.379, allocations: 146.5 kB / 1.416 GB, free: 12.8 MB / 0.8386 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.417e-05/1.38, allocations: 7.5 kB / 1.416 GB, free: 12.79 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000185/1.38, allocations: 12.05 kB / 1.416 GB, free: 12.78 MB / 0.8386 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000116/1.38, allocations: 70.31 kB / 1.416 GB, free: 12.72 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.026e-05/1.38, allocations: 15.56 kB / 1.416 GB, free: 12.71 MB / 0.8386 GB Notification: Performance of sorting global known variables: time 0.0001737/1.38, allocations: 196.5 kB / 1.416 GB, free: 12.56 MB / 0.8386 GB Notification: Performance of sort global known variables: time 9.22e-07/1.38, allocations: 0 / 1.416 GB, free: 12.56 MB / 0.8386 GB Notification: Performance of remove unused functions: time 0.0008593/1.381, allocations: 223.3 kB / 1.416 GB, free: 12.34 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.0002615/1.381, allocations: 143.1 kB / 1.417 GB, free: 12.2 MB / 0.8386 GB Notification: Performance of simCode: created initialization part: time 0.0009153/1.382, allocations: 0.6656 MB / 1.417 GB, free: 11.71 MB / 0.8386 GB Notification: Performance of simCode: created event and clocks part: time 3.818e-06/1.382, allocations: 0 / 1.417 GB, free: 11.71 MB / 0.8386 GB Notification: Performance of simCode: created simulation system equations: time 0.000235/1.382, allocations: 189.3 kB / 1.417 GB, free: 11.58 MB / 0.8386 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.00051/1.383, allocations: 86.81 kB / 1.418 GB, free: 11.52 MB / 0.8386 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.00148/1.384, allocations: 0.7233 MB / 1.418 GB, free: 10.83 MB / 0.8386 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006024/1.385, allocations: 0.9326 MB / 1.419 GB, free: 9.883 MB / 0.8386 GB Notification: Performance of simCode: alias equations: time 0.0005017/1.386, allocations: 112.6 kB / 1.419 GB, free: 9.773 MB / 0.8386 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001196/1.386, allocations: 35.44 kB / 1.419 GB, free: 9.738 MB / 0.8386 GB Notification: Performance of SimCode: time 5.61e-07/1.386, allocations: 4 kB / 1.419 GB, free: 9.734 MB / 0.8386 GB Notification: Performance of Templates: time 0.01218/1.398, allocations: 5.525 MB / 1.425 GB, free: 4.277 MB / 0.8386 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