Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0-beta.om/package.mo", uses=false) Using package Modelica with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0-beta.om/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Running command: "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_1_0-beta_om_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_1_0-beta_om_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.001795/0.001801, allocations: 104.1 kB / 17.63 MB, free: 5.344 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.002085/0.002085, allocations: 214.4 kB / 18.59 MB, free: 4.402 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0-beta.om/package.mo): time 1.504/1.504, allocations: 227.7 MB / 247 MB, free: 10.3 MB / 206.1 MB Warning: Requested package Modelica of version trunk, but this package was already loaded with version 4.1.0. OpenModelica cannot reason about compatibility between the two packages since they are not semantic versions. Warning: Requested package Complex of version 4.1.0, but this package was already loaded with version trunk. OpenModelica cannot reason about compatibility between the two packages since they are not semantic versions. Warning: Requested package ModelicaServices of version 4.1.0, but this package was already loaded with version trunk. OpenModelica cannot reason about compatibility between the two packages since they are not semantic versions. Notification: Performance of FrontEnd - loaded program: time 0.002008/0.002008, allocations: 61.81 kB / 307.3 MB, free: 408 kB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.09904/0.1011, allocations: 50.54 MB / 357.9 MB, free: 13.84 MB / 302.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.007879/0.109, allocations: 5.838 MB / 363.7 MB, free: 7.969 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.004175/0.1132, allocations: 2.742 MB / 366.5 MB, free: 5.215 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003529/0.1136, allocations: 27.94 kB / 366.5 MB, free: 5.188 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001424/0.115, allocations: 0.766 MB / 367.2 MB, free: 4.418 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0009088/0.1159, allocations: 0.5516 MB / 367.8 MB, free: 3.863 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0009869/0.1169, allocations: 0.5144 MB / 368.3 MB, free: 3.352 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.001581/0.1185, allocations: 1.59 MB / 369.9 MB, free: 1.758 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0007336/0.1193, allocations: 0.5961 MB / 370.5 MB, free: 1.137 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0005958/0.1199, allocations: 0.6112 MB / 371.1 MB, free: 0.5234 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.1533/0.2732, allocations: 0.7393 MB / 371.8 MB, free: 11.12 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0004965/0.2737, allocations: 134.5 kB / 372 MB, free: 11.12 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0006356/0.2743, allocations: 203.4 kB / 372.2 MB, free: 11.12 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0005539/0.2749, allocations: 0.6437 MB / 372.8 MB, free: 11.12 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0007526/0.2757, allocations: 0.9228 MB / 373.7 MB, free: 10.93 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.002172/0.2778, allocations: 2.458 MB / 376.2 MB, free: 10.55 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.769e-06/0.2779, allocations: 0 / 376.2 MB, free: 10.55 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.633e-06/0.2779, allocations: 0.5 kB / 376.2 MB, free: 10.55 MB / 302.1 MB Notification: Performance of Transformations before backend: time 4.74e-05/0.2779, allocations: 1.375 kB / 376.2 MB, free: 10.55 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 215 * Number of variables: 215 Notification: Performance of Generate backend data structure: time 0.005377/0.2833, allocations: 2.582 MB / 378.8 MB, free: 9.332 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.274e-05/0.2834, allocations: 10.78 kB / 378.8 MB, free: 9.332 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001804/0.2836, allocations: 138.7 kB / 378.9 MB, free: 9.293 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0004101/0.284, allocations: 224.2 kB / 379.2 MB, free: 9.18 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002395/0.2864, allocations: 1.528 MB / 380.7 MB, free: 8.66 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004831/0.2869, allocations: 169.7 kB / 380.8 MB, free: 8.629 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001278/0.287, allocations: 94.34 kB / 380.9 MB, free: 8.621 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001799/0.2888, allocations: 1.126 MB / 382.1 MB, free: 8.152 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.007e-05/0.2888, allocations: 1.125 kB / 382.1 MB, free: 8.152 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.289e-05/0.2889, allocations: 38.72 kB / 382.1 MB, free: 8.125 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.828e-05/0.289, allocations: 22.03 kB / 382.1 MB, free: 8.125 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00143/0.2904, allocations: 0.7408 MB / 382.9 MB, free: 7.883 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007311/0.2977, allocations: 4.662 MB / 387.5 MB, free: 5.32 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001359/0.2991, allocations: 0.978 MB / 388.5 MB, free: 4.637 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007922/0.2999, allocations: 404.7 kB / 388.9 MB, free: 4.52 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 5.745e-05/0.3, allocations: 5.062 kB / 388.9 MB, free: 4.52 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.802e-05/0.3, allocations: 51.45 kB / 389 MB, free: 4.469 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 1.923e-06/0.3, allocations: 0 / 389 MB, free: 4.469 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002374/0.3024, allocations: 0.8812 MB / 389.8 MB, free: 4.152 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.08e-05/0.3025, allocations: 423.7 kB / 390.2 MB, free: 3.652 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003989/0.3065, allocations: 2.771 MB / 393 MB, free: 2.379 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001321/0.3067, allocations: 38.27 kB / 393.1 MB, free: 2.34 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0006043/0.3073, allocations: 0.8805 MB / 393.9 MB, free: 1.578 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001063/0.3074, allocations: 159.8 kB / 394.1 MB, free: 1.441 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001994/0.3076, allocations: 128.9 kB / 394.2 MB, free: 1.359 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 5.945e-05/0.3077, allocations: 331.5 kB / 394.5 MB, free: 1.035 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006107/0.3083, allocations: 277.8 kB / 394.8 MB, free: 0.9062 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007212/0.309, allocations: 0.5493 MB / 395.4 MB, free: 440 kB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001213/0.3102, allocations: 0.6631 MB / 396 MB, free: 15.98 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.21e-06/0.3103, allocations: 2.719 kB / 396 MB, free: 15.98 MB / 318.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002073/0.3123, allocations: 0.8945 MB / 396.9 MB, free: 15.56 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.1e-05/0.3124, allocations: 12.44 kB / 396.9 MB, free: 15.55 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.057e-06/0.3124, allocations: 3.75 kB / 396.9 MB, free: 15.55 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.048e-05/0.3124, allocations: 10.91 kB / 397 MB, free: 15.55 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006913/0.3131, allocations: 175 kB / 397.1 MB, free: 15.52 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.784e-05/0.3131, allocations: 17.19 kB / 397.1 MB, free: 15.51 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001189/0.3143, allocations: 170.1 kB / 397.3 MB, free: 15.42 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.154e-05/0.3144, allocations: 30.45 kB / 397.3 MB, free: 15.41 MB / 318.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 25 * Number of states: 0 () * Number of discrete variables: 6 (pulseSeries.on2,pulseSeries.on1,energy2.local_reset,battery2.limIntegrator.local_reset,energy1.local_reset,battery1.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (76): * Single equations (assignments): 76 * 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.0008465/0.3152, allocations: 0.5608 MB / 397.9 MB, free: 15.09 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.000281/0.3155, allocations: 180.9 kB / 398.1 MB, free: 15 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001604/0.3171, allocations: 0.7379 MB / 398.8 MB, free: 14.61 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.189e-06/0.3172, allocations: 5.562 kB / 398.8 MB, free: 14.61 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.063e-06/0.3172, allocations: 3.938 kB / 398.8 MB, free: 14.61 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.861e-06/0.3172, allocations: 0 / 398.8 MB, free: 14.61 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.004147/0.3213, allocations: 2.193 MB / 401 MB, free: 13.16 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.278e-06/0.3214, allocations: 0 / 401 MB, free: 13.16 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005379/0.3219, allocations: 121.2 kB / 401.1 MB, free: 13.13 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 6.492e-06/0.3219, allocations: 3.125 kB / 401.1 MB, free: 13.13 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.032e-05/0.322, allocations: 14.3 kB / 401.1 MB, free: 13.12 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.34e-06/0.322, allocations: 6.125 kB / 401.2 MB, free: 13.12 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.356e-06/0.322, allocations: 1.5 kB / 401.2 MB, free: 13.12 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002172/0.3242, allocations: 1.115 MB / 402.3 MB, free: 12.48 MB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007881/0.325, allocations: 406.7 kB / 402.7 MB, free: 12.06 MB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002082/0.3252, allocations: 15.98 kB / 402.7 MB, free: 12.04 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001124/0.3263, allocations: 155.8 kB / 402.8 MB, free: 11.89 MB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000326/0.3267, allocations: 151.8 kB / 403 MB, free: 11.74 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.417e-05/0.3267, allocations: 23.92 kB / 403 MB, free: 11.72 MB / 318.1 MB Notification: Performance of sorting global known variables: time 0.002906/0.3296, allocations: 1.971 MB / 405 MB, free: 9.727 MB / 318.1 MB Notification: Performance of sort global known variables: time 1.8e-07/0.3296, allocations: 0 / 405 MB, free: 9.727 MB / 318.1 MB Notification: Performance of remove unused functions: time 0.001069/0.3307, allocations: 307.2 kB / 405.3 MB, free: 9.426 MB / 318.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 4 * Number of states: 6 (battery1.limIntegrator.y,energy1.y,battery2.limIntegrator.y,battery2.capacitor[1].v,battery2.capacitor[2].v,energy2.y) * 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 (44): * Single equations (assignments): 44 * 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.004162/0.3349, allocations: 2.028 MB / 407.3 MB, free: 7.57 MB / 318.1 MB Notification: Performance of simCode: created initialization part: time 0.001776/0.3367, allocations: 0.6792 MB / 408 MB, free: 6.918 MB / 318.1 MB Notification: Performance of simCode: created event and clocks part: time 9.918e-06/0.3367, allocations: 8.438 kB / 408 MB, free: 6.91 MB / 318.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0007941/0.3375, allocations: 379 kB / 408.4 MB, free: 6.551 MB / 318.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.002085/0.3396, allocations: 321.8 kB / 408.7 MB, free: 6.238 MB / 318.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0359/0.3755, allocations: 19.88 MB / 428.6 MB, free: 1.117 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001316/0.3769, allocations: 1.433 MB / 430 MB, free: 15.65 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.00108/0.378, allocations: 295.1 kB / 430.3 MB, free: 15.36 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001112/0.3791, allocations: 0.7062 MB / 431 MB, free: 14.65 MB / 350.1 MB Notification: Performance of SimCode: time 1.072e-06/0.3791, allocations: 0 / 431 MB, free: 14.65 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.2618/0.6409, allocations: 38.49 MB / 469.5 MB, free: 8.566 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 9.15/9.791, allocations: 19.23 kB / 469.5 MB, free: 8.547 MB / 382.1 MB (rm -f Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & python3 -m fmpy simulate --output-file Modelica_4.1.0-beta.om_Modelica.Electrical.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 Modelica_4_1_0-beta_om_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_4.1.0-beta.om_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1)