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.0009117/0.0009155, allocations: 92.22 kB / 17.31 MB, free: 6.535 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.001096/0.001096, allocations: 175.1 kB / 18.21 MB, free: 5.684 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.291/1.291, allocations: 223.3 MB / 242.3 MB, free: 192 kB / 190.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002174/0.0002174, allocations: 4 kB / 302.1 MB, free: 6.125 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.07302/0.07325, allocations: 50.42 MB / 352.5 MB, free: 3.703 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.005207/0.07849, allocations: 5.353 MB / 357.8 MB, free: 14.32 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.003018/0.08153, allocations: 2.49 MB / 360.3 MB, free: 11.82 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002811/0.08182, allocations: 27.81 kB / 360.4 MB, free: 11.79 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001244/0.08307, allocations: 0.72 MB / 361.1 MB, free: 11.07 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0007061/0.08379, allocations: 461.7 kB / 361.5 MB, free: 10.62 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000828/0.08463, allocations: 458.3 kB / 362 MB, free: 10.18 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.001312/0.08595, allocations: 1.516 MB / 363.5 MB, free: 8.656 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006413/0.08661, allocations: 0.5278 MB / 364 MB, free: 8.102 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0004439/0.08706, allocations: 0.494 MB / 364.5 MB, free: 7.605 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0006271/0.0877, allocations: 0.6495 MB / 365.2 MB, free: 6.953 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0001102/0.08782, allocations: 60 kB / 365.2 MB, free: 6.895 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002483/0.08807, allocations: 120 kB / 365.3 MB, free: 6.777 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0004261/0.08851, allocations: 0.5645 MB / 365.9 MB, free: 6.211 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0006203/0.08914, allocations: 0.8324 MB / 366.7 MB, free: 5.367 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.001407/0.09055, allocations: 1.948 MB / 368.7 MB, free: 3.414 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.167e-06/0.09057, allocations: 8 kB / 368.7 MB, free: 3.406 MB / 302.1 MB Notification: Performance of FrontEnd: time 1.242e-06/0.09057, allocations: 0 / 368.7 MB, free: 3.406 MB / 302.1 MB Notification: Performance of Transformations before backend: time 1.536e-05/0.0906, allocations: 0 / 368.7 MB, free: 3.406 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.003943/0.09454, allocations: 2.3 MB / 371 MB, free: 1.047 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.056e-05/0.09459, allocations: 12.03 kB / 371 MB, free: 1.035 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002776/0.09487, allocations: 222.2 kB / 371.2 MB, free: 0.8164 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.1398/0.2347, allocations: 1.509 MB / 372.7 MB, free: 22.95 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005652/0.2353, allocations: 192.5 kB / 372.9 MB, free: 22.92 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001782/0.2355, allocations: 84.91 kB / 373 MB, free: 22.92 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002024/0.2375, allocations: 1.136 MB / 374.1 MB, free: 22.67 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.286e-05/0.2376, allocations: 1.188 kB / 374.1 MB, free: 22.67 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 9.968e-05/0.2377, allocations: 36.81 kB / 374.2 MB, free: 22.67 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.457e-05/0.2377, allocations: 26.08 kB / 374.2 MB, free: 22.66 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001632/0.2393, allocations: 0.7487 MB / 374.9 MB, free: 22.62 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00669/0.246, allocations: 4.712 MB / 379.7 MB, free: 20.02 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001418/0.2475, allocations: 1.002 MB / 380.7 MB, free: 19.32 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008603/0.2483, allocations: 421 kB / 381.1 MB, free: 19.19 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.574e-05/0.2484, allocations: 11.52 kB / 381.1 MB, free: 19.18 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 2.495e-05/0.2484, allocations: 40.14 kB / 381.1 MB, free: 19.14 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 1.894e-06/0.2484, allocations: 0 / 381.1 MB, free: 19.14 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002105/0.2505, allocations: 0.9059 MB / 382 MB, free: 18.82 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.224e-05/0.2506, allocations: 419.2 kB / 382.4 MB, free: 18.32 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003652/0.2543, allocations: 2.737 MB / 385.2 MB, free: 17.43 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 5.157e-05/0.2544, allocations: 41.89 kB / 385.2 MB, free: 17.38 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0005662/0.2549, allocations: 0.88 MB / 386.1 MB, free: 16.7 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.000103/0.255, allocations: 155.5 kB / 386.2 MB, free: 16.58 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.092e-05/0.2551, allocations: 61.83 kB / 386.3 MB, free: 16.54 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 4.743e-05/0.2552, allocations: 329.5 kB / 386.6 MB, free: 16.23 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006448/0.2558, allocations: 285.2 kB / 386.9 MB, free: 16.15 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007454/0.2566, allocations: 0.5663 MB / 387.5 MB, free: 15.71 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001207/0.2578, allocations: 0.6691 MB / 388.1 MB, free: 15.29 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.501e-06/0.2578, allocations: 1.062 kB / 388.1 MB, free: 15.29 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001798/0.2596, allocations: 0.9151 MB / 389.1 MB, free: 14.83 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.772e-05/0.2597, allocations: 6.531 kB / 389.1 MB, free: 14.83 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.07e-05/0.2597, allocations: 6.469 kB / 389.1 MB, free: 14.83 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.878e-05/0.2597, allocations: 8.938 kB / 389.1 MB, free: 14.83 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006594/0.2604, allocations: 179.9 kB / 389.3 MB, free: 14.78 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.526e-05/0.2604, allocations: 16.73 kB / 389.3 MB, free: 14.77 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001183/0.2616, allocations: 209.8 kB / 389.5 MB, free: 14.68 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.786e-05/0.2616, allocations: 27.38 kB / 389.5 MB, free: 14.68 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.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.0005693/0.2622, allocations: 0.5621 MB / 390.1 MB, free: 14.34 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002405/0.2625, allocations: 179 kB / 390.2 MB, free: 14.25 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001476/0.2639, allocations: 0.7598 MB / 391 MB, free: 13.86 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.849e-06/0.264, allocations: 7.734 kB / 391 MB, free: 13.85 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.25e-06/0.264, allocations: 0.75 kB / 391 MB, free: 13.85 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.67e-06/0.264, allocations: 3.984 kB / 391 MB, free: 13.85 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003072/0.2671, allocations: 2.182 MB / 393.2 MB, free: 12.41 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.027e-06/0.2671, allocations: 1.375 kB / 393.2 MB, free: 12.41 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005463/0.2676, allocations: 130.6 kB / 393.3 MB, free: 12.38 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.219e-06/0.2676, allocations: 10.78 kB / 393.3 MB, free: 12.37 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.497e-05/0.2677, allocations: 8.125 kB / 393.3 MB, free: 12.37 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.529e-06/0.2677, allocations: 10.67 kB / 393.4 MB, free: 12.36 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.803e-06/0.2677, allocations: 1.375 kB / 393.4 MB, free: 12.36 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001915/0.2696, allocations: 1.134 MB / 394.5 MB, free: 11.71 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005019/0.2701, allocations: 423.3 kB / 394.9 MB, free: 11.4 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001806/0.2703, allocations: 15.25 kB / 394.9 MB, free: 11.39 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001139/0.2715, allocations: 194.1 kB / 395.1 MB, free: 11.33 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002659/0.2717, allocations: 160.5 kB / 395.3 MB, free: 11.24 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.948e-05/0.2718, allocations: 16.72 kB / 395.3 MB, free: 11.23 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.001989/0.2738, allocations: 1.946 MB / 397.2 MB, free: 9.754 MB / 302.1 MB Notification: Performance of sort global known variables: time 2.4e-07/0.2738, allocations: 0 / 397.2 MB, free: 9.754 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0007033/0.2745, allocations: 315.1 kB / 397.5 MB, free: 9.449 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 (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.001011/0.2755, allocations: 486.1 kB / 398 MB, free: 9.176 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001233/0.2768, allocations: 0.6467 MB / 398.7 MB, free: 8.531 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 3.516e-06/0.2768, allocations: 0 / 398.7 MB, free: 8.531 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0006734/0.2775, allocations: 384.7 kB / 399 MB, free: 8.156 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001431/0.2789, allocations: 305.5 kB / 399.3 MB, free: 7.855 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004581/0.2835, allocations: 4.25 MB / 403.6 MB, free: 3.559 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0007265/0.2842, allocations: 1.429 MB / 405 MB, free: 2.102 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003328/0.2846, allocations: 107.4 kB / 405.1 MB, free: 1.996 MB / 302.1 MB Notification: Performance of SimCode: time 2.6e-07/0.2846, allocations: 0 / 405.1 MB, free: 1.996 MB / 302.1 MB Notification: Performance of Templates: time 0.02807/0.3127, allocations: 22.72 MB / 427.8 MB, free: 11.36 MB / 334.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/jenkins1/ws/OpenModelicaLibraryTestingWork/Reference-modelica.org/ReferenceResults/MAP-LIB_ReferenceResults/v4.0.0/Modelica/Electrical/Batteries/Examples/BatteryDischargeCharge/BatteryDischargeCharge.csv","/var/lib/jenkins1/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