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.0009649/0.0009649, allocations: 193.2 kB / 17.38 MB, free: 4.434 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.248/1.248, allocations: 226.6 MB / 244.7 MB, free: 6.488 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007042/0.0007044, allocations: 97.02 kB / 296.8 MB, free: 6.707 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002054/0.0002054, allocations: 8 kB / 356.7 MB, free: 10.72 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1945/0.1947, allocations: 51.29 MB / 408 MB, free: 27.72 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.004016/0.1988, allocations: 5.061 MB / 413.1 MB, free: 22.64 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.00298/0.2018, allocations: 2.56 MB / 415.7 MB, free: 20.09 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003937/0.2022, allocations: 19.94 kB / 415.7 MB, free: 20.07 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.001063/0.2033, allocations: 0.6966 MB / 416.4 MB, free: 19.37 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.0007004/0.204, allocations: 481.6 kB / 416.8 MB, free: 18.9 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0007907/0.2048, allocations: 389 kB / 417.2 MB, free: 18.53 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.001053/0.2059, allocations: 1.426 MB / 418.7 MB, free: 17.1 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005318/0.2064, allocations: 0.5162 MB / 419.2 MB, free: 16.55 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.000365/0.2068, allocations: 494.1 kB / 419.6 MB, free: 16.07 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0004622/0.2072, allocations: 0.6068 MB / 420.3 MB, free: 15.46 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001035/0.2074, allocations: 63.94 kB / 420.3 MB, free: 15.4 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002726/0.2076, allocations: 127.9 kB / 420.4 MB, free: 15.27 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0003213/0.208, allocations: 0.5608 MB / 421 MB, free: 14.71 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0004623/0.2084, allocations: 0.8017 MB / 421.8 MB, free: 13.9 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.001008/0.2095, allocations: 1.952 MB / 423.8 MB, free: 11.94 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.047e-06/0.2095, allocations: 4 kB / 423.8 MB, free: 11.94 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.362e-06/0.2095, allocations: 0 / 423.8 MB, free: 11.94 MB / 298.7 MB Notification: Performance of Transformations before backend: time 1.731e-05/0.2095, allocations: 0 / 423.8 MB, free: 11.94 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.003233/0.2127, allocations: 2.323 MB / 426.1 MB, free: 9.551 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.401e-05/0.2128, allocations: 8.031 kB / 426.1 MB, free: 9.543 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.000228/0.213, allocations: 226.2 kB / 426.3 MB, free: 9.32 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001633/0.2146, allocations: 1.523 MB / 427.8 MB, free: 7.727 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004559/0.2151, allocations: 188.2 kB / 428 MB, free: 7.535 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.341e-05/0.2152, allocations: 83.94 kB / 428.1 MB, free: 7.453 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001531/0.2168, allocations: 1.133 MB / 429.2 MB, free: 6.246 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.062e-05/0.2168, allocations: 4 kB / 429.2 MB, free: 6.242 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.772e-05/0.2169, allocations: 36 kB / 429.3 MB, free: 6.207 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.369e-05/0.2169, allocations: 20 kB / 429.3 MB, free: 6.188 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001207/0.2181, allocations: 0.7416 MB / 430 MB, free: 5.441 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00506/0.2232, allocations: 4.712 MB / 434.7 MB, free: 0.5586 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001338/0.2245, allocations: 0.9989 MB / 435.7 MB, free: 15.45 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008262/0.2254, allocations: 426 kB / 436.2 MB, free: 15.03 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 5.173e-05/0.2254, allocations: 8 kB / 436.2 MB, free: 15.02 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.062e-05/0.2255, allocations: 38.56 kB / 436.2 MB, free: 14.98 MB / 314.7 MB Notification: Performance of pre-optimization done (n=44): time 1.753e-06/0.2255, allocations: 0 / 436.2 MB, free: 14.98 MB / 314.7 MB Notification: Performance of matching and sorting (n=44): time 0.001939/0.2274, allocations: 0.9019 MB / 437.1 MB, free: 14.07 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.000178/0.2276, allocations: 431.1 kB / 437.5 MB, free: 13.55 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003111/0.2307, allocations: 2.755 MB / 440.3 MB, free: 10.75 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 5.145e-05/0.2308, allocations: 41.7 kB / 440.3 MB, free: 10.7 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0006551/0.2315, allocations: 0.8823 MB / 441.2 MB, free: 9.816 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001208/0.2316, allocations: 153.8 kB / 441.4 MB, free: 9.664 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.572e-05/0.2316, allocations: 11.94 kB / 441.4 MB, free: 9.652 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 0.0001059/0.2317, allocations: 334 kB / 441.7 MB, free: 9.32 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006317/0.2324, allocations: 281.1 kB / 442 MB, free: 9.047 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008091/0.2332, allocations: 0.5636 MB / 442.5 MB, free: 8.363 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001207/0.2344, allocations: 0.6679 MB / 443.2 MB, free: 7.617 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.239e-06/0.2344, allocations: 4 kB / 443.2 MB, free: 7.613 MB / 314.7 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001702/0.2361, allocations: 0.8999 MB / 444.1 MB, free: 6.707 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.114e-05/0.2362, allocations: 11.98 kB / 444.1 MB, free: 6.695 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.051e-05/0.2362, allocations: 8 kB / 444.1 MB, free: 6.688 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.972e-05/0.2362, allocations: 8.281 kB / 444.1 MB, free: 6.68 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006458/0.2369, allocations: 175.7 kB / 444.3 MB, free: 6.508 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.774e-05/0.2369, allocations: 23.8 kB / 444.3 MB, free: 6.484 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0009828/0.2379, allocations: 211.1 kB / 444.5 MB, free: 6.277 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.668e-05/0.2379, allocations: 32 kB / 444.6 MB, free: 6.246 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.0007209/0.2387, allocations: 0.5627 MB / 445.1 MB, free: 5.676 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002101/0.2389, allocations: 181.8 kB / 445.3 MB, free: 5.496 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001562/0.2405, allocations: 0.7509 MB / 446.1 MB, free: 4.734 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.096e-05/0.2405, allocations: 8 kB / 446.1 MB, free: 4.727 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.192e-06/0.2405, allocations: 3.938 kB / 446.1 MB, free: 4.723 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.823e-06/0.2405, allocations: 7.984 kB / 446.1 MB, free: 4.715 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003462/0.244, allocations: 2.195 MB / 448.3 MB, free: 2.445 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.828e-06/0.244, allocations: 0 / 448.3 MB, free: 2.445 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005294/0.2445, allocations: 123.9 kB / 448.4 MB, free: 2.324 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 8.095e-06/0.2445, allocations: 7.984 kB / 448.4 MB, free: 2.316 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.791e-05/0.2446, allocations: 12 kB / 448.4 MB, free: 2.305 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.981e-06/0.2446, allocations: 7.938 kB / 448.4 MB, free: 2.297 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.168e-06/0.2446, allocations: 0 / 448.4 MB, free: 2.297 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002005/0.2466, allocations: 1.132 MB / 449.6 MB, free: 1.137 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.000624/0.2473, allocations: 418.6 kB / 450 MB, free: 0.707 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001896/0.2475, allocations: 15.98 kB / 450 MB, free: 0.6914 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001022/0.2485, allocations: 199.8 kB / 450.2 MB, free: 0.4961 MB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003031/0.2488, allocations: 159.7 kB / 450.3 MB, free: 348 kB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.528e-05/0.2489, allocations: 23.92 kB / 450.4 MB, free: 324 kB / 314.7 MB Notification: Performance of sorting global known variables: time 0.0027/0.2516, allocations: 1.956 MB / 452.3 MB, free: 14.34 MB / 330.7 MB Notification: Performance of sort global known variables: time 6.31e-07/0.2516, allocations: 0 / 452.3 MB, free: 14.34 MB / 330.7 MB Notification: Performance of remove unused functions: time 0.0008573/0.2524, allocations: 319.1 kB / 452.6 MB, free: 14.03 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.001012/0.2535, allocations: 482.5 kB / 453.1 MB, free: 13.71 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.001463/0.2549, allocations: 0.6434 MB / 453.7 MB, free: 13.06 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 6.051e-06/0.255, allocations: 4.312 kB / 453.7 MB, free: 13.05 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0007912/0.2558, allocations: 375.6 kB / 454.1 MB, free: 12.69 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001474/0.2572, allocations: 309 kB / 454.4 MB, free: 12.38 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.005958/0.2632, allocations: 4.063 MB / 458.5 MB, free: 8.273 MB / 330.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001222/0.2645, allocations: 1.425 MB / 459.9 MB, free: 6.82 MB / 330.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000411/0.2649, allocations: 111.4 kB / 460 MB, free: 6.711 MB / 330.7 MB Notification: Performance of SimCode: time 6.81e-07/0.2649, allocations: 0 / 460 MB, free: 6.711 MB / 330.7 MB Notification: Performance of Templates: time 0.0334/0.2983, allocations: 22.84 MB / 482.8 MB, free: 15.94 MB / 362.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