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: "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_trunk_cpp_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge,fileNamePrefix="Modelica_trunk_cpp_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.0009378/0.0009421, allocations: 199 kB / 17.38 MB, free: 4.43 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.237/1.237, allocations: 226.5 MB / 244.7 MB, free: 6.496 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0007796/0.0007797, allocations: 100.2 kB / 296.7 MB, free: 6.691 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002993/0.0002998, allocations: 4 kB / 356.8 MB, free: 10.61 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2104/0.2107, allocations: 51.29 MB / 408.1 MB, free: 27.69 MB / 298.7 MB Notification: Performance of NFInst.instantiate(Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge): time 0.003997/0.2148, allocations: 5.063 MB / 413.2 MB, free: 22.61 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.003131/0.2179, allocations: 2.556 MB / 415.7 MB, free: 20.07 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003558/0.2183, allocations: 19.94 kB / 415.8 MB, free: 20.05 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.001045/0.2194, allocations: 0.7005 MB / 416.5 MB, free: 19.34 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.0006494/0.22, allocations: 489.6 kB / 416.9 MB, free: 18.86 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0007629/0.2208, allocations: 375.9 kB / 417.3 MB, free: 18.5 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.000979/0.2218, allocations: 1.43 MB / 418.7 MB, free: 17.07 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000503/0.2223, allocations: 0.5162 MB / 419.3 MB, free: 16.53 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003591/0.2227, allocations: 494 kB / 419.7 MB, free: 16.04 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.000433/0.2231, allocations: 0.603 MB / 420.3 MB, free: 15.44 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 0.0001012/0.2232, allocations: 60 kB / 420.4 MB, free: 15.38 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002481/0.2235, allocations: 127.9 kB / 420.5 MB, free: 15.25 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0003168/0.2238, allocations: 0.5608 MB / 421.1 MB, free: 14.69 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0004713/0.2243, allocations: 0.7978 MB / 421.9 MB, free: 13.88 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.001006/0.2253, allocations: 1.952 MB / 423.8 MB, free: 11.93 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.328e-06/0.2253, allocations: 7.984 kB / 423.8 MB, free: 11.92 MB / 298.7 MB Notification: Performance of FrontEnd: time 1.333e-06/0.2253, allocations: 0 / 423.8 MB, free: 11.92 MB / 298.7 MB Notification: Performance of Transformations before backend: time 1.598e-05/0.2253, allocations: 4 kB / 423.8 MB, free: 11.91 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.00331/0.2287, allocations: 2.319 MB / 426.2 MB, free: 9.531 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.933e-05/0.2287, allocations: 12.02 kB / 426.2 MB, free: 9.52 MB / 298.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001372/0.2288, allocations: 139.5 kB / 426.3 MB, free: 9.375 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002223/0.2291, allocations: 222.2 kB / 426.5 MB, free: 9.156 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001626/0.2307, allocations: 1.527 MB / 428.1 MB, free: 7.559 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004528/0.2312, allocations: 191.9 kB / 428.2 MB, free: 7.363 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.386e-05/0.2313, allocations: 84 kB / 428.3 MB, free: 7.281 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001589/0.2329, allocations: 1.125 MB / 429.5 MB, free: 6.082 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.905e-05/0.2329, allocations: 0 / 429.5 MB, free: 6.082 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.422e-05/0.233, allocations: 40 kB / 429.5 MB, free: 6.043 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.599e-05/0.233, allocations: 20 kB / 429.5 MB, free: 6.023 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001205/0.2342, allocations: 0.7455 MB / 430.3 MB, free: 5.273 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005115/0.2393, allocations: 4.716 MB / 435 MB, free: 396 kB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001372/0.2407, allocations: 0.9994 MB / 436 MB, free: 15.29 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0009445/0.2417, allocations: 418 kB / 436.4 MB, free: 14.87 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 6.976e-05/0.2418, allocations: 7.984 kB / 436.4 MB, free: 14.86 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.766e-05/0.2418, allocations: 46.56 kB / 436.4 MB, free: 14.81 MB / 314.7 MB Notification: Performance of pre-optimization done (n=44): time 2.595e-06/0.2418, allocations: 0 / 436.4 MB, free: 14.81 MB / 314.7 MB Notification: Performance of matching and sorting (n=44): time 0.002385/0.2442, allocations: 0.898 MB / 437.3 MB, free: 13.9 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001931/0.2444, allocations: 431.2 kB / 437.8 MB, free: 13.38 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.003784/0.2482, allocations: 2.759 MB / 440.5 MB, free: 10.58 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 6.407e-05/0.2483, allocations: 37.64 kB / 440.6 MB, free: 10.54 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0007929/0.2491, allocations: 0.8824 MB / 441.4 MB, free: 9.648 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.000122/0.2492, allocations: 157.8 kB / 441.6 MB, free: 9.492 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.479e-05/0.2493, allocations: 12 kB / 441.6 MB, free: 9.48 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 0.0001082/0.2494, allocations: 330 kB / 441.9 MB, free: 9.152 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006354/0.25, allocations: 285.1 kB / 442.2 MB, free: 8.875 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007963/0.2508, allocations: 0.5597 MB / 442.8 MB, free: 8.195 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001201/0.252, allocations: 0.6757 MB / 443.4 MB, free: 7.441 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.607e-06/0.2521, allocations: 0 / 443.4 MB, free: 7.441 MB / 314.7 MB Notification: Performance of matching and sorting (n=76) (initialization): time 0.001689/0.2538, allocations: 0.9077 MB / 444.3 MB, free: 6.523 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 1.764e-05/0.2538, allocations: 10.81 kB / 444.4 MB, free: 6.516 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.816e-06/0.2538, allocations: 4 kB / 444.4 MB, free: 6.512 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.831e-05/0.2538, allocations: 16.28 kB / 444.4 MB, free: 6.496 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006289/0.2545, allocations: 179.7 kB / 444.5 MB, free: 6.32 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.681e-05/0.2545, allocations: 15.94 kB / 444.6 MB, free: 6.305 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001021/0.2555, allocations: 211.1 kB / 444.8 MB, free: 6.098 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.083e-05/0.2556, allocations: 28 kB / 444.8 MB, free: 6.07 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.0007001/0.2563, allocations: 0.5623 MB / 445.4 MB, free: 5.5 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002109/0.2565, allocations: 181.8 kB / 445.5 MB, free: 5.32 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001539/0.258, allocations: 0.7509 MB / 446.3 MB, free: 4.559 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.826e-06/0.2581, allocations: 7.938 kB / 446.3 MB, free: 4.551 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.757e-06/0.2581, allocations: 4 kB / 446.3 MB, free: 4.547 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.444e-06/0.2581, allocations: 3.984 kB / 446.3 MB, free: 4.543 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.003312/0.2614, allocations: 2.195 MB / 448.5 MB, free: 2.273 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.529e-06/0.2614, allocations: 4 kB / 448.5 MB, free: 2.27 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0005517/0.262, allocations: 127.9 kB / 448.6 MB, free: 2.145 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 5.28e-06/0.262, allocations: 7.938 kB / 448.6 MB, free: 2.137 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.857e-05/0.262, allocations: 11.98 kB / 448.6 MB, free: 2.125 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 4.969e-06/0.2621, allocations: 4 kB / 448.7 MB, free: 2.121 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.413e-06/0.2621, allocations: 0 / 448.7 MB, free: 2.121 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.002027/0.2641, allocations: 1.128 MB / 449.8 MB, free: 0.9648 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0006099/0.2647, allocations: 422.6 kB / 450.2 MB, free: 0.5312 MB / 314.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.000155/0.2649, allocations: 15.94 kB / 450.2 MB, free: 0.5156 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001086/0.266, allocations: 199.8 kB / 450.4 MB, free: 328 kB / 314.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003312/0.2663, allocations: 163.7 kB / 450.6 MB, free: 164 kB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.475e-05/0.2664, allocations: 19.98 kB / 450.6 MB, free: 144 kB / 314.7 MB Notification: Performance of sorting global known variables: time 0.002432/0.2688, allocations: 1.956 MB / 452.5 MB, free: 14.16 MB / 330.7 MB Notification: Performance of sort global known variables: time 1.61e-07/0.2688, allocations: 0 / 452.5 MB, free: 14.16 MB / 330.7 MB Notification: Performance of remove unused functions: time 0.0008098/0.2696, allocations: 323.1 kB / 452.9 MB, free: 13.84 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.003135/0.2728, allocations: 2.04 MB / 454.9 MB, free: 11.93 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.001378/0.2742, allocations: 0.6399 MB / 455.5 MB, free: 11.29 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 6.172e-06/0.2742, allocations: 8.25 kB / 455.5 MB, free: 11.28 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0007364/0.2749, allocations: 383.3 kB / 455.9 MB, free: 10.91 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.00144/0.2764, allocations: 298.8 kB / 456.2 MB, free: 10.61 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02075/0.2971, allocations: 13.35 MB / 469.6 MB, free: 12.48 MB / 346.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0009726/0.2981, allocations: 1.433 MB / 471 MB, free: 11.02 MB / 346.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0008829/0.299, allocations: 0.7101 MB / 471.7 MB, free: 10.3 MB / 346.7 MB Notification: Performance of SimCode: time 8.72e-07/0.299, allocations: 0 / 471.7 MB, free: 10.3 MB / 346.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 4.482/4.781, allocations: 29.57 MB / 0.4895 GB, free: 12.68 MB / 378.7 MB (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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge_res.mat --tempDir=temp_Modelica_trunk_cpp_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge_fmu --startTime=0 --stopTime=3600 --timeout=50 --tolerance=1e-06 Modelica_trunk_cpp_Modelica_Electrical_Batteries_Examples_BatteryDischargeCharge.fmu > Modelica_trunk_cpp_Modelica.Electrical.Batteries.Examples.BatteryDischargeCharge.pipe 2>&1)