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") [: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 7.0.3-maint.7.0.x/package.mo): time 1.194/1.194, allocations: 249.4 MB / 256.7 MB, free: 7.051 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.0008976/0.0008976, allocations: 181.2 kB / 316 MB, free: 3.508 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.031/1.031, allocations: 205.1 MB / 0.5667 GB, free: 15.59 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.0007986/0.0007986, allocations: 94.58 kB / 0.671 GB, free: 4.707 MB / 0.5105 GB Notification: Performance of FrontEnd - loaded program: time 5.32e-06/5.34e-06, allocations: 0 / 0.7807 GB, free: 103 MB / 0.5417 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1382/0.1382, allocations: 106.3 MB / 0.8846 GB, free: 12.6 MB / 0.5573 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.4311/0.5693, allocations: 158.2 MB / 1.039 GB, free: 14.52 MB / 0.6667 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001743/0.5695, allocations: 92.61 kB / 1.039 GB, free: 14.47 MB / 0.6667 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: time 0.04361/0.6131, allocations: 20.48 MB / 1.059 GB, free: 13.81 MB / 0.6823 GB Notification: Performance of Transformations before backend: time 2.869e-05/0.6132, allocations: 20.66 kB / 1.059 GB, free: 13.79 MB / 0.6823 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.001002/0.6142, allocations: 0.7876 MB / 1.06 GB, free: 13 MB / 0.6823 GB Notification: Performance of prepare preOptimizeDAE: time 3.111e-05/0.6142, allocations: 8.031 kB / 1.06 GB, free: 12.99 MB / 0.6823 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005911/0.6148, allocations: 123 kB / 1.06 GB, free: 12.87 MB / 0.6823 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000508/0.6153, allocations: 422 kB / 1.06 GB, free: 12.47 MB / 0.6823 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.595e-05/0.6154, allocations: 24 kB / 1.06 GB, free: 12.45 MB / 0.6823 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.612e-05/0.6155, allocations: 55.91 kB / 1.061 GB, free: 12.39 MB / 0.6823 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0007439/0.6162, allocations: 0.4914 MB / 1.061 GB, free: 12.08 MB / 0.6823 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0009421/0.6172, allocations: 0.7542 MB / 1.062 GB, free: 11.44 MB / 0.6823 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.082e-05/0.6172, allocations: 3.938 kB / 1.062 GB, free: 11.44 MB / 0.6823 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.953e-05/0.6173, allocations: 7.984 kB / 1.062 GB, free: 11.43 MB / 0.6823 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.925e-05/0.6173, allocations: 41.98 kB / 1.062 GB, free: 11.39 MB / 0.6823 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002937/0.6203, allocations: 3.545 MB / 1.065 GB, free: 8.086 MB / 0.6823 GB Notification: Performance of preOpt comSubExp (simulation): time 0.00042/0.6207, allocations: 279.2 kB / 1.066 GB, free: 7.879 MB / 0.6823 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002903/0.621, allocations: 183.5 kB / 1.066 GB, free: 7.758 MB / 0.6823 GB Notification: Performance of preOpt evalFunc (simulation): time 3.013e-05/0.6211, allocations: 12.36 kB / 1.066 GB, free: 7.746 MB / 0.6823 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002354/0.6213, allocations: 184.9 kB / 1.066 GB, free: 7.602 MB / 0.6823 GB Notification: Performance of pre-optimization done (n=46): time 1.593e-06/0.6213, allocations: 0 / 1.066 GB, free: 7.602 MB / 0.6823 GB Notification: Performance of matching and sorting (n=46): time 0.0004479/0.6218, allocations: 280.6 kB / 1.066 GB, free: 7.379 MB / 0.6823 GB Notification: Performance of inlineWhenForInitialization (initialization): time 3.26e-05/0.6218, allocations: 66.72 kB / 1.066 GB, free: 7.305 MB / 0.6823 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002402/0.622, allocations: 310.1 kB / 1.067 GB, free: 7.062 MB / 0.6823 GB Notification: Performance of collectPreVariables (initialization): time 4.539e-05/0.6221, allocations: 33.52 kB / 1.067 GB, free: 7.027 MB / 0.6823 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001606/0.6223, allocations: 323.6 kB / 1.067 GB, free: 6.734 MB / 0.6823 GB Notification: Performance of collectInitialBindings (initialization): time 8.486e-05/0.6224, allocations: 128.1 kB / 1.067 GB, free: 6.629 MB / 0.6823 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.048e-05/0.6224, allocations: 0 / 1.067 GB, free: 6.629 MB / 0.6823 GB Notification: Performance of setup shared object (initialization): time 9.548e-05/0.6225, allocations: 347 kB / 1.067 GB, free: 6.297 MB / 0.6823 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001985/0.6227, allocations: 135 kB / 1.067 GB, free: 6.215 MB / 0.6823 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002997/0.623, allocations: 370.3 kB / 1.068 GB, free: 5.824 MB / 0.6823 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002333/0.6232, allocations: 169.2 kB / 1.068 GB, free: 5.707 MB / 0.6823 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.946e-06/0.6232, allocations: 4 kB / 1.068 GB, free: 5.703 MB / 0.6823 GB Notification: Performance of matching and sorting (n=93) (initialization): time 0.0006903/0.6239, allocations: 0.5018 MB / 1.068 GB, free: 5.285 MB / 0.6823 GB Notification: Performance of prepare postOptimizeDAE: time 0.0006836/0.6246, allocations: 2.701 MB / 1.071 GB, free: 2.426 MB / 0.6823 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.261e-05/0.6247, allocations: 8 kB / 1.071 GB, free: 2.418 MB / 0.6823 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.094e-05/0.6247, allocations: 12 kB / 1.071 GB, free: 2.406 MB / 0.6823 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003369/0.625, allocations: 103.2 kB / 1.071 GB, free: 2.309 MB / 0.6823 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.097e-05/0.625, allocations: 16 kB / 1.071 GB, free: 2.293 MB / 0.6823 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002899/0.6253, allocations: 39.58 kB / 1.071 GB, free: 2.254 MB / 0.6823 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.557e-05/0.6254, allocations: 34.12 kB / 1.071 GB, free: 2.227 MB / 0.6823 GB Notification: Performance of prepare postOptimizeDAE: time 4.979e-06/0.6254, allocations: 4 kB / 1.071 GB, free: 2.223 MB / 0.6823 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0005661/0.626, allocations: 430.4 kB / 1.072 GB, free: 1.891 MB / 0.6823 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.103e-06/0.626, allocations: 12.84 kB / 1.072 GB, free: 1.879 MB / 0.6823 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.048e-05/0.626, allocations: 12 kB / 1.072 GB, free: 1.867 MB / 0.6823 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000303/0.6263, allocations: 111.2 kB / 1.072 GB, free: 1.766 MB / 0.6823 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.397e-06/0.6263, allocations: 11.94 kB / 1.072 GB, free: 1.754 MB / 0.6823 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002542/0.6266, allocations: 35.67 kB / 1.072 GB, free: 1.719 MB / 0.6823 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.933e-05/0.6266, allocations: 31.69 kB / 1.072 GB, free: 1.691 MB / 0.6823 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 () * 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.0001101/0.6268, allocations: 139.2 kB / 1.072 GB, free: 1.555 MB / 0.6823 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 4.942e-05/0.6268, allocations: 43.52 kB / 1.072 GB, free: 1.512 MB / 0.6823 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0005376/0.6274, allocations: 343.7 kB / 1.072 GB, free: 1.258 MB / 0.6823 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.769e-06/0.6274, allocations: 4 kB / 1.072 GB, free: 1.254 MB / 0.6823 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.949e-06/0.6274, allocations: 3.984 kB / 1.072 GB, free: 1.25 MB / 0.6823 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.814e-06/0.6274, allocations: 3.984 kB / 1.072 GB, free: 1.246 MB / 0.6823 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00115/0.6285, allocations: 0.9613 MB / 1.073 GB, free: 428 kB / 0.6823 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.727e-06/0.6286, allocations: 7.938 kB / 1.073 GB, free: 420 kB / 0.6823 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002084/0.6288, allocations: 47.28 kB / 1.073 GB, free: 376 kB / 0.6823 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.111e-06/0.6288, allocations: 11.84 kB / 1.073 GB, free: 364 kB / 0.6823 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.334e-05/0.6288, allocations: 3.984 kB / 1.073 GB, free: 360 kB / 0.6823 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.124e-06/0.6288, allocations: 4 kB / 1.073 GB, free: 356 kB / 0.6823 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.144e-06/0.6288, allocations: 0 / 1.073 GB, free: 356 kB / 0.6823 GB Notification: Performance of postOpt detectJacobianSparsePattern (simulation): time 0.0006778/0.6295, allocations: 0.5889 MB / 1.074 GB, free: 15.86 MB / 0.698 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001219/0.6296, allocations: 138.2 kB / 1.074 GB, free: 15.72 MB / 0.698 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.15e-05/0.6297, allocations: 11.84 kB / 1.074 GB, free: 15.71 MB / 0.698 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001763/0.6299, allocations: 8.047 kB / 1.074 GB, free: 15.71 MB / 0.698 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.466e-05/0.63, allocations: 42.94 kB / 1.074 GB, free: 15.67 MB / 0.698 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.725e-05/0.63, allocations: 19.48 kB / 1.074 GB, free: 15.66 MB / 0.698 GB Notification: Performance of sort global known variables: time 0.0001427/0.6302, allocations: 194.4 kB / 1.074 GB, free: 15.5 MB / 0.698 GB Notification: Performance of remove unused functions: time 0.0006733/0.6309, allocations: 211.5 kB / 1.075 GB, free: 15.3 MB / 0.698 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * 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) * Top-level inputs: 0 Notification: Strong component statistics for simulation (51): * Single equations (assignments): 47 * 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.0001565/0.631, allocations: 129.5 kB / 1.075 GB, free: 15.16 MB / 0.698 GB Notification: Performance of simCode: created initialization part: time 0.0008096/0.6318, allocations: 0.6582 MB / 1.075 GB, free: 14.68 MB / 0.698 GB Notification: Performance of simCode: created event and clocks part: time 1.833e-06/0.6319, allocations: 0 / 1.075 GB, free: 14.68 MB / 0.698 GB Notification: Performance of simCode: created simulation system equations: time 0.0002063/0.6321, allocations: 166.8 kB / 1.076 GB, free: 14.56 MB / 0.698 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004331/0.6325, allocations: 86.81 kB / 1.076 GB, free: 14.5 MB / 0.698 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001224/0.6337, allocations: 0.7011 MB / 1.076 GB, free: 13.84 MB / 0.698 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0005054/0.6343, allocations: 0.9685 MB / 1.077 GB, free: 12.86 MB / 0.698 GB Notification: Performance of SimCode: time 2.6e-07/0.6343, allocations: 0 / 1.077 GB, free: 12.86 MB / 0.698 GB Notification: Performance of Templates: time 0.01138/0.6456, allocations: 7.185 MB / 1.084 GB, free: 5.742 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