Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.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/PowerSysPro 2.3.1-master/package.mo", uses=false) Using package PowerSysPro with version 2.3.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.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(PowerSysPro.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="PowerSysPro_PowerSysPro_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(PowerSysPro.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="PowerSysPro_PowerSysPro_Batteries_Examples_BatteryDischargeCharge",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.00104/0.00104, allocations: 110.7 kB / 16.46 MB, free: 6.496 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.001114/0.001114, allocations: 189.5 kB / 17.39 MB, free: 5.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.264/1.264, allocations: 222.9 MB / 241.1 MB, free: 15.09 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.1-master/package.mo): time 0.04555/0.04555, allocations: 8.101 MB / 299.3 MB, free: 6.637 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001135/0.001135, allocations: 63.89 kB / 414 MB, free: 22.07 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08666/0.08781, allocations: 51.51 MB / 465.6 MB, free: 2.52 MB / 334.1 MB Notification: Performance of NFInst.instantiate(PowerSysPro.Batteries.Examples.BatteryDischargeCharge): time 0.003302/0.09114, allocations: 2.394 MB / 467.9 MB, free: 112 kB / 334.1 MB Notification: Performance of NFInst.instExpressions: time 0.0007519/0.09191, allocations: 0.5022 MB / 468.4 MB, free: 15.61 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.833e-05/0.09201, allocations: 4 kB / 468.5 MB, free: 15.6 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003431/0.09237, allocations: 103.7 kB / 468.6 MB, free: 15.5 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001914/0.09257, allocations: 79.47 kB / 468.6 MB, free: 15.42 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002074/0.09278, allocations: 87.78 kB / 468.7 MB, free: 15.34 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002696/0.09306, allocations: 283 kB / 469 MB, free: 15.06 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001925/0.09326, allocations: 103.4 kB / 469.1 MB, free: 14.96 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001208/0.09339, allocations: 119.6 kB / 469.2 MB, free: 14.84 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001998/0.0936, allocations: 147.4 kB / 469.4 MB, free: 14.7 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 4.525e-05/0.09365, allocations: 28 kB / 469.4 MB, free: 14.67 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001509/0.09381, allocations: 75.98 kB / 469.5 MB, free: 14.59 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0001562/0.09397, allocations: 107.7 kB / 469.6 MB, free: 14.49 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001354/0.09412, allocations: 155.2 kB / 469.7 MB, free: 14.34 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0004149/0.09454, allocations: 398.5 kB / 470.1 MB, free: 13.95 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.038e-06/0.09455, allocations: 4 kB / 470.1 MB, free: 13.94 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.162e-06/0.09456, allocations: 0 / 470.1 MB, free: 13.94 MB / 350.1 MB Notification: Performance of Transformations before backend: time 5.681e-06/0.09457, allocations: 0 / 470.1 MB, free: 13.94 MB / 350.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 40 * Number of variables: 40 Notification: Performance of Generate backend data structure: time 0.001739/0.09631, allocations: 0.8024 MB / 470.9 MB, free: 13.08 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.914e-05/0.09636, allocations: 11.89 kB / 470.9 MB, free: 13.07 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.559e-05/0.09642, allocations: 50.73 kB / 471 MB, free: 13.01 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.089e-05/0.0965, allocations: 40.69 kB / 471 MB, free: 12.97 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000433/0.09694, allocations: 355.7 kB / 471.4 MB, free: 12.59 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.052e-05/0.09697, allocations: 12.7 kB / 471.4 MB, free: 12.57 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.781e-05/0.09701, allocations: 20.38 kB / 471.4 MB, free: 12.55 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004623/0.09748, allocations: 283 kB / 471.7 MB, free: 12.25 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.099e-05/0.0975, allocations: 3.938 kB / 471.7 MB, free: 12.25 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.475e-05/0.09753, allocations: 11.94 kB / 471.7 MB, free: 12.24 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.372e-06/0.09754, allocations: 4 kB / 471.7 MB, free: 12.23 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003731/0.09792, allocations: 200.1 kB / 471.9 MB, free: 12.04 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001214/0.09914, allocations: 0.8494 MB / 472.7 MB, free: 11.12 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0005794/0.09974, allocations: 299.7 kB / 473 MB, free: 10.8 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000307/0.1001, allocations: 140.8 kB / 473.2 MB, free: 10.66 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 3.89e-05/0.1001, allocations: 4 kB / 473.2 MB, free: 10.66 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.317e-05/0.1001, allocations: 30.56 kB / 473.2 MB, free: 10.62 MB / 350.1 MB Notification: Performance of pre-optimization done (n=13): time 1.252e-06/0.1001, allocations: 3.938 kB / 473.2 MB, free: 10.62 MB / 350.1 MB Notification: Performance of matching and sorting (n=13): time 0.0006771/0.1008, allocations: 285.5 kB / 473.5 MB, free: 10.34 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.59e-05/0.1009, allocations: 213.6 kB / 473.7 MB, free: 10.08 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0003718/0.1013, allocations: 366.6 kB / 474 MB, free: 9.711 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 2.26e-05/0.1013, allocations: 29.7 kB / 474.1 MB, free: 9.676 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001088/0.1014, allocations: 172.3 kB / 474.2 MB, free: 9.504 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 4.068e-05/0.1015, allocations: 51.62 kB / 474.3 MB, free: 9.453 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.667e-05/0.1016, allocations: 29.72 kB / 474.3 MB, free: 9.418 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 0.000116/0.1017, allocations: 338.8 kB / 474.6 MB, free: 9.078 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001891/0.1019, allocations: 79.94 kB / 474.7 MB, free: 9 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002363/0.1021, allocations: 159.6 kB / 474.9 MB, free: 8.816 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.000717/0.1029, allocations: 238.5 kB / 475.1 MB, free: 8.574 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.697e-06/0.1029, allocations: 0 / 475.1 MB, free: 8.574 MB / 350.1 MB Notification: Performance of matching and sorting (n=15) (initialization): time 0.0004582/0.1033, allocations: 225.3 kB / 475.3 MB, free: 8.348 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.612e-05/0.1034, allocations: 4 kB / 475.3 MB, free: 8.344 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 4.979e-06/0.1034, allocations: 0 / 475.3 MB, free: 8.344 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.659e-05/0.1034, allocations: 4 kB / 475.3 MB, free: 8.34 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001484/0.1036, allocations: 32.05 kB / 475.4 MB, free: 8.309 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 6.412e-06/0.1036, allocations: 0 / 475.4 MB, free: 8.309 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004939/0.1041, allocations: 87.81 kB / 475.5 MB, free: 8.223 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.613e-05/0.1041, allocations: 8 kB / 475.5 MB, free: 8.215 MB / 350.1 MB Warning: Assuming fixed start value for the following 1 variables: battery.integrator.q:VARIABLE(flow=false start = battery.SOC_start fixed = true ) "Charge as current integration" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 2 (pulseSeries.on2,pulseSeries.on1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (15): * Single equations (assignments): 15 * Array equations: 0 * Algorithm blocks: 0 * 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.0002948/0.1044, allocations: 170.6 kB / 475.6 MB, free: 8.039 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.964e-05/0.1045, allocations: 27.81 kB / 475.7 MB, free: 8.012 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.000577/0.1051, allocations: 231.4 kB / 475.9 MB, free: 7.773 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.974e-06/0.1051, allocations: 0 / 475.9 MB, free: 7.773 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.019e-06/0.1051, allocations: 0 / 475.9 MB, free: 7.773 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.211e-06/0.1051, allocations: 11.98 kB / 475.9 MB, free: 7.762 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0009678/0.1061, allocations: 0.6629 MB / 476.6 MB, free: 7.039 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.864e-06/0.1061, allocations: 0 / 476.6 MB, free: 7.039 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001502/0.1062, allocations: 39.89 kB / 476.6 MB, free: 7 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 4.198e-06/0.1062, allocations: 4 kB / 476.6 MB, free: 6.996 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.921e-05/0.1063, allocations: 7.938 kB / 476.6 MB, free: 6.988 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.703e-06/0.1063, allocations: 0 / 476.6 MB, free: 6.988 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.81e-07/0.1063, allocations: 0 / 476.6 MB, free: 6.988 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007/0.107, allocations: 431.9 kB / 477 MB, free: 6.551 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 9.698e-05/0.1071, allocations: 112.9 kB / 477.1 MB, free: 6.422 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.629e-05/0.1071, allocations: 15.88 kB / 477.2 MB, free: 6.406 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004983/0.1077, allocations: 79.95 kB / 477.2 MB, free: 6.328 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002332/0.1079, allocations: 123.8 kB / 477.4 MB, free: 6.207 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.7e-05/0.1079, allocations: 12 kB / 477.4 MB, free: 6.195 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0002666/0.1082, allocations: 273.9 kB / 477.6 MB, free: 5.926 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.1082, allocations: 0 / 477.6 MB, free: 5.926 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0003079/0.1085, allocations: 67.89 kB / 477.7 MB, free: 5.859 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 1 (battery.integrator.q) * Number of discrete variables: 2 (pulseSeries.on1,pulseSeries.on2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (13): * Single equations (assignments): 13 * Array equations: 0 * Algorithm blocks: 0 * 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 Backend phase and start with SimCode phase: time 0.001407/0.1099, allocations: 1.115 MB / 478.8 MB, free: 4.797 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.0004828/0.1104, allocations: 203.8 kB / 479 MB, free: 4.598 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 2.615e-06/0.1104, allocations: 0 / 479 MB, free: 4.598 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000276/0.1107, allocations: 135.8 kB / 479.2 MB, free: 4.465 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003105/0.111, allocations: 23.36 kB / 479.2 MB, free: 4.445 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004399/0.1154, allocations: 3.095 MB / 482.3 MB, free: 1.254 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003367/0.1158, allocations: 0.7597 MB / 483 MB, free: 476 kB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0001372/0.1159, allocations: 37.55 kB / 483.1 MB, free: 440 kB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001741/0.1161, allocations: 87.41 kB / 483.2 MB, free: 352 kB / 350.1 MB Notification: Performance of SimCode: time 4.41e-07/0.1161, allocations: 0 / 483.2 MB, free: 352 kB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02721/0.1434, allocations: 8.164 MB / 491.3 MB, free: 8.273 MB / 366.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.906/8.05, allocations: 3.234 kB / 491.3 MB, free: 8.273 MB / 366.1 MB (rm -f PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.sim & python3 -m fmpy simulate --output-file PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge_res.csv --start-time 0 --stop-time 3600 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.1 PowerSysPro_PowerSysPro_Batteries_Examples_BatteryDischargeCharge.fmu > PowerSysPro_PowerSysPro.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1)