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/BuildingSystems 2.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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo", uses=false) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/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) 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 BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/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/BuildingSystems 2.0.0-master/package.mo): time 0.796/0.796, allocations: 141.8 MB / 149.3 MB, free: 9.211 MB / 122.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.000992/0.000992, allocations: 160.9 kB / 182.2 MB, free: 9.473 MB / 154.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.501/1.501, allocations: 221.5 MB / 436.4 MB, free: 13.27 MB / 330.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008959/0.0008958, allocations: 84.08 kB / 0.5074 GB, free: 10.11 MB / 410.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.00176/0.00176, allocations: 273.2 kB / 0.5889 GB, free: 54.64 MB / 410.7 MB Notification: Performance of FrontEnd - loaded program: time 1.423e-05/1.427e-05, allocations: 4 kB / 0.6765 GB, free: 12.81 MB / 458.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.393/0.393, allocations: 82.77 MB / 0.7574 GB, free: 32 MB / 458.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1351/0.5281, allocations: 111.4 MB / 0.8661 GB, free: 496 kB / 0.5261 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0001892/0.5284, allocations: 79.83 kB / 0.8662 GB, free: 420 kB / 0.5261 GB Notification: Performance of FrontEnd - DAE generated: time 0.02503/0.5534, allocations: 7.709 MB / 0.8737 GB, free: 8.613 MB / 0.5417 GB Notification: Performance of FrontEnd: time 1.452e-06/0.5535, allocations: 0 / 0.8737 GB, free: 8.613 MB / 0.5417 GB Notification: Performance of Transformations before backend: time 1.415e-05/0.5535, allocations: 4 kB / 0.8737 GB, free: 8.609 MB / 0.5417 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.001579/0.5551, allocations: 0.7159 MB / 0.8744 GB, free: 7.832 MB / 0.5417 GB Notification: Performance of prepare preOptimizeDAE: time 3.788e-05/0.5551, allocations: 8.031 kB / 0.8744 GB, free: 7.824 MB / 0.5417 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001407/0.5553, allocations: 39.53 kB / 0.8745 GB, free: 7.785 MB / 0.5417 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0002865/0.5556, allocations: 267.8 kB / 0.8747 GB, free: 7.48 MB / 0.5417 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.157e-05/0.5556, allocations: 11.95 kB / 0.8747 GB, free: 7.469 MB / 0.5417 GB Notification: Performance of preOpt expandDerOperator (simulation): time 7.773e-05/0.5557, allocations: 19.98 kB / 0.8748 GB, free: 7.449 MB / 0.5417 GB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.0004426/0.5561, allocations: 208.8 kB / 0.875 GB, free: 7.246 MB / 0.5417 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004739/0.5566, allocations: 260 kB / 0.8752 GB, free: 6.98 MB / 0.5417 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.17e-05/0.5566, allocations: 7.906 kB / 0.8752 GB, free: 6.973 MB / 0.5417 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.937e-05/0.5567, allocations: 7.984 kB / 0.8752 GB, free: 6.965 MB / 0.5417 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.526e-06/0.5567, allocations: 7.938 kB / 0.8752 GB, free: 6.957 MB / 0.5417 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001885/0.5586, allocations: 0.8367 MB / 0.876 GB, free: 6.074 MB / 0.5417 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006517/0.5593, allocations: 290 kB / 0.8763 GB, free: 5.773 MB / 0.5417 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002876/0.5596, allocations: 159.3 kB / 0.8765 GB, free: 5.613 MB / 0.5417 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0007548/0.5603, allocations: 453.6 kB / 0.8769 GB, free: 5.078 MB / 0.5417 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004964/0.5608, allocations: 272.9 kB / 0.8772 GB, free: 4.793 MB / 0.5417 GB Notification: Performance of pre-optimization done (n=42): time 6.973e-06/0.5609, allocations: 3.984 kB / 0.8772 GB, free: 4.789 MB / 0.5417 GB Notification: Performance of matching and sorting (n=42): time 0.04655/0.6074, allocations: 5.733 MB / 0.8828 GB, free: 15.05 MB / 0.5573 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.068e-05/0.6075, allocations: 89.11 kB / 0.8829 GB, free: 14.94 MB / 0.5573 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000389/0.6079, allocations: 277.2 kB / 0.8831 GB, free: 14.67 MB / 0.5573 GB Notification: Performance of collectPreVariables (initialization): time 6.538e-05/0.608, allocations: 25.7 kB / 0.8831 GB, free: 14.64 MB / 0.5573 GB Notification: Performance of collectInitialEqns (initialization): time 0.000131/0.6081, allocations: 165.1 kB / 0.8833 GB, free: 14.47 MB / 0.5573 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001434/0.6083, allocations: 134 kB / 0.8834 GB, free: 14.34 MB / 0.5573 GB Notification: Performance of simplifyInitialFunctions (initialization): time 3.499e-05/0.6083, allocations: 0 / 0.8834 GB, free: 14.34 MB / 0.5573 GB Notification: Performance of setup shared object (initialization): time 0.000146/0.6085, allocations: 354.7 kB / 0.8838 GB, free: 13.98 MB / 0.5573 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002736/0.6088, allocations: 153.8 kB / 0.8839 GB, free: 13.83 MB / 0.5573 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002937/0.6091, allocations: 201.7 kB / 0.8841 GB, free: 13.61 MB / 0.5573 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.04587/0.6549, allocations: 5.508 MB / 0.8895 GB, free: 8.098 MB / 0.5573 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.323e-05/0.655, allocations: 7.984 kB / 0.8895 GB, free: 8.09 MB / 0.5573 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.04659/0.7016, allocations: 5.816 MB / 0.8952 GB, free: 2.262 MB / 0.5573 GB Notification: Performance of prepare postOptimizeDAE: time 8.322e-05/0.7017, allocations: 93.09 kB / 0.8953 GB, free: 2.152 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.056e-05/0.7017, allocations: 4 kB / 0.8953 GB, free: 2.148 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.995e-05/0.7018, allocations: 4 kB / 0.8953 GB, free: 2.145 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006817/0.7024, allocations: 124 kB / 0.8954 GB, free: 2.023 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.029e-05/0.7025, allocations: 4 kB / 0.8954 GB, free: 2.02 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005972/0.7031, allocations: 59.55 kB / 0.8955 GB, free: 1.961 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.478e-05/0.7032, allocations: 23.98 kB / 0.8955 GB, free: 1.938 MB / 0.5573 GB Warning: Assuming fixed start value for the following 8 variables: battery_1C.E_discharged:VARIABLE(start = 0.0 unit = "J" ) "Total energy taken from the battery" type: Real battery_1C.E_charged:VARIABLE(start = 0.0 unit = "J" ) "Total energy charged to the battery" type: Real battery_C20.E_discharged:VARIABLE(start = 0.0 unit = "J" ) "Total energy taken from the battery" type: Real battery_C20.E_charged:VARIABLE(start = 0.0 unit = "J" ) "Total energy charged to the battery" type: Real battery_1C.EBou:VARIABLE(start = (1.0 - battery_1C.c) * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" ) "Bound charge of the battery" type: Real battery_1C.EAva:VARIABLE(start = battery_1C.c * battery_1C.SOC_start * battery_1C.E_nominal unit = "J" ) "Available charge of the battery" type: Real battery_C20.EBou:VARIABLE(start = (1.0 - battery_C20.c) * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" ) "Bound charge of the battery" type: Real battery_C20.EAva:VARIABLE(start = battery_C20.c * battery_C20.SOC_start * battery_C20.E_nominal unit = "J" ) "Available 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 ($whenCondition3,$whenCondition2,$PRE.gain.T_start,gain.T_start,$PRE.gain.count,gain.count,$PRE.load_1C.T_start,load_1C.T_start,$PRE.load_1C.count,load_1C.count,$whenCondition1,$PRE.load_C20.T_start,load_C20.T_start,$PRE.load_C20.count,load_C20.count) * Number of discrete 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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0002786/0.7034, allocations: 173.7 kB / 0.8956 GB, free: 1.766 MB / 0.5573 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.316e-05/0.7035, allocations: 39.53 kB / 0.8957 GB, free: 1.727 MB / 0.5573 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.3697/1.073, allocations: 6.712 MB / 0.9022 GB, free: 134.5 MB / 0.5573 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.211e-05/1.073, allocations: 7.844 kB / 0.9022 GB, free: 134.5 MB / 0.5573 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.556e-06/1.073, allocations: 0 / 0.9022 GB, free: 134.5 MB / 0.5573 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.359e-05/1.073, allocations: 2.672 kB / 0.9022 GB, free: 134.5 MB / 0.5573 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006856/1.074, allocations: 429.1 kB / 0.9027 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.757e-06/1.074, allocations: 2.109 kB / 0.9027 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0006962/1.075, allocations: 117.2 kB / 0.9028 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt tearingSystem (simulation): time 9.958e-06/1.075, allocations: 3.625 kB / 0.9028 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.789e-05/1.075, allocations: 11.12 kB / 0.9028 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.061e-06/1.075, allocations: 3.281 kB / 0.9028 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.989e-06/1.075, allocations: 1.359 kB / 0.9028 GB, free: 134.3 MB / 0.5573 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.04065/1.116, allocations: 6.871 MB / 0.9095 GB, free: 133.8 MB / 0.5573 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000254/1.116, allocations: 165.4 kB / 0.9097 GB, free: 133.7 MB / 0.5573 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.000115/1.116, allocations: 7.703 kB / 0.9097 GB, free: 133.6 MB / 0.5573 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004631/1.116, allocations: 38.56 kB / 0.9097 GB, free: 133.6 MB / 0.5573 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001428/1.117, allocations: 57.81 kB / 0.9097 GB, free: 133.6 MB / 0.5573 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.631e-05/1.117, allocations: 18.91 kB / 0.9098 GB, free: 133.6 MB / 0.5573 GB Notification: Performance of sorting global known variables: time 0.0002078/1.117, allocations: 214.8 kB / 0.91 GB, free: 133.4 MB / 0.5573 GB Notification: Performance of sort global known variables: time 1.4e-07/1.117, allocations: 0 / 0.91 GB, free: 133.4 MB / 0.5573 GB Notification: Performance of remove unused functions: time 0.0004478/1.117, allocations: 119 kB / 0.9101 GB, free: 133.3 MB / 0.5573 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) * 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 (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.0002486/1.118, allocations: 152.8 kB / 0.9102 GB, free: 133.2 MB / 0.5573 GB Notification: Performance of simCode: created initialization part: time 0.00072/1.118, allocations: 0.5374 MB / 0.9108 GB, free: 132.8 MB / 0.5573 GB Notification: Performance of simCode: created event and clocks part: time 4.689e-06/1.118, allocations: 2.844 kB / 0.9108 GB, free: 132.8 MB / 0.5573 GB Notification: Performance of simCode: created simulation system equations: time 0.0003176/1.119, allocations: 209 kB / 0.911 GB, free: 132.6 MB / 0.5573 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003739/1.119, allocations: 56.81 kB / 0.911 GB, free: 132.6 MB / 0.5573 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001293/1.12, allocations: 0.9584 MB / 0.9119 GB, free: 131.8 MB / 0.5573 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001685/1.121, allocations: 0.809 MB / 0.9127 GB, free: 131 MB / 0.5573 GB Notification: Performance of simCode: alias equations: time 0.0003493/1.121, allocations: 71.41 kB / 0.9128 GB, free: 131 MB / 0.5573 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000168/1.121, allocations: 56.58 kB / 0.9129 GB, free: 130.9 MB / 0.5573 GB Notification: Performance of SimCode: time 4.51e-07/1.121, allocations: 0 / 0.9129 GB, free: 130.9 MB / 0.5573 GB Notification: Performance of Templates: time 0.008259/1.129, allocations: 5.436 MB / 0.9182 GB, free: 126 MB / 0.5573 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 -lv LOG_STATS > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)