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 10.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 10.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.0.0-master/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_latest_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_latest_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 10.0.0-master/package.mo): time 1.717/1.717, allocations: 390.4 MB / 397.7 MB, free: 11.3 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.0009027/0.0009029, allocations: 190.1 kB / 490.8 MB, free: 1.953 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.061/1.061, allocations: 221.3 MB / 0.7863 GB, free: 13.67 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.0008015/0.0008015, allocations: 87.91 kB / 0.9264 GB, free: 14.21 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 4.84e-06/4.86e-06, allocations: 0 / 1.072 GB, free: 182.6 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1636/0.1637, allocations: 143 MB / 1.212 GB, free: 40.14 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.463/0.6267, allocations: 175.8 MB / 1.383 GB, free: 17.07 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001987/0.6269, allocations: 92.12 kB / 1.383 GB, free: 17.07 MB / 0.823 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.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 10.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: time 0.04572/0.6727, allocations: 23.59 MB / 1.406 GB, free: 5.41 MB / 0.823 GB Notification: Performance of Transformations before backend: time 2.343e-05/0.6727, allocations: 12 kB / 1.406 GB, free: 5.398 MB / 0.823 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.0009532/0.6737, allocations: 0.8076 MB / 1.407 GB, free: 20.59 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 2.713e-05/0.6737, allocations: 8.031 kB / 1.407 GB, free: 20.59 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005696/0.6743, allocations: 134.9 kB / 1.407 GB, free: 20.45 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004587/0.6747, allocations: 416.2 kB / 1.408 GB, free: 20.07 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.151e-05/0.6748, allocations: 31.48 kB / 1.408 GB, free: 20.05 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 7.321e-05/0.6749, allocations: 48 kB / 1.408 GB, free: 20 MB / 0.8386 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0006633/0.6755, allocations: 0.4911 MB / 1.408 GB, free: 19.68 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0008258/0.6764, allocations: 0.7626 MB / 1.409 GB, free: 19.04 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.783e-05/0.6764, allocations: 0 / 1.409 GB, free: 19.04 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.841e-05/0.6764, allocations: 7.062 kB / 1.409 GB, free: 19.03 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 3.314e-05/0.6765, allocations: 41.98 kB / 1.409 GB, free: 18.99 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002739/0.6792, allocations: 3.547 MB / 1.412 GB, free: 15.71 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0003953/0.6796, allocations: 352.2 kB / 1.413 GB, free: 15.4 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.000267/0.6799, allocations: 208.9 kB / 1.413 GB, free: 15.24 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 2.869e-05/0.68, allocations: 7.891 kB / 1.413 GB, free: 15.24 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002424/0.6802, allocations: 255.9 kB / 1.413 GB, free: 15.02 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 1.693e-06/0.6802, allocations: 0 / 1.413 GB, free: 15.02 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.0004203/0.6806, allocations: 313.5 kB / 1.414 GB, free: 14.77 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 3.116e-05/0.6807, allocations: 165.7 kB / 1.414 GB, free: 14.57 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002243/0.6809, allocations: 308.1 kB / 1.414 GB, free: 14.32 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 5.823e-05/0.681, allocations: 40.14 kB / 1.414 GB, free: 14.29 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001683/0.6811, allocations: 322.8 kB / 1.414 GB, free: 14 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 9.337e-05/0.6812, allocations: 123.8 kB / 1.414 GB, free: 13.91 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.025e-05/0.6813, allocations: 0 / 1.414 GB, free: 13.91 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 0.0001166/0.6814, allocations: 355.4 kB / 1.415 GB, free: 13.57 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000219/0.6816, allocations: 137.1 kB / 1.415 GB, free: 13.48 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003613/0.682, allocations: 378 kB / 1.415 GB, free: 13.09 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002607/0.6823, allocations: 181.8 kB / 1.415 GB, free: 12.96 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.9e-06/0.6823, allocations: 4 kB / 1.415 GB, free: 12.96 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.0007235/0.683, allocations: 0.5186 MB / 1.416 GB, free: 12.53 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.0008343/0.6838, allocations: 2.701 MB / 1.419 GB, free: 9.672 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.928e-06/0.6838, allocations: 8 kB / 1.419 GB, free: 9.664 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.889e-05/0.6839, allocations: 12 kB / 1.419 GB, free: 9.652 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003358/0.6842, allocations: 99.45 kB / 1.419 GB, free: 9.559 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.51e-05/0.6842, allocations: 15.98 kB / 1.419 GB, free: 9.543 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002991/0.6845, allocations: 51.45 kB / 1.419 GB, free: 9.492 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.416e-05/0.6846, allocations: 30.56 kB / 1.419 GB, free: 9.469 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 5.24e-06/0.6846, allocations: 6.969 kB / 1.419 GB, free: 9.465 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0006312/0.6852, allocations: 446.8 kB / 1.419 GB, free: 9.121 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.103e-06/0.6853, allocations: 4 kB / 1.419 GB, free: 9.117 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.216e-05/0.6853, allocations: 12.84 kB / 1.419 GB, free: 9.105 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003088/0.6856, allocations: 110.8 kB / 1.419 GB, free: 9.004 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.739e-06/0.6856, allocations: 19.91 kB / 1.419 GB, free: 8.984 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002602/0.6859, allocations: 31.73 kB / 1.419 GB, free: 8.953 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.324e-05/0.6859, allocations: 35 kB / 1.419 GB, free: 8.926 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.000128/0.6861, allocations: 152.1 kB / 1.42 GB, free: 8.773 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.482e-05/0.6861, allocations: 39.53 kB / 1.42 GB, free: 8.734 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005417/0.6867, allocations: 342.9 kB / 1.42 GB, free: 8.48 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.58e-06/0.6867, allocations: 4 kB / 1.42 GB, free: 8.477 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.999e-06/0.6867, allocations: 4 kB / 1.42 GB, free: 8.473 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.444e-06/0.6867, allocations: 3.984 kB / 1.42 GB, free: 8.469 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001203/0.6879, allocations: 0.98 MB / 1.421 GB, free: 7.641 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.576e-06/0.6879, allocations: 4 kB / 1.421 GB, free: 7.637 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002035/0.6881, allocations: 43.91 kB / 1.421 GB, free: 7.594 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.841e-06/0.6881, allocations: 4 kB / 1.421 GB, free: 7.59 MB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.567e-05/0.6882, allocations: 7.875 kB / 1.421 GB, free: 7.586 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.741e-06/0.6882, allocations: 7.984 kB / 1.421 GB, free: 7.578 MB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.006e-06/0.6882, allocations: 0 / 1.421 GB, free: 7.578 MB / 0.8386 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.0007439/0.6889, allocations: 0.6877 MB / 1.422 GB, free: 6.965 MB / 0.8386 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000132/0.6891, allocations: 153.3 kB / 1.422 GB, free: 6.812 MB / 0.8386 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.278e-05/0.6891, allocations: 7.984 kB / 1.422 GB, free: 6.805 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001852/0.6893, allocations: 7.5 kB / 1.422 GB, free: 6.801 MB / 0.8386 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001003/0.6894, allocations: 55.67 kB / 1.422 GB, free: 6.754 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.715e-05/0.6895, allocations: 19.55 kB / 1.422 GB, free: 6.738 MB / 0.8386 GB Notification: Performance of sort global known variables: time 0.0001424/0.6896, allocations: 198.6 kB / 1.422 GB, free: 6.578 MB / 0.8386 GB Notification: Performance of remove unused functions: time 0.0006647/0.6903, allocations: 215.1 kB / 1.422 GB, free: 6.371 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.0001609/0.6905, allocations: 140.6 kB / 1.422 GB, free: 6.23 MB / 0.8386 GB Notification: Performance of simCode: created initialization part: time 0.000837/0.6913, allocations: 0.6854 MB / 1.423 GB, free: 5.727 MB / 0.8386 GB Notification: Performance of simCode: created event and clocks part: time 4.138e-06/0.6913, allocations: 4 kB / 1.423 GB, free: 5.723 MB / 0.8386 GB Notification: Performance of simCode: created simulation system equations: time 0.0002309/0.6916, allocations: 186.6 kB / 1.423 GB, free: 5.594 MB / 0.8386 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004202/0.692, allocations: 91.06 kB / 1.423 GB, free: 5.523 MB / 0.8386 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001281/0.6933, allocations: 0.7342 MB / 1.424 GB, free: 4.824 MB / 0.8386 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0005506/0.6938, allocations: 0.976 MB / 1.425 GB, free: 3.836 MB / 0.8386 GB Notification: Performance of SimCode: time 3.31e-07/0.6939, allocations: 0 / 1.425 GB, free: 3.836 MB / 0.8386 GB Notification: Performance of Templates: time 0.01192/0.7058, allocations: 7.399 MB / 1.432 GB, free: 12.52 MB / 0.8542 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 -emit_protected -lv LOG_STATS > Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1) diffSimulationResults("Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat","/mnt/ReferenceFiles/Buildings/csv/master/Buildings_Electrical_DC_Storage_Examples_Battery.csv","../files/Buildings_latest_Buildings.Electrical.DC.Storage.Examples.Battery.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches