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: "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009244/0.0009244, allocations: 93.8 kB / 16.31 MB, free: 5.57 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.001043/0.001043, allocations: 178.2 kB / 17.2 MB, free: 5.531 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.469/1.469, allocations: 223.2 MB / 241.2 MB, free: 324 kB / 190.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0002838/0.0002839, allocations: 8 kB / 300.9 MB, free: 6.352 MB / 238.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1321/0.1324, allocations: 50.42 MB / 351.3 MB, free: 3.922 MB / 286.1 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.00723/0.1397, allocations: 5.034 MB / 356.4 MB, free: 14.86 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.005019/0.1447, allocations: 2.39 MB / 358.8 MB, free: 12.46 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0007624/0.1455, allocations: 23.88 kB / 358.8 MB, free: 12.44 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.001684/0.1472, allocations: 0.6849 MB / 359.5 MB, free: 11.75 MB / 302.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/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.001065/0.1483, allocations: 453.7 kB / 359.9 MB, free: 11.31 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001088/0.1494, allocations: 382.1 kB / 360.3 MB, free: 10.94 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.001564/0.151, allocations: 1.395 MB / 361.7 MB, free: 9.543 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0006701/0.1517, allocations: 443.2 kB / 362.1 MB, free: 9.09 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0005716/0.1523, allocations: 490.1 kB / 362.6 MB, free: 8.609 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0007123/0.153, allocations: 0.6068 MB / 363.2 MB, free: 8 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.000125/0.1531, allocations: 56 kB / 363.2 MB, free: 7.945 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0003135/0.1534, allocations: 116 kB / 363.4 MB, free: 7.832 MB / 302.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0005402/0.154, allocations: 0.5647 MB / 363.9 MB, free: 7.266 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0003022/0.1543, allocations: 336.6 kB / 364.3 MB, free: 6.93 MB / 302.1 MB Notification: Performance of NFConvertDAE.convert: time 0.00185/0.1561, allocations: 1.952 MB / 366.2 MB, free: 4.973 MB / 302.1 MB Notification: Performance of FrontEnd - DAE generated: time 8.185e-06/0.1562, allocations: 0 / 366.2 MB, free: 4.973 MB / 302.1 MB Notification: Performance of FrontEnd: time 2.245e-06/0.1562, allocations: 0 / 366.2 MB, free: 4.973 MB / 302.1 MB Notification: Performance of Transformations before backend: time 3.646e-05/0.1562, allocations: 0 / 366.2 MB, free: 4.973 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.004573/0.1608, allocations: 2.327 MB / 368.5 MB, free: 2.586 MB / 302.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.985e-05/0.1609, allocations: 8.031 kB / 368.5 MB, free: 2.578 MB / 302.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.000223/0.1611, allocations: 139.3 kB / 368.7 MB, free: 2.434 MB / 302.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0003508/0.1615, allocations: 221.3 kB / 368.9 MB, free: 2.215 MB / 302.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002326/0.1638, allocations: 1.434 MB / 370.3 MB, free: 0.7383 MB / 302.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004981/0.1643, allocations: 183.6 kB / 370.5 MB, free: 0.5508 MB / 302.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001308/0.1644, allocations: 91.95 kB / 370.6 MB, free: 472 kB / 302.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.2548/0.4192, allocations: 1.125 MB / 371.7 MB, free: 23.05 MB / 302.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 2.67e-05/0.4193, allocations: 1.094 kB / 371.7 MB, free: 23.05 MB / 302.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001081/0.4194, allocations: 40.09 kB / 371.8 MB, free: 23.05 MB / 302.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 3.367e-05/0.4194, allocations: 21.16 kB / 371.8 MB, free: 23.05 MB / 302.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001743/0.4212, allocations: 0.7471 MB / 372.5 MB, free: 23.04 MB / 302.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.008473/0.4297, allocations: 4.711 MB / 377.2 MB, free: 20.91 MB / 302.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001407/0.4311, allocations: 1.004 MB / 378.2 MB, free: 20.21 MB / 302.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0008608/0.432, allocations: 419.2 kB / 378.7 MB, free: 20.09 MB / 302.1 MB Notification: Performance of preOpt evalFunc (simulation): time 6.006e-05/0.4321, allocations: 7.734 kB / 378.7 MB, free: 20.09 MB / 302.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.866e-05/0.4321, allocations: 47.25 kB / 378.7 MB, free: 20.04 MB / 302.1 MB Notification: Performance of pre-optimization done (n=44): time 2.455e-06/0.4321, allocations: 0 / 378.7 MB, free: 20.04 MB / 302.1 MB Notification: Performance of matching and sorting (n=44): time 0.002403/0.4345, allocations: 0.9051 MB / 379.6 MB, free: 19.71 MB / 302.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001344/0.4347, allocations: 427.3 kB / 380 MB, free: 19.21 MB / 302.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.004844/0.4395, allocations: 2.739 MB / 382.8 MB, free: 18.31 MB / 302.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001335/0.4397, allocations: 34.98 kB / 382.8 MB, free: 18.28 MB / 302.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007993/0.4405, allocations: 0.8764 MB / 383.7 MB, free: 17.6 MB / 302.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001472/0.4407, allocations: 158.9 kB / 383.8 MB, free: 17.48 MB / 302.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.293e-05/0.4407, allocations: 14.38 kB / 383.8 MB, free: 17.47 MB / 302.1 MB Notification: Performance of setup shared object (initialization): time 9.011e-05/0.4408, allocations: 332.5 kB / 384.2 MB, free: 17.15 MB / 302.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0007336/0.4415, allocations: 283 kB / 384.4 MB, free: 17.07 MB / 302.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0008579/0.4424, allocations: 0.5546 MB / 385 MB, free: 16.65 MB / 302.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.000717/0.4431, allocations: 309.6 kB / 385.3 MB, free: 16.54 MB / 302.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 7.664e-06/0.4431, allocations: 1.188 kB / 385.3 MB, free: 16.54 MB / 302.1 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001988/0.4451, allocations: 0.9068 MB / 386.2 MB, free: 16.18 MB / 302.1 MB Notification: Performance of prepare postOptimizeDAE: time 2.745e-05/0.4452, allocations: 7.25 kB / 386.2 MB, free: 16.18 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.394e-05/0.4452, allocations: 9.5 kB / 386.2 MB, free: 16.18 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.059e-05/0.4452, allocations: 13.72 kB / 386.2 MB, free: 16.18 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006621/0.4459, allocations: 178.1 kB / 386.4 MB, free: 16.16 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.65e-05/0.4459, allocations: 18.95 kB / 386.4 MB, free: 16.15 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001212/0.4472, allocations: 208.7 kB / 386.6 MB, free: 16.09 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.828e-05/0.4472, allocations: 27.95 kB / 386.7 MB, free: 16.09 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.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.0009127/0.4482, allocations: 0.5573 MB / 387.2 MB, free: 15.8 MB / 302.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002545/0.4484, allocations: 179.2 kB / 387.4 MB, free: 15.71 MB / 302.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001649/0.4501, allocations: 0.751 MB / 388.1 MB, free: 15.31 MB / 302.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.736e-06/0.4501, allocations: 4.688 kB / 388.2 MB, free: 15.31 MB / 302.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.312e-06/0.4501, allocations: 0 / 388.2 MB, free: 15.31 MB / 302.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.546e-06/0.4501, allocations: 7.938 kB / 388.2 MB, free: 15.3 MB / 302.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003345/0.4535, allocations: 2.186 MB / 390.3 MB, free: 13.87 MB / 302.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.517e-06/0.4535, allocations: 0 / 390.3 MB, free: 13.87 MB / 302.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0004899/0.454, allocations: 124.8 kB / 390.5 MB, free: 13.83 MB / 302.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 8.175e-06/0.454, allocations: 2.344 kB / 390.5 MB, free: 13.83 MB / 302.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.033e-05/0.454, allocations: 12.53 kB / 390.5 MB, free: 13.82 MB / 302.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.572e-06/0.4541, allocations: 14.53 kB / 390.5 MB, free: 13.82 MB / 302.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.904e-06/0.4541, allocations: 3.938 kB / 390.5 MB, free: 13.81 MB / 302.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00195/0.456, allocations: 1.128 MB / 391.6 MB, free: 13.17 MB / 302.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005711/0.4566, allocations: 419.8 kB / 392 MB, free: 12.86 MB / 302.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001676/0.4568, allocations: 18.86 kB / 392.1 MB, free: 12.85 MB / 302.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0009963/0.4578, allocations: 195.6 kB / 392.2 MB, free: 12.79 MB / 302.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003069/0.4581, allocations: 161.5 kB / 392.4 MB, free: 12.7 MB / 302.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.551e-05/0.4582, allocations: 21.17 kB / 392.4 MB, free: 12.69 MB / 302.1 MB Notification: Performance of sorting global known variables: time 0.002461/0.4606, allocations: 1.943 MB / 394.4 MB, free: 11.74 MB / 302.1 MB Notification: Performance of sort global known variables: time 1.4e-07/0.4606, allocations: 3.938 kB / 394.4 MB, free: 11.74 MB / 302.1 MB Notification: Performance of remove unused functions: time 0.0009294/0.4616, allocations: 302.7 kB / 394.7 MB, free: 11.69 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 (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.002867/0.4644, allocations: 2.065 MB / 396.7 MB, free: 9.992 MB / 302.1 MB Notification: Performance of simCode: created initialization part: time 0.001335/0.4658, allocations: 0.6429 MB / 397.4 MB, free: 9.348 MB / 302.1 MB Notification: Performance of simCode: created event and clocks part: time 5.861e-06/0.4658, allocations: 0 / 397.4 MB, free: 9.348 MB / 302.1 MB Notification: Performance of simCode: created simulation system equations: time 0.000647/0.4665, allocations: 388.7 kB / 397.8 MB, free: 8.969 MB / 302.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.001501/0.468, allocations: 308.6 kB / 398.1 MB, free: 8.668 MB / 302.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02236/0.4903, allocations: 13.2 MB / 411.3 MB, free: 10.7 MB / 318.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.001158/0.4915, allocations: 1.433 MB / 412.7 MB, free: 9.238 MB / 318.1 MB Notification: Performance of simCode: alias equations: time 0.001048/0.4926, allocations: 294.8 kB / 413 MB, free: 8.945 MB / 318.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0009382/0.4936, allocations: 0.6906 MB / 413.7 MB, free: 8.254 MB / 318.1 MB Notification: Performance of SimCode: time 1.042e-06/0.4936, allocations: 0 / 413.7 MB, free: 8.254 MB / 318.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.06742/0.561, allocations: 34.93 MB / 448.6 MB, free: 5.691 MB / 350.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0002346/0.5613, allocations: 243.9 kB / 448.8 MB, free: 5.449 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 3.222/3.783, allocations: 4 kB / 448.8 MB, free: 5.445 MB / 350.1 MB (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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.mat --tempDir=temp_Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge_fmu --startTime=0 --stopTime=3600 --timeout=50 --tolerance=1e-06 Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.mat does not exist to compare? outputFormat=mat