Running command: translateModel(Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc,tolerance=1e-06,outputFormat="mat",numberOfIntervals=48000,variableFilter="time|inductor1.i|inductor2.i",fileNamePrefix="Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc") Notification: Performance of loadModel(Modelica): time 1.937/1.937, allocations: 194.9 MB / 208.4 MB, free: 3.242 MB / 170.7 MB Notification: Performance of FrontEnd - loaded program: time 2.876e-05/2.892e-05, allocations: 7.125 kB / 255.3 MB, free: 3.195 MB / 202.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08406/0.08411, allocations: 44.49 MB / 299.8 MB, free: 6.633 MB / 250.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.3592/0.4434, allocations: 74.4 MB / 374.2 MB, free: 22.17 MB / 314.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002325/0.4437, allocations: 68.44 kB / 374.3 MB, free: 22.17 MB / 314.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.02708/0.4708, allocations: 6.064 MB / 380.4 MB, free: 21.38 MB / 314.7 MB Notification: Performance of FrontEnd: time 1.907e-06/0.4708, allocations: 3.938 kB / 380.4 MB, free: 21.38 MB / 314.7 MB Notification: Performance of Transformations before backend: time 2.326e-05/0.4708, allocations: 5.969 kB / 380.4 MB, free: 21.38 MB / 314.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 80 * Number of variables: 80 Notification: Performance of Generate backend data structure: time 0.0009511/0.4718, allocations: 0.5703 MB / 380.9 MB, free: 20.95 MB / 314.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.185e-05/0.4719, allocations: 12.78 kB / 381 MB, free: 20.94 MB / 314.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001042/0.472, allocations: 40.52 kB / 381 MB, free: 20.92 MB / 314.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003359/0.4723, allocations: 268.5 kB / 381.3 MB, free: 20.69 MB / 314.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 7.771e-05/0.4724, allocations: 77.62 kB / 381.3 MB, free: 20.63 MB / 314.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.861e-05/0.4725, allocations: 31.19 kB / 381.4 MB, free: 20.63 MB / 314.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000656/0.4732, allocations: 321.2 kB / 381.7 MB, free: 20.55 MB / 314.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.696e-05/0.4732, allocations: 4.969 kB / 381.7 MB, free: 20.55 MB / 314.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.514e-05/0.4733, allocations: 15.66 kB / 381.7 MB, free: 20.55 MB / 314.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.156e-05/0.4733, allocations: 6.75 kB / 381.7 MB, free: 20.55 MB / 314.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0004952/0.4738, allocations: 204.1 kB / 381.9 MB, free: 20.54 MB / 314.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002187/0.476, allocations: 1.391 MB / 383.3 MB, free: 19.73 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.000367/0.4764, allocations: 162.6 kB / 383.5 MB, free: 19.7 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001744/0.4766, allocations: 81.2 kB / 383.5 MB, free: 19.7 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 2.245e-05/0.4766, allocations: 2.625 kB / 383.5 MB, free: 19.7 MB / 314.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000294/0.4769, allocations: 149.1 kB / 383.7 MB, free: 19.62 MB / 314.7 MB Notification: Performance of pre-optimization done (n=21): time 3.336e-06/0.4769, allocations: 0 / 383.7 MB, free: 19.62 MB / 314.7 MB Notification: Performance of matching and sorting (n=21): time 0.0007073/0.4777, allocations: 232.8 kB / 383.9 MB, free: 19.55 MB / 314.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.634e-05/0.4777, allocations: 110.5 kB / 384 MB, free: 19.43 MB / 314.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002828/0.478, allocations: 229.5 kB / 384.2 MB, free: 19.33 MB / 314.7 MB Notification: Performance of collectPreVariables (initialization): time 2.871e-05/0.4781, allocations: 34.33 kB / 384.3 MB, free: 19.29 MB / 314.7 MB Notification: Performance of collectInitialEqns (initialization): time 0.0001082/0.4782, allocations: 257.9 kB / 384.5 MB, free: 19.09 MB / 314.7 MB Notification: Performance of collectInitialBindings (initialization): time 6.403e-05/0.4783, allocations: 69.94 kB / 384.6 MB, free: 19.05 MB / 314.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.75e-05/0.4783, allocations: 8.906 kB / 384.6 MB, free: 19.04 MB / 314.7 MB Notification: Performance of setup shared object (initialization): time 5.72e-05/0.4784, allocations: 324.1 kB / 384.9 MB, free: 18.73 MB / 314.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001759/0.4786, allocations: 71.94 kB / 385 MB, free: 18.73 MB / 314.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002242/0.4788, allocations: 146 kB / 385.1 MB, free: 18.63 MB / 314.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001939/0.479, allocations: 82.36 kB / 385.2 MB, free: 18.62 MB / 314.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.038e-06/0.479, allocations: 5.281 kB / 385.2 MB, free: 18.62 MB / 314.7 MB Notification: Performance of matching and sorting (n=37) (initialization): time 0.0007975/0.4798, allocations: 302.1 kB / 385.5 MB, free: 18.55 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 2.114e-05/0.4799, allocations: 5.5 kB / 385.5 MB, free: 18.55 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.942e-06/0.4799, allocations: 3.031 kB / 385.5 MB, free: 18.55 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0002933/0.4802, allocations: 60.25 kB / 385.6 MB, free: 18.54 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003169/0.4805, allocations: 59.83 kB / 385.6 MB, free: 18.53 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001252/0.4818, allocations: 1.405 MB / 387 MB, free: 17.19 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003895/0.4822, allocations: 48.69 kB / 387.1 MB, free: 17.17 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.353e-05/0.4823, allocations: 10.62 kB / 387.1 MB, free: 17.17 MB / 314.7 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 10 * Number of states: 0 () * Number of discrete variables: 8 ($whenCondition1,switch1.off,$PRE.switch2.off,switch2.off,$PRE.switch2.quenched,switch2.quenched,$PRE.switch2.tSwitch,switch2.tSwitch) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (36): * Single equations (assignments): 35 * 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 {1 1} Notification: Performance of prepare postOptimizeDAE: time 0.0001114/0.4824, allocations: 129.9 kB / 387.2 MB, free: 17.05 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.737e-05/0.4825, allocations: 28.86 kB / 387.3 MB, free: 17.04 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 6.996e-05/0.4825, allocations: 33.19 kB / 387.3 MB, free: 17.03 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 5.684e-06/0.4826, allocations: 2.469 kB / 387.3 MB, free: 17.03 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.534e-06/0.4826, allocations: 0 / 387.3 MB, free: 17.03 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.609e-06/0.4826, allocations: 3.375 kB / 387.3 MB, free: 17.03 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004095/0.483, allocations: 332.7 kB / 387.6 MB, free: 16.84 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.161e-06/0.483, allocations: 1.875 kB / 387.6 MB, free: 16.84 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002909/0.4833, allocations: 39.52 kB / 387.7 MB, free: 16.83 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0002532/0.4836, allocations: 60.17 kB / 387.7 MB, free: 16.82 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.64e-05/0.4836, allocations: 3.969 kB / 387.7 MB, free: 16.82 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001085/0.4847, allocations: 1.332 MB / 389.1 MB, free: 15.55 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.701e-06/0.4848, allocations: 0 / 389.1 MB, free: 15.55 MB / 314.7 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0008262/0.4856, allocations: 328.7 kB / 389.4 MB, free: 15.45 MB / 314.7 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0005041/0.4861, allocations: 128.8 kB / 389.5 MB, free: 31.34 MB / 330.7 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.845e-05/0.4862, allocations: 2.75 kB / 389.5 MB, free: 31.34 MB / 330.7 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002426/0.4865, allocations: 22.34 kB / 389.5 MB, free: 31.34 MB / 330.7 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001049/0.4866, allocations: 28.41 kB / 389.5 MB, free: 31.34 MB / 330.7 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.288e-05/0.4866, allocations: 13.78 kB / 389.6 MB, free: 31.33 MB / 330.7 MB Notification: Performance of sorting global known variables: time 0.000241/0.4869, allocations: 180.5 kB / 389.7 MB, free: 31.25 MB / 330.7 MB Notification: Performance of sort global known variables: time 7.97e-07/0.4869, allocations: 1.344 kB / 389.7 MB, free: 31.25 MB / 330.7 MB Notification: Performance of remove unused functions: time 0.0005728/0.4875, allocations: 95.88 kB / 389.8 MB, free: 31.23 MB / 330.7 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 2 (inductor1.i,inductor2.i) * Number of discrete variables: 5 ($whenCondition1,switch1.off,switch2.off,switch2.quenched,switch2.tSwitch) * Number of discrete states: 2 (switch2.quenched,switch2.off) * Top-level inputs: 0 Notification: Strong component statistics for simulation (20): * Single equations (assignments): 18 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 1 * 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 {1 1} Notification: Performance of Backend phase and start with SimCode phase: time 0.000177/0.4877, allocations: 117.5 kB / 389.9 MB, free: 31.14 MB / 330.7 MB Notification: Performance of simCode: created initialization part: time 0.0006683/0.4883, allocations: 301.3 kB / 390.2 MB, free: 31.01 MB / 330.7 MB Notification: Performance of simCode: created event and clocks part: time 3.892e-06/0.4884, allocations: 0 / 390.2 MB, free: 31.01 MB / 330.7 MB Notification: Performance of simCode: created simulation system equations: time 0.0003299/0.4887, allocations: 190.6 kB / 390.4 MB, free: 30.9 MB / 330.7 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002972/0.489, allocations: 28.59 kB / 390.5 MB, free: 30.9 MB / 330.7 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001517/0.4906, allocations: 0.5124 MB / 391 MB, free: 30.63 MB / 330.7 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004488/0.491, allocations: 0.7794 MB / 391.7 MB, free: 29.93 MB / 330.7 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001025/0.4912, allocations: 22.28 kB / 391.8 MB, free: 29.92 MB / 330.7 MB Notification: Performance of SimCode: time 2.177e-06/0.4912, allocations: 3.938 kB / 391.8 MB, free: 29.91 MB / 330.7 MB Notification: Performance of Templates: time 0.007416/0.4986, allocations: 4.487 MB / 396.3 MB, free: 29.66 MB / 330.7 MB "Error: Could not read variable switch1.off in file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat. Warning: Get data of variable switch1.off from file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat failed! Error: Could not read variable switch1.s in file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat. Warning: Get data of variable switch1.s from file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat failed! Error: Could not read variable switch2.quenched in file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat. Warning: Get data of variable switch2.quenched from file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat failed! Error: Could not read variable switch2.tSwitch in file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat. Warning: Get data of variable switch2.tSwitch from file Modelica_3.2.2_cpp_Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc_res.mat failed! " Variables in the reference:time,inductor1.i,inductor2.i Variables in the result:constantVoltage1.V,constantVoltage1.i,constantVoltage1.n.i,constantVoltage1.n.v,constantVoltage1.p.i,constantVoltage1.p.v,constantVoltage1.v,constantVoltage2.V,constantVoltage2.i,constantVoltage2.n.i,constantVoltage2.n.v,constantVoltage2.p.i,constantVoltage2.p.v,constantVoltage2.v,ground.p.i,ground.p.v,ground1.p.i,ground1.p.v,ground2.p.i,ground2.p.v,inductor1.L,der(inductor1.i),inductor1.i,inductor1.n.i,inductor1.n.v,inductor1.p.i,inductor1.p.v,inductor1.v,inductor2.L,der(inductor2.i),inductor2.i,inductor2.n.i,inductor2.n.v,inductor2.p.i,inductor2.p.v,inductor2.v,resistor1.LossPower,resistor1.R,resistor1.R_actual,resistor1.T,resistor1.T_heatPort,resistor1.T_ref,resistor1.alpha,resistor1.i,resistor1.n.i,resistor1.n.v,resistor1.p.i,resistor1.p.v,resistor1.v,resistor2.LossPower,resistor2.R,resistor2.R_actual,resistor2.T,resistor2.T_heatPort,resistor2.T_ref,resistor2.alpha,resistor2.i,resistor2.n.i,resistor2.n.v,resistor2.p.i,resistor2.p.v,resistor2.v,sineVoltage.V,sineVoltage.freqHz,sineVoltage.i,sineVoltage.n.i,sineVoltage.n.v,sineVoltage.offset,sineVoltage.p.i,sineVoltage.p.v,sineVoltage.phase,sineVoltage.signalSource.amplitude,sineVoltage.signalSource.freqHz,sineVoltage.signalSource.offset,sineVoltage.signalSource.phase,sineVoltage.signalSource.startTime,sineVoltage.signalSource.y,sineVoltage.startTime,sineVoltage.v,switch1.Goff,switch1.LossPower,switch1.Ron,switch1.T,switch1.T_heatPort,switch1.control.i,switch1.control.v,switch1.i,switch1.level,switch1.n.i,switch1.n.v,switch1.p.i,switch1.p.v,switch1.v,switch2.Goff,switch2.LossPower,switch2.Ron,switch2.T,switch2.T_heatPort,switch2.V0,switch2.Vmax,switch2.control.i,switch2.control.v,switch2.dVdt,switch2.i,switch2.level,switch2.n.i,switch2.n.v,switch2.off,switch2.p.i,switch2.p.v,switch2.v,time