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.002031/0.002031, allocations: 108 kB / 15.61 MB, free: 152 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.003464/0.003464, allocations: 196.9 kB / 16.53 MB, free: 6.664 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.97/1.97, allocations: 222.9 MB / 240.2 MB, free: 4.398 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.003811/0.003812, allocations: 282.7 kB / 290.7 MB, free: 2 MB / 238.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 1.592/1.592, allocations: 169.3 MB / 0.4982 GB, free: 13.89 MB / 382.1 MB Notification: Performance of FrontEnd - loaded program: time 0.003717/0.003717, allocations: 96.78 kB / 0.5953 GB, free: 27.93 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3007/0.3045, allocations: 86.98 MB / 0.6803 GB, free: 0.6016 MB / 478.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Technologies.ElectricalStorages.Examples.BatteryComplex): time 0.008125/0.3127, allocations: 2.627 MB / 0.6828 GB, free: 13.97 MB / 494.1 MB Notification: Performance of NFInst.instExpressions: time 0.003919/0.3166, allocations: 1.08 MB / 0.6839 GB, free: 12.88 MB / 494.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0005559/0.3172, allocations: 15.88 kB / 0.6839 GB, free: 12.87 MB / 494.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0006046/0.3179, allocations: 75.56 kB / 0.684 GB, free: 12.79 MB / 494.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0007109/0.3187, allocations: 123 kB / 0.6841 GB, free: 12.67 MB / 494.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0009801/0.3197, allocations: 175.6 kB / 0.6843 GB, free: 12.5 MB / 494.1 MB Notification: Performance of NFFlatten.flatten: time 0.00117/0.3209, allocations: 0.5099 MB / 0.6848 GB, free: 11.99 MB / 494.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002571/0.3212, allocations: 48.72 kB / 0.6848 GB, free: 11.94 MB / 494.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0007355/0.3219, allocations: 231.2 kB / 0.685 GB, free: 11.71 MB / 494.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000733/0.3227, allocations: 227 kB / 0.6852 GB, free: 11.49 MB / 494.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001849/0.3229, allocations: 28 kB / 0.6853 GB, free: 11.46 MB / 494.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004279/0.3233, allocations: 75.95 kB / 0.6853 GB, free: 11.39 MB / 494.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0002015/0.3235, allocations: 71.73 kB / 0.6854 GB, free: 11.32 MB / 494.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0005298/0.3241, allocations: 195 kB / 0.6856 GB, free: 11.13 MB / 494.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0009811/0.3251, allocations: 418.6 kB / 0.686 GB, free: 10.72 MB / 494.1 MB Notification: Performance of FrontEnd - DAE generated: time 7.154e-06/0.3251, allocations: 0 / 0.686 GB, free: 10.72 MB / 494.1 MB Notification: Performance of FrontEnd: time 2.835e-06/0.3251, allocations: 0 / 0.686 GB, free: 10.72 MB / 494.1 MB Notification: Performance of Transformations before backend: time 1.903e-05/0.3252, allocations: 0 / 0.686 GB, free: 10.72 MB / 494.1 MB 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.003318/0.3285, allocations: 0.8073 MB / 0.6868 GB, free: 9.848 MB / 494.1 MB Notification: Performance of prepare preOptimizeDAE: time 6.33e-05/0.3286, allocations: 8.031 kB / 0.6868 GB, free: 9.84 MB / 494.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001518/0.3287, allocations: 54.73 kB / 0.6868 GB, free: 9.777 MB / 494.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002019/0.329, allocations: 40.47 kB / 0.6869 GB, free: 9.738 MB / 494.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007775/0.3298, allocations: 339.9 kB / 0.6872 GB, free: 9.367 MB / 494.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.997e-05/0.3298, allocations: 16.81 kB / 0.6872 GB, free: 9.352 MB / 494.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001072/0.3299, allocations: 20.38 kB / 0.6872 GB, free: 9.332 MB / 494.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001384/0.3313, allocations: 336.8 kB / 0.6876 GB, free: 8.992 MB / 494.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.419e-05/0.3314, allocations: 7.906 kB / 0.6876 GB, free: 8.984 MB / 494.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.251e-05/0.3315, allocations: 4 kB / 0.6876 GB, free: 8.98 MB / 494.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.437e-05/0.3315, allocations: 4 kB / 0.6876 GB, free: 8.977 MB / 494.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001429/0.3329, allocations: 302 kB / 0.6879 GB, free: 8.684 MB / 494.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001986/0.3349, allocations: 0.7734 MB / 0.6886 GB, free: 7.855 MB / 494.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001844/0.3368, allocations: 390.3 kB / 0.689 GB, free: 7.457 MB / 494.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008624/0.3377, allocations: 209.5 kB / 0.6892 GB, free: 7.246 MB / 494.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.00114/0.3388, allocations: 453.4 kB / 0.6896 GB, free: 6.711 MB / 494.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.00134/0.3402, allocations: 320.8 kB / 0.6899 GB, free: 6.379 MB / 494.1 MB Notification: Performance of pre-optimization done (n=42): time 6.572e-06/0.3402, allocations: 4 kB / 0.6899 GB, free: 6.375 MB / 494.1 MB Notification: Performance of matching and sorting (n=42): time 0.002949/0.3432, allocations: 0.6037 MB / 0.6905 GB, free: 5.766 MB / 494.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001129/0.3433, allocations: 85.11 kB / 0.6906 GB, free: 5.664 MB / 494.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006237/0.344, allocations: 312.5 kB / 0.6909 GB, free: 5.344 MB / 494.1 MB Notification: Performance of collectPreVariables (initialization): time 8.212e-05/0.3441, allocations: 37.7 kB / 0.6909 GB, free: 5.301 MB / 494.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002078/0.3443, allocations: 164.8 kB / 0.6911 GB, free: 5.137 MB / 494.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002365/0.3445, allocations: 138 kB / 0.6912 GB, free: 5 MB / 494.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002948/0.3448, allocations: 94 kB / 0.6913 GB, free: 4.902 MB / 494.1 MB Notification: Performance of setup shared object (initialization): time 0.0002421/0.3451, allocations: 354.8 kB / 0.6917 GB, free: 4.547 MB / 494.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0009448/0.3461, allocations: 211.4 kB / 0.6919 GB, free: 4.336 MB / 494.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001008/0.3471, allocations: 242.4 kB / 0.6921 GB, free: 4.082 MB / 494.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 9.061/9.408, allocations: 0.866 GB / 1.558 GB, free: 31.6 MB / 0.7169 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.664e-05/9.408, allocations: 0 / 1.558 GB, free: 31.6 MB / 0.7169 GB Notification: Performance of matching and sorting (n=61) (initialization): time 0.002436/9.41, allocations: 0.6404 MB / 1.559 GB, free: 31.11 MB / 0.7169 GB Notification: Performance of prepare postOptimizeDAE: time 7.907e-05/9.411, allocations: 90.81 kB / 1.559 GB, free: 31.01 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.258e-05/9.411, allocations: 0 / 1.559 GB, free: 31.01 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (initialization): time 4.407e-05/9.411, allocations: 4.656 kB / 1.559 GB, free: 31 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0008715/9.411, allocations: 123 kB / 1.559 GB, free: 30.9 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.139e-05/9.412, allocations: 4 kB / 1.559 GB, free: 30.89 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0008667/9.412, allocations: 63.34 kB / 1.559 GB, free: 30.86 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.862e-05/9.412, allocations: 22.98 kB / 1.559 GB, free: 30.84 MB / 0.7169 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.0004454/9.413, allocations: 202.4 kB / 1.559 GB, free: 30.68 MB / 0.7169 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001441/9.413, allocations: 34.12 kB / 1.559 GB, free: 30.66 MB / 0.7169 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.002461/9.416, allocations: 0.6399 MB / 1.56 GB, free: 30.19 MB / 0.7169 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.092e-05/9.416, allocations: 8.391 kB / 1.56 GB, free: 30.18 MB / 0.7169 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.321e-05/9.416, allocations: 5.562 kB / 1.56 GB, free: 30.18 MB / 0.7169 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.189e-05/9.416, allocations: 3.984 kB / 1.56 GB, free: 30.18 MB / 0.7169 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0006582/9.416, allocations: 439.1 kB / 1.56 GB, free: 29.81 MB / 0.7169 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.855e-06/9.416, allocations: 0 / 1.56 GB, free: 29.81 MB / 0.7169 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000891/9.417, allocations: 107.8 kB / 1.56 GB, free: 29.71 MB / 0.7169 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.388e-05/9.417, allocations: 5.594 kB / 1.56 GB, free: 29.7 MB / 0.7169 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 6.577e-05/9.417, allocations: 15.11 kB / 1.56 GB, free: 29.7 MB / 0.7169 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.224e-06/9.417, allocations: 4 kB / 1.56 GB, free: 29.69 MB / 0.7169 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.777e-06/9.417, allocations: 3.938 kB / 1.56 GB, free: 29.69 MB / 0.7169 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002529/9.42, allocations: 0.7837 MB / 1.561 GB, free: 28.96 MB / 0.7169 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002773/9.42, allocations: 158.3 kB / 1.561 GB, free: 28.8 MB / 0.7169 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001284/9.42, allocations: 21.56 kB / 1.561 GB, free: 28.79 MB / 0.7169 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0006528/9.421, allocations: 39.89 kB / 1.561 GB, free: 28.75 MB / 0.7169 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001997/9.421, allocations: 55.92 kB / 1.561 GB, free: 28.69 MB / 0.7169 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.4e-05/9.421, allocations: 19.98 kB / 1.562 GB, free: 28.67 MB / 0.7169 GB Notification: Performance of sorting global known variables: time 0.0002795/9.422, allocations: 215.1 kB / 1.562 GB, free: 28.46 MB / 0.7169 GB Notification: Performance of sort global known variables: time 1.9e-07/9.422, allocations: 0 / 1.562 GB, free: 28.46 MB / 0.7169 GB Notification: Performance of remove unused functions: time 0.0006792/9.422, allocations: 117 kB / 1.562 GB, free: 28.36 MB / 0.7169 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.002545/9.425, allocations: 1.37 MB / 1.563 GB, free: 26.96 MB / 0.7169 GB Notification: Performance of simCode: created initialization part: time 0.001733/9.427, allocations: 0.652 MB / 1.564 GB, free: 26.29 MB / 0.7169 GB Notification: Performance of simCode: created event and clocks part: time 3.366e-06/9.427, allocations: 5.281 kB / 1.564 GB, free: 26.28 MB / 0.7169 GB Notification: Performance of simCode: created simulation system equations: time 0.000748/9.427, allocations: 263.7 kB / 1.564 GB, free: 26.02 MB / 0.7169 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006861/9.428, allocations: 70.7 kB / 1.564 GB, free: 25.97 MB / 0.7169 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.008642/9.437, allocations: 4.282 MB / 1.568 GB, free: 21.62 MB / 0.7169 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002681/9.437, allocations: 0.8051 MB / 1.569 GB, free: 20.78 MB / 0.7169 GB Notification: Performance of simCode: alias equations: time 0.0006933/9.438, allocations: 88.3 kB / 1.569 GB, free: 20.7 MB / 0.7169 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003598/9.438, allocations: 144.8 kB / 1.569 GB, free: 20.55 MB / 0.7169 GB Notification: Performance of SimCode: time 1.273e-06/9.438, allocations: 0 / 1.569 GB, free: 20.55 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.05069/9.489, allocations: 9.809 MB / 1.579 GB, free: 10.96 MB / 0.7169 GB Notification: Performance of buildModelFMU: Generate platform static: time 11.2/20.69, allocations: 0 / 1.579 GB, free: 10.96 MB / 0.7169 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)