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: "" <> buildModelFMU(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex,fileNamePrefix="BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001507/0.001507, allocations: 104 kB / 15.6 MB, free: 144 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001599/0.001599, allocations: 190.9 kB / 16.53 MB, free: 6.688 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.384/1.384, allocations: 222.9 MB / 240.2 MB, free: 4.406 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.002485/0.002485, allocations: 271 kB / 290.7 MB, free: 2.02 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.037/1.037, allocations: 178.6 MB / 0.5073 GB, free: 4.594 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.003905/0.003905, allocations: 100.2 kB / 0.6065 GB, free: 24.86 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.183/0.1869, allocations: 89.15 MB / 0.6936 GB, free: 4.234 MB / 494.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.004355/0.1913, allocations: 2.636 MB / 0.6962 GB, free: 1.59 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.001978/0.1933, allocations: 1.079 MB / 0.6972 GB, free: 0.5039 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002157/0.1935, allocations: 11.94 kB / 0.6972 GB, free: 0.4922 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002808/0.1938, allocations: 75.56 kB / 0.6973 GB, free: 428 kB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002942/0.1942, allocations: 119 kB / 0.6974 GB, free: 308 kB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0004881/0.1947, allocations: 183.6 kB / 0.6976 GB, free: 124 kB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.000675/0.1953, allocations: 0.5139 MB / 0.6981 GB, free: 15.61 MB / 0.4981 GB Notification: Performance of NFFlatten.resolveConnections: time 0.000141/0.1955, allocations: 44.67 kB / 0.6981 GB, free: 15.56 MB / 0.4981 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0004034/0.1959, allocations: 227.1 kB / 0.6984 GB, free: 15.34 MB / 0.4981 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003829/0.1963, allocations: 219.1 kB / 0.6986 GB, free: 15.12 MB / 0.4981 GB Notification: Performance of NFPackage.collectConstants: time 8.101e-05/0.1964, allocations: 32 kB / 0.6986 GB, free: 15.09 MB / 0.4981 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0002065/0.1966, allocations: 79.94 kB / 0.6987 GB, free: 15.02 MB / 0.4981 GB Notification: Performance of NFScalarize.scalarize: time 9.157e-05/0.1967, allocations: 79.66 kB / 0.6987 GB, free: 14.94 MB / 0.4981 GB Notification: Performance of NFVerifyModel.verify: time 0.0002305/0.1969, allocations: 187 kB / 0.6989 GB, free: 14.75 MB / 0.4981 GB Notification: Performance of NFConvertDAE.convert: time 0.0005087/0.1975, allocations: 410.6 kB / 0.6993 GB, free: 14.35 MB / 0.4981 GB Notification: Performance of FrontEnd - DAE generated: time 5.731e-06/0.1975, allocations: 4 kB / 0.6993 GB, free: 14.35 MB / 0.4981 GB Notification: Performance of FrontEnd: time 1.222e-06/0.1975, allocations: 0 / 0.6993 GB, free: 14.35 MB / 0.4981 GB Notification: Performance of Transformations before backend: time 1.271e-05/0.1975, allocations: 0 / 0.6993 GB, free: 14.35 MB / 0.4981 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.001966/0.1995, allocations: 0.8055 MB / 0.7001 GB, free: 13.48 MB / 0.4981 GB Notification: Performance of prepare preOptimizeDAE: time 4.831e-05/0.1995, allocations: 8.031 kB / 0.7001 GB, free: 13.47 MB / 0.4981 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 7.639e-05/0.1996, allocations: 54.73 kB / 0.7002 GB, free: 13.41 MB / 0.4981 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001079/0.1997, allocations: 44.45 kB / 0.7002 GB, free: 13.36 MB / 0.4981 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004532/0.2002, allocations: 339.8 kB / 0.7005 GB, free: 12.99 MB / 0.4981 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.32e-05/0.2002, allocations: 16.81 kB / 0.7006 GB, free: 12.97 MB / 0.4981 GB Notification: Performance of preOpt expandDerOperator (simulation): time 6.815e-05/0.2003, allocations: 28.28 kB / 0.7006 GB, free: 12.95 MB / 0.4981 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007561/0.2011, allocations: 324.9 kB / 0.7009 GB, free: 12.62 MB / 0.4981 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.836e-05/0.2011, allocations: 4 kB / 0.7009 GB, free: 12.62 MB / 0.4981 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.769e-05/0.2011, allocations: 11.98 kB / 0.7009 GB, free: 12.61 MB / 0.4981 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.424e-06/0.2011, allocations: 4 kB / 0.7009 GB, free: 12.6 MB / 0.4981 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000883/0.202, allocations: 299.7 kB / 0.7012 GB, free: 12.31 MB / 0.4981 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001185/0.2032, allocations: 0.7733 MB / 0.7019 GB, free: 11.48 MB / 0.4981 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001107/0.2043, allocations: 385.5 kB / 0.7023 GB, free: 11.09 MB / 0.4981 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0005008/0.2049, allocations: 206.3 kB / 0.7025 GB, free: 10.88 MB / 0.4981 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0006913/0.2056, allocations: 461.4 kB / 0.703 GB, free: 10.34 MB / 0.4981 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007597/0.2063, allocations: 320.7 kB / 0.7033 GB, free: 10 MB / 0.4981 GB Notification: Performance of pre-optimization done (n=42): time 2.335e-06/0.2063, allocations: 4 kB / 0.7033 GB, free: 10 MB / 0.4981 GB Notification: Performance of matching and sorting (n=42): time 0.0017/0.2081, allocations: 0.6063 MB / 0.7039 GB, free: 9.391 MB / 0.4981 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.928e-05/0.2081, allocations: 85.11 kB / 0.7039 GB, free: 9.289 MB / 0.4981 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003612/0.2085, allocations: 308.5 kB / 0.7042 GB, free: 8.973 MB / 0.4981 GB Notification: Performance of collectPreVariables (initialization): time 5.666e-05/0.2086, allocations: 37.7 kB / 0.7043 GB, free: 8.93 MB / 0.4981 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001296/0.2087, allocations: 160.9 kB / 0.7044 GB, free: 8.77 MB / 0.4981 GB Notification: Performance of collectInitialBindings (initialization): time 0.00014/0.2089, allocations: 146 kB / 0.7046 GB, free: 8.625 MB / 0.4981 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001814/0.209, allocations: 90.02 kB / 0.7046 GB, free: 8.531 MB / 0.4981 GB Notification: Performance of setup shared object (initialization): time 0.0001632/0.2092, allocations: 354.8 kB / 0.705 GB, free: 8.176 MB / 0.4981 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0005509/0.2098, allocations: 203.5 kB / 0.7052 GB, free: 7.969 MB / 0.4981 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005639/0.2103, allocations: 250.3 kB / 0.7054 GB, free: 7.711 MB / 0.4981 GB Notification: Performance of analyzeInitialSystem (initialization): time 6.405/6.616, allocations: 0.8661 GB / 1.571 GB, free: 22.02 MB / 0.7325 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.496e-06/6.616, allocations: 4 kB / 1.571 GB, free: 22.02 MB / 0.7325 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.00131/6.617, allocations: 0.6363 MB / 1.572 GB, free: 21.53 MB / 0.7325 GB Notification: Performance of prepare postOptimizeDAE: time 4.323e-05/6.617, allocations: 88.17 kB / 1.572 GB, free: 21.43 MB / 0.7325 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.845e-06/6.617, allocations: 0 / 1.572 GB, free: 21.43 MB / 0.7325 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.053e-05/6.617, allocations: 4 kB / 1.572 GB, free: 21.43 MB / 0.7325 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005121/6.618, allocations: 116.6 kB / 1.572 GB, free: 21.32 MB / 0.7325 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.207e-05/6.618, allocations: 0 / 1.572 GB, free: 21.32 MB / 0.7325 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004866/6.618, allocations: 66.19 kB / 1.572 GB, free: 21.28 MB / 0.7325 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.523e-05/6.618, allocations: 22.95 kB / 1.572 GB, free: 21.26 MB / 0.7325 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.6850000000000001 * 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.6850000000000001 * 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.0002851/6.618, allocations: 205.2 kB / 1.573 GB, free: 21.1 MB / 0.7325 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.591e-05/6.619, allocations: 36.72 kB / 1.573 GB, free: 21.08 MB / 0.7325 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00145/6.62, allocations: 0.63 MB / 1.573 GB, free: 20.61 MB / 0.7325 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.222e-06/6.62, allocations: 4 kB / 1.573 GB, free: 20.61 MB / 0.7325 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.764e-06/6.62, allocations: 8.5 kB / 1.573 GB, free: 20.6 MB / 0.7325 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.564e-06/6.62, allocations: 3.984 kB / 1.573 GB, free: 20.59 MB / 0.7325 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003675/6.62, allocations: 442.9 kB / 1.574 GB, free: 20.23 MB / 0.7325 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.458e-06/6.62, allocations: 4 kB / 1.574 GB, free: 20.22 MB / 0.7325 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005265/6.621, allocations: 100.4 kB / 1.574 GB, free: 20.13 MB / 0.7325 GB Notification: Performance of postOpt tearingSystem (simulation): time 5.59e-06/6.621, allocations: 8 kB / 1.574 GB, free: 20.12 MB / 0.7325 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.065e-05/6.621, allocations: 18.36 kB / 1.574 GB, free: 20.11 MB / 0.7325 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.218e-06/6.621, allocations: 7.938 kB / 1.574 GB, free: 20.11 MB / 0.7325 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.265e-06/6.621, allocations: 3.938 kB / 1.574 GB, free: 20.1 MB / 0.7325 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001454/6.622, allocations: 0.7867 MB / 1.575 GB, free: 19.4 MB / 0.7325 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001513/6.623, allocations: 160.2 kB / 1.575 GB, free: 19.24 MB / 0.7325 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.208e-05/6.623, allocations: 15.98 kB / 1.575 GB, free: 19.22 MB / 0.7325 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004093/6.623, allocations: 35.91 kB / 1.575 GB, free: 19.19 MB / 0.7325 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001258/6.623, allocations: 63.92 kB / 1.575 GB, free: 19.12 MB / 0.7325 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.181e-05/6.623, allocations: 19.98 kB / 1.575 GB, free: 19.11 MB / 0.7325 GB Notification: Performance of sorting global known variables: time 0.0001523/6.623, allocations: 215.1 kB / 1.575 GB, free: 18.89 MB / 0.7325 GB Notification: Performance of sort global known variables: time 6.61e-07/6.623, allocations: 0 / 1.575 GB, free: 18.89 MB / 0.7325 GB Notification: Performance of remove unused functions: time 0.0003734/6.624, allocations: 112 kB / 1.575 GB, free: 18.79 MB / 0.7325 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.001712/6.626, allocations: 1.366 MB / 1.576 GB, free: 17.41 MB / 0.7325 GB Notification: Performance of simCode: created initialization part: time 0.00114/6.627, allocations: 0.6644 MB / 1.577 GB, free: 16.71 MB / 0.7325 GB Notification: Performance of simCode: created event and clocks part: time 2.234e-06/6.627, allocations: 1.094 kB / 1.577 GB, free: 16.71 MB / 0.7325 GB Notification: Performance of simCode: created simulation system equations: time 0.0005102/6.627, allocations: 259.9 kB / 1.577 GB, free: 16.46 MB / 0.7325 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004148/6.628, allocations: 78.34 kB / 1.577 GB, free: 16.39 MB / 0.7325 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.005194/6.633, allocations: 4.277 MB / 1.582 GB, free: 12.04 MB / 0.7325 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001632/6.633, allocations: 0.8088 MB / 1.582 GB, free: 11.2 MB / 0.7325 GB Notification: Performance of simCode: alias equations: time 0.0003754/6.633, allocations: 81.61 kB / 1.583 GB, free: 11.12 MB / 0.7325 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002144/6.634, allocations: 143.4 kB / 1.583 GB, free: 10.98 MB / 0.7325 GB Notification: Performance of SimCode: time 5.21e-07/6.634, allocations: 4 kB / 1.583 GB, free: 10.98 MB / 0.7325 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03277/6.666, allocations: 9.83 MB / 1.592 GB, free: 1.387 MB / 0.7325 GB Notification: Performance of buildModelFMU: Generate platform static: time 7.724/14.39, allocations: 17.17 kB / 1.592 GB, free: 1.379 MB / 0.7325 GB (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 & python3 -m fmpy simulate --output-file BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex_res.csv --start-time 0 --stop-time 3.1536e+07 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 12614.4 BuildingSystems_BuildingSystems_Technologies_ElectricalStorages_Examples_BatteryComplex.fmu > BuildingSystems_BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex.pipe 2>&1)