Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) 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/PowerSystems 2.0.0/package.mo", uses=false) Using package PowerSystems with version 2.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 2.0.0/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) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid,fileNamePrefix="PowerSystems_PowerSystems_Examples_AC1ph_DC_Inverters_InverterToGrid",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid,fileNamePrefix="PowerSystems_PowerSystems_Examples_AC1ph_DC_Inverters_InverterToGrid",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001125/0.001125, allocations: 107.2 kB / 16.92 MB, free: 5.77 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001249/0.001249, allocations: 191.3 kB / 17.85 MB, free: 5.168 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.317/1.317, allocations: 222.9 MB / 241.5 MB, free: 15.29 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSystems 2.0.0/package.mo): time 0.1783/0.1783, allocations: 38.04 MB / 329.7 MB, free: 8.812 MB / 270.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001354/0.001354, allocations: 66.33 kB / 398.9 MB, free: 33.96 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08547/0.08684, allocations: 58.07 MB / 457 MB, free: 7.98 MB / 334.1 MB Notification: Performance of NFInst.instantiate(PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid): time 0.007823/0.0947, allocations: 6.546 MB / 463.5 MB, free: 1.398 MB / 334.1 MB Notification: Performance of NFInst.instExpressions: time 0.002838/0.09756, allocations: 1.66 MB / 465.2 MB, free: 15.73 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0005012/0.09809, allocations: 23.88 kB / 465.2 MB, free: 15.71 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0006033/0.09873, allocations: 162.7 kB / 465.4 MB, free: 15.55 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.001103/0.09985, allocations: 437.8 kB / 465.8 MB, free: 15.12 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0007237/0.1006, allocations: 355.5 kB / 466.1 MB, free: 14.77 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.001564/0.1022, allocations: 1.496 MB / 467.6 MB, free: 13.27 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005333/0.1027, allocations: 405.7 kB / 468 MB, free: 12.88 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0008962/0.1036, allocations: 0.5878 MB / 468.6 MB, free: 12.29 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.001028/0.1047, allocations: 0.6543 MB / 469.3 MB, free: 11.63 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 0.0002285/0.1049, allocations: 103.9 kB / 469.4 MB, free: 11.53 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0002782/0.1052, allocations: 100 kB / 469.5 MB, free: 11.43 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0004434/0.1056, allocations: 407.1 kB / 469.9 MB, free: 11.04 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0005821/0.1062, allocations: 474 kB / 470.3 MB, free: 10.57 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.001026/0.1073, allocations: 1.172 MB / 471.5 MB, free: 9.395 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.487e-06/0.1073, allocations: 0 / 471.5 MB, free: 9.395 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.152e-06/0.1073, allocations: 0 / 471.5 MB, free: 9.395 MB / 350.1 MB Notification: Performance of Transformations before backend: time 2.457e-05/0.1073, allocations: 0 / 471.5 MB, free: 9.395 MB / 350.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 159 * Number of variables: 159 Notification: Performance of Generate backend data structure: time 0.002872/0.1102, allocations: 1.316 MB / 472.8 MB, free: 8.016 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.673e-05/0.1102, allocations: 11.89 kB / 472.8 MB, free: 8.004 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001605/0.1104, allocations: 114.7 kB / 472.9 MB, free: 7.883 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001831/0.1106, allocations: 95.98 kB / 473 MB, free: 7.789 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001277/0.1119, allocations: 0.6937 MB / 473.7 MB, free: 7.051 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0004304/0.1123, allocations: 350.8 kB / 474.1 MB, free: 6.66 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001306/0.1125, allocations: 64 kB / 474.1 MB, free: 6.598 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.002308/0.1148, allocations: 1.149 MB / 475.3 MB, free: 5.41 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.667e-05/0.1148, allocations: 0 / 475.3 MB, free: 5.41 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 8.498e-05/0.1149, allocations: 24 kB / 475.3 MB, free: 5.387 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.00012/0.115, allocations: 41.28 kB / 475.3 MB, free: 5.348 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002799/0.1178, allocations: 1.176 MB / 476.5 MB, free: 4.172 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.005162/0.123, allocations: 3.48 MB / 480 MB, free: 0.582 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002557/0.1256, allocations: 0.9635 MB / 481 MB, free: 15.6 MB / 366.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001672/0.1273, allocations: 0.6864 MB / 481.6 MB, free: 14.91 MB / 366.1 MB Notification: Performance of preOpt evalFunc (simulation): time 4.903e-05/0.1273, allocations: 8.562 kB / 481.7 MB, free: 14.9 MB / 366.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001527/0.1289, allocations: 0.6811 MB / 482.3 MB, free: 14.2 MB / 366.1 MB Notification: Performance of pre-optimization done (n=59): time 4.167e-06/0.1289, allocations: 0 / 482.3 MB, free: 14.2 MB / 366.1 MB Notification: Performance of matching and sorting (n=61): time 0.02013/0.149, allocations: 5.674 MB / 488 MB, free: 8.449 MB / 366.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 7.793e-05/0.1491, allocations: 93.59 kB / 488.1 MB, free: 8.336 MB / 366.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005614/0.1497, allocations: 469.8 kB / 488.6 MB, free: 7.867 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 0.0001002/0.1498, allocations: 49.7 kB / 488.6 MB, free: 7.812 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0002456/0.1501, allocations: 320.2 kB / 488.9 MB, free: 7.496 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.000223/0.1503, allocations: 201.2 kB / 489.1 MB, free: 7.297 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002762/0.1506, allocations: 130.2 kB / 489.2 MB, free: 7.164 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 0.0001488/0.1507, allocations: 374.8 kB / 489.6 MB, free: 6.789 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001199/0.152, allocations: 0.5051 MB / 490.1 MB, free: 6.285 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001252/0.1532, allocations: 0.6258 MB / 490.7 MB, free: 5.621 MB / 366.1 MB Warning: It was not possible to determine if the initialization problem is consistent, because of not evaluable parameters/start values during compile time: ind.i[1] = ind.i_start[1] (-ind.i_start[2] = ind.i_start[1]) Notification: Performance of analyzeInitialSystem (initialization): time 0.007247/0.1605, allocations: 3.135 MB / 493.9 MB, free: 2.406 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.91e-06/0.1605, allocations: 0 / 493.9 MB, free: 2.406 MB / 366.1 MB Notification: Performance of matching and sorting (n=83) (initialization): time 0.008/0.1685, allocations: 2.498 MB / 496.4 MB, free: 15.89 MB / 382.1 MB Notification: Performance of prepare postOptimizeDAE: time 7.443e-05/0.1686, allocations: 53.62 kB / 496.4 MB, free: 15.83 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.378e-05/0.1687, allocations: 4 kB / 496.4 MB, free: 15.83 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.002531/0.1712, allocations: 1.09 MB / 497.5 MB, free: 14.73 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0005481/0.1718, allocations: 107.8 kB / 497.6 MB, free: 14.63 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.01636/0.1881, allocations: 6.875 MB / 0.4927 GB, free: 7.617 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007991/0.189, allocations: 79.95 kB / 0.4928 GB, free: 7.539 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.0001086/0.1891, allocations: 39.98 kB / 0.4928 GB, free: 7.5 MB / 382.1 MB Warning: The initial conditions are over specified. The following 1 initial equations are redundant, so they are removed from the initialization system: ind.i[1] = ind.i_start[1]. Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 14 * Number of states: 0 () * Number of discrete variables: 14 (system.initime,$PRE.inverter.modulator.gates[1],$PRE.inverter.modulator.gates[2],$PRE.inverter.modulator.gates[3],$PRE.inverter.modulator.gates[4],$PRE.inverter.modulator.t0,$PRE.inverter.modulator.sigdel_t,inverter.modulator.t0,inverter.modulator.sigdel_t,inverter.modulator.gates[4],inverter.modulator.gates[3],inverter.modulator.gates[2],inverter.modulator.gates[1],$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (63): * Single equations (assignments): 61 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(5,11)} Notification: Performance of prepare postOptimizeDAE: time 0.0004407/0.1895, allocations: 279.4 kB / 0.4931 GB, free: 7.215 MB / 382.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001296/0.1897, allocations: 63.23 kB / 0.4931 GB, free: 7.152 MB / 382.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.008271/0.1979, allocations: 2.433 MB / 0.4955 GB, free: 4.703 MB / 382.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.659e-06/0.198, allocations: 8 kB / 0.4955 GB, free: 4.695 MB / 382.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.136e-06/0.198, allocations: 4.125 kB / 0.4955 GB, free: 4.691 MB / 382.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.27e-05/0.198, allocations: 7.984 kB / 0.4955 GB, free: 4.684 MB / 382.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.009939/0.2079, allocations: 3.563 MB / 0.499 GB, free: 1.023 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 9.107e-06/0.208, allocations: 0 / 0.499 GB, free: 1.023 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.000406/0.2084, allocations: 79.89 kB / 0.4991 GB, free: 0.9453 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.1722/0.3806, allocations: 1.087 MB / 0.5001 GB, free: 57.12 MB / 382.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 0.0001705/0.3808, allocations: 20.55 kB / 0.5001 GB, free: 57.12 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.01577/0.3966, allocations: 6.829 MB / 0.5068 GB, free: 55 MB / 382.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.297e-06/0.3966, allocations: 2.625 kB / 0.5068 GB, free: 55 MB / 382.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.01008/0.4067, allocations: 3.205 MB / 0.5099 GB, free: 54.24 MB / 382.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004471/0.4072, allocations: 226.2 kB / 0.5102 GB, free: 54.11 MB / 382.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001478/0.4074, allocations: 36.27 kB / 0.5102 GB, free: 54.09 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0008319/0.4082, allocations: 91.83 kB / 0.5103 GB, free: 54.09 MB / 382.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0005182/0.4087, allocations: 173.5 kB / 0.5105 GB, free: 54.07 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 7.665e-05/0.4088, allocations: 22.42 kB / 0.5105 GB, free: 54.06 MB / 382.1 MB Notification: Performance of sorting global known variables: time 0.0005817/0.4094, allocations: 322.6 kB / 0.5108 GB, free: 53.91 MB / 382.1 MB Notification: Performance of sort global known variables: time 1.2e-07/0.4094, allocations: 0 / 0.5108 GB, free: 53.91 MB / 382.1 MB Notification: Performance of remove unused functions: time 0.001113/0.4105, allocations: 227.5 kB / 0.511 GB, free: 53.89 MB / 382.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 7 * Number of states: 3 (meterDC.pav,meterAC.pav,ind.i[2]) * Number of discrete variables: 8 ($whenCondition1,inverter.modulator.gates[1],inverter.modulator.gates[2],inverter.modulator.gates[3],inverter.modulator.gates[4],inverter.modulator.sigdel_t,inverter.modulator.t0,system.initime) * Number of discrete states: 6 (inverter.modulator.t0,inverter.modulator.sigdel_t,inverter.modulator.gates[3],inverter.modulator.gates[4],inverter.modulator.gates[1],inverter.modulator.gates[2]) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (50): * Single equations (assignments): 42 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 7 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(5,11)} Notification: Performance of Backend phase and start with SimCode phase: time 0.009788/0.4203, allocations: 3.773 MB / 0.5147 GB, free: 52.54 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.004696/0.4251, allocations: 1.842 MB / 0.5165 GB, free: 51.95 MB / 382.1 MB Notification: Performance of simCode: created event and clocks part: time 4.719e-06/0.4251, allocations: 0 / 0.5165 GB, free: 51.95 MB / 382.1 MB Notification: Performance of simCode: created simulation system equations: time 0.003191/0.4283, allocations: 1.111 MB / 0.5176 GB, free: 51.59 MB / 382.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0009627/0.4293, allocations: 156.5 kB / 0.5177 GB, free: 51.54 MB / 382.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02028/0.4496, allocations: 9.963 MB / 0.5274 GB, free: 44.41 MB / 382.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003586/0.4499, allocations: 1 MB / 0.5284 GB, free: 43.39 MB / 382.1 MB Notification: Performance of simCode: alias equations: time 0.000407/0.4504, allocations: 118 kB / 0.5285 GB, free: 43.28 MB / 382.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002353/0.4506, allocations: 239.3 kB / 0.5288 GB, free: 43.04 MB / 382.1 MB Notification: Performance of SimCode: time 6.81e-07/0.4506, allocations: 0 / 0.5288 GB, free: 43.04 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.03888/0.4895, allocations: 22.49 MB / 0.5507 GB, free: 20.78 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 11.32/11.8, allocations: 11.95 kB / 0.5507 GB, free: 20.77 MB / 382.1 MB (rm -f PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.pipe ; mkfifo PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.pipe ; head -c 1048576 < PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.pipe >> ../files/PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.sim & python3 -m fmpy simulate --output-file PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid_res.csv --start-time 0 --stop-time 0.2 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.0002 PowerSystems_PowerSystems_Examples_AC1ph_DC_Inverters_InverterToGrid.fmu > PowerSystems_PowerSystems.Examples.AC1ph_DC.Inverters.InverterToGrid.pipe 2>&1)