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") [:1:1-1:32:writable] Error: Class GC_set_max_heap_size not found in scope (looking for a function or record). Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/package.mo): time 1.739/1.739, allocations: 387.2 MB / 394.5 MB, free: 13.65 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.000899/0.000899, allocations: 173.3 kB / 487 MB, free: 5.312 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.103/1.103, allocations: 221.3 MB / 0.7819 GB, free: 1.387 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.0007986/0.0007986, allocations: 96.95 kB / 0.9213 GB, free: 2.625 MB / 0.6823 GB Notification: Performance of FrontEnd - loaded program: time 6.121e-06/6.151e-06, allocations: 4 kB / 1.066 GB, free: 168.2 MB / 0.7448 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1751/0.1751, allocations: 142.3 MB / 1.205 GB, free: 26.16 MB / 0.7448 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.4966/0.6717, allocations: 175 MB / 1.376 GB, free: 1.824 MB / 0.8073 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001804/0.6719, allocations: 88.88 kB / 1.376 GB, free: 1.777 MB / 0.8073 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: time 0.04772/0.7197, allocations: 23.57 MB / 1.399 GB, free: 14.35 MB / 0.8386 GB Notification: Performance of Transformations before backend: time 3.088e-05/0.7197, allocations: 15.98 kB / 1.399 GB, free: 14.33 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.000994/0.7207, allocations: 0.8013 MB / 1.4 GB, free: 13.52 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 3.085e-05/0.7208, allocations: 9.031 kB / 1.4 GB, free: 13.52 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005876/0.7214, allocations: 142.3 kB / 1.4 GB, free: 13.38 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0005105/0.7219, allocations: 411.3 kB / 1.401 GB, free: 12.99 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.585e-05/0.7219, allocations: 35.36 kB / 1.401 GB, free: 12.96 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.51e-05/0.722, allocations: 48 kB / 1.401 GB, free: 12.91 MB / 0.8386 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007349/0.7228, allocations: 0.4945 MB / 1.401 GB, free: 12.59 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0009618/0.7237, allocations: 0.7531 MB / 1.402 GB, free: 11.96 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.269e-05/0.7238, allocations: 3.938 kB / 1.402 GB, free: 11.95 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.212e-05/0.7238, allocations: 11.98 kB / 1.402 GB, free: 11.94 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.349e-05/0.7239, allocations: 45.05 kB / 1.402 GB, free: 11.9 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002876/0.7267, allocations: 3.554 MB / 1.405 GB, free: 8.59 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000439/0.7272, allocations: 345.3 kB / 1.406 GB, free: 8.285 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003147/0.7275, allocations: 215 kB / 1.406 GB, free: 8.121 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 3.299e-05/0.7276, allocations: 8.25 kB / 1.406 GB, free: 8.117 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002862/0.7279, allocations: 245 kB / 1.406 GB, free: 7.91 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 1.763e-06/0.7279, allocations: 4 kB / 1.406 GB, free: 7.906 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.0004691/0.7283, allocations: 307 kB / 1.406 GB, free: 7.66 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.707e-05/0.7284, allocations: 169.2 kB / 1.407 GB, free: 7.461 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002436/0.7287, allocations: 306.2 kB / 1.407 GB, free: 7.219 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 4.963e-05/0.7287, allocations: 40.2 kB / 1.407 GB, free: 7.18 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001576/0.7289, allocations: 319.9 kB / 1.407 GB, free: 6.891 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 8.758e-05/0.729, allocations: 133.6 kB / 1.407 GB, free: 6.781 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.038e-05/0.729, allocations: 0 / 1.407 GB, free: 6.781 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 9.19e-05/0.7291, allocations: 350.4 kB / 1.408 GB, free: 6.449 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000209/0.7293, allocations: 139 kB / 1.408 GB, free: 6.363 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003069/0.7296, allocations: 377.5 kB / 1.408 GB, free: 5.969 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002734/0.7299, allocations: 172.2 kB / 1.408 GB, free: 5.848 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.39e-06/0.7299, allocations: 4 kB / 1.408 GB, free: 5.844 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0007027/0.7306, allocations: 0.5171 MB / 1.409 GB, free: 5.418 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.0006546/0.7313, allocations: 2.702 MB / 1.411 GB, free: 2.555 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.448e-06/0.7313, allocations: 8 kB / 1.412 GB, free: 2.547 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.091e-05/0.7313, allocations: 15.94 kB / 1.412 GB, free: 2.531 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003241/0.7316, allocations: 103.6 kB / 1.412 GB, free: 2.438 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.717e-05/0.7317, allocations: 19.92 kB / 1.412 GB, free: 2.418 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002921/0.732, allocations: 43.47 kB / 1.412 GB, free: 2.375 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.357e-05/0.732, allocations: 31.73 kB / 1.412 GB, free: 2.348 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 5.169e-06/0.732, allocations: 4 kB / 1.412 GB, free: 2.344 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0005968/0.7326, allocations: 462.2 kB / 1.412 GB, free: 1.988 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.891e-06/0.7326, allocations: 4 kB / 1.412 GB, free: 1.984 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.151e-05/0.7327, allocations: 15.91 kB / 1.412 GB, free: 1.969 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002974/0.733, allocations: 103.2 kB / 1.412 GB, free: 1.871 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.251e-05/0.733, allocations: 15.94 kB / 1.412 GB, free: 1.855 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002554/0.7332, allocations: 31.73 kB / 1.412 GB, free: 1.824 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.904e-05/0.7333, allocations: 30.28 kB / 1.412 GB, free: 1.801 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.0001118/0.7334, allocations: 155.4 kB / 1.412 GB, free: 1.652 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.681e-05/0.7335, allocations: 47.44 kB / 1.413 GB, free: 1.605 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005336/0.734, allocations: 330.4 kB / 1.413 GB, free: 1.355 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.901e-06/0.734, allocations: 4 kB / 1.413 GB, free: 1.352 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.12e-06/0.734, allocations: 4 kB / 1.413 GB, free: 1.348 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.657e-06/0.7341, allocations: 7.984 kB / 1.413 GB, free: 1.34 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001154/0.7352, allocations: 0.983 MB / 1.414 GB, free: 0.5 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.457e-06/0.7352, allocations: 4 kB / 1.414 GB, free: 0.4961 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002032/0.7354, allocations: 47.97 kB / 1.414 GB, free: 460 kB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.23e-06/0.7354, allocations: 4 kB / 1.414 GB, free: 456 kB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.564e-05/0.7355, allocations: 7.5 kB / 1.414 GB, free: 452 kB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.258e-06/0.7355, allocations: 4 kB / 1.414 GB, free: 448 kB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.965e-06/0.7355, allocations: 7.922 kB / 1.414 GB, free: 440 kB / 0.8386 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.0007488/0.7362, allocations: 0.6788 MB / 1.415 GB, free: 15.82 MB / 0.8542 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001287/0.7364, allocations: 154.2 kB / 1.415 GB, free: 15.66 MB / 0.8542 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.395e-05/0.7365, allocations: 11.73 kB / 1.415 GB, free: 15.66 MB / 0.8542 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001855/0.7366, allocations: 4 kB / 1.415 GB, free: 15.65 MB / 0.8542 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001002/0.7368, allocations: 50.67 kB / 1.415 GB, free: 15.61 MB / 0.8542 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.966e-05/0.7368, allocations: 15.81 kB / 1.415 GB, free: 15.6 MB / 0.8542 GB Notification: Performance of sort global known variables: time 0.0001452/0.7369, allocations: 204.5 kB / 1.415 GB, free: 15.44 MB / 0.8542 GB Notification: Performance of remove unused functions: time 0.0006481/0.7376, allocations: 219.2 kB / 1.415 GB, free: 15.22 MB / 0.8542 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.0001509/0.7378, allocations: 137.6 kB / 1.415 GB, free: 15.09 MB / 0.8542 GB Notification: Performance of simCode: created initialization part: time 0.0008269/0.7386, allocations: 0.6863 MB / 1.416 GB, free: 14.58 MB / 0.8542 GB Notification: Performance of simCode: created event and clocks part: time 2.695e-06/0.7386, allocations: 4 kB / 1.416 GB, free: 14.58 MB / 0.8542 GB Notification: Performance of simCode: created simulation system equations: time 0.0002276/0.7388, allocations: 182 kB / 1.416 GB, free: 14.45 MB / 0.8542 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004288/0.7393, allocations: 85.22 kB / 1.416 GB, free: 14.39 MB / 0.8542 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001236/0.7405, allocations: 0.731 MB / 1.417 GB, free: 13.7 MB / 0.8542 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0005147/0.741, allocations: 0.9803 MB / 1.418 GB, free: 12.7 MB / 0.8542 GB Notification: Performance of SimCode: time 2.41e-07/0.741, allocations: 0 / 1.418 GB, free: 12.7 MB / 0.8542 GB Notification: Performance of Templates: time 0.01148/0.7525, allocations: 7.396 MB / 1.425 GB, free: 5.375 MB / 0.8542 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