Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.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/AES main/package.mo", uses=false) Using package AES with version (/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/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(AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator,fileNamePrefix="AES_AES_Coursework_ElecSys_power_frequency_control_BO_rigid_Islanded_generator",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator,fileNamePrefix="AES_AES_Coursework_ElecSys_power_frequency_control_BO_rigid_Islanded_generator",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.001118/0.001118, allocations: 108 kB / 15.6 MB, free: 132 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001201/0.001201, allocations: 193.7 kB / 16.53 MB, free: 6.391 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.345/1.345, allocations: 222.9 MB / 240.2 MB, free: 4.418 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo): time 0.199/0.199, allocations: 22.34 MB / 312.7 MB, free: 12.52 MB / 254.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001313/0.001313, allocations: 55.91 kB / 380.9 MB, free: 10.49 MB / 318.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2482/0.2495, allocations: 54.94 MB / 435.9 MB, free: 39.81 MB / 350.1 MB Notification: Performance of NFInst.instantiate(AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator): time 0.002054/0.2516, allocations: 1.008 MB / 436.9 MB, free: 39.16 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.001224/0.2528, allocations: 1.222 MB / 438.1 MB, free: 38.26 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 8.769e-05/0.2529, allocations: 0 / 438.1 MB, free: 38.26 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0002885/0.2532, allocations: 42.73 kB / 438.1 MB, free: 38.24 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001325/0.2534, allocations: 43.52 kB / 438.2 MB, free: 38.22 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000171/0.2536, allocations: 80.94 kB / 438.3 MB, free: 38.18 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002143/0.2538, allocations: 217.3 kB / 438.5 MB, free: 38.1 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 9.947e-05/0.2539, allocations: 31.14 kB / 438.5 MB, free: 38.08 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 9.588e-05/0.254, allocations: 83.88 kB / 438.6 MB, free: 38.05 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001353/0.2542, allocations: 92.95 kB / 438.7 MB, free: 38.02 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 3.013e-05/0.2542, allocations: 9.344 kB / 438.7 MB, free: 38.02 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 2.294e-05/0.2542, allocations: 10.38 kB / 438.7 MB, free: 38.02 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 7.443e-05/0.2543, allocations: 42.89 kB / 438.7 MB, free: 38 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 5.459e-05/0.2544, allocations: 65.84 kB / 438.8 MB, free: 37.95 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0001333/0.2545, allocations: 120.4 kB / 438.9 MB, free: 37.9 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.938e-06/0.2545, allocations: 0 / 438.9 MB, free: 37.9 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.372e-06/0.2545, allocations: 0 / 438.9 MB, free: 37.9 MB / 350.1 MB Notification: Performance of Transformations before backend: time 5.2e-06/0.2545, allocations: 0 / 438.9 MB, free: 37.9 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: 18 * Number of variables: 18 Notification: Performance of Generate backend data structure: time 0.0009425/0.2555, allocations: 0.5198 MB / 439.4 MB, free: 37.47 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.324e-05/0.2555, allocations: 7.594 kB / 439.4 MB, free: 37.47 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 2.99e-05/0.2556, allocations: 40.52 kB / 439.5 MB, free: 37.43 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 3.747e-05/0.2556, allocations: 20.34 kB / 439.5 MB, free: 37.41 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0004627/0.2561, allocations: 286 kB / 439.8 MB, free: 37.18 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.405e-05/0.2561, allocations: 3.438 kB / 439.8 MB, free: 37.18 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 2.533e-05/0.2561, allocations: 13.31 kB / 439.8 MB, free: 37.18 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0001881/0.2563, allocations: 133.2 kB / 439.9 MB, free: 37.08 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 8.256e-06/0.2563, allocations: 0 / 439.9 MB, free: 37.08 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.177e-05/0.2564, allocations: 2.688 kB / 439.9 MB, free: 37.08 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.159e-06/0.2564, allocations: 6.531 kB / 439.9 MB, free: 37.08 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0001734/0.2566, allocations: 92.97 kB / 440 MB, free: 37.05 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.000593/0.2572, allocations: 0.5774 MB / 440.6 MB, free: 36.55 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003337/0.2575, allocations: 140 kB / 440.7 MB, free: 36.5 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 8.626e-05/0.2576, allocations: 51.09 kB / 440.8 MB, free: 36.47 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.406e-05/0.2576, allocations: 2.562 kB / 440.8 MB, free: 36.47 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.257e-05/0.2576, allocations: 34.56 kB / 440.8 MB, free: 36.43 MB / 350.1 MB Notification: Performance of pre-optimization done (n=10): time 1.563e-06/0.2576, allocations: 0 / 440.8 MB, free: 36.43 MB / 350.1 MB Notification: Performance of matching and sorting (n=10): time 0.0003276/0.258, allocations: 165.3 kB / 441 MB, free: 36.36 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 1.973e-05/0.258, allocations: 51.41 kB / 441 MB, free: 36.29 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004196/0.2584, allocations: 255 kB / 441.3 MB, free: 36.16 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 1.07e-05/0.2585, allocations: 32.45 kB / 441.3 MB, free: 36.12 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 5.257e-05/0.2585, allocations: 124.8 kB / 441.4 MB, free: 36.01 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 2.698e-05/0.2585, allocations: 40.3 kB / 441.5 MB, free: 35.98 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 4.486e-05/0.2586, allocations: 26.38 kB / 441.5 MB, free: 35.95 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 4.625e-05/0.2586, allocations: 330.9 kB / 441.8 MB, free: 35.63 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 7.781e-05/0.2587, allocations: 39.36 kB / 441.9 MB, free: 35.62 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 7.694e-05/0.2588, allocations: 57.88 kB / 441.9 MB, free: 35.59 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0006978/0.2595, allocations: 255 kB / 442.2 MB, free: 35.49 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 2.534e-06/0.2595, allocations: 0 / 442.2 MB, free: 35.49 MB / 350.1 MB Notification: Performance of matching and sorting (n=15) (initialization): time 0.0002547/0.2598, allocations: 170.1 kB / 442.3 MB, free: 35.41 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.638e-05/0.2598, allocations: 7.625 kB / 442.4 MB, free: 35.41 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.202e-06/0.2598, allocations: 0 / 442.4 MB, free: 35.41 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.902e-05/0.2599, allocations: 0 / 442.4 MB, free: 35.41 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001165/0.26, allocations: 17.84 kB / 442.4 MB, free: 35.41 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 7.664e-06/0.26, allocations: 10.25 kB / 442.4 MB, free: 35.41 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001935/0.2602, allocations: 33.81 kB / 442.4 MB, free: 35.39 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 9.798e-06/0.2602, allocations: 3.062 kB / 442.4 MB, free: 35.39 MB / 350.1 MB Warning: Assuming fixed start value for the following 2 variables: g.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [1] Cps.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [1] Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 3 * Number of states: 0 () * Number of discrete variables: 1 (N.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (15): * Single equations (assignments): 15 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0001423/0.2604, allocations: 140.7 kB / 442.6 MB, free: 35.26 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 4.016e-05/0.2604, allocations: 15.97 kB / 442.6 MB, free: 35.25 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.814e-05/0.2605, allocations: 23.36 kB / 442.6 MB, free: 35.24 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.627e-06/0.2605, allocations: 2.625 kB / 442.6 MB, free: 35.24 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.48e-06/0.2605, allocations: 7.938 kB / 442.6 MB, free: 35.23 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 3.787e-06/0.2605, allocations: 0 / 442.6 MB, free: 35.23 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002131/0.2607, allocations: 237.7 kB / 442.8 MB, free: 35.02 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.392e-06/0.2607, allocations: 2.844 kB / 442.8 MB, free: 35.02 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001254/0.2608, allocations: 11.66 kB / 442.9 MB, free: 35.02 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 3.687e-06/0.2609, allocations: 2.75 kB / 442.9 MB, free: 35.02 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.411e-05/0.2609, allocations: 7.219 kB / 442.9 MB, free: 35.01 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.325e-06/0.2609, allocations: 4 kB / 442.9 MB, free: 35.01 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.994e-06/0.2609, allocations: 3.938 kB / 442.9 MB, free: 35 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0003175/0.2612, allocations: 282.3 kB / 443.1 MB, free: 34.82 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 4.284e-05/0.2613, allocations: 102.1 kB / 443.2 MB, free: 34.71 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 2.625e-05/0.2613, allocations: 0 / 443.2 MB, free: 34.71 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002137/0.2615, allocations: 28.3 kB / 443.3 MB, free: 34.7 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 3.764e-05/0.2616, allocations: 14.48 kB / 443.3 MB, free: 34.7 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 6.782e-06/0.2616, allocations: 3.969 kB / 443.3 MB, free: 34.7 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0003357/0.2619, allocations: 195.8 kB / 443.5 MB, free: 34.6 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.2e-07/0.2619, allocations: 0 / 443.5 MB, free: 34.6 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0002501/0.2622, allocations: 23.91 kB / 443.5 MB, free: 34.59 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 3 (N.y,Cps.x_scaled[1],g.x_scaled[1]) * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (10): * Single equations (assignments): 10 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0004572/0.2626, allocations: 0.8127 MB / 444.3 MB, free: 33.88 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.0002169/0.2629, allocations: 108.4 kB / 444.4 MB, free: 33.85 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 1.994e-06/0.2629, allocations: 0 / 444.4 MB, free: 33.85 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 8.005e-05/0.263, allocations: 54.42 kB / 444.5 MB, free: 33.83 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0003348/0.2633, allocations: 32.58 kB / 444.5 MB, free: 33.82 MB / 350.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002468/0.2658, allocations: 2.104 MB / 446.6 MB, free: 32.32 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0001478/0.266, allocations: 0.7294 MB / 447.3 MB, free: 31.62 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 8.311e-05/0.266, allocations: 26.22 kB / 447.4 MB, free: 31.62 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 7.279e-05/0.2661, allocations: 43.41 kB / 447.4 MB, free: 31.59 MB / 350.1 MB Notification: Performance of SimCode: time 2.4e-07/0.2661, allocations: 0 / 447.4 MB, free: 31.59 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02239/0.2885, allocations: 3.092 MB / 450.5 MB, free: 31.16 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 7.532/7.82, allocations: 8.719 kB / 450.5 MB, free: 31.15 MB / 350.1 MB (rm -f AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.pipe ; mkfifo AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.pipe ; head -c 1048576 < AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.pipe >> ../files/AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.sim & python3 -m fmpy simulate --output-file AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator_res.csv --start-time 0 --stop-time 300 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.6 AES_AES_Coursework_ElecSys_power_frequency_control_BO_rigid_Islanded_generator.fmu > AES_AES.Coursework.ElecSys_power_frequency_control.BO_rigid_Islanded_generator.pipe 2>&1)