Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.x/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo", uses=false) Using package ModelicaServices with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo) Using package Buildings with version 7.0.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.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_maint.7.0.x_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_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.x/package.mo): time 1.332/1.332, allocations: 251.9 MB / 266.9 MB, free: 11 MB / 218.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.001035/0.001035, allocations: 178.3 kB / 326.5 MB, free: 2.238 MB / 250.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.863/1.863, allocations: 205.4 MB / 0.5775 GB, free: 20.25 MB / 426.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.0009238/0.000924, allocations: 86.94 kB / 0.6821 GB, free: 12.88 MB / 0.5105 GB Notification: Performance of FrontEnd - loaded program: time 0.0004152/0.0004149, allocations: 7.031 kB / 0.7962 GB, free: 135.2 MB / 0.6042 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2181/0.2186, allocations: 106.3 MB / 0.9001 GB, free: 63.93 MB / 0.6042 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.1925/0.4111, allocations: 158 MB / 1.054 GB, free: 1.754 MB / 0.698 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003024/0.4115, allocations: 99.95 kB / 1.054 GB, free: 1.656 MB / 0.698 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 7.0.3-maint.7.0.x/Electrical/Interfaces/Source.mo:30:9-30: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 7.0.3-maint.7.0.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.524/0.9355, allocations: 21.19 MB / 1.075 GB, free: 151.4 MB / 0.698 GB Notification: Performance of FrontEnd: time 3.958e-06/0.9355, allocations: 1.125 kB / 1.075 GB, free: 151.4 MB / 0.698 GB Notification: Performance of Transformations before backend: time 6.806e-05/0.9356, allocations: 20.03 kB / 1.075 GB, free: 151.4 MB / 0.698 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.002058/0.9377, allocations: 0.816 MB / 1.076 GB, free: 150.8 MB / 0.698 GB Notification: Performance of prepare preOptimizeDAE: time 4.722e-05/0.9377, allocations: 9.75 kB / 1.076 GB, free: 150.8 MB / 0.698 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0009572/0.9387, allocations: 128.5 kB / 1.076 GB, free: 150.7 MB / 0.698 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000883/0.9396, allocations: 404.1 kB / 1.076 GB, free: 150.4 MB / 0.698 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 8.777e-05/0.9397, allocations: 71.84 kB / 1.077 GB, free: 150.4 MB / 0.698 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001677/0.9399, allocations: 81.89 kB / 1.077 GB, free: 150.4 MB / 0.698 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001723/0.9416, allocations: 0.8562 MB / 1.077 GB, free: 150 MB / 0.698 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.918e-05/0.9417, allocations: 8.812 kB / 1.077 GB, free: 150 MB / 0.698 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.57e-05/0.9418, allocations: 31.81 kB / 1.077 GB, free: 150 MB / 0.698 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.796e-05/0.9418, allocations: 41.11 kB / 1.078 GB, free: 150 MB / 0.698 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001155/0.943, allocations: 0.5649 MB / 1.078 GB, free: 149.9 MB / 0.698 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004439/0.9475, allocations: 3.707 MB / 1.082 GB, free: 147.1 MB / 0.698 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006665/0.9482, allocations: 311.8 kB / 1.082 GB, free: 147 MB / 0.698 GB Notification: Performance of preOpt evalFunc (simulation): time 3.855e-05/0.9482, allocations: 4.656 kB / 1.082 GB, free: 147 MB / 0.698 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004167/0.9486, allocations: 216.8 kB / 1.082 GB, free: 146.9 MB / 0.698 GB Notification: Performance of pre-optimization done (n=46): time 4.058e-06/0.9486, allocations: 0 / 1.082 GB, free: 146.9 MB / 0.698 GB Notification: Performance of matching and sorting (n=46): time 0.001021/0.9497, allocations: 451.4 kB / 1.083 GB, free: 146.8 MB / 0.698 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.346e-05/0.9497, allocations: 57.47 kB / 1.083 GB, free: 146.7 MB / 0.698 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006006/0.9504, allocations: 389.2 kB / 1.083 GB, free: 146.5 MB / 0.698 GB Notification: Performance of collectPreVariables (initialization): time 6.983e-05/0.9504, allocations: 54.28 kB / 1.083 GB, free: 146.5 MB / 0.698 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002239/0.9507, allocations: 339.6 kB / 1.083 GB, free: 146.2 MB / 0.698 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001117/0.9508, allocations: 124.4 kB / 1.084 GB, free: 146.1 MB / 0.698 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.6e-05/0.9508, allocations: 11.56 kB / 1.084 GB, free: 146.1 MB / 0.698 GB Notification: Performance of setup shared object (initialization): time 0.0001091/0.9509, allocations: 362.3 kB / 1.084 GB, free: 145.8 MB / 0.698 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003094/0.9513, allocations: 155.3 kB / 1.084 GB, free: 145.7 MB / 0.698 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004056/0.9517, allocations: 393.9 kB / 1.084 GB, free: 145.3 MB / 0.698 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003737/0.952, allocations: 187.9 kB / 1.085 GB, free: 145.2 MB / 0.698 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.315e-06/0.9521, allocations: 6.219 kB / 1.085 GB, free: 145.2 MB / 0.698 GB Notification: Performance of matching and sorting (n=93) (initialization): time 0.001171/0.9532, allocations: 0.5981 MB / 1.085 GB, free: 144.9 MB / 0.698 GB Notification: Performance of prepare postOptimizeDAE: time 0.0005614/0.9538, allocations: 2.716 MB / 1.088 GB, free: 142 MB / 0.698 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.091e-05/0.9538, allocations: 7.625 kB / 1.088 GB, free: 142 MB / 0.698 GB Notification: Performance of postOpt tearingSystem (initialization): time 3.916e-05/0.9539, allocations: 11.97 kB / 1.088 GB, free: 142 MB / 0.698 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004123/0.9543, allocations: 102.6 kB / 1.088 GB, free: 142 MB / 0.698 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 3.282e-05/0.9544, allocations: 14.78 kB / 1.088 GB, free: 142 MB / 0.698 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004794/0.9548, allocations: 73.33 kB / 1.088 GB, free: 141.9 MB / 0.698 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.925e-05/0.9549, allocations: 30.81 kB / 1.088 GB, free: 141.9 MB / 0.698 GB Notification: Performance of prepare postOptimizeDAE: time 1.211e-05/0.9549, allocations: 4.25 kB / 1.088 GB, free: 141.9 MB / 0.698 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001083/0.956, allocations: 0.5294 MB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.406e-05/0.9561, allocations: 7.031 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.359e-05/0.9561, allocations: 11.97 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000399/0.9565, allocations: 98.7 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.5e-05/0.9565, allocations: 18.8 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004318/0.957, allocations: 56.17 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 8.833e-05/0.9571, allocations: 37.8 kB / 1.089 GB, free: 141.6 MB / 0.698 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 31 * Number of states: 0 () * Number of discrete variables: 48 ($PRE.toOn.enableFire,$PRE.toHold.enableFire,$PRE.toDischarge.enableFire,$PRE.toOff.enableFire,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 (93): * Single equations (assignments): 93 * 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.0004845/0.9576, allocations: 312.7 kB / 1.089 GB, free: 141.3 MB / 0.698 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001264/0.9577, allocations: 45.62 kB / 1.089 GB, free: 141.3 MB / 0.698 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0008504/0.9586, allocations: 394.8 kB / 1.09 GB, free: 141 MB / 0.698 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.885e-06/0.9586, allocations: 8.906 kB / 1.09 GB, free: 141 MB / 0.698 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.302e-06/0.9586, allocations: 8 kB / 1.09 GB, free: 141 MB / 0.698 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.085e-06/0.9586, allocations: 9.688 kB / 1.09 GB, free: 141 MB / 0.698 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001525/0.9601, allocations: 1.026 MB / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.356e-06/0.9602, allocations: 0 / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002178/0.9604, allocations: 46.88 kB / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt tearingSystem (simulation): time 8.586e-06/0.9604, allocations: 3.969 kB / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.041e-05/0.9604, allocations: 7.953 kB / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.68e-06/0.9604, allocations: 11.77 kB / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.266e-06/0.9605, allocations: 0 / 1.091 GB, free: 140.3 MB / 0.698 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007402/0.9612, allocations: 0.6091 MB / 1.091 GB, free: 139.9 MB / 0.698 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001889/0.9614, allocations: 156.2 kB / 1.091 GB, free: 139.7 MB / 0.698 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.261e-05/0.9615, allocations: 11.5 kB / 1.091 GB, free: 139.7 MB / 0.698 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.000189/0.9617, allocations: 18.56 kB / 1.091 GB, free: 139.7 MB / 0.698 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001113/0.9618, allocations: 43 kB / 1.091 GB, free: 139.7 MB / 0.698 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.788e-05/0.9618, allocations: 23.55 kB / 1.091 GB, free: 139.7 MB / 0.698 GB Notification: Performance of sorting global known variables: time 0.000251/0.9621, allocations: 261.3 kB / 1.092 GB, free: 139.5 MB / 0.698 GB Notification: Performance of sort global known variables: time 2.1e-07/0.9621, allocations: 0 / 1.092 GB, free: 139.5 MB / 0.698 GB Notification: Performance of remove unused functions: time 0.0009281/0.963, allocations: 233.3 kB / 1.092 GB, free: 139.5 MB / 0.698 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 1 (bat.cha.SOC) * Number of discrete variables: 32 (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: 6 (discharge.newActive,hold.newActive,charge.newActive,off.newActive,bat.cha.underCharged,bat.cha.overCharged) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (50): * Single equations (assignments): 46 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 4 * 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.0001825/0.9632, allocations: 128.9 kB / 1.092 GB, free: 139.4 MB / 0.698 GB Notification: Performance of simCode: created initialization part: time 0.001088/0.9643, allocations: 0.7211 MB / 1.093 GB, free: 139.1 MB / 0.698 GB Notification: Performance of simCode: created event and clocks part: time 3.336e-06/0.9643, allocations: 320 / 1.093 GB, free: 139.1 MB / 0.698 GB Notification: Performance of simCode: created simulation system equations: time 0.0002297/0.9646, allocations: 181.7 kB / 1.093 GB, free: 139 MB / 0.698 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005022/0.9651, allocations: 85.73 kB / 1.093 GB, free: 138.9 MB / 0.698 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001711/0.9668, allocations: 1.169 MB / 1.094 GB, free: 138.1 MB / 0.698 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003406/0.9672, allocations: 0.9222 MB / 1.095 GB, free: 137.3 MB / 0.698 GB Notification: Performance of simCode: alias equations: time 0.0004239/0.9676, allocations: 117.6 kB / 1.095 GB, free: 137.2 MB / 0.698 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001203/0.9677, allocations: 49.58 kB / 1.095 GB, free: 137.2 MB / 0.698 GB Notification: Performance of SimCode: time 1.373e-06/0.9677, allocations: 3.938 kB / 1.095 GB, free: 137.2 MB / 0.698 GB Notification: Performance of Templates: time 0.009936/0.9777, allocations: 5.355 MB / 1.1 GB, free: 132.2 MB / 0.698 GB make -j1 -f Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.makefile (rm -f Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; mkfifo Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; head -c 1048576 < Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.pipe >> ../files/Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.sim & ./Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1) diffSimulationResults("Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat","/mnt/ReferenceFiles/Buildings/csv/Buildings_Electrical_DC_Storage_Examples_Battery.csv","../files/Buildings_maint.7.0.x_Buildings.Electrical.DC.Storage.Examples.Battery.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches