Running command: translateModel(Modelica.Blocks.Examples.TotalHarmonicDistortion,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2000,variableFilter="time|thd1.harmonic.mean1.x|thd1.harmonic.mean2.x|thd1.rootMeanSquare.mean.x|thdRMS.harmonic.mean1.x|thdRMS.harmonic.mean2.x|thdRMS.rootMeanSquare.mean.x",fileNamePrefix="Modelica_trunk_Modelica.Blocks.Examples.TotalHarmonicDistortion") Notification: Performance of loadModel(Modelica): time 2.037/2.037, allocations: 225.8 MB / 239.4 MB, free: 11.17 MB / 202.7 MB Notification: Performance of FrontEnd - loaded program: time 3.278e-05/3.322e-05, allocations: 4 kB / 292.7 MB, free: 8.332 MB / 234.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.09246/0.09251, allocations: 50.42 MB / 343.1 MB, free: 5.898 MB / 282.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3669/0.4594, allocations: 81.13 MB / 424.2 MB, free: 13.07 MB / 346.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002/0.4597, allocations: 70.08 kB / 424.3 MB, free: 13.04 MB / 346.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.04391/0.5036, allocations: 10.42 MB / 434.7 MB, free: 4.281 MB / 346.7 MB Notification: Performance of FrontEnd: time 1.651e-06/0.5036, allocations: 0 / 434.7 MB, free: 4.281 MB / 346.7 MB Notification: Performance of Transformations before backend: time 5.13e-05/0.5037, allocations: 16 kB / 434.7 MB, free: 4.266 MB / 346.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 141 * Number of variables: 141 Notification: Performance of Generate backend data structure: time 0.001996/0.5057, allocations: 0.8407 MB / 435.6 MB, free: 3.414 MB / 346.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.358e-05/0.5058, allocations: 12.03 kB / 435.6 MB, free: 3.402 MB / 346.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002802/0.506, allocations: 79.06 kB / 435.6 MB, free: 3.324 MB / 346.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001121/0.5072, allocations: 0.5213 MB / 436.2 MB, free: 2.871 MB / 346.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.62e-05/0.5073, allocations: 50.83 kB / 436.2 MB, free: 2.84 MB / 346.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001379/0.5074, allocations: 70.52 kB / 436.3 MB, free: 2.793 MB / 346.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002133/0.5096, allocations: 0.5985 MB / 436.9 MB, free: 2.379 MB / 346.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 3.559e-05/0.5096, allocations: 7.938 kB / 436.9 MB, free: 2.371 MB / 346.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.972e-05/0.5097, allocations: 23.38 kB / 436.9 MB, free: 2.367 MB / 346.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.741e-05/0.5098, allocations: 15.94 kB / 436.9 MB, free: 2.352 MB / 346.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.00111/0.5109, allocations: 421.7 kB / 437.3 MB, free: 2.098 MB / 346.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00459/0.5155, allocations: 1.99 MB / 439.3 MB, free: 0.5742 MB / 346.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0009733/0.5165, allocations: 403 kB / 439.7 MB, free: 332 kB / 346.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004047/0.5169, allocations: 176.3 kB / 439.9 MB, free: 228 kB / 346.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.689e-05/0.517, allocations: 12.17 kB / 439.9 MB, free: 220 kB / 346.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007796/0.5178, allocations: 339 kB / 440.2 MB, free: 15.96 MB / 362.7 MB Notification: Performance of pre-optimization done (n=53): time 4.348e-06/0.5178, allocations: 0 / 440.2 MB, free: 15.96 MB / 362.7 MB Notification: Performance of matching and sorting (n=53): time 0.001265/0.5191, allocations: 472.7 kB / 440.7 MB, free: 15.61 MB / 362.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001012/0.5192, allocations: 117.9 kB / 440.8 MB, free: 15.48 MB / 362.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0007149/0.5199, allocations: 394.5 kB / 441.2 MB, free: 15.18 MB / 362.7 MB Notification: Performance of collectPreVariables (initialization): time 9.854e-05/0.5201, allocations: 44.27 kB / 441.2 MB, free: 15.14 MB / 362.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003497/0.5204, allocations: 316.1 kB / 441.6 MB, free: 14.91 MB / 362.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002049/0.5206, allocations: 166.3 kB / 441.7 MB, free: 14.77 MB / 362.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 4.394e-05/0.5207, allocations: 12.25 kB / 441.7 MB, free: 14.77 MB / 362.7 MB Notification: Performance of setup shared object (initialization): time 0.0002287/0.5209, allocations: 367.5 kB / 442.1 MB, free: 14.42 MB / 362.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004162/0.5214, allocations: 159.1 kB / 442.2 MB, free: 14.33 MB / 362.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0006059/0.522, allocations: 374.6 kB / 442.6 MB, free: 13.95 MB / 362.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0009551/0.523, allocations: 203.7 kB / 442.8 MB, free: 13.82 MB / 362.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.548e-05/0.523, allocations: 4 kB / 442.8 MB, free: 13.81 MB / 362.7 MB Notification: Performance of matching and sorting (n=79) (initialization): time 0.00249/0.5255, allocations: 0.5765 MB / 443.4 MB, free: 13.38 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 0.002021/0.5276, allocations: 2.522 MB / 445.9 MB, free: 10.7 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 3.283e-05/0.5277, allocations: 7.984 kB / 445.9 MB, free: 10.69 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 4.841e-05/0.5277, allocations: 16 kB / 445.9 MB, free: 10.68 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001289/0.529, allocations: 141.3 kB / 446.1 MB, free: 10.54 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 4.152e-05/0.5291, allocations: 19.88 kB / 446.1 MB, free: 10.52 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001086/0.5302, allocations: 84.75 kB / 446.2 MB, free: 10.45 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001364/0.5304, allocations: 34.42 kB / 446.2 MB, free: 10.42 MB / 362.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.174e-05/0.5304, allocations: 7.438 kB / 446.2 MB, free: 10.42 MB / 362.7 MB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.001992/0.5324, allocations: 0.4901 MB / 446.7 MB, free: 10.07 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.128e-05/0.5325, allocations: 8.75 kB / 446.7 MB, free: 10.06 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.332e-05/0.5325, allocations: 12 kB / 446.7 MB, free: 10.05 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001117/0.5337, allocations: 137.8 kB / 446.9 MB, free: 9.922 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 3.164e-05/0.5337, allocations: 11.94 kB / 446.9 MB, free: 9.91 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001006/0.5347, allocations: 68.78 kB / 446.9 MB, free: 9.852 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001207/0.5349, allocations: 38.67 kB / 447 MB, free: 9.82 MB / 362.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 29 * Number of states: 0 () * Number of discrete variables: 24 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,$PRE.thdRMS.harmonic.mean1.y_last,thdRMS.harmonic.mean1.y_last,$PRE.thdRMS.harmonic.mean2.y_last,thdRMS.harmonic.mean2.y_last,$PRE.thdRMS.rootMeanSquare.mean.y_last,thdRMS.rootMeanSquare.mean.y_last,thdRMS.valid,thdRMS.andValid.u1,thdRMS.andValid.u2,$PRE.thd1.harmonic.mean1.y_last,thd1.harmonic.mean1.y_last,$PRE.thd1.harmonic.mean2.y_last,thd1.harmonic.mean2.y_last,$PRE.thd1.rootMeanSquare.mean.y_last,thd1.rootMeanSquare.mean.y_last,thd1.valid,thd1.andValid.u1,thd1.andValid.u2) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (79): * Single equations (assignments): 79 * 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.0004088/0.5353, allocations: 159.2 kB / 447.1 MB, free: 9.68 MB / 362.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002346/0.5356, allocations: 59.25 kB / 447.2 MB, free: 9.621 MB / 362.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.002125/0.5377, allocations: 0.4888 MB / 447.7 MB, free: 9.289 MB / 362.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.051e-05/0.5378, allocations: 8 kB / 447.7 MB, free: 9.281 MB / 362.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.481e-06/0.5378, allocations: 0 / 447.7 MB, free: 9.281 MB / 362.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.03e-05/0.5379, allocations: 3.984 kB / 447.7 MB, free: 9.277 MB / 362.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001666/0.5395, allocations: 0.6346 MB / 448.3 MB, free: 8.766 MB / 362.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.939e-06/0.5396, allocations: 0 / 448.3 MB, free: 8.766 MB / 362.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001223/0.5408, allocations: 99.23 kB / 448.4 MB, free: 8.672 MB / 362.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.343e-05/0.5409, allocations: 4 kB / 448.4 MB, free: 8.668 MB / 362.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001064/0.541, allocations: 19.67 kB / 448.4 MB, free: 8.656 MB / 362.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.652e-05/0.541, allocations: 7.953 kB / 448.5 MB, free: 8.648 MB / 362.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.564e-06/0.541, allocations: 0 / 448.5 MB, free: 8.648 MB / 362.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00317/0.5442, allocations: 0.7419 MB / 449.2 MB, free: 8.039 MB / 362.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0003182/0.5446, allocations: 128.5 kB / 449.3 MB, free: 7.895 MB / 362.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002203/0.5448, allocations: 19.98 kB / 449.3 MB, free: 7.875 MB / 362.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0008631/0.5457, allocations: 51.91 kB / 449.4 MB, free: 7.824 MB / 362.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0002355/0.546, allocations: 48.33 kB / 449.4 MB, free: 7.777 MB / 362.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001241/0.5461, allocations: 23.97 kB / 449.5 MB, free: 7.754 MB / 362.7 MB Notification: Performance of sorting global known variables: time 0.0009019/0.5471, allocations: 301.2 kB / 449.8 MB, free: 7.461 MB / 362.7 MB Notification: Performance of sort global known variables: time 1.676e-06/0.5471, allocations: 4 kB / 449.8 MB, free: 7.457 MB / 362.7 MB Notification: Performance of remove unused functions: time 0.002102/0.5492, allocations: 259 kB / 450 MB, free: 7.203 MB / 362.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 6 (thd1.harmonic.mean1.x,thd1.harmonic.mean2.x,thd1.rootMeanSquare.mean.x,thdRMS.harmonic.mean1.x,thdRMS.harmonic.mean2.x,thdRMS.rootMeanSquare.mean.x) * Number of discrete variables: 18 ($whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,thd1.harmonic.mean1.y_last,thd1.harmonic.mean2.y_last,thd1.rootMeanSquare.mean.y_last,thd1.valid,thd1.andValid.u1,thd1.andValid.u2,thdRMS.harmonic.mean1.y_last,thdRMS.harmonic.mean2.y_last,thdRMS.rootMeanSquare.mean.y_last,thdRMS.valid,thdRMS.andValid.u1,thdRMS.andValid.u2) * Number of discrete states: 6 (thdRMS.rootMeanSquare.mean.x,thdRMS.harmonic.mean2.x,thdRMS.harmonic.mean1.x,thd1.rootMeanSquare.mean.x,thd1.harmonic.mean2.x,thd1.harmonic.mean1.x) * Top-level inputs: 0 Notification: Strong component statistics for simulation (53): * Single equations (assignments): 47 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * 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.0003763/0.5496, allocations: 131.8 kB / 450.1 MB, free: 7.066 MB / 362.7 MB Notification: Performance of simCode: created initialization part: time 0.0032/0.5529, allocations: 0.7087 MB / 450.8 MB, free: 6.355 MB / 362.7 MB Notification: Performance of simCode: created event and clocks part: time 7.051e-06/0.5529, allocations: 0 / 450.8 MB, free: 6.355 MB / 362.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0009701/0.5539, allocations: 217.6 kB / 451.1 MB, free: 6.145 MB / 362.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000934/0.5549, allocations: 77.09 kB / 451.1 MB, free: 6.07 MB / 362.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.003895/0.5588, allocations: 0.8358 MB / 452 MB, free: 5.211 MB / 362.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.00107/0.5599, allocations: 0.9123 MB / 452.9 MB, free: 4.266 MB / 362.7 MB Notification: Performance of simCode: alias equations: time 0.001465/0.5614, allocations: 126.4 kB / 453 MB, free: 4.141 MB / 362.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003089/0.5617, allocations: 43.42 kB / 453 MB, free: 4.098 MB / 362.7 MB Notification: Performance of SimCode: time 2.443e-06/0.5618, allocations: 0 / 453 MB, free: 4.098 MB / 362.7 MB Notification: Performance of Templates: time 0.02105/0.5828, allocations: 6.096 MB / 459.1 MB, free: 14.04 MB / 378.7 MB