Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo", uses=false) Using package ModelicaServices with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo) Using package Modelica with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo) Using package Complex with version trunk (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/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_trunk_cpp_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_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001652/0.001652, allocations: 195.9 kB / 17.05 MB, free: 5.098 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.285/1.285, allocations: 226.6 MB / 244.3 MB, free: 8.309 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007399/0.0007402, allocations: 94.39 kB / 296.4 MB, free: 7.035 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002019/0.000202, allocations: 4 kB / 356.2 MB, free: 11.24 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1985/0.1987, allocations: 51.3 MB / 407.5 MB, free: 27.86 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.003919/0.2027, allocations: 5.05 MB / 412.5 MB, free: 22.79 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.003048/0.2057, allocations: 2.562 MB / 415.1 MB, free: 20.24 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0005/0.2063, allocations: 19.94 kB / 415.1 MB, free: 20.22 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.001121/0.2074, allocations: 0.6963 MB / 415.8 MB, free: 19.52 MB / 298.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/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.0007396/0.2081, allocations: 477.6 kB / 416.3 MB, free: 19.05 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0008118/0.209, allocations: 387.3 kB / 416.7 MB, free: 18.68 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.00101/0.21, allocations: 1.403 MB / 418.1 MB, free: 17.28 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004594/0.2105, allocations: 447.2 kB / 418.5 MB, free: 16.82 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000416/0.2109, allocations: 486.1 kB / 419 MB, free: 16.34 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0004499/0.2113, allocations: 0.6068 MB / 419.6 MB, free: 15.73 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 9.992e-05/0.2114, allocations: 60 kB / 419.6 MB, free: 15.67 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002841/0.2117, allocations: 128 kB / 419.8 MB, free: 15.55 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0002978/0.212, allocations: 0.5647 MB / 420.3 MB, free: 14.98 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001769/0.2122, allocations: 340.6 kB / 420.7 MB, free: 14.64 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.001055/0.2133, allocations: 1.952 MB / 422.6 MB, free: 12.68 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.709e-06/0.2133, allocations: 0 / 422.6 MB, free: 12.68 MB / 298.7 MB Notification: Performance of FrontEnd: time 2.184e-06/0.2133, allocations: 0 / 422.6 MB, free: 12.68 MB / 298.7 MB Notification: Performance of Transformations before backend: time 1.991e-05/0.2133, allocations: 0 / 422.6 MB, free: 12.68 MB / 298.7 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.003463/0.2168, allocations: 2.342 MB / 425 MB, free: 10.28 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.417e-05/0.2168, allocations: 8.031 kB / 425 MB, free: 10.27 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002464/0.2171, allocations: 221.3 kB / 425.2 MB, free: 10.05 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001659/0.2188, allocations: 1.457 MB / 426.6 MB, free: 8.523 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004752/0.2193, allocations: 187.6 kB / 426.8 MB, free: 8.332 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001096/0.2194, allocations: 84 kB / 426.9 MB, free: 8.25 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001621/0.221, allocations: 1.125 MB / 428 MB, free: 7.051 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.926e-05/0.221, allocations: 0 / 428 MB, free: 7.051 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.914e-05/0.2211, allocations: 40 kB / 428.1 MB, free: 7.012 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.756e-05/0.2211, allocations: 20 kB / 428.1 MB, free: 6.992 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001221/0.2224, allocations: 0.7455 MB / 428.8 MB, free: 6.242 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005604/0.228, allocations: 4.712 MB / 433.6 MB, free: 1.359 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001267/0.2293, allocations: 0.9917 MB / 434.5 MB, free: 272 kB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008093/0.2301, allocations: 417.2 kB / 435 MB, free: 15.85 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 5.206e-05/0.2302, allocations: 7.984 kB / 435 MB, free: 15.84 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 4.423e-05/0.2302, allocations: 54.45 kB / 435 MB, free: 15.78 MB / 314.7 MB Notification: Performance of pre-optimization done (n=44): time 2.394e-06/0.2302, allocations: 0 / 435 MB, free: 15.78 MB / 314.7 MB Notification: Performance of matching and sorting (n=44): time 0.002167/0.2324, allocations: 0.898 MB / 435.9 MB, free: 14.88 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002161/0.2326, allocations: 431.2 kB / 436.3 MB, free: 14.36 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.00358/0.2362, allocations: 2.759 MB / 439.1 MB, free: 11.55 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 8.517e-05/0.2363, allocations: 33.7 kB / 439.1 MB, free: 11.52 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007333/0.2371, allocations: 0.8863 MB / 440 MB, free: 10.62 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001452/0.2372, allocations: 149.8 kB / 440.2 MB, free: 10.47 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.131e-05/0.2373, allocations: 16 kB / 440.2 MB, free: 10.46 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 0.0001277/0.2374, allocations: 334 kB / 440.5 MB, free: 10.12 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006568/0.238, allocations: 277.1 kB / 440.8 MB, free: 9.855 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.00086/0.2389, allocations: 0.5636 MB / 441.3 MB, free: 9.168 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006302/0.2396, allocations: 308.6 kB / 441.6 MB, free: 8.867 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.681e-06/0.2396, allocations: 4 kB / 441.6 MB, free: 8.863 MB / 314.7 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001863/0.2414, allocations: 0.9077 MB / 442.5 MB, free: 7.945 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.461e-05/0.2415, allocations: 11.95 kB / 442.6 MB, free: 7.934 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.137e-05/0.2415, allocations: 4 kB / 442.6 MB, free: 7.93 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.558e-05/0.2415, allocations: 15.98 kB / 442.6 MB, free: 7.914 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006482/0.2422, allocations: 180 kB / 442.8 MB, free: 7.738 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.864e-05/0.2422, allocations: 15.92 kB / 442.8 MB, free: 7.723 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001109/0.2433, allocations: 207.1 kB / 443 MB, free: 7.52 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 7.076e-05/0.2434, allocations: 28 kB / 443 MB, free: 7.492 MB / 314.7 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.0008346/0.2442, allocations: 0.5588 MB / 443.6 MB, free: 6.926 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002685/0.2445, allocations: 177.8 kB / 443.7 MB, free: 6.75 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001654/0.2462, allocations: 0.7587 MB / 444.5 MB, free: 5.984 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.633e-06/0.2462, allocations: 8 kB / 444.5 MB, free: 5.977 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.308e-06/0.2462, allocations: 0 / 444.5 MB, free: 5.977 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.003e-06/0.2462, allocations: 3.984 kB / 444.5 MB, free: 5.973 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003664/0.2499, allocations: 2.21 MB / 446.7 MB, free: 3.688 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.747e-06/0.2499, allocations: 0 / 446.7 MB, free: 3.688 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005444/0.2505, allocations: 119.8 kB / 446.8 MB, free: 3.57 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 9.498e-06/0.2505, allocations: 4 kB / 446.8 MB, free: 3.566 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.158e-05/0.2505, allocations: 11.98 kB / 446.8 MB, free: 3.555 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.15e-06/0.2505, allocations: 8.031 kB / 446.9 MB, free: 3.547 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.645e-06/0.2506, allocations: 4 kB / 446.9 MB, free: 3.543 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002046/0.2526, allocations: 1.139 MB / 448 MB, free: 2.375 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0006148/0.2533, allocations: 418.6 kB / 448.4 MB, free: 1.945 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002011/0.2535, allocations: 12 kB / 448.4 MB, free: 1.934 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001145/0.2546, allocations: 199.8 kB / 448.6 MB, free: 1.738 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002925/0.2549, allocations: 155.7 kB / 448.8 MB, free: 1.586 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.276e-05/0.255, allocations: 19.98 kB / 448.8 MB, free: 1.566 MB / 314.7 MB Notification: Performance of sorting global known variables: time 0.002643/0.2576, allocations: 1.959 MB / 450.7 MB, free: 15.59 MB / 330.7 MB Notification: Performance of sort global known variables: time 2.31e-07/0.2576, allocations: 0 / 450.7 MB, free: 15.59 MB / 330.7 MB Notification: Performance of remove unused functions: time 0.0008896/0.2585, allocations: 315.3 kB / 451 MB, free: 15.28 MB / 330.7 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.001043/0.2596, allocations: 484.4 kB / 451.5 MB, free: 14.96 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.00148/0.2611, allocations: 0.6428 MB / 452.2 MB, free: 14.32 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 5.511e-06/0.2611, allocations: 0 / 452.2 MB, free: 14.32 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0007663/0.2619, allocations: 380.7 kB / 452.5 MB, free: 13.95 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001431/0.2633, allocations: 312.8 kB / 452.8 MB, free: 13.64 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.006407/0.2697, allocations: 4.063 MB / 456.9 MB, free: 9.52 MB / 330.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001304/0.2711, allocations: 1.433 MB / 458.3 MB, free: 8.059 MB / 330.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.00045/0.2715, allocations: 115.4 kB / 458.5 MB, free: 7.949 MB / 330.7 MB Notification: Performance of SimCode: time 6.11e-07/0.2715, allocations: 0 / 458.5 MB, free: 7.949 MB / 330.7 MB Notification: Performance of Templates: time 0.03414/0.3057, allocations: 22.88 MB / 481.3 MB, free: 1.133 MB / 346.7 MB make -j1 -f Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.makefile (rm -f Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; mkfifo Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe ; head -c 1048576 < Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe >> ../files/Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.sim & ./Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge --alarm=480 -emit_protected > Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1) diffSimulationResults("Modelica_trunk_cpp_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_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches