Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.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) 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: translateModel(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,tolerance=1e-06,outputFormat="mat",numberOfIntervals=72000,variableFilter="time|battery1.limIntegrator.y|battery2.capacitor.1..v|battery2.capacitor.2..v|battery2.limIntegrator.y|energy1.y|energy2.y",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge") translateModel(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,tolerance=1e-06,outputFormat="mat",numberOfIntervals=72000,variableFilter="time|battery1.limIntegrator.y|battery2.capacitor.1..v|battery2.capacitor.2..v|battery2.limIntegrator.y|energy1.y|energy2.y",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00127/0.00127, allocations: 94.56 kB / 16.3 MB, free: 5.996 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.001469/0.001469, allocations: 187.2 kB / 17.2 MB, free: 5.91 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.517/1.517, allocations: 223.2 MB / 241.1 MB, free: 5.465 MB / 190.1 MB Notification: Performance of FrontEnd - loaded program: time 0.000341/0.0003412, allocations: 6.375 kB / 300.7 MB, free: 5.961 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1283/0.1287, allocations: 50.43 MB / 351.1 MB, free: 11.79 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.005655/0.1344, allocations: 4.729 MB / 355.9 MB, free: 7.043 MB / 286.1 MB Notification: Performance of NFInst.instExpressions: time 0.004734/0.1392, allocations: 2.402 MB / 358.3 MB, free: 4.633 MB / 286.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0009219/0.1401, allocations: 23.88 kB / 358.3 MB, free: 4.609 MB / 286.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002084/0.1422, allocations: 0.927 MB / 359.2 MB, free: 3.68 MB / 286.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/Electrical/Batteries/BatteryStacks/CellRCStack.mo:14:26-14:33:writable] Warning: 'each' used when modifying non-array element v. Notification: Performance of NFTyping.typeBindings: time 0.001358/0.1436, allocations: 359 kB / 359.6 MB, free: 3.328 MB / 286.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001283/0.1449, allocations: 380.9 kB / 359.9 MB, free: 2.961 MB / 286.1 MB Notification: Performance of NFFlatten.flatten: time 0.001979/0.1469, allocations: 1.144 MB / 361.1 MB, free: 1.816 MB / 286.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0007496/0.1477, allocations: 451.2 kB / 361.5 MB, free: 1.355 MB / 286.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0006667/0.1483, allocations: 474.3 kB / 362 MB, free: 0.8906 MB / 286.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000616/0.149, allocations: 0.5251 MB / 362.5 MB, free: 372 kB / 286.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001056/0.1491, allocations: 52 kB / 362.6 MB, free: 320 kB / 286.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003173/0.1494, allocations: 107.9 kB / 362.7 MB, free: 212 kB / 286.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0004348/0.1498, allocations: 478.5 kB / 363.1 MB, free: 15.74 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000287/0.1501, allocations: 340.6 kB / 363.5 MB, free: 15.4 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.001939/0.1521, allocations: 1.78 MB / 365.3 MB, free: 13.61 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.677e-06/0.1521, allocations: 0 / 365.3 MB, free: 13.61 MB / 302.1 MB Notification: Performance of FrontEnd: time 3.056e-06/0.1521, allocations: 4 kB / 365.3 MB, free: 13.61 MB / 302.1 MB Notification: Performance of Transformations before backend: time 3.628e-05/0.1522, allocations: 0 / 365.3 MB, free: 13.61 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.004554/0.1567, allocations: 2.253 MB / 367.5 MB, free: 11.3 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.166e-05/0.1568, allocations: 8.031 kB / 367.5 MB, free: 11.29 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003481/0.1571, allocations: 221.3 kB / 367.7 MB, free: 11.07 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002612/0.1597, allocations: 1.511 MB / 369.2 MB, free: 9.516 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005192/0.1603, allocations: 183.6 kB / 369.4 MB, free: 9.328 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001354/0.1604, allocations: 91.86 kB / 369.5 MB, free: 9.238 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002084/0.1625, allocations: 1.123 MB / 370.6 MB, free: 8.039 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.914e-05/0.1625, allocations: 0 / 370.6 MB, free: 8.039 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.025e-05/0.1626, allocations: 40 kB / 370.7 MB, free: 8 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.041e-05/0.1627, allocations: 20 kB / 370.7 MB, free: 7.98 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001475/0.1642, allocations: 0.7416 MB / 371.4 MB, free: 7.238 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007535/0.1717, allocations: 4.314 MB / 375.8 MB, free: 2.754 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001558/0.1733, allocations: 1.002 MB / 376.8 MB, free: 1.648 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.695e-05/0.1734, allocations: 4 kB / 376.8 MB, free: 1.645 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 5.66e-05/0.1735, allocations: 50.5 kB / 376.8 MB, free: 1.586 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 2.555e-06/0.1735, allocations: 0 / 376.8 MB, free: 1.586 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.00204/0.1755, allocations: 0.9136 MB / 377.7 MB, free: 0.6641 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002089/0.1757, allocations: 423.2 kB / 378.1 MB, free: 156 kB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.002751/0.1785, allocations: 2.04 MB / 380.2 MB, free: 14.07 MB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 7.954e-05/0.1786, allocations: 45.64 kB / 380.2 MB, free: 14.02 MB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007222/0.1793, allocations: 0.8861 MB / 381.1 MB, free: 13.12 MB / 318.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001661/0.1795, allocations: 149.8 kB / 381.2 MB, free: 12.98 MB / 318.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.184e-05/0.1795, allocations: 16 kB / 381.3 MB, free: 12.96 MB / 318.1 MB Notification: Performance of setup shared object (initialization): time 0.0001337/0.1797, allocations: 326 kB / 381.6 MB, free: 12.64 MB / 318.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006397/0.1803, allocations: 289.1 kB / 381.9 MB, free: 12.36 MB / 318.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008122/0.1811, allocations: 0.5636 MB / 382.4 MB, free: 11.67 MB / 318.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006361/0.1818, allocations: 312.6 kB / 382.7 MB, free: 11.37 MB / 318.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.316e-06/0.1818, allocations: 8 kB / 382.7 MB, free: 11.36 MB / 318.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001825/0.1836, allocations: 0.9078 MB / 383.7 MB, free: 10.45 MB / 318.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.531e-05/0.1837, allocations: 8 kB / 383.7 MB, free: 10.44 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.137e-05/0.1837, allocations: 4 kB / 383.7 MB, free: 10.43 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.542e-05/0.1837, allocations: 15.98 kB / 383.7 MB, free: 10.42 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006603/0.1844, allocations: 184 kB / 383.9 MB, free: 10.24 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.717e-05/0.1844, allocations: 11.94 kB / 383.9 MB, free: 10.23 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001094/0.1855, allocations: 215.1 kB / 384.1 MB, free: 10.02 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.641e-05/0.1856, allocations: 27.95 kB / 384.1 MB, free: 9.988 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.on1,pulseSeries.on2,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 (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0008651/0.1864, allocations: 0.56 MB / 384.7 MB, free: 9.418 MB / 318.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002323/0.1867, allocations: 181.8 kB / 384.8 MB, free: 9.238 MB / 318.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001559/0.1883, allocations: 0.7533 MB / 385.6 MB, free: 8.473 MB / 318.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.793e-06/0.1883, allocations: 4 kB / 385.6 MB, free: 8.469 MB / 318.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.049e-06/0.1883, allocations: 4 kB / 385.6 MB, free: 8.465 MB / 318.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.823e-06/0.1883, allocations: 3.984 kB / 385.6 MB, free: 8.461 MB / 318.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003253/0.1916, allocations: 1.995 MB / 387.6 MB, free: 6.395 MB / 318.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.798e-06/0.1916, allocations: 0 / 387.6 MB, free: 6.395 MB / 318.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005649/0.1921, allocations: 127.8 kB / 387.7 MB, free: 6.27 MB / 318.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 9.347e-06/0.1922, allocations: 4 kB / 387.7 MB, free: 6.266 MB / 318.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.863e-05/0.1922, allocations: 15.95 kB / 387.7 MB, free: 6.25 MB / 318.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 3.897e-06/0.1922, allocations: 4.062 kB / 387.8 MB, free: 6.246 MB / 318.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.006e-06/0.1922, allocations: 4 kB / 387.8 MB, free: 6.242 MB / 318.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002107/0.1943, allocations: 1.181 MB / 388.9 MB, free: 5.02 MB / 318.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0006034/0.195, allocations: 330.7 kB / 389.3 MB, free: 4.676 MB / 318.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001515/0.1951, allocations: 16.06 kB / 389.3 MB, free: 4.66 MB / 318.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001075/0.1962, allocations: 203.8 kB / 389.5 MB, free: 4.461 MB / 318.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003116/0.1965, allocations: 159.7 kB / 389.6 MB, free: 4.305 MB / 318.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.385e-05/0.1966, allocations: 16 kB / 389.6 MB, free: 4.289 MB / 318.1 MB Notification: Performance of sorting global known variables: time 0.001963/0.1985, allocations: 1.432 MB / 391.1 MB, free: 2.836 MB / 318.1 MB Notification: Performance of sort global known variables: time 1.6e-07/0.1986, allocations: 0 / 391.1 MB, free: 2.836 MB / 318.1 MB Notification: Performance of remove unused functions: time 0.0008846/0.1994, allocations: 283.2 kB / 391.4 MB, free: 2.559 MB / 318.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * 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 (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.001047/0.2005, allocations: 482.5 kB / 391.8 MB, free: 2.266 MB / 318.1 MB Notification: Performance of simCode: created initialization part: time 0.001447/0.202, allocations: 0.6506 MB / 392.5 MB, free: 1.613 MB / 318.1 MB Notification: Performance of simCode: created event and clocks part: time 5.72e-06/0.202, allocations: 4 kB / 392.5 MB, free: 1.609 MB / 318.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0007257/0.2027, allocations: 364.7 kB / 392.8 MB, free: 1.254 MB / 318.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001198/0.2039, allocations: 289.6 kB / 393.1 MB, free: 0.9688 MB / 318.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006047/0.21, allocations: 3.86 MB / 397 MB, free: 13.06 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001161/0.2112, allocations: 1.468 MB / 398.4 MB, free: 11.56 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 0.0009451/0.2121, allocations: 273.4 kB / 398.7 MB, free: 11.29 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002687/0.2124, allocations: 107.4 kB / 398.8 MB, free: 11.18 MB / 334.1 MB Notification: Performance of SimCode: time 5.81e-07/0.2124, allocations: 0 / 398.8 MB, free: 11.18 MB / 334.1 MB Notification: Performance of Templates: time 0.02841/0.2408, allocations: 14.8 MB / 413.6 MB, free: 12.55 MB / 350.1 MB make -j1 -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.makefile (rm -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & ./Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1) diffSimulationResults("Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.mat","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Electrical/Batteries/Examples/BatteryDischargeCharge/BatteryDischargeCharge.csv","../files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches