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.0008801/0.0008805, allocations: 89.41 kB / 16.31 MB, free: 5.668 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.000906/0.0009062, allocations: 183.9 kB / 17.21 MB, free: 5.586 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.5/1.5, allocations: 223.2 MB / 241.2 MB, free: 328 kB / 190.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002644/0.0002646, allocations: 4 kB / 300.8 MB, free: 6.449 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1164/0.1167, allocations: 50.42 MB / 351.2 MB, free: 4.02 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.007668/0.1244, allocations: 5.026 MB / 356.3 MB, free: 14.97 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.004991/0.1295, allocations: 2.417 MB / 358.7 MB, free: 12.54 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001195/0.1307, allocations: 23.94 kB / 358.7 MB, free: 12.52 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001901/0.1326, allocations: 0.6771 MB / 359.4 MB, free: 11.84 MB / 302.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.001441/0.1341, allocations: 445.7 kB / 359.8 MB, free: 11.4 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001286/0.1354, allocations: 394.2 kB / 360.2 MB, free: 11.02 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.002023/0.1374, allocations: 1.391 MB / 361.6 MB, free: 9.629 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0008825/0.1383, allocations: 435.2 kB / 362 MB, free: 9.184 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0009527/0.1393, allocations: 494 kB / 362.5 MB, free: 8.699 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001076/0.1404, allocations: 0.6068 MB / 363.1 MB, free: 8.09 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002165/0.1406, allocations: 63.94 kB / 363.2 MB, free: 8.027 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.000448/0.141, allocations: 120 kB / 363.3 MB, free: 7.91 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0005615/0.1416, allocations: 0.5647 MB / 363.8 MB, free: 7.344 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000471/0.1421, allocations: 336.6 kB / 364.2 MB, free: 7.008 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.00195/0.1441, allocations: 1.948 MB / 366.1 MB, free: 5.055 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.312e-06/0.1441, allocations: 0 / 366.1 MB, free: 5.055 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.503e-06/0.1441, allocations: 0 / 366.1 MB, free: 5.055 MB / 302.1 MB Notification: Performance of Transformations before backend: time 8.399e-05/0.1442, allocations: 0 / 366.1 MB, free: 5.055 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.004731/0.1489, allocations: 2.323 MB / 368.4 MB, free: 2.672 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.08e-05/0.149, allocations: 12.03 kB / 368.5 MB, free: 2.66 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0005474/0.1495, allocations: 221.3 kB / 368.7 MB, free: 2.441 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002532/0.1521, allocations: 1.438 MB / 370.1 MB, free: 0.9609 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004734/0.1525, allocations: 191.6 kB / 370.3 MB, free: 0.7656 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001203/0.1527, allocations: 87.89 kB / 370.4 MB, free: 0.6797 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.2031/0.3557, allocations: 1.122 MB / 371.5 MB, free: 23.07 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.635e-05/0.3558, allocations: 0.5312 kB / 371.5 MB, free: 23.07 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001322/0.356, allocations: 39.88 kB / 371.5 MB, free: 23.07 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.782e-05/0.356, allocations: 23.06 kB / 371.6 MB, free: 23.07 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001811/0.3578, allocations: 0.7464 MB / 372.3 MB, free: 23.06 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007657/0.3655, allocations: 4.703 MB / 377 MB, free: 20.97 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001441/0.3669, allocations: 1.004 MB / 378 MB, free: 20.27 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008932/0.3679, allocations: 419.3 kB / 378.4 MB, free: 20.14 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.349e-05/0.3679, allocations: 8.969 kB / 378.4 MB, free: 20.14 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.965e-05/0.368, allocations: 40.17 kB / 378.5 MB, free: 20.1 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 2.725e-06/0.368, allocations: 1.406 kB / 378.5 MB, free: 20.1 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002263/0.3703, allocations: 0.9015 MB / 379.4 MB, free: 19.78 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001121/0.3704, allocations: 431.4 kB / 379.8 MB, free: 19.27 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.00404/0.3744, allocations: 2.736 MB / 382.5 MB, free: 18.38 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 8.477e-05/0.3745, allocations: 38.48 kB / 382.6 MB, free: 18.34 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0006778/0.3752, allocations: 0.8784 MB / 383.5 MB, free: 17.66 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001202/0.3753, allocations: 156.5 kB / 383.6 MB, free: 17.54 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.331e-05/0.3754, allocations: 10.84 kB / 383.6 MB, free: 17.53 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 6.684e-05/0.3755, allocations: 331.9 kB / 383.9 MB, free: 17.21 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006718/0.3761, allocations: 286.7 kB / 384.2 MB, free: 17.13 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007696/0.3769, allocations: 0.5585 MB / 384.8 MB, free: 16.71 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006257/0.3775, allocations: 308.9 kB / 385.1 MB, free: 16.59 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.942e-06/0.3776, allocations: 1.531 kB / 385.1 MB, free: 16.59 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002124/0.3797, allocations: 0.9062 MB / 386 MB, free: 16.24 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.284e-05/0.3797, allocations: 6.906 kB / 386 MB, free: 16.24 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.411e-05/0.3798, allocations: 5.438 kB / 386 MB, free: 16.24 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.075e-05/0.3798, allocations: 10.28 kB / 386 MB, free: 16.24 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000657/0.3805, allocations: 179.2 kB / 386.2 MB, free: 16.22 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.947e-05/0.3805, allocations: 8.844 kB / 386.2 MB, free: 16.22 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001147/0.3816, allocations: 213.5 kB / 386.4 MB, free: 16.16 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.157e-05/0.3817, allocations: 31.88 kB / 386.4 MB, free: 16.15 MB / 302.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.0009571/0.3827, allocations: 0.5554 MB / 387 MB, free: 15.89 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002408/0.3829, allocations: 179.1 kB / 387.2 MB, free: 15.79 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001615/0.3845, allocations: 0.7533 MB / 387.9 MB, free: 15.4 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.052e-05/0.3846, allocations: 6.875 kB / 387.9 MB, free: 15.4 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.933e-06/0.3846, allocations: 0 / 387.9 MB, free: 15.4 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.292e-06/0.3846, allocations: 7.984 kB / 387.9 MB, free: 15.39 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003669/0.3883, allocations: 2.187 MB / 390.1 MB, free: 13.95 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.629e-06/0.3883, allocations: 0 / 390.1 MB, free: 13.95 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005026/0.3888, allocations: 130.5 kB / 390.2 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 7.574e-06/0.3888, allocations: 1.469 kB / 390.3 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.978e-05/0.3889, allocations: 12.94 kB / 390.3 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.532e-06/0.3889, allocations: 2.188 kB / 390.3 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 5.51e-06/0.3889, allocations: 2.469 kB / 390.3 MB, free: 13.91 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002105/0.391, allocations: 1.143 MB / 391.4 MB, free: 13.25 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0006323/0.3916, allocations: 415.9 kB / 391.8 MB, free: 12.95 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001769/0.3918, allocations: 17.48 kB / 391.8 MB, free: 12.94 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0009695/0.3928, allocations: 197.1 kB / 392 MB, free: 12.88 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000308/0.3931, allocations: 156.7 kB / 392.2 MB, free: 12.79 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.58e-05/0.3932, allocations: 21.8 kB / 392.2 MB, free: 12.78 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002368/0.3956, allocations: 1.948 MB / 394.1 MB, free: 11.83 MB / 302.1 MB Notification: Performance of sort global known variables: time 2.7e-07/0.3956, allocations: 0 / 394.1 MB, free: 11.83 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0009218/0.3965, allocations: 306.1 kB / 394.4 MB, free: 11.78 MB / 302.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 (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.001101/0.3976, allocations: 491.2 kB / 394.9 MB, free: 11.57 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001248/0.3989, allocations: 0.6418 MB / 395.6 MB, free: 11.17 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 6.252e-06/0.3989, allocations: 8.062 kB / 395.6 MB, free: 11.16 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006086/0.3995, allocations: 376.7 kB / 395.9 MB, free: 10.8 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001285/0.4008, allocations: 309.6 kB / 396.2 MB, free: 10.49 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004681/0.4055, allocations: 3.971 MB / 400.2 MB, free: 6.48 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0007348/0.4062, allocations: 1.433 MB / 401.7 MB, free: 5.02 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.0007478/0.407, allocations: 294.8 kB / 401.9 MB, free: 4.727 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002742/0.4073, allocations: 95.42 kB / 402 MB, free: 4.633 MB / 302.1 MB Notification: Performance of SimCode: time 5.61e-07/0.4073, allocations: 0 / 402 MB, free: 4.633 MB / 302.1 MB Notification: Performance of Templates: time 0.03177/0.4391, allocations: 18.62 MB / 420.7 MB, free: 2.199 MB / 318.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","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches