Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_trunk_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.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.CCCV_StackRC,fileNamePrefix="Modelica_trunk_Modelica_Electrical_Batteries_Examples_CCCV_StackRC",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Modelica.Electrical.Batteries.Examples.CCCV_StackRC,fileNamePrefix="Modelica_trunk_Modelica_Electrical_Batteries_Examples_CCCV_StackRC",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex trunk/package.mo): time 0.001169/0.001169, allocations: 198.7 kB / 17.08 MB, free: 5.082 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/package.mo): time 1.29/1.29, allocations: 227.2 MB / 245 MB, free: 7.605 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices trunk/package.mo): time 0.0008183/0.0008183, allocations: 95.59 kB / 297.2 MB, free: 6.188 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002095/0.0002096, allocations: 4 kB / 358 MB, free: 9.445 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1945/0.1947, allocations: 51.48 MB / 409.5 MB, free: 26.61 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1026/0.2973, allocations: 95.27 MB / 0.4929 GB, free: 11.19 MB / 378.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002297/0.2976, allocations: 81.78 kB / 0.493 GB, free: 11.11 MB / 378.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/ParameterRecords/TransientData/CellData.mo:8:3-11:59:writable] Notification: Moving binding to initial equation section and setting fixed attribute of rcData[2].R to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/ParameterRecords/TransientData/CellData.mo:8:3-11:59:writable] Notification: Moving binding to initial equation section and setting fixed attribute of rcData[2].C to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/ParameterRecords/TransientData/CellData.mo:8:3-11:59:writable] Notification: Moving binding to initial equation section and setting fixed attribute of rcData[1].R to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/ParameterRecords/TransientData/CellData.mo:8:3-11:59:writable] Notification: Moving binding to initial equation section and setting fixed attribute of rcData[1].C to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/BaseClasses/BaseStackData.mo:13:3-17:109:writable] Notification: Moving binding to initial equation section and setting fixed attribute of cellData[1,1].Qnom to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/BaseClasses/BaseStackData.mo:13:3-17:109:writable] Notification: Moving binding to initial equation section and setting fixed attribute of cellData[1,1].OCVmax to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/BaseClasses/BaseStackData.mo:13:3-17:109:writable] Notification: Moving binding to initial equation section and setting fixed attribute of cellData[1,1].OCVmin to false. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica trunk/Electrical/Batteries/BaseClasses/BaseStackData.mo:13:3-17:109:writable] Notification: Moving binding to initial equation section and setting fixed attribute of cellData[1,1].Ri to false. Notification: Performance of FrontEnd - DAE generated: time 0.8451/1.143, allocations: 279.7 MB / 0.7662 GB, free: 59.76 MB / 442.7 MB Notification: Performance of FrontEnd: time 2.094e-06/1.143, allocations: 0 / 0.7662 GB, free: 59.76 MB / 442.7 MB Notification: Performance of Transformations before backend: time 0.003324/1.146, allocations: 263.9 kB / 0.7664 GB, free: 59.5 MB / 442.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1013 * Number of variables: 1013 Notification: Performance of Generate backend data structure: time 0.03729/1.183, allocations: 18.82 MB / 0.7848 GB, free: 40.54 MB / 442.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.894e-05/1.183, allocations: 16.03 kB / 0.7848 GB, free: 40.52 MB / 442.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.002006/1.185, allocations: 0.6054 MB / 0.7854 GB, free: 39.91 MB / 442.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.003673/1.189, allocations: 1.755 MB / 0.7871 GB, free: 38.13 MB / 442.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.03861/1.228, allocations: 25.61 MB / 0.8121 GB, free: 12.42 MB / 442.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0002808/1.228, allocations: 387.7 kB / 0.8125 GB, free: 12.04 MB / 442.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0005457/1.229, allocations: 395.9 kB / 0.8129 GB, free: 11.65 MB / 442.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.01004/1.239, allocations: 8.15 MB / 0.8208 GB, free: 3.242 MB / 442.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 6.42e-05/1.239, allocations: 3.938 kB / 0.8208 GB, free: 3.238 MB / 442.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0004518/1.239, allocations: 180 kB / 0.821 GB, free: 3.062 MB / 442.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.361e-05/1.239, allocations: 99.98 kB / 0.8211 GB, free: 2.965 MB / 442.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.009154/1.248, allocations: 6.588 MB / 0.8275 GB, free: 12.37 MB / 458.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.2584/1.507, allocations: 34.75 MB / 0.8615 GB, free: 65.75 MB / 458.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.008817/1.516, allocations: 6.086 MB / 0.8674 GB, free: 65.66 MB / 458.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.0001339/1.516, allocations: 26.69 kB / 0.8674 GB, free: 65.66 MB / 458.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 7.653e-05/1.516, allocations: 79.16 kB / 0.8675 GB, free: 65.62 MB / 458.7 MB Notification: Performance of pre-optimization done (n=231): time 4.799e-06/1.516, allocations: 0 / 0.8675 GB, free: 65.62 MB / 458.7 MB Notification: Performance of matching and sorting (n=231): time 0.03254/1.549, allocations: 15.1 MB / 0.8822 GB, free: 65.17 MB / 458.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002524/1.549, allocations: 1.294 MB / 0.8835 GB, free: 63.61 MB / 458.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.04783/1.597, allocations: 28.44 MB / 0.9113 GB, free: 62.18 MB / 458.7 MB Notification: Performance of collectPreVariables (initialization): time 0.0006809/1.597, allocations: 83.39 kB / 0.9114 GB, free: 62.11 MB / 458.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.009964/1.607, allocations: 8.267 MB / 0.9194 GB, free: 55.97 MB / 458.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.001159/1.609, allocations: 0.8121 MB / 0.9202 GB, free: 55.45 MB / 458.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002819/1.609, allocations: 57.81 kB / 0.9203 GB, free: 55.41 MB / 458.7 MB Notification: Performance of setup shared object (initialization): time 0.0001669/1.609, allocations: 425.9 kB / 0.9207 GB, free: 55.06 MB / 458.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.004113/1.613, allocations: 2.961 MB / 0.9236 GB, free: 54.36 MB / 458.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.004543/1.618, allocations: 3.994 MB / 0.9275 GB, free: 52.58 MB / 458.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.004324/1.622, allocations: 3.368 MB / 0.9308 GB, free: 51.66 MB / 458.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.166e-05/1.622, allocations: 3.875 kB / 0.9308 GB, free: 51.66 MB / 458.7 MB Notification: Performance of matching and sorting (n=348) (initialization): time 0.01365/1.636, allocations: 8.829 MB / 0.9394 GB, free: 44.39 MB / 458.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.39e-05/1.636, allocations: 8 kB / 0.9394 GB, free: 44.39 MB / 458.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.16e-05/1.636, allocations: 16 kB / 0.9394 GB, free: 44.37 MB / 458.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002553/1.638, allocations: 1.207 MB / 0.9406 GB, free: 43.38 MB / 458.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.002481/1.641, allocations: 0.8792 MB / 0.9415 GB, free: 42.77 MB / 458.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01236/1.653, allocations: 13.07 MB / 0.9542 GB, free: 31.49 MB / 458.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.006284/1.66, allocations: 0.8957 MB / 0.9551 GB, free: 30.94 MB / 458.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000254/1.66, allocations: 96 kB / 0.9552 GB, free: 30.85 MB / 458.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 70 * Number of states: 0 () * Number of discrete variables: 14 (cccvCharger.CV,energy.local_reset,stack.cell[3,2].limIntegrator.local_reset,stack.cell[3,2].cell.limIntegrator.local_reset,stack.cell[3,1].limIntegrator.local_reset,stack.cell[3,1].cell.limIntegrator.local_reset,stack.cell[2,2].limIntegrator.local_reset,stack.cell[2,2].cell.limIntegrator.local_reset,stack.cell[2,1].limIntegrator.local_reset,stack.cell[2,1].cell.limIntegrator.local_reset,stack.cell[1,2].limIntegrator.local_reset,stack.cell[1,2].cell.limIntegrator.local_reset,stack.cell[1,1].limIntegrator.local_reset,stack.cell[1,1].cell.limIntegrator.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (266): * Single equations (assignments): 265 * 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: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {3 80} Notification: Performance of prepare postOptimizeDAE: time 0.01051/1.67, allocations: 9.161 MB / 0.9641 GB, free: 23.29 MB / 458.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.003266/1.674, allocations: 1.562 MB / 0.9657 GB, free: 21.71 MB / 458.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.01382/1.687, allocations: 8.191 MB / 0.9737 GB, free: 15 MB / 458.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.296e-05/1.688, allocations: 25.69 kB / 0.9737 GB, free: 14.97 MB / 458.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.138e-06/1.688, allocations: 3.281 kB / 0.9737 GB, free: 14.97 MB / 458.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.867e-05/1.688, allocations: 16.42 kB / 0.9737 GB, free: 14.97 MB / 458.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.01891/1.706, allocations: 11.63 MB / 0.9851 GB, free: 4.426 MB / 458.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.219e-05/1.707, allocations: 0 / 0.9851 GB, free: 4.426 MB / 458.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.002455/1.709, allocations: 0.7134 MB / 0.9858 GB, free: 3.734 MB / 458.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.002348/1.711, allocations: 1.177 MB / 0.9869 GB, free: 2.566 MB / 458.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0002612/1.712, allocations: 75.97 kB / 0.987 GB, free: 2.492 MB / 458.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01571/1.727, allocations: 12.98 MB / 0.9996 GB, free: 5.48 MB / 474.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.634e-06/1.727, allocations: 0 / 0.9996 GB, free: 5.48 MB / 474.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0184/1.746, allocations: 10.91 MB / 1.01 GB, free: 10.57 MB / 490.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.01363/1.759, allocations: 7.488 MB / 1.018 GB, free: 2.406 MB / 490.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.002167/1.762, allocations: 91.22 kB / 1.018 GB, free: 2.32 MB / 490.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.004492/1.766, allocations: 0.96 MB / 1.019 GB, free: 1.379 MB / 490.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0008995/1.767, allocations: 493.9 kB / 1.019 GB, free: 0.9023 MB / 490.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001827/1.767, allocations: 60 kB / 1.019 GB, free: 0.8438 MB / 490.7 MB Notification: Performance of sorting global known variables: time 0.2412/2.008, allocations: 22.19 MB / 1.041 GB, free: 97.99 MB / 490.7 MB Notification: Performance of sort global known variables: time 6.41e-07/2.008, allocations: 0 / 1.041 GB, free: 97.99 MB / 490.7 MB Notification: Performance of remove unused functions: time 0.007902/2.016, allocations: 2.019 MB / 1.043 GB, free: 97.99 MB / 490.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 25 (stack.cell[1,1].cell.limIntegrator.y,stack.cell[1,1].cell.capacitor[1].v,stack.cell[1,1].cell.capacitor[2].v,stack.cell[1,1].limIntegrator.y,stack.cell[1,2].cell.limIntegrator.y,stack.cell[1,2].cell.capacitor[1].v,stack.cell[1,2].cell.capacitor[2].v,stack.cell[1,2].limIntegrator.y,stack.cell[2,1].cell.limIntegrator.y,stack.cell[2,1].cell.capacitor[1].v,stack.cell[2,1].cell.capacitor[2].v,stack.cell[2,1].limIntegrator.y,stack.cell[2,2].cell.limIntegrator.y,stack.cell[2,2].cell.capacitor[1].v,stack.cell[2,2].cell.capacitor[2].v,stack.cell[2,2].limIntegrator.y,stack.cell[3,1].cell.limIntegrator.y,stack.cell[3,1].cell.capacitor[1].v,stack.cell[3,1].cell.capacitor[2].v,stack.cell[3,1].limIntegrator.y,stack.cell[3,2].cell.limIntegrator.y,stack.cell[3,2].cell.capacitor[1].v,stack.cell[3,2].cell.capacitor[2].v,stack.cell[3,2].limIntegrator.y,energy.y) * Number of discrete variables: 1 (cccvCharger.CV) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (149): * Single equations (assignments): 148 * 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: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 0 * Non-linear torn systems: 1 {3 80} Notification: Performance of Backend phase and start with SimCode phase: time 0.01875/2.035, allocations: 12.19 MB / 1.055 GB, free: 96.99 MB / 490.7 MB Notification: Performance of simCode: created initialization part: time 0.009507/2.045, allocations: 6.892 MB / 1.061 GB, free: 96.73 MB / 490.7 MB Notification: Performance of simCode: created event and clocks part: time 1.416e-05/2.045, allocations: 5.375 kB / 1.061 GB, free: 96.73 MB / 490.7 MB Notification: Performance of simCode: created simulation system equations: time 0.005078/2.05, allocations: 3.685 MB / 1.065 GB, free: 96.51 MB / 490.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.01304/2.063, allocations: 2.536 MB / 1.068 GB, free: 96.39 MB / 490.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 1.333/3.396, allocations: 263.3 MB / 1.325 GB, free: 76.69 MB / 0.5105 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0131/3.409, allocations: 11.71 MB / 1.336 GB, free: 67.69 MB / 0.5105 GB Notification: Performance of simCode: alias equations: time 0.01397/3.423, allocations: 6.221 MB / 1.342 GB, free: 63.57 MB / 0.5105 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.01099/3.434, allocations: 6.761 MB / 1.349 GB, free: 57.29 MB / 0.5105 GB Notification: Performance of SimCode: time 1.403e-06/3.434, allocations: 2.219 kB / 1.349 GB, free: 57.29 MB / 0.5105 GB [CodegenCFunctions.tpl:7265:24-7265:24:writable] Error: Template error: array reduction unable to generate code for element of unknown dimension sizes; type record Modelica.Electrical.Batteries.ParameterRecords.TransientData.CellData String CellType; Real Qnom; Boolean useLinearSOCDependency; Real OCVmax; Real OCVmin; Real SOCmax; Real SOCmin; Real[2, 2] OCV_SOC; enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; Real[2, 2] OCV_SOC_internal; Real Ri; Real T_ref; Real alpha; Real Idis; Real R0; Integer nRC; record Modelica.Electrical.Batteries.ParameterRecords.TransientData.RCData String CellType; Real R; Real T_ref; Real alpha; Real C; end Modelica.Electrical.Batteries.ParameterRecords.TransientData.RCData;[1] rcData; end Modelica.Electrical.Batteries.ParameterRecords.TransientData.CellData;[:]: array(if Modelica.Math.BooleanVectors.anyTrue({ks == kDegraded[1,1] and kp == kDegraded[1,2]}) then cellDataDegraded else cellDataOriginal for kp in 1:Np).