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.0008768/0.000877, allocations: 92.75 kB / 16.65 MB, free: 6.59 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.001002/0.001002, allocations: 184.2 kB / 17.57 MB, free: 6.199 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.443/1.443, allocations: 223.3 MB / 241.6 MB, free: 14.39 MB / 206.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002615/0.0002614, allocations: 7.938 kB / 301.4 MB, free: 5.891 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1093/0.1096, allocations: 50.42 MB / 351.8 MB, free: 3.469 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.007649/0.1173, allocations: 5.341 MB / 357.2 MB, free: 14.1 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.005813/0.1231, allocations: 2.494 MB / 359.7 MB, free: 11.59 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001502/0.1247, allocations: 31.81 kB / 359.7 MB, free: 11.56 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.002435/0.1272, allocations: 0.7083 MB / 360.4 MB, free: 10.85 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001951/0.1291, allocations: 473.7 kB / 360.9 MB, free: 10.39 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001957/0.1311, allocations: 464.1 kB / 361.3 MB, free: 9.938 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.002864/0.134, allocations: 1.515 MB / 362.8 MB, free: 8.422 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001146/0.1352, allocations: 0.5201 MB / 363.4 MB, free: 7.875 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.001123/0.1363, allocations: 0.4901 MB / 363.8 MB, free: 7.383 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001164/0.1375, allocations: 0.6573 MB / 364.5 MB, free: 6.723 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0003273/0.1379, allocations: 56 kB / 364.6 MB, free: 6.668 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0006156/0.1385, allocations: 124 kB / 364.7 MB, free: 6.547 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0006649/0.1392, allocations: 0.5606 MB / 365.2 MB, free: 5.984 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.001313/0.1405, allocations: 0.8402 MB / 366.1 MB, free: 5.133 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.003011/0.1435, allocations: 2.327 MB / 368.4 MB, free: 2.797 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 1.028e-05/0.1436, allocations: 4 kB / 368.4 MB, free: 2.793 MB / 302.1 MB Notification: Performance of FrontEnd: time 4.248e-06/0.1436, allocations: 0 / 368.4 MB, free: 2.793 MB / 302.1 MB Notification: Performance of Transformations before backend: time 0.0001471/0.1438, allocations: 0 / 368.4 MB, free: 2.793 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.006486/0.1502, allocations: 2.296 MB / 370.7 MB, free: 448 kB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 7.291e-05/0.1503, allocations: 8.031 kB / 370.7 MB, free: 440 kB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.001063/0.1514, allocations: 226.2 kB / 370.9 MB, free: 212 kB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.2301/0.3816, allocations: 1.513 MB / 372.5 MB, free: 22.96 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0006214/0.3822, allocations: 190.4 kB / 372.6 MB, free: 22.93 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0002612/0.3825, allocations: 82.66 kB / 372.7 MB, free: 22.93 MB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002672/0.3852, allocations: 1.137 MB / 373.9 MB, free: 22.68 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.934e-05/0.3853, allocations: 0 / 373.9 MB, free: 22.68 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001143/0.3854, allocations: 39.16 kB / 373.9 MB, free: 22.68 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.336e-05/0.3854, allocations: 25.83 kB / 373.9 MB, free: 22.67 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001822/0.3872, allocations: 0.7519 MB / 374.7 MB, free: 22.52 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.009179/0.3964, allocations: 4.702 MB / 379.4 MB, free: 19.93 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001693/0.3982, allocations: 0.9973 MB / 380.4 MB, free: 19.24 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0009575/0.3992, allocations: 422.9 kB / 380.8 MB, free: 19.11 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.722e-05/0.3993, allocations: 11.45 kB / 380.8 MB, free: 19.11 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.35e-05/0.3993, allocations: 47.64 kB / 380.8 MB, free: 19.06 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 2.594e-06/0.3993, allocations: 0 / 380.8 MB, free: 19.06 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002659/0.402, allocations: 0.9014 MB / 381.7 MB, free: 18.74 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001025/0.4021, allocations: 423.3 kB / 382.2 MB, free: 18.24 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.005304/0.4074, allocations: 2.742 MB / 384.9 MB, free: 17.34 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.000184/0.4076, allocations: 38.2 kB / 384.9 MB, free: 17.3 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007553/0.4084, allocations: 0.8725 MB / 385.8 MB, free: 16.62 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001806/0.4086, allocations: 160 kB / 386 MB, free: 16.5 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001023/0.4087, allocations: 65.98 kB / 386 MB, free: 16.46 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 7.846e-05/0.4088, allocations: 326.1 kB / 386.3 MB, free: 16.15 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0007408/0.4095, allocations: 291.4 kB / 386.6 MB, free: 16.07 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008106/0.4104, allocations: 0.5617 MB / 387.2 MB, free: 15.64 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001191/0.4116, allocations: 0.6704 MB / 387.9 MB, free: 15.18 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.622e-06/0.4116, allocations: 2.219 kB / 387.9 MB, free: 15.18 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.002201/0.4138, allocations: 0.9141 MB / 388.8 MB, free: 14.72 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.803e-05/0.4138, allocations: 6.656 kB / 388.8 MB, free: 14.72 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.804e-05/0.4139, allocations: 6.875 kB / 388.8 MB, free: 14.72 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.169e-05/0.4139, allocations: 8.375 kB / 388.8 MB, free: 14.72 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007206/0.4146, allocations: 177 kB / 389 MB, free: 14.67 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.566e-05/0.4147, allocations: 15.92 kB / 389 MB, free: 14.66 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001381/0.4161, allocations: 209.1 kB / 389.2 MB, free: 14.57 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.536e-05/0.4161, allocations: 27.73 kB / 389.2 MB, free: 14.57 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.0009426/0.4171, allocations: 0.5616 MB / 389.8 MB, free: 14.23 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.000329/0.4174, allocations: 181.1 kB / 390 MB, free: 14.14 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001569/0.419, allocations: 0.7565 MB / 390.7 MB, free: 13.75 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.025e-06/0.419, allocations: 4.469 kB / 390.7 MB, free: 13.75 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.821e-06/0.419, allocations: 1.312 kB / 390.7 MB, free: 13.75 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.132e-06/0.419, allocations: 3.984 kB / 390.7 MB, free: 13.74 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003679/0.4227, allocations: 2.183 MB / 392.9 MB, free: 12.31 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.412e-06/0.4228, allocations: 1 kB / 392.9 MB, free: 12.31 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005735/0.4234, allocations: 122.4 kB / 393 MB, free: 12.28 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 9.227e-06/0.4234, allocations: 13.44 kB / 393 MB, free: 12.27 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.159e-05/0.4234, allocations: 13.34 kB / 393.1 MB, free: 12.26 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 9.738e-06/0.4234, allocations: 13.98 kB / 393.1 MB, free: 12.25 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.479e-06/0.4234, allocations: 1.969 kB / 393.1 MB, free: 12.25 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002333/0.4258, allocations: 1.136 MB / 394.2 MB, free: 11.6 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0007982/0.4266, allocations: 423.5 kB / 394.6 MB, free: 11.29 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002376/0.4269, allocations: 9.844 kB / 394.6 MB, free: 11.29 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001199/0.4281, allocations: 205 kB / 394.8 MB, free: 11.21 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003203/0.4284, allocations: 153.4 kB / 395 MB, free: 11.13 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.339e-05/0.4285, allocations: 15.66 kB / 395 MB, free: 11.13 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002528/0.431, allocations: 1.946 MB / 396.9 MB, free: 9.453 MB / 302.1 MB Notification: Performance of sort global known variables: time 2.31e-07/0.431, allocations: 0 / 396.9 MB, free: 9.453 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.001331/0.4323, allocations: 314.5 kB / 397.2 MB, free: 9.148 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.001195/0.4336, allocations: 483.9 kB / 397.7 MB, free: 8.879 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001618/0.4352, allocations: 0.6467 MB / 398.4 MB, free: 8.234 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 9.177e-06/0.4352, allocations: 0.9375 kB / 398.4 MB, free: 8.234 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0007709/0.436, allocations: 383.8 kB / 398.7 MB, free: 7.859 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.002346/0.4384, allocations: 317.5 kB / 399.1 MB, free: 7.547 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006632/0.445, allocations: 4.174 MB / 403.2 MB, free: 3.332 MB / 302.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001044/0.4462, allocations: 1.437 MB / 404.7 MB, free: 1.867 MB / 302.1 MB Notification: Performance of simCode: alias equations: time 0.001226/0.4474, allocations: 294.8 kB / 405 MB, free: 1.574 MB / 302.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003511/0.4478, allocations: 103.4 kB / 405.1 MB, free: 1.473 MB / 302.1 MB Notification: Performance of SimCode: time 1.422e-06/0.4478, allocations: 0 / 405.1 MB, free: 1.473 MB / 302.1 MB Notification: Performance of Templates: time 0.03597/0.4838, allocations: 19.16 MB / 424.2 MB, free: 14.5 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/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