Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/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/NcDataReader2 2.5.1-master/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo", uses=false) Using package BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/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 ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") translateModel(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00162/0.00162, allocations: 110.4 kB / 16.41 MB, free: 5.996 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001757/0.001757, allocations: 188.4 kB / 17.34 MB, free: 5.602 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.429/1.429, allocations: 222.9 MB / 241 MB, free: 15.07 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002544/0.002544, allocations: 285.3 kB / 291.5 MB, free: 14.43 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.011/1.011, allocations: 169.3 MB / 0.499 GB, free: 4.414 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.00288/0.00288, allocations: 103.8 kB / 0.6821 GB, free: 6.965 MB / 494.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4171/0.42, allocations: 86.97 MB / 0.767 GB, free: 3.875 MB / 0.5294 GB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.003837/0.4238, allocations: 2.657 MB / 0.7696 GB, free: 1.203 MB / 0.5294 GB Notification: Performance of NFInst.instExpressions: time 0.001824/0.4256, allocations: 1.08 MB / 0.7707 GB, free: 116 kB / 0.5294 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001291/0.4257, allocations: 11.88 kB / 0.7707 GB, free: 104 kB / 0.5294 GB Notification: Performance of NFTyping.typeComponents: time 0.0002318/0.426, allocations: 71.41 kB / 0.7707 GB, free: 32 kB / 0.5294 GB Notification: Performance of NFTyping.typeBindings: time 0.0002682/0.4262, allocations: 135 kB / 0.7709 GB, free: 15.9 MB / 0.545 GB Notification: Performance of NFTyping.typeClassSections: time 0.0004058/0.4267, allocations: 171.6 kB / 0.771 GB, free: 15.73 MB / 0.545 GB Notification: Performance of NFFlatten.flatten: time 0.0005388/0.4272, allocations: 0.5099 MB / 0.7715 GB, free: 15.22 MB / 0.545 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001142/0.4273, allocations: 40.52 kB / 0.7716 GB, free: 15.18 MB / 0.545 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0003024/0.4276, allocations: 231.2 kB / 0.7718 GB, free: 14.96 MB / 0.545 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003106/0.4279, allocations: 227 kB / 0.772 GB, free: 14.73 MB / 0.545 GB Notification: Performance of NFPackage.collectConstants: time 5.681e-05/0.428, allocations: 28 kB / 0.772 GB, free: 14.71 MB / 0.545 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001594/0.4281, allocations: 79.95 kB / 0.7721 GB, free: 14.63 MB / 0.545 GB Notification: Performance of NFScalarize.scalarize: time 0.0001011/0.4282, allocations: 79.66 kB / 0.7722 GB, free: 14.55 MB / 0.545 GB Notification: Performance of NFVerifyModel.verify: time 0.000188/0.4284, allocations: 183 kB / 0.7724 GB, free: 14.37 MB / 0.545 GB Notification: Performance of NFConvertDAE.convert: time 0.0005081/0.4289, allocations: 424.1 kB / 0.7728 GB, free: 13.96 MB / 0.545 GB Notification: Performance of FrontEnd - DAE generated: time 3.737e-06/0.4289, allocations: 0 / 0.7728 GB, free: 13.96 MB / 0.545 GB Notification: Performance of FrontEnd: time 1.123e-06/0.4289, allocations: 0 / 0.7728 GB, free: 13.96 MB / 0.545 GB Notification: Performance of Transformations before backend: time 1.277e-05/0.4289, allocations: 0 / 0.7728 GB, free: 13.96 MB / 0.545 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 49 * Number of variables: 49 Notification: Performance of Generate backend data structure: time 0.001952/0.4309, allocations: 0.8207 MB / 0.7736 GB, free: 13.07 MB / 0.545 GB Notification: Performance of prepare preOptimizeDAE: time 3.695e-05/0.4309, allocations: 12.02 kB / 0.7736 GB, free: 13.06 MB / 0.545 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.94e-05/0.431, allocations: 40.7 kB / 0.7736 GB, free: 13.02 MB / 0.545 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000451/0.4315, allocations: 344.2 kB / 0.7739 GB, free: 12.64 MB / 0.545 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.423e-05/0.4315, allocations: 16.81 kB / 0.774 GB, free: 12.63 MB / 0.545 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.93e-05/0.4316, allocations: 24.33 kB / 0.774 GB, free: 12.61 MB / 0.545 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000792/0.4324, allocations: 337 kB / 0.7743 GB, free: 12.27 MB / 0.545 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.487e-05/0.4324, allocations: 0 / 0.7743 GB, free: 12.27 MB / 0.545 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.335e-05/0.4324, allocations: 11.98 kB / 0.7743 GB, free: 12.25 MB / 0.545 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.083e-06/0.4324, allocations: 8 kB / 0.7743 GB, free: 12.25 MB / 0.545 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0009085/0.4333, allocations: 290.2 kB / 0.7746 GB, free: 11.96 MB / 0.545 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001186/0.4345, allocations: 0.7813 MB / 0.7754 GB, free: 11.13 MB / 0.545 GB Notification: Performance of preOpt comSubExp (simulation): time 0.00114/0.4357, allocations: 357.5 kB / 0.7757 GB, free: 10.76 MB / 0.545 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005366/0.4362, allocations: 189.5 kB / 0.7759 GB, free: 10.57 MB / 0.545 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0007225/0.4369, allocations: 457.4 kB / 0.7763 GB, free: 10.03 MB / 0.545 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007792/0.4377, allocations: 329.2 kB / 0.7766 GB, free: 9.691 MB / 0.545 GB Notification: Performance of pre-optimization done (n=42): time 1.913e-06/0.4377, allocations: 0 / 0.7766 GB, free: 9.691 MB / 0.545 GB Notification: Performance of matching and sorting (n=42): time 0.001745/0.4395, allocations: 0.6103 MB / 0.7772 GB, free: 9.078 MB / 0.545 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.155e-05/0.4395, allocations: 93.03 kB / 0.7773 GB, free: 8.969 MB / 0.545 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003328/0.4399, allocations: 300.6 kB / 0.7776 GB, free: 8.668 MB / 0.545 GB Notification: Performance of collectPreVariables (initialization): time 5.368e-05/0.4399, allocations: 33.7 kB / 0.7776 GB, free: 8.629 MB / 0.545 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001517/0.4401, allocations: 172.9 kB / 0.7778 GB, free: 8.453 MB / 0.545 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001447/0.4402, allocations: 146.8 kB / 0.7779 GB, free: 8.309 MB / 0.545 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001579/0.4404, allocations: 86.11 kB / 0.778 GB, free: 8.219 MB / 0.545 GB Notification: Performance of setup shared object (initialization): time 0.0001777/0.4405, allocations: 354.8 kB / 0.7784 GB, free: 7.863 MB / 0.545 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005635/0.4411, allocations: 206.7 kB / 0.7786 GB, free: 7.656 MB / 0.545 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005823/0.4417, allocations: 242.4 kB / 0.7788 GB, free: 7.406 MB / 0.545 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.907/7.349, allocations: 0.866 GB / 1.645 GB, free: 275.7 MB / 0.8419 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.212e-06/7.349, allocations: 2.906 kB / 1.645 GB, free: 275.7 MB / 0.8419 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.001244/7.35, allocations: 0.6384 MB / 1.645 GB, free: 275.2 MB / 0.8419 GB Notification: Performance of prepare postOptimizeDAE: time 4.409e-05/7.35, allocations: 93.11 kB / 1.646 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.775e-06/7.35, allocations: 3.984 kB / 1.646 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.536e-05/7.35, allocations: 4 kB / 1.646 GB, free: 275.1 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005237/7.351, allocations: 117.1 kB / 1.646 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.266e-05/7.351, allocations: 10.41 kB / 1.646 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.00047/7.351, allocations: 60.47 kB / 1.646 GB, free: 275 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.972e-05/7.352, allocations: 23.98 kB / 1.646 GB, free: 274.9 MB / 0.8419 GB Warning: Assuming fixed start value for the following 8 variables: battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.E_charged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy charged to the battery" type: Real battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" fixed = true ) "Total energy taken from the battery" type: Real battery_1C.EAva:VARIABLE(start = 0.315 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_1C.EBou:VARIABLE(start = 0.685 * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" fixed = true ) "Bound charge of the battery" type: Real battery_C20.EAva:VARIABLE(start = 0.315 * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" fixed = true ) "Available charge of the battery" type: Real battery_C20.EBou:VARIABLE(start = 0.685 * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" fixed = true ) "Bound charge of the battery" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 6 * Number of states: 0 () * Number of discrete variables: 15 ($PRE.load_1C.count,$PRE.load_1C.T_start,$PRE.gain.count,$PRE.gain.T_start,load_1C.count,load_1C.T_start,gain.count,gain.T_start,$whenCondition2,$whenCondition3,$PRE.load_C20.count,$PRE.load_C20.T_start,load_C20.count,load_C20.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (58): * Single equations (assignments): 55 * Array equations: 0 * Algorithm blocks: 3 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002696/7.352, allocations: 207.1 kB / 1.646 GB, free: 274.7 MB / 0.8419 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.194e-05/7.352, allocations: 40.95 kB / 1.646 GB, free: 274.7 MB / 0.8419 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001366/7.353, allocations: 0.6282 MB / 1.647 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.591e-06/7.353, allocations: 8 kB / 1.647 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.591e-06/7.353, allocations: 3.938 kB / 1.647 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.342e-06/7.353, allocations: 0 / 1.647 GB, free: 274.1 MB / 0.8419 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003336/7.354, allocations: 444.1 kB / 1.647 GB, free: 273.6 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.134e-06/7.354, allocations: 0 / 1.647 GB, free: 273.6 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005559/7.354, allocations: 111.9 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 4.378e-06/7.354, allocations: 4 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.422e-05/7.354, allocations: 11.56 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.557e-06/7.354, allocations: 4 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.963e-06/7.354, allocations: 3.938 kB / 1.647 GB, free: 273.5 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001486/7.356, allocations: 0.7919 MB / 1.648 GB, free: 272.7 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001718/7.356, allocations: 166.8 kB / 1.648 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.007e-05/7.356, allocations: 12 kB / 1.648 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004095/7.356, allocations: 39.89 kB / 1.648 GB, free: 272.5 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.00013/7.356, allocations: 59.83 kB / 1.648 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.024e-05/7.356, allocations: 19.98 kB / 1.648 GB, free: 272.4 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0001501/7.357, allocations: 211.1 kB / 1.648 GB, free: 272.2 MB / 0.8419 GB Notification: Performance of sort global known variables: time 8.1e-08/7.357, allocations: 0 / 1.648 GB, free: 272.2 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.0003615/7.357, allocations: 122 kB / 1.649 GB, free: 272.1 MB / 0.8419 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 8 (battery_1C.EAva,battery_1C.EBou,battery_1C.E_charged,battery_1C.E_discharged,battery_C20.EAva,battery_C20.EBou,battery_C20.E_charged,battery_C20.E_discharged) * Number of discrete variables: 9 ($whenCondition3,$whenCondition2,gain.T_start,gain.count,load_1C.T_start,load_1C.count,$whenCondition1,load_C20.T_start,load_C20.count) * Number of discrete states: 3 (load_C20.count,gain.count,load_1C.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (54): * Single equations (assignments): 48 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0001674/7.357, allocations: 138.7 kB / 1.649 GB, free: 272 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.00104/7.358, allocations: 0.6077 MB / 1.649 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 1.804e-06/7.358, allocations: 0 / 1.649 GB, free: 271.3 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.0004971/7.359, allocations: 239.2 kB / 1.65 GB, free: 271.1 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004032/7.359, allocations: 74.27 kB / 1.65 GB, free: 271 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001425/7.361, allocations: 1.103 MB / 1.651 GB, free: 269.9 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.00016/7.361, allocations: 0.8012 MB / 1.651 GB, free: 269.1 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.0002927/7.361, allocations: 87.39 kB / 1.652 GB, free: 269 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001561/7.361, allocations: 55.41 kB / 1.652 GB, free: 268.9 MB / 0.8419 GB Notification: Performance of SimCode: time 9.72e-07/7.361, allocations: 0 / 1.652 GB, free: 268.9 MB / 0.8419 GB Notification: Performance of Templates: time 0.009244/7.37, allocations: 6.054 MB / 1.657 GB, free: 263 MB / 0.8419 GB make -j1 -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.makefile (rm -f BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe ; mkfifo BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe >> ../files/BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.sim & ./BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex -abortSlowSimulation -alarm=480 -s cvode -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)