Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.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 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ElectricalEnergyStorage 3.2.2-master/package.mo", uses=false) Using package ElectricalEnergyStorage with version 3.2.2 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ElectricalEnergyStorage 3.2.2-master/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+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(ElectricalEnergyStorage.Examples.AdvancedStackCycling,tolerance=1e-06,outputFormat="empty",numberOfIntervals=40000,variableFilter="",fileNamePrefix="ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling") translateModel(ElectricalEnergyStorage.Examples.AdvancedStackCycling,tolerance=1e-06,outputFormat="empty",numberOfIntervals=40000,variableFilter="",fileNamePrefix="ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001094/0.001094, allocations: 116.2 kB / 16.42 MB, free: 6.492 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.001088/0.001089, allocations: 183.9 kB / 17.35 MB, free: 5.762 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.324/1.324, allocations: 205.1 MB / 223.2 MB, free: 12.24 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ElectricalEnergyStorage 3.2.2-master/package.mo): time 0.0474/0.0474, allocations: 7.045 MB / 277.6 MB, free: 4.969 MB / 222.1 MB Notification: Modelica requested package Complex of version 3.2.3. Complex 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Modelica requested package ModelicaServices of version 3.2.3. ModelicaServices 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: ElectricalEnergyStorage requested package Modelica of version 3.2.2. Modelica 3.2.3 is used instead which states that it is fully compatible without conversion script needed. Notification: Performance of FrontEnd - loaded program: time 0.001478/0.001478, allocations: 77.23 kB / 386 MB, free: 48.12 MB / 318.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1004/0.1019, allocations: 48.11 MB / 434.1 MB, free: 9.434 MB / 318.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Blocks/Math.mo:543:5-544:48:writable] Warning: Parameter cycler.vOut.gain.k has no value, and is fixed during initialization (fixed=true), using available start value (start=1) as default value. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Blocks/Math.mo:543:5-544:48:writable] Warning: Parameter cycler.iOut.gain.k has no value, and is fixed during initialization (fixed=true), using available start value (start=1) as default value. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/ElectricalEnergyStorage 3.2.2-master/package.mo:595:11-595:138:writable] Warning: Parameter batteryStack.SOCini has no value, and is fixed during initialization (fixed=true), using available start value (start=fill(0.5, ns, np)) as default value. Notification: Performance of NFInst.instantiate(ElectricalEnergyStorage.Examples.AdvancedStackCycling): time 0.01013/0.1121, allocations: 10.64 MB / 444.7 MB, free: 14.74 MB / 334.1 MB Notification: Performance of NFInst.instExpressions: time 0.009751/0.1219, allocations: 5.803 MB / 450.5 MB, free: 8.914 MB / 334.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.002422/0.1243, allocations: 55.88 kB / 450.6 MB, free: 8.859 MB / 334.1 MB Notification: Performance of NFTyping.typeComponents: time 0.003407/0.1278, allocations: 1.473 MB / 452 MB, free: 7.379 MB / 334.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/Utilities/Strings.mo:139:3-175:14:writable] Warning: Pure function 'Modelica.Utilities.Strings.isEmpty' contains a call to impure function 'Modelica.Utilities.Strings.Advanced.skipWhiteSpace'. Notification: Performance of NFTyping.typeBindings: time 0.00244/0.1302, allocations: 0.5928 MB / 452.6 MB, free: 6.781 MB / 334.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.002547/0.1328, allocations: 1.214 MB / 453.9 MB, free: 5.566 MB / 334.1 MB Notification: Performance of NFFlatten.flatten: time 0.01262/0.1454, allocations: 10.65 MB / 464.5 MB, free: 10.89 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.009758/0.1552, allocations: 7.486 MB / 472 MB, free: 3.309 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.00514/0.1604, allocations: 3.728 MB / 475.7 MB, free: 15.57 MB / 366.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.005586/0.166, allocations: 3.674 MB / 479.4 MB, free: 11.88 MB / 366.1 MB Notification: Performance of NFPackage.collectConstants: time 0.003042/0.1691, allocations: 1.281 MB / 480.7 MB, free: 10.6 MB / 366.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.003064/0.1722, allocations: 1.324 MB / 482 MB, free: 9.277 MB / 366.1 MB Notification: Performance of NFScalarize.scalarize: time 0.003712/0.1759, allocations: 2.526 MB / 484.5 MB, free: 6.746 MB / 366.1 MB Notification: Performance of NFVerifyModel.verify: time 0.009137/0.185, allocations: 4.685 MB / 489.2 MB, free: 2.043 MB / 366.1 MB Notification: Performance of NFConvertDAE.convert: time 0.01742/0.2025, allocations: 17.52 MB / 0.4948 GB, free: 496 kB / 382.1 MB Notification: Performance of FrontEnd - DAE generated: time 9.848e-06/0.2025, allocations: 4 kB / 0.4948 GB, free: 492 kB / 382.1 MB Notification: Performance of FrontEnd: time 1.834e-06/0.2026, allocations: 0 / 0.4948 GB, free: 492 kB / 382.1 MB Notification: Performance of Transformations before backend: time 0.0004766/0.203, allocations: 0 / 0.4948 GB, free: 492 kB / 382.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1082 * Number of variables: 1082 Notification: Performance of Generate backend data structure: time 0.0265/0.2295, allocations: 9.205 MB / 0.5038 GB, free: 7.184 MB / 398.1 MB Notification: Performance of prepare preOptimizeDAE: time 5.867e-05/0.2296, allocations: 11.97 kB / 0.5038 GB, free: 7.172 MB / 398.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.002137/0.2318, allocations: 0.7301 MB / 0.5046 GB, free: 6.434 MB / 398.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.02065/0.2524, allocations: 8.487 MB / 0.5128 GB, free: 13.87 MB / 414.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0003772/0.2529, allocations: 360.8 kB / 0.5132 GB, free: 13.52 MB / 414.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.002174/0.255, allocations: 435.9 kB / 0.5136 GB, free: 13.09 MB / 414.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.01574/0.2708, allocations: 7.582 MB / 0.521 GB, free: 5.289 MB / 414.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 8.949e-05/0.2709, allocations: 7.938 kB / 0.521 GB, free: 5.281 MB / 414.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0005603/0.2715, allocations: 176 kB / 0.5212 GB, free: 5.109 MB / 414.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0001484/0.2717, allocations: 152.1 kB / 0.5213 GB, free: 4.957 MB / 414.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.2761/0.5478, allocations: 6.511 MB / 0.5277 GB, free: 79.56 MB / 414.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.04533/0.5932, allocations: 31.12 MB / 0.5581 GB, free: 60.32 MB / 414.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.006746/0.6, allocations: 8.368 MB / 0.5663 GB, free: 52.58 MB / 414.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.003131/0.6031, allocations: 2.488 MB / 0.5687 GB, free: 50.1 MB / 414.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001026/0.6033, allocations: 29.91 kB / 0.5687 GB, free: 50.07 MB / 414.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.002437/0.6057, allocations: 2.168 MB / 0.5708 GB, free: 47.87 MB / 414.1 MB Notification: Performance of pre-optimization done (n=203): time 5.27e-06/0.6057, allocations: 4 kB / 0.5708 GB, free: 47.87 MB / 414.1 MB Notification: Performance of matching and sorting (n=203): time 0.01094/0.6167, allocations: 6.505 MB / 0.5772 GB, free: 41.33 MB / 414.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001029/0.6168, allocations: 393.7 kB / 0.5776 GB, free: 40.86 MB / 414.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.01469/0.6315, allocations: 10.83 MB / 0.5881 GB, free: 30.01 MB / 414.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0006683/0.6322, allocations: 73.7 kB / 0.5882 GB, free: 29.93 MB / 414.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.003081/0.6353, allocations: 3.047 MB / 0.5912 GB, free: 26.88 MB / 414.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0008527/0.6361, allocations: 0.7039 MB / 0.5919 GB, free: 26.18 MB / 414.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0008635/0.637, allocations: 0.567 MB / 0.5924 GB, free: 25.61 MB / 414.1 MB Notification: Performance of setup shared object (initialization): time 5.084e-05/0.6371, allocations: 305.1 kB / 0.5927 GB, free: 25.31 MB / 414.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.002456/0.6395, allocations: 1.981 MB / 0.5947 GB, free: 23.32 MB / 414.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.002679/0.6422, allocations: 2.769 MB / 0.5974 GB, free: 20.26 MB / 414.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.01643/0.6587, allocations: 9.429 MB / 0.6066 GB, free: 10.59 MB / 414.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.059e-05/0.6587, allocations: 4 kB / 0.6066 GB, free: 10.59 MB / 414.1 MB Notification: Performance of matching and sorting (n=331) (initialization): time 0.008645/0.6674, allocations: 5.518 MB / 0.612 GB, free: 5.051 MB / 414.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.007e-05/0.6674, allocations: 23.5 kB / 0.612 GB, free: 5.031 MB / 414.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.966e-05/0.6674, allocations: 24 kB / 0.612 GB, free: 5.008 MB / 414.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0009935/0.6684, allocations: 471.9 kB / 0.6125 GB, free: 4.547 MB / 414.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002114/0.6706, allocations: 0.6512 MB / 0.6131 GB, free: 3.895 MB / 414.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.005226/0.6758, allocations: 4.865 MB / 0.6178 GB, free: 14.88 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.003614/0.6794, allocations: 480.7 kB / 0.6183 GB, free: 14.41 MB / 430.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0002715/0.6797, allocations: 104 kB / 0.6184 GB, free: 14.3 MB / 430.1 MB Warning: Assuming fixed start value for the following 3 variables: batteryStack.cell[3,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.variableCapacitor.Q:VARIABLE(unit = "C" fixed = true ) type: Real [3,1,1] batteryStack.cell[2,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.variableCapacitor.Q:VARIABLE(unit = "C" fixed = true ) type: Real [3,1,1] batteryStack.cell[1,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.variableCapacitor.Q:VARIABLE(unit = "C" fixed = true ) type: Real [3,1,1] Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 82 * Number of states: 0 () * Number of discrete variables: 52 ($PRE.cycler.chargingFinished.fallingEdge.not_u,$PRE.cycler.cycling.edge1.u,$PRE.cycler.cycling.BeforeChargingDelay.timer.entryTime,$PRE.cycler.cycling.BeforeChargingDelay.rSFlipFlop.pre.u,$PRE.cycler.cycling.AfterChargingDelay.timer.entryTime,$PRE.cycler.cycling.AfterChargingDelay.rSFlipFlop.pre.u,$PRE.cycler.cycling.rSFlipFlop.pre.u,cycler.chargingFinished.fallingEdge.not_u,cycler.chargingFinished.fallingEdge.y,cycler.chargingFinished.GraterEqualVmax.y,cycler.cycling.or1.y,cycler.cycling.greaterThreshold.y,cycler.cycling.edge1.y,cycler.cycling.edge1.u,cycler.cycling.BeforeChargingDelay.greaterThreshold.y,cycler.cycling.BeforeChargingDelay.timer.entryTime,cycler.cycling.BeforeChargingDelay.rSFlipFlop.pre.u,cycler.cycling.BeforeChargingDelay.rSFlipFlop.QI,cycler.cycling.BeforeChargingDelay.u,cycler.cycling.AfterChargingDelay.greaterThreshold.y,cycler.cycling.AfterChargingDelay.timer.entryTime,cycler.cycling.AfterChargingDelay.rSFlipFlop.pre.u,cycler.cycling.AfterChargingDelay.rSFlipFlop.QI,cycler.cycling.AfterChargingDelay.u,cycler.cycling.lessVinMin.y,cycler.cycling.rSFlipFlop.pre.u,cycler.Charging,cycler.Discharging,$whenCondition1,$whenCondition2,batteryStack.cell[3,1].linearDynamicImpedance.selfDischarge.qabs.absInt.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.cellImpedance.rs.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].resistor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.calculator.EquivalentCycles.integrator.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.calculator.q.absInt.local_reset,batteryStack.cell[3,1].linearDynamicImpedance.calculator.sOC.integrator.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.selfDischarge.qabs.absInt.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.cellImpedance.rs.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].resistor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.calculator.EquivalentCycles.integrator.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.calculator.q.absInt.local_reset,batteryStack.cell[2,1].linearDynamicImpedance.calculator.sOC.integrator.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.selfDischarge.qabs.absInt.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.cellImpedance.rs.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].resistor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.cellImpedance.rcseriesLinear.rclinear[1].capacitor.impedanceValue.qabs.absInt.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.calculator.EquivalentCycles.integrator.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.calculator.q.absInt.local_reset,batteryStack.cell[1,1].linearDynamicImpedance.calculator.sOC.integrator.local_reset,charger.controlledCurrent.limitedController.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (302): * Single equations (assignments): 301 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(3,27)} Notification: Performance of prepare postOptimizeDAE: time 0.006211/0.6859, allocations: 3.936 MB / 0.6222 GB, free: 10.36 MB / 430.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.001929/0.6879, allocations: 0.5091 MB / 0.6227 GB, free: 9.848 MB / 430.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.00861/0.6965, allocations: 4.641 MB / 0.6273 GB, free: 5.191 MB / 430.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.943e-05/0.6965, allocations: 7.969 kB / 0.6273 GB, free: 5.184 MB / 430.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.17e-06/0.6966, allocations: 0 / 0.6273 GB, free: 5.184 MB / 430.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.00521/0.7018, allocations: 1.791 MB / 0.629 GB, free: 3.367 MB / 430.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.001254/0.703, allocations: 87.97 kB / 0.6291 GB, free: 3.281 MB / 430.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001894/0.7049, allocations: 247.6 kB / 0.6293 GB, free: 3.039 MB / 430.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0003852/0.7053, allocations: 141.8 kB / 0.6295 GB, free: 2.902 MB / 430.1 MB Notification: Performance of postOpt createDAEmodeBDAE (simulation): time 0.009011/0.7144, allocations: 5.02 MB / 0.6344 GB, free: 13.91 MB / 446.1 MB Notification: Performance of postOpt symbolicJacobianDAE (simulation): time 0.01068/0.7251, allocations: 7.158 MB / 0.6414 GB, free: 6.727 MB / 446.1 MB Notification: Performance of postOpt setEvaluationStage (simulation): time 0.002683/0.7278, allocations: 2.007 MB / 0.6433 GB, free: 4.719 MB / 446.1 MB Notification: Performance of sorting global known variables: time 0.0143/0.7421, allocations: 7.656 MB / 0.6508 GB, free: 13.06 MB / 462.1 MB Notification: Performance of Backend: time 9.72e-07/0.7421, allocations: 4 kB / 0.6508 GB, free: 13.05 MB / 462.1 MB Notification: Performance of simCode: created initialization part: time 0.009973/0.7521, allocations: 3.428 MB / 0.6542 GB, free: 9.633 MB / 462.1 MB Notification: Performance of SimCode: time 0.02963/0.7818, allocations: 16.2 MB / 0.67 GB, free: 9.395 MB / 478.1 MB Notification: Performance of Templates: time 0.3595/1.141, allocations: 90.96 MB / 0.7588 GB, free: 166.4 MB / 0.5137 GB make -j1 -f ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.makefile (rm -f ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.pipe ; mkfifo ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.pipe ; head -c 1048576 < ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.pipe >> ../files/ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.sim & ./ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling -abortSlowSimulation -alarm=480 -lv LOG_STATS > ElectricalEnergyStorage_ElectricalEnergyStorage.Examples.AdvancedStackCycling.pipe 2>&1)