Running command: "" <> buildModelFMU(ModelicaTest.Blocks.Discrete,fileNamePrefix="ModelicaTest_3_2_2_cpp_ModelicaTest_Blocks_Discrete",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadModel(ModelicaTest): time 2.568/2.568, allocations: 235 MB / 247.6 MB, free: 14.36 MB / 202.7 MB Notification: Performance of FrontEnd - loaded program: time 4.064e-05/4.125e-05, allocations: 4.938 kB / 305 MB, free: 5.566 MB / 250.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4085/0.4085, allocations: 54.85 MB / 359.9 MB, free: 2.309 MB / 298.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.1705/0.5791, allocations: 82.99 MB / 442.8 MB, free: 13.89 MB / 378.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002591/0.5795, allocations: 63.97 kB / 442.9 MB, free: 13.82 MB / 378.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.02021/0.5997, allocations: 3.884 MB / 446.8 MB, free: 9.957 MB / 378.7 MB Notification: Performance of FrontEnd: time 1.723e-06/0.5998, allocations: 0 / 446.8 MB, free: 9.957 MB / 378.7 MB Notification: Performance of Transformations before backend: time 2.161e-05/0.5998, allocations: 4 kB / 446.8 MB, free: 9.953 MB / 378.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.001708/0.6015, allocations: 0.5726 MB / 447.4 MB, free: 9.328 MB / 378.7 MB Notification: Performance of prepare preOptimizeDAE: time 5.901e-05/0.6016, allocations: 8.031 kB / 447.4 MB, free: 9.32 MB / 378.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.000136/0.6017, allocations: 58.53 kB / 447.4 MB, free: 9.254 MB / 378.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001124/0.6019, allocations: 31.62 kB / 447.5 MB, free: 9.223 MB / 378.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004351/0.6023, allocations: 239.7 kB / 447.7 MB, free: 8.945 MB / 378.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.921e-05/0.6024, allocations: 16 kB / 447.7 MB, free: 8.93 MB / 378.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.569e-05/0.6025, allocations: 23.98 kB / 447.7 MB, free: 8.906 MB / 378.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006228/0.6031, allocations: 209.9 kB / 447.9 MB, free: 8.695 MB / 378.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.372e-05/0.6031, allocations: 0 / 447.9 MB, free: 8.695 MB / 378.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 7.448e-05/0.6032, allocations: 19.94 kB / 448 MB, free: 8.676 MB / 378.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.086e-05/0.6032, allocations: 4 kB / 448 MB, free: 8.672 MB / 378.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000404/0.6036, allocations: 119.9 kB / 448.1 MB, free: 8.555 MB / 378.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001657/0.6053, allocations: 0.5587 MB / 448.6 MB, free: 7.945 MB / 378.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0007767/0.6061, allocations: 304 kB / 448.9 MB, free: 7.645 MB / 378.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003279/0.6065, allocations: 120.8 kB / 449.1 MB, free: 7.523 MB / 378.7 MB Notification: Performance of preOpt evalFunc (simulation): time 4.393e-05/0.6065, allocations: 7.984 kB / 449.1 MB, free: 7.516 MB / 378.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000612/0.6072, allocations: 231.5 kB / 449.3 MB, free: 7.277 MB / 378.7 MB Notification: Performance of pre-optimization done (n=43): time 3.566e-06/0.6072, allocations: 0.8438 kB / 449.3 MB, free: 7.277 MB / 378.7 MB Notification: Performance of matching and sorting (n=43): time 0.001278/0.6085, allocations: 441.1 kB / 449.7 MB, free: 6.84 MB / 378.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 9.012e-05/0.6086, allocations: 79.38 kB / 449.8 MB, free: 6.75 MB / 378.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002891/0.6089, allocations: 183 kB / 450 MB, free: 6.566 MB / 378.7 MB Notification: Performance of collectPreVariables (initialization): time 7.224e-05/0.609, allocations: 49.69 kB / 450 MB, free: 6.512 MB / 378.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001215/0.6091, allocations: 187.4 kB / 450.2 MB, free: 6.324 MB / 378.7 MB Notification: Performance of collectInitialBindings (initialization): time 0.0001338/0.6093, allocations: 98.84 kB / 450.3 MB, free: 6.227 MB / 378.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.129e-05/0.6093, allocations: 12 kB / 450.3 MB, free: 6.215 MB / 378.7 MB Notification: Performance of setup shared object (initialization): time 0.0001392/0.6095, allocations: 334.8 kB / 450.6 MB, free: 5.879 MB / 378.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002687/0.6097, allocations: 93.67 kB / 450.7 MB, free: 5.789 MB / 378.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004251/0.6102, allocations: 280.3 kB / 451 MB, free: 5.43 MB / 378.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003876/0.6106, allocations: 135.9 kB / 451.1 MB, free: 5.297 MB / 378.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.622e-06/0.6106, allocations: 0 / 451.1 MB, free: 5.297 MB / 378.7 MB Notification: Performance of matching and sorting (n=66) (initialization): time 0.001026/0.6116, allocations: 400.8 kB / 451.5 MB, free: 4.898 MB / 378.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.842e-05/0.6117, allocations: 8 kB / 451.5 MB, free: 4.891 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.502e-05/0.6117, allocations: 5.859 kB / 451.5 MB, free: 4.887 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 3.341e-05/0.6118, allocations: 15.98 kB / 451.6 MB, free: 4.871 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004048/0.6122, allocations: 63.84 kB / 451.6 MB, free: 4.809 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 3.761e-05/0.6122, allocations: 15.94 kB / 451.6 MB, free: 4.793 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003407/0.6126, allocations: 39.77 kB / 451.7 MB, free: 4.754 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.778e-05/0.6127, allocations: 20 kB / 451.7 MB, free: 4.734 MB / 378.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.pulsStart,booleanPulse.pulsStart,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.0002665/0.6129, allocations: 172.7 kB / 451.9 MB, free: 4.559 MB / 378.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.5e-05/0.613, allocations: 35.62 kB / 451.9 MB, free: 4.523 MB / 378.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.306e-05/0.6131, allocations: 26.77 kB / 451.9 MB, free: 4.5 MB / 378.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.235e-06/0.6132, allocations: 4 kB / 451.9 MB, free: 4.496 MB / 378.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.394e-06/0.6132, allocations: 0 / 451.9 MB, free: 4.496 MB / 378.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.863e-06/0.6132, allocations: 1.5 kB / 451.9 MB, free: 4.496 MB / 378.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.00236/0.6156, allocations: 0.932 MB / 452.9 MB, free: 3.508 MB / 378.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 6.162e-06/0.6156, allocations: 0 / 452.9 MB, free: 3.508 MB / 378.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001382/0.6158, allocations: 8 kB / 452.9 MB, free: 3.5 MB / 378.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.44e-05/0.6158, allocations: 4 kB / 452.9 MB, free: 3.496 MB / 378.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 5.076e-05/0.6159, allocations: 23.91 kB / 452.9 MB, free: 3.473 MB / 378.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 7.855e-06/0.6159, allocations: 3.953 kB / 452.9 MB, free: 3.469 MB / 378.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.665e-06/0.6159, allocations: 0 / 452.9 MB, free: 3.469 MB / 378.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001212/0.6171, allocations: 0.5422 MB / 453.4 MB, free: 2.91 MB / 378.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0001062/0.6172, allocations: 104.7 kB / 453.5 MB, free: 2.789 MB / 378.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 9.466e-05/0.6174, allocations: 19.97 kB / 453.6 MB, free: 2.77 MB / 378.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004386/0.6178, allocations: 39.97 kB / 453.6 MB, free: 2.73 MB / 378.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 9.618e-05/0.6179, allocations: 27.92 kB / 453.6 MB, free: 2.703 MB / 378.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.673e-05/0.618, allocations: 19.97 kB / 453.7 MB, free: 2.684 MB / 378.7 MB Notification: Performance of sorting global known variables: time 0.0002153/0.6182, allocations: 149.5 kB / 453.8 MB, free: 2.539 MB / 378.7 MB Notification: Performance of sort global known variables: time 5.01e-07/0.6182, allocations: 0 / 453.8 MB, free: 2.539 MB / 378.7 MB Notification: Performance of remove unused functions: time 0.0006546/0.6189, allocations: 72.94 kB / 453.9 MB, free: 2.469 MB / 378.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.pulsStart,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.001656/0.6206, allocations: 1.107 MB / 455 MB, free: 1.336 MB / 378.7 MB Notification: Performance of simCode: created initialization part: time 0.0009257/0.6215, allocations: 299.7 kB / 455.3 MB, free: 1.043 MB / 378.7 MB Notification: Performance of simCode: created event and clocks part: time 4.549e-06/0.6215, allocations: 1.562 kB / 455.3 MB, free: 1.043 MB / 378.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0004382/0.622, allocations: 159.9 kB / 455.4 MB, free: 0.8867 MB / 378.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0005247/0.6225, allocations: 42.55 kB / 455.5 MB, free: 0.8477 MB / 378.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002045/0.6246, allocations: 0.4887 MB / 456 MB, free: 320 kB / 378.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004685/0.6251, allocations: 0.7692 MB / 456.7 MB, free: 15.51 MB / 394.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.000218/0.6253, allocations: 87.41 kB / 456.8 MB, free: 15.43 MB / 394.7 MB Notification: Performance of SimCode: time 1.483e-06/0.6254, allocations: 0 / 456.8 MB, free: 15.43 MB / 394.7 MB Notification: Performance of buildModelFMU: Generate C++ for platform static: time 2.552/3.178, allocations: 4.346 MB / 461.2 MB, free: 11.1 MB / 394.7 MB TODO: How the !@#!# did the simulation report success but simulation result ModelicaTest_3.2.2_cpp_ModelicaTest.Blocks.Discrete_res.mat does not exist to compare? outputFormat=mat