Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.conf.json 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) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) 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) Running command: translateModel(Modelica.Electrical.Batteries.Examples.CCCV_StackRC,tolerance=1e-06,outputFormat="mat",numberOfIntervals=24000,variableFilter="time|energy.y|stack.cell.1, 1..cell.capacitor.1..v|stack.cell.1, 1..cell.capacitor.2..v|stack.cell.1, 1..cell.limIntegrator.y|stack.cell.1, 1..limIntegrator.y|stack.cell.1, 2..cell.capacitor.1..v|stack.cell.1, 2..cell.capacitor.2..v|stack.cell.1, 2..cell.limIntegrator.y|stack.cell.1, 2..limIntegrator.y|stack.cell.2, 1..cell.capacitor.1..v|stack.cell.2, 1..cell.capacitor.2..v|stack.cell.2, 1..cell.limIntegrator.y|stack.cell.2, 1..limIntegrator.y|stack.cell.2, 2..cell.capacitor.1..v|stack.cell.2, 2..cell.capacitor.2..v|stack.cell.2, 2..cell.limIntegrator.y|stack.cell.2, 2..limIntegrator.y|stack.cell.3, 1..cell.capacitor.1..v|stack.cell.3, 1..cell.capacitor.2..v|stack.cell.3, 1..cell.limIntegrator.y|stack.cell.3, 1..limIntegrator.y|stack.cell.3, 2..cell.capacitor.1..v|stack.cell.3, 2..cell.capacitor.2..v|stack.cell.3, 2..cell.limIntegrator.y|stack.cell.3, 2..limIntegrator.y",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC") translateModel(Modelica.Electrical.Batteries.Examples.CCCV_StackRC,tolerance=1e-06,outputFormat="mat",numberOfIntervals=24000,variableFilter="time|energy.y|stack.cell.1, 1..cell.capacitor.1..v|stack.cell.1, 1..cell.capacitor.2..v|stack.cell.1, 1..cell.limIntegrator.y|stack.cell.1, 1..limIntegrator.y|stack.cell.1, 2..cell.capacitor.1..v|stack.cell.1, 2..cell.capacitor.2..v|stack.cell.1, 2..cell.limIntegrator.y|stack.cell.1, 2..limIntegrator.y|stack.cell.2, 1..cell.capacitor.1..v|stack.cell.2, 1..cell.capacitor.2..v|stack.cell.2, 1..cell.limIntegrator.y|stack.cell.2, 1..limIntegrator.y|stack.cell.2, 2..cell.capacitor.1..v|stack.cell.2, 2..cell.capacitor.2..v|stack.cell.2, 2..cell.limIntegrator.y|stack.cell.2, 2..limIntegrator.y|stack.cell.3, 1..cell.capacitor.1..v|stack.cell.3, 1..cell.capacitor.2..v|stack.cell.3, 1..cell.limIntegrator.y|stack.cell.3, 1..limIntegrator.y|stack.cell.3, 2..cell.capacitor.1..v|stack.cell.3, 2..cell.capacitor.2..v|stack.cell.3, 2..cell.limIntegrator.y|stack.cell.3, 2..limIntegrator.y",fileNamePrefix="Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.0009736/0.0009737, allocations: 181.3 kB / 16.39 MB, free: 5.766 MB / 13.93 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.324/1.324, allocations: 223.2 MB / 240.3 MB, free: 11.88 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009539/0.000954, allocations: 98.69 kB / 291.5 MB, free: 10.91 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002825/0.0002826, allocations: 4 kB / 351.1 MB, free: 15.32 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2705/0.2708, allocations: 50.4 MB / 401.5 MB, free: 32.59 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1167/0.3876, allocations: 94.06 MB / 495.6 MB, free: 2.398 MB / 362.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002121/0.3879, allocations: 87.89 kB / 495.6 MB, free: 2.312 MB / 362.7 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 4.0.0+maint.om/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 1.066/1.454, allocations: 278.2 MB / 0.7557 GB, free: 45.91 MB / 426.7 MB Notification: Performance of FrontEnd: time 3.307e-06/1.454, allocations: 0 / 0.7557 GB, free: 45.91 MB / 426.7 MB Notification: Performance of Transformations before backend: time 0.004321/1.458, allocations: 267.8 kB / 0.7559 GB, free: 45.64 MB / 426.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.0503/1.508, allocations: 18.75 MB / 0.7742 GB, free: 26.75 MB / 426.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.063e-05/1.508, allocations: 8.031 kB / 0.7742 GB, free: 26.74 MB / 426.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.007325/1.516, allocations: 1.747 MB / 0.7759 GB, free: 24.97 MB / 426.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.05308/1.569, allocations: 25.53 MB / 0.8009 GB, free: 15.33 MB / 442.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005122/1.569, allocations: 381.6 kB / 0.8012 GB, free: 14.95 MB / 442.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.001212/1.571, allocations: 403.8 kB / 0.8016 GB, free: 14.56 MB / 442.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.01578/1.586, allocations: 8.138 MB / 0.8096 GB, free: 6.164 MB / 442.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 7.322e-05/1.586, allocations: 7.938 kB / 0.8096 GB, free: 6.156 MB / 442.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0006908/1.587, allocations: 176 kB / 0.8097 GB, free: 5.984 MB / 442.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.326e-05/1.587, allocations: 100 kB / 0.8098 GB, free: 5.887 MB / 442.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.01239/1.6, allocations: 6.584 MB / 0.8163 GB, free: 15.3 MB / 458.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.5856/2.185, allocations: 34.72 MB / 0.8502 GB, free: 65.45 MB / 458.8 MB Notification: Performance of preOpt comSubExp (simulation): time 0.009973/2.195, allocations: 6.088 MB / 0.8561 GB, free: 65.36 MB / 458.8 MB Notification: Performance of preOpt evalFunc (simulation): time 0.000278/2.196, allocations: 33.72 kB / 0.8562 GB, free: 65.35 MB / 458.8 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0001/2.196, allocations: 81.38 kB / 0.8562 GB, free: 65.31 MB / 458.8 MB Notification: Performance of pre-optimization done (n=231): time 7.454e-06/2.196, allocations: 3.797 kB / 0.8562 GB, free: 65.31 MB / 458.8 MB Notification: Performance of matching and sorting (n=231): time 0.03674/2.232, allocations: 15.09 MB / 0.871 GB, free: 64.88 MB / 458.8 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0002959/2.233, allocations: 1.3 MB / 0.8722 GB, free: 63.31 MB / 458.8 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.06339/2.296, allocations: 28.35 MB / 0.8999 GB, free: 62.43 MB / 458.8 MB Notification: Performance of collectPreVariables (initialization): time 0.0008572/2.297, allocations: 78.58 kB / 0.9 GB, free: 62.4 MB / 458.8 MB Notification: Performance of collectInitialEqns (initialization): time 0.01396/2.311, allocations: 8.228 MB / 0.908 GB, free: 56.72 MB / 458.8 MB Notification: Performance of collectInitialBindings (initialization): time 0.001356/2.312, allocations: 0.8105 MB / 0.9088 GB, free: 56.2 MB / 458.8 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002811/2.313, allocations: 53.38 kB / 0.9089 GB, free: 56.16 MB / 458.8 MB Notification: Performance of setup shared object (initialization): time 0.0001735/2.313, allocations: 432.8 kB / 0.9093 GB, free: 55.81 MB / 458.8 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.004327/2.317, allocations: 2.953 MB / 0.9122 GB, free: 55.11 MB / 458.8 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.004937/2.322, allocations: 4.008 MB / 0.9161 GB, free: 53.33 MB / 458.8 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.004533/2.327, allocations: 3.35 MB / 0.9194 GB, free: 52.43 MB / 458.8 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.884e-05/2.327, allocations: 7.781 kB / 0.9194 GB, free: 52.43 MB / 458.8 MB Notification: Performance of matching and sorting (n=348) (initialization): time 0.01784/2.345, allocations: 8.827 MB / 0.928 GB, free: 48.12 MB / 458.8 MB Notification: Performance of prepare postOptimizeDAE: time 4.465e-05/2.345, allocations: 8 kB / 0.928 GB, free: 48.11 MB / 458.8 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 4.123e-05/2.345, allocations: 16 kB / 0.928 GB, free: 48.09 MB / 458.8 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.003171/2.348, allocations: 1.203 MB / 0.9292 GB, free: 47.11 MB / 458.8 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.003554/2.352, allocations: 0.8872 MB / 0.9301 GB, free: 46.49 MB / 458.8 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01428/2.366, allocations: 13.06 MB / 0.9428 GB, free: 35.21 MB / 458.8 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0096/2.376, allocations: 0.8921 MB / 0.9437 GB, free: 34.66 MB / 458.8 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.001033/2.377, allocations: 106.3 kB / 0.9438 GB, free: 34.57 MB / 458.8 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.01596/2.393, allocations: 9.135 MB / 0.9527 GB, free: 27.03 MB / 458.8 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.005585/2.398, allocations: 1.558 MB / 0.9542 GB, free: 25.45 MB / 458.8 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.01809/2.416, allocations: 8.189 MB / 0.9622 GB, free: 18.75 MB / 458.8 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.903e-05/2.416, allocations: 20 kB / 0.9622 GB, free: 18.73 MB / 458.8 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.28e-06/2.416, allocations: 7.938 kB / 0.9622 GB, free: 18.72 MB / 458.8 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.839e-05/2.416, allocations: 9.422 kB / 0.9623 GB, free: 18.72 MB / 458.8 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.02841/2.445, allocations: 11.6 MB / 0.9736 GB, free: 9.52 MB / 458.8 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.54e-05/2.445, allocations: 2.25 kB / 0.9736 GB, free: 9.52 MB / 458.8 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.00262/2.447, allocations: 0.706 MB / 0.9743 GB, free: 8.832 MB / 458.8 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.002626/2.45, allocations: 1.181 MB / 0.9754 GB, free: 7.664 MB / 458.8 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0003252/2.45, allocations: 78.06 kB / 0.9755 GB, free: 7.594 MB / 458.8 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01452/2.465, allocations: 12.97 MB / 0.9882 GB, free: 10.58 MB / 474.8 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.364e-06/2.465, allocations: 0 / 0.9882 GB, free: 10.58 MB / 474.8 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.02216/2.487, allocations: 10.91 MB / 0.9988 GB, free: 15.67 MB / 490.8 MB Notification: Performance of postOpt removeConstants (simulation): time 0.01576/2.503, allocations: 7.489 MB / 1.006 GB, free: 7.504 MB / 490.8 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.004907/2.508, allocations: 87.97 kB / 1.006 GB, free: 7.418 MB / 490.8 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.00785/2.516, allocations: 0.9644 MB / 1.007 GB, free: 6.477 MB / 490.8 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.001297/2.517, allocations: 485.2 kB / 1.008 GB, free: 6.004 MB / 490.8 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0003158/2.518, allocations: 63.16 kB / 1.008 GB, free: 5.945 MB / 490.8 MB Notification: Performance of sorting global known variables: time 0.3564/2.874, allocations: 22.11 MB / 1.029 GB, free: 95.73 MB / 490.8 MB Notification: Performance of sort global known variables: time 7.72e-07/2.874, allocations: 0 / 1.029 GB, free: 95.73 MB / 490.8 MB Notification: Performance of remove unused functions: time 0.009889/2.884, allocations: 2.017 MB / 1.031 GB, free: 95.73 MB / 490.8 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.002027/2.886, allocations: 0.7514 MB / 1.032 GB, free: 95.59 MB / 490.8 MB Notification: Performance of simCode: created initialization part: time 0.01272/2.899, allocations: 6.883 MB / 1.039 GB, free: 95.38 MB / 490.8 MB Notification: Performance of simCode: created event and clocks part: time 1.987e-05/2.899, allocations: 8.031 kB / 1.039 GB, free: 95.38 MB / 490.8 MB Notification: Performance of simCode: created simulation system equations: time 0.005531/2.904, allocations: 3.684 MB / 1.042 GB, free: 95.18 MB / 490.8 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.01351/2.918, allocations: 2.526 MB / 1.045 GB, free: 95.07 MB / 490.8 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.07827/2.996, allocations: 46.14 MB / 1.09 GB, free: 83.67 MB / 490.8 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.02386/3.02, allocations: 11.69 MB / 1.101 GB, free: 80.45 MB / 490.8 MB Notification: Performance of simCode: alias equations: time 0.0215/3.042, allocations: 6.127 MB / 1.107 GB, free: 76.69 MB / 490.8 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.005143/3.047, allocations: 0.7431 MB / 1.108 GB, free: 75.97 MB / 490.8 MB Notification: Performance of SimCode: time 1.933e-06/3.047, allocations: 0 / 1.108 GB, free: 75.97 MB / 490.8 MB [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). Notification: Performance of Templates: time 0.5817/3.628, allocations: 152 MB / 1.256 GB, free: 96.08 MB / 490.8 MB make -j1 -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.makefile make -j1 -f Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.makefile clang -Os -fPIC -falign-functions -mfpmath=sse -fno-dollars-in-identifiers -Os -march=native -I"/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/bin/../include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_CCCV_StackRC -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=2 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC.c clang -Os -fPIC -falign-functions -mfpmath=sse -fno-dollars-in-identifiers -Os -march=native -I"/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/bin/../include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_CCCV_StackRC -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=2 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_functions.o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_functions.c clang -Os -fPIC -falign-functions -mfpmath=sse -fno-dollars-in-identifiers -Os -march=native -I"/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelica/OMCompiler/build/bin/../include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_4_0_0_Modelica_Electrical_Batteries_Examples_CCCV_StackRC -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=2 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.o Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:908:84: error: expected ';' at end of declaration Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array ths->__omcQ_24tmpVar31; ^ ; Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:910:81: error: redefinition of 'ths' Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array ths->__omcQ_24tmpVar30; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:908:81: note: previous definition is here Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array ths->__omcQ_24tmpVar31; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:910:84: error: expected ';' at end of declaration Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array ths->__omcQ_24tmpVar30; ^ ; Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:918:16: error: member reference type 'Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array' (aka 'struct base_array_s') is not a pointer; did you mean to use '.'? tmp97 = ths->_Ns /* Range stop-value */; ~~~^~ . Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:918:18: error: no member named '_Ns' in 'struct base_array_s' tmp97 = ths->_Ns /* Range stop-value */; ~~~ ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:926:6: error: "[CodegenCFunctions.tpl:7265:24-7265:24] array reduction unable to generate code for element of unknown dimension sizes; type record Modelica.Electrical.Batteries.ParameterRecords.TransientData.CellData #error "[CodegenCFunctions.tpl:7265:24-7265:24] array reduction unable to generate code for element of unknown dimension sizes; type record Modelica.Electrical.Batteries.ParameterRecords.TransientData.CellData ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:950:238: warning: missing terminating '"' character [-Winvalid-pp-token] 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)" ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:925:91: error: member reference type 'Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array' (aka 'struct base_array_s') is not a pointer; did you mean to use '.'? alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array(&ths->__omcQ_24tmpVar31, 2, tmp98 ~~~^~ . ./Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_functions.h:214:133: note: expanded from macro 'alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array' #define alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array(dst,ndims,...) generic_array_create(NULL, dst, Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_construct_p, ndims, sizeof(Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData), __VA_ARGS__) ^~~ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:925:93: error: no member named '__omcQ_24tmpVar31' in 'struct base_array_s' alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array(&ths->__omcQ_24tmpVar31, 2, tmp98 ~~~ ^ ./Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_functions.h:214:133: note: expanded from macro 'alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array' #define alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array(dst,ndims,...) generic_array_create(NULL, dst, Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_construct_p, ndims, sizeof(Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData), __VA_ARGS__) ^~~ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:928:7: error: use of undeclared identifier 'Real' Real Qnom; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:929:7: error: use of undeclared identifier 'Boolean' Boolean useLinearSOCDependency; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:930:7: error: use of undeclared identifier 'Real' Real OCVmax; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:931:7: error: use of undeclared identifier 'Real' Real OCVmin; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:932:7: error: use of undeclared identifier 'Real' Real SOCmax; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:933:7: error: use of undeclared identifier 'Real' Real SOCmin; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:934:7: error: use of undeclared identifier 'Real' Real[2, 2] OCV_SOC; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:934:12: warning: expression result unused [-Wunused-value] Real[2, 2] OCV_SOC; ^ ./Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_functions.h:214:307: note: expanded from macro 'alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array' #define alloc_Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_array(dst,ndims,...) generic_array_create(NULL, dst, Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData_construct_p, ndims, sizeof(Modelica_Electrical_Batteries_ParameterRecords_TransientData_CellData), __VA_ARGS__) ^~~~~~~~~~~ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:935:7: warning: implicit declaration of function 'enumeration' is invalid in C99 [-Wimplicit-function-declaration] enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:935:19: error: use of undeclared identifier 'LinearSegments' enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:935:35: error: use of undeclared identifier 'ContinuousDerivative' enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:935:57: error: use of undeclared identifier 'ConstantSegments' enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; ^ Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.c:935:75: error: use of undeclared identifier 'MonotoneContinuousDerivative1' enumeration(LinearSegments, ContinuousDerivative, ConstantSegments, MonotoneContinuousDerivative1, MonotoneContinuousDerivative2, ModifiedContinuousDerivative) smoothness; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 3 warnings and 20 errors generated. make: *** [: Modelica_4.0.0_Modelica.Electrical.Batteries.Examples.CCCV_StackRC_records.o] Error 1