Running command: "" <> buildModelFMU(ModelicaTest.Blocks.Discrete,fileNamePrefix="ModelicaTest_4_0_0_ModelicaTest_Blocks_Discrete",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadModel(ModelicaTest): time 2.531/2.531, allocations: 270 MB / 283.6 MB, free: 1.973 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 4.325e-05/4.332e-05, allocations: 4 kB / 348.5 MB, free: 2.75 MB / 282.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3889/0.389, allocations: 61.87 MB / 410.4 MB, free: 10.67 MB / 330.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.164/0.553, allocations: 88.85 MB / 499.2 MB, free: 1.695 MB / 410.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002256/0.5533, allocations: 63.97 kB / 499.3 MB, free: 1.633 MB / 410.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.01921/0.5725, allocations: 3.979 MB / 0.4915 GB, free: 13.63 MB / 426.7 MB Notification: Performance of FrontEnd: time 1.833e-06/0.5726, allocations: 0 / 0.4915 GB, free: 13.63 MB / 426.7 MB Notification: Performance of Transformations before backend: time 2.1e-05/0.5726, allocations: 4 kB / 0.4915 GB, free: 13.62 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: 44 * Number of variables: 44 Notification: Performance of Generate backend data structure: time 0.001668/0.5743, allocations: 0.5766 MB / 0.492 GB, free: 13 MB / 426.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.047e-05/0.5744, allocations: 8.031 kB / 0.492 GB, free: 13 MB / 426.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001074/0.5745, allocations: 54.53 kB / 0.4921 GB, free: 12.93 MB / 426.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 9.545e-05/0.5746, allocations: 27.72 kB / 0.4921 GB, free: 12.91 MB / 426.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004096/0.575, allocations: 243.6 kB / 0.4923 GB, free: 12.62 MB / 426.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.542e-05/0.5751, allocations: 24 kB / 0.4924 GB, free: 12.6 MB / 426.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.161e-05/0.5751, allocations: 23.98 kB / 0.4924 GB, free: 12.58 MB / 426.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0005989/0.5758, allocations: 213.5 kB / 0.4926 GB, free: 12.36 MB / 426.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.24e-05/0.5758, allocations: 4 kB / 0.4926 GB, free: 12.36 MB / 426.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.621e-05/0.5758, allocations: 4 kB / 0.4926 GB, free: 12.36 MB / 426.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.43e-05/0.5759, allocations: 4 kB / 0.4926 GB, free: 12.35 MB / 426.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003933/0.5763, allocations: 119.9 kB / 0.4927 GB, free: 12.23 MB / 426.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001553/0.5778, allocations: 0.5626 MB / 0.4933 GB, free: 11.62 MB / 426.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0007494/0.5786, allocations: 299.7 kB / 0.4936 GB, free: 11.32 MB / 426.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003278/0.579, allocations: 120.8 kB / 0.4937 GB, free: 11.2 MB / 426.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.292e-05/0.579, allocations: 7.984 kB / 0.4937 GB, free: 11.19 MB / 426.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005958/0.5796, allocations: 235.4 kB / 0.4939 GB, free: 10.95 MB / 426.7 MB Notification: Performance of pre-optimization done (n=43): time 5.11e-06/0.5797, allocations: 7.984 kB / 0.4939 GB, free: 10.94 MB / 426.7 MB Notification: Performance of matching and sorting (n=43): time 0.001218/0.5809, allocations: 445.1 kB / 0.4943 GB, free: 10.5 MB / 426.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 8.185e-05/0.581, allocations: 75.33 kB / 0.4944 GB, free: 10.41 MB / 426.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002811/0.5813, allocations: 187 kB / 0.4946 GB, free: 10.23 MB / 426.7 MB Notification: Performance of collectPreVariables (initialization): time 6.446e-05/0.5814, allocations: 41.7 kB / 0.4946 GB, free: 10.18 MB / 426.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001111/0.5815, allocations: 133 kB / 0.4947 GB, free: 10.04 MB / 426.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001309/0.5816, allocations: 98.78 kB / 0.4948 GB, free: 9.945 MB / 426.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.5e-05/0.5817, allocations: 20 kB / 0.4949 GB, free: 9.926 MB / 426.7 MB Notification: Performance of setup shared object (initialization): time 0.0001554/0.5818, allocations: 342.8 kB / 0.4952 GB, free: 9.582 MB / 426.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000264/0.5821, allocations: 89.12 kB / 0.4953 GB, free: 9.496 MB / 426.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004483/0.5826, allocations: 272.4 kB / 0.4955 GB, free: 9.141 MB / 426.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0004606/0.583, allocations: 139.8 kB / 0.4957 GB, free: 9.004 MB / 426.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 8.145e-06/0.5831, allocations: 4 kB / 0.4957 GB, free: 9 MB / 426.7 MB Notification: Performance of matching and sorting (n=66) (initialization): time 0.001124/0.5842, allocations: 409.4 kB / 0.4961 GB, free: 8.594 MB / 426.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.519e-05/0.5842, allocations: 8 kB / 0.4961 GB, free: 8.586 MB / 426.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.736e-05/0.5843, allocations: 8 kB / 0.4961 GB, free: 8.578 MB / 426.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.098e-05/0.5843, allocations: 8 kB / 0.4961 GB, free: 8.57 MB / 426.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004258/0.5847, allocations: 67.8 kB / 0.4961 GB, free: 8.504 MB / 426.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.457e-05/0.5848, allocations: 11.94 kB / 0.4962 GB, free: 8.492 MB / 426.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003116/0.5851, allocations: 39.73 kB / 0.4962 GB, free: 8.453 MB / 426.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.48e-05/0.5852, allocations: 24.16 kB / 0.4962 GB, free: 8.43 MB / 426.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 27 * Number of states: 0 () * Number of discrete variables: 62 ($PRE.triggeredMax.y,triggeredMax.y,$PRE.triggeredSampler.y,triggeredSampler.y,$PRE.stateSpace.firstTrigger,stateSpace.firstTrigger,$PRE.stateSpace.x[1],stateSpace.x[1],$PRE.stateSpace.x[2],stateSpace.x[2],$PRE.stateSpace.y[1],stateSpace.y[1],$PRE.transferFunction.firstTrigger,transferFunction.firstTrigger,$PRE.transferFunction.x1,transferFunction.x1,$PRE.transferFunction.xext[1],transferFunction.xext[1],$PRE.transferFunction.xext[2],transferFunction.xext[2],$PRE.transferFunction.x[1],transferFunction.x[1],$PRE.transferFunction.y,transferFunction.y,$PRE.unitDelay.firstTrigger,unitDelay.firstTrigger,$PRE.unitDelay.y,unitDelay.y,$PRE.firstOrderHold.firstTrigger,firstOrderHold.firstTrigger,$PRE.zeroOrderHold.firstTrigger,zeroOrderHold.firstTrigger,$PRE.sampler.firstTrigger,sampler.firstTrigger,$whenCondition8,$whenCondition1,sampler.sampleTrigger,$PRE.zeroOrderHold.ySample,$whenCondition2,zeroOrderHold.sampleTrigger,$whenCondition3,firstOrderHold.sampleTrigger,$whenCondition4,unitDelay.sampleTrigger,$whenCondition5,transferFunction.sampleTrigger,$whenCondition6,stateSpace.sampleTrigger,$whenCondition7,booleanPulse.y,$PRE.booleanPulse.pulseStart,booleanPulse.pulseStart,sampler.y,zeroOrderHold.ySample,$PRE.firstOrderHold.tSample,firstOrderHold.tSample,$PRE.firstOrderHold.uSample,firstOrderHold.uSample,$PRE.firstOrderHold.pre_uSample,firstOrderHold.pre_uSample,$PRE.firstOrderHold.c,firstOrderHold.c) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (66): * Single equations (assignments): 66 * 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.0002669/0.5854, allocations: 172.8 kB / 0.4964 GB, free: 8.254 MB / 426.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.046e-05/0.5855, allocations: 27.72 kB / 0.4964 GB, free: 8.227 MB / 426.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.021e-05/0.5856, allocations: 26.77 kB / 0.4964 GB, free: 8.199 MB / 426.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.09e-05/0.5857, allocations: 8 kB / 0.4964 GB, free: 8.191 MB / 426.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.12e-05/0.5857, allocations: 3.953 kB / 0.4964 GB, free: 8.188 MB / 426.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.658e-06/0.5857, allocations: 3.984 kB / 0.4965 GB, free: 8.184 MB / 426.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.002292/0.588, allocations: 0.9243 MB / 0.4974 GB, free: 7.203 MB / 426.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 7.213e-06/0.588, allocations: 4 kB / 0.4974 GB, free: 7.199 MB / 426.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001306/0.5882, allocations: 19.98 kB / 0.4974 GB, free: 7.18 MB / 426.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.139e-05/0.5882, allocations: 0 / 0.4974 GB, free: 7.18 MB / 426.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.322e-05/0.5883, allocations: 15.92 kB / 0.4974 GB, free: 7.164 MB / 426.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 8.997e-06/0.5883, allocations: 4 kB / 0.4974 GB, free: 7.16 MB / 426.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.024e-06/0.5883, allocations: 0 / 0.4974 GB, free: 7.16 MB / 426.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001157/0.5895, allocations: 0.5344 MB / 0.4979 GB, free: 6.609 MB / 426.7 MB Notification: Performance of postOpt removeConstants (simulation): time 9.022e-05/0.5896, allocations: 104.8 kB / 0.498 GB, free: 6.488 MB / 426.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.727e-05/0.5897, allocations: 19.98 kB / 0.498 GB, free: 6.469 MB / 426.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004181/0.5901, allocations: 35.97 kB / 0.4981 GB, free: 6.434 MB / 426.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.331e-05/0.5902, allocations: 27.95 kB / 0.4981 GB, free: 6.406 MB / 426.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.392e-05/0.5903, allocations: 15.98 kB / 0.4981 GB, free: 6.391 MB / 426.7 MB Notification: Performance of sorting global known variables: time 0.0002006/0.5905, allocations: 153.5 kB / 0.4983 GB, free: 6.242 MB / 426.7 MB Notification: Performance of sort global known variables: time 4.1e-07/0.5905, allocations: 0 / 0.4983 GB, free: 6.242 MB / 426.7 MB Notification: Performance of remove unused functions: time 0.0005927/0.5911, allocations: 71.94 kB / 0.4983 GB, free: 6.172 MB / 426.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 0 () * Number of discrete variables: 39 (booleanPulse.y,stateSpace.sampleTrigger,transferFunction.sampleTrigger,unitDelay.sampleTrigger,firstOrderHold.sampleTrigger,zeroOrderHold.sampleTrigger,sampler.sampleTrigger,$whenCondition8,$whenCondition7,$whenCondition6,$whenCondition5,$whenCondition4,$whenCondition3,$whenCondition2,$whenCondition1,sampler.firstTrigger,sampler.y,zeroOrderHold.firstTrigger,zeroOrderHold.ySample,firstOrderHold.firstTrigger,firstOrderHold.tSample,firstOrderHold.uSample,firstOrderHold.pre_uSample,firstOrderHold.c,unitDelay.firstTrigger,unitDelay.y,transferFunction.firstTrigger,transferFunction.y,transferFunction.x[1],transferFunction.x1,transferFunction.xext[1],transferFunction.xext[2],stateSpace.firstTrigger,stateSpace.y[1],stateSpace.x[1],stateSpace.x[2],triggeredSampler.y,booleanPulse.pulseStart,triggeredMax.y) * Number of discrete states: 8 (zeroOrderHold.ySample,triggeredMax.y,stateSpace.x[1],stateSpace.x[2],transferFunction.x[1],unitDelay.u,firstOrderHold.uSample,firstOrderHold.c) * Top-level inputs: 0 Notification: Strong component statistics for simulation (43): * Single equations (assignments): 19 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 24 * 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.001751/0.5929, allocations: 1.114 MB / 0.4994 GB, free: 5.031 MB / 426.7 MB Notification: Performance of simCode: created initialization part: time 0.00117/0.5941, allocations: 312.6 kB / 0.4997 GB, free: 4.727 MB / 426.7 MB Notification: Performance of simCode: created event and clocks part: time 3.486e-06/0.5941, allocations: 0 / 0.4997 GB, free: 4.727 MB / 426.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0005611/0.5947, allocations: 151.9 kB / 0.4999 GB, free: 4.578 MB / 426.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006286/0.5953, allocations: 32.06 kB / 0.4999 GB, free: 4.547 MB / 426.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002511/0.5978, allocations: 474.6 kB / 0.5003 GB, free: 4.043 MB / 426.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004898/0.5983, allocations: 0.7647 MB / 0.5011 GB, free: 3.25 MB / 426.7 MB Notification: Performance of simCode: alias equations: time 0.0002001/0.5986, allocations: 42.91 kB / 0.5011 GB, free: 3.211 MB / 426.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002312/0.5988, allocations: 83.41 kB / 0.5012 GB, free: 3.129 MB / 426.7 MB Notification: Performance of SimCode: time 1.223e-06/0.5988, allocations: 0 / 0.5012 GB, free: 3.129 MB / 426.7 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.07807/0.6769, allocations: 5.064 MB / 0.5062 GB, free: 14.18 MB / 442.7 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.000271/0.6773, allocations: 136.2 kB / 0.5063 GB, free: 13.95 MB / 442.7 MB Notification: Performance of buildModelFMU: Generate platform static: time 2.378/3.055, allocations: 4 kB / 0.5063 GB, free: 13.95 MB / 442.7 MB TODO: How the !@#!# did the simulation report success but simulation result ModelicaTest_4.0.0_ModelicaTest.Blocks.Discrete_res.mat does not exist to compare? outputFormat=mat