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.002013/0.002013, allocations: 106.3 kB / 17.16 MB, free: 6.324 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.002888/0.002888, allocations: 198.9 kB / 18.08 MB, free: 5.422 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 2.206/2.206, allocations: 222.9 MB / 241.8 MB, free: 15.3 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.00214/0.00214, allocations: 43.8 kB / 300.6 MB, free: 6.277 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.164/0.1662, allocations: 49.46 MB / 350.1 MB, free: 4.809 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.0119/0.1781, allocations: 5.77 MB / 355.8 MB, free: 15 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.007143/0.1854, allocations: 2.54 MB / 358.4 MB, free: 12.45 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001295/0.1867, allocations: 23.88 kB / 358.4 MB, free: 12.43 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002783/0.1896, allocations: 0.7161 MB / 359.1 MB, free: 11.71 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.002186/0.1918, allocations: 465.7 kB / 359.6 MB, free: 11.25 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.002046/0.1939, allocations: 470.1 kB / 360 MB, free: 10.8 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.003263/0.1972, allocations: 1.512 MB / 361.5 MB, free: 9.285 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001332/0.1985, allocations: 0.524 MB / 362.1 MB, free: 8.734 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.00132/0.1999, allocations: 0.5369 MB / 362.6 MB, free: 8.195 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001444/0.2013, allocations: 0.7041 MB / 363.3 MB, free: 7.488 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002827/0.2016, allocations: 80 kB / 363.4 MB, free: 7.41 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0007419/0.2024, allocations: 152 kB / 363.5 MB, free: 7.262 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0008341/0.2033, allocations: 0.588 MB / 364.1 MB, free: 6.672 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.00135/0.2046, allocations: 0.8502 MB / 365 MB, free: 5.816 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.003135/0.2078, allocations: 1.999 MB / 367 MB, free: 3.812 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.352e-06/0.2078, allocations: 0 / 367 MB, free: 3.812 MB / 302.1 MB Notification: Performance of FrontEnd: time 2.304e-06/0.2078, allocations: 0 / 367 MB, free: 3.812 MB / 302.1 MB Notification: Performance of Transformations before backend: time 6.596e-05/0.2079, allocations: 0 / 367 MB, free: 3.812 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.009574/0.2175, allocations: 2.563 MB / 369.5 MB, free: 1.188 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 6.228e-05/0.2176, allocations: 8.031 kB / 369.5 MB, free: 1.18 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0007618/0.2183, allocations: 226.2 kB / 369.8 MB, free: 0.957 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.3241/0.5424, allocations: 1.511 MB / 371.3 MB, free: 24 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.001185/0.5437, allocations: 177.7 kB / 371.4 MB, free: 23.97 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0004901/0.5442, allocations: 85.25 kB / 371.5 MB, free: 23.97 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.004979/0.5492, allocations: 1.129 MB / 372.7 MB, free: 23.63 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.118e-05/0.5493, allocations: 0.5625 kB / 372.7 MB, free: 23.63 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0002411/0.5496, allocations: 39.56 kB / 372.7 MB, free: 23.61 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.806e-05/0.5496, allocations: 25.56 kB / 372.7 MB, free: 23.6 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0035/0.5532, allocations: 0.7405 MB / 373.5 MB, free: 23.36 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01564/0.5688, allocations: 4.663 MB / 378.1 MB, free: 20.78 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.003175/0.5721, allocations: 0.9841 MB / 379.1 MB, free: 20.09 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001779/0.5739, allocations: 406.8 kB / 379.5 MB, free: 19.96 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 9.557e-05/0.574, allocations: 15.33 kB / 379.5 MB, free: 19.95 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 5.504e-05/0.5741, allocations: 43.94 kB / 379.6 MB, free: 19.91 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 4.739e-06/0.5741, allocations: 0 / 379.6 MB, free: 19.91 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.005022/0.5791, allocations: 0.8747 MB / 380.4 MB, free: 19.59 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001629/0.5793, allocations: 426.9 kB / 380.9 MB, free: 19.09 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.01098/0.5904, allocations: 2.738 MB / 383.6 MB, free: 18.19 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0002645/0.5907, allocations: 38.14 kB / 383.6 MB, free: 18.15 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.001632/0.5924, allocations: 0.8733 MB / 384.5 MB, free: 17.48 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0003878/0.5928, allocations: 164.7 kB / 384.7 MB, free: 17.36 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0005542/0.5934, allocations: 123.2 kB / 384.8 MB, free: 17.29 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 0.0001256/0.5935, allocations: 332 kB / 385.1 MB, free: 16.97 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001498/0.595, allocations: 285 kB / 385.4 MB, free: 16.89 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001651/0.5967, allocations: 0.5479 MB / 385.9 MB, free: 16.46 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.00258/0.5993, allocations: 0.664 MB / 386.6 MB, free: 16.05 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.841e-05/0.5994, allocations: 1.125 kB / 386.6 MB, free: 16.05 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.004311/0.6037, allocations: 0.8958 MB / 387.5 MB, free: 15.64 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 4.371e-05/0.6038, allocations: 9.75 kB / 387.5 MB, free: 15.64 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.705e-05/0.6038, allocations: 6.125 kB / 387.5 MB, free: 15.64 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 5.262e-05/0.6039, allocations: 8.781 kB / 387.5 MB, free: 15.64 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001337/0.6052, allocations: 171.9 kB / 387.7 MB, free: 15.59 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 4.351e-05/0.6053, allocations: 13.45 kB / 387.7 MB, free: 15.59 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.00297/0.6083, allocations: 169.1 kB / 387.9 MB, free: 15.5 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.00015/0.6085, allocations: 26.22 kB / 387.9 MB, free: 15.5 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.002022/0.6105, allocations: 0.5726 MB / 388.5 MB, free: 15.16 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.001041/0.6116, allocations: 183.7 kB / 388.6 MB, free: 15.06 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.003595/0.6152, allocations: 0.734 MB / 389.4 MB, free: 14.68 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.172e-05/0.6152, allocations: 3.969 kB / 389.4 MB, free: 14.68 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.148e-05/0.6153, allocations: 3.938 kB / 389.4 MB, free: 14.68 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.392e-05/0.6153, allocations: 3.984 kB / 389.4 MB, free: 14.67 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.008206/0.6235, allocations: 2.163 MB / 391.6 MB, free: 13.24 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 8.235e-06/0.6236, allocations: 1.219 kB / 391.6 MB, free: 13.24 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00105/0.6246, allocations: 125 kB / 391.7 MB, free: 13.21 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.915e-05/0.6247, allocations: 6.688 kB / 391.7 MB, free: 13.2 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 8.218e-05/0.6248, allocations: 12.12 kB / 391.7 MB, free: 13.2 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.323e-05/0.6248, allocations: 2.75 kB / 391.7 MB, free: 13.2 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 7.764e-06/0.6248, allocations: 9.297 kB / 391.7 MB, free: 13.19 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004618/0.6294, allocations: 1.106 MB / 392.8 MB, free: 12.54 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.001834/0.6313, allocations: 411.3 kB / 393.2 MB, free: 12.25 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0008172/0.6322, allocations: 15.39 kB / 393.2 MB, free: 12.24 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.002637/0.6348, allocations: 153 kB / 393.4 MB, free: 12.17 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0006058/0.6354, allocations: 157.4 kB / 393.5 MB, free: 12.09 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001183/0.6356, allocations: 17.25 kB / 393.5 MB, free: 12.08 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.005955/0.6416, allocations: 1.948 MB / 395.5 MB, free: 11.12 MB / 302.1 MB Notification: Performance of sort global known variables: time 8.31e-07/0.6416, allocations: 0 / 395.5 MB, free: 11.12 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.002445/0.6441, allocations: 314.9 kB / 395.8 MB, free: 10.81 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.002184/0.6463, allocations: 483.1 kB / 396.3 MB, free: 10.55 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.002796/0.6491, allocations: 0.6311 MB / 396.9 MB, free: 9.926 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 9.517e-06/0.6491, allocations: 4 kB / 396.9 MB, free: 9.922 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.001465/0.6506, allocations: 376.7 kB / 397.3 MB, free: 9.555 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.004021/0.6546, allocations: 302.6 kB / 397.6 MB, free: 9.254 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0112/0.6659, allocations: 4.131 MB / 401.7 MB, free: 5.086 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001643/0.6676, allocations: 1.429 MB / 403.1 MB, free: 3.629 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.001018/0.6686, allocations: 99.42 kB / 403.2 MB, free: 3.531 MB / 302.1 MB Notification: Performance of SimCode: time 2.214e-06/0.6687, allocations: 0 / 403.2 MB, free: 3.531 MB / 302.1 MB Notification: Performance of Templates: time 0.06823/0.7369, allocations: 22.98 MB / 426.2 MB, free: 12.64 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