Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.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_case_studies.Primary_secondary_tertiary,fileNamePrefix="AES_AES_Coursework_ElecSys_case_studies_Primary_secondary_tertiary",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary,fileNamePrefix="AES_AES_Coursework_ElecSys_case_studies_Primary_secondary_tertiary",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.001132/0.001132, 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.002326/0.002326, allocations: 198.5 kB / 16.54 MB, free: 6.672 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.366/1.366, allocations: 222.9 MB / 240.2 MB, free: 4.379 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo): time 0.2196/0.2196, allocations: 22.35 MB / 312.7 MB, free: 12.51 MB / 254.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001356/0.001356, allocations: 59.91 kB / 380.9 MB, free: 10.38 MB / 318.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2472/0.2486, allocations: 54.94 MB / 435.9 MB, free: 39.7 MB / 350.1 MB Notification: Performance of NFInst.instantiate(AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary): time 0.002921/0.2515, allocations: 2.528 MB / 438.4 MB, free: 37.89 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.001044/0.2526, allocations: 0.7735 MB / 439.2 MB, free: 37.36 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001372/0.2527, allocations: 5.562 kB / 439.2 MB, free: 37.36 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003438/0.2531, allocations: 89.59 kB / 439.3 MB, free: 37.31 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002538/0.2534, allocations: 131.7 kB / 439.4 MB, free: 37.24 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.000285/0.2537, allocations: 202.2 kB / 439.6 MB, free: 37.14 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0003713/0.254, allocations: 0.5168 MB / 440.1 MB, free: 36.91 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.000185/0.2542, allocations: 122 kB / 440.2 MB, free: 36.86 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001965/0.2544, allocations: 224.7 kB / 440.4 MB, free: 36.75 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002248/0.2547, allocations: 239.6 kB / 440.7 MB, free: 36.64 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 5.585e-05/0.2547, allocations: 34.06 kB / 440.7 MB, free: 36.64 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 5.542e-05/0.2548, allocations: 36.97 kB / 440.7 MB, free: 36.64 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 9.524e-05/0.2549, allocations: 108.2 kB / 440.9 MB, free: 36.58 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.0001188/0.255, allocations: 191.6 kB / 441 MB, free: 36.45 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002605/0.2553, allocations: 388.4 kB / 441.4 MB, free: 36.29 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 3.357e-06/0.2553, allocations: 0 / 441.4 MB, free: 36.29 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.362e-06/0.2553, allocations: 0 / 441.4 MB, free: 36.29 MB / 350.1 MB Notification: Performance of Transformations before backend: time 7.384e-06/0.2553, allocations: 0 / 441.4 MB, free: 36.29 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: 71 * Number of variables: 71 Notification: Performance of Generate backend data structure: time 0.001601/0.2569, allocations: 0.8336 MB / 442.3 MB, free: 35.71 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 3.264e-05/0.257, allocations: 12.09 kB / 442.3 MB, free: 35.71 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 6.326e-05/0.257, allocations: 62.42 kB / 442.3 MB, free: 35.66 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 6.883e-05/0.2571, allocations: 47.53 kB / 442.4 MB, free: 35.63 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006864/0.2578, allocations: 419.5 kB / 442.8 MB, free: 35.34 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.031e-05/0.2578, allocations: 27.11 kB / 442.8 MB, free: 35.32 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.629e-05/0.2579, allocations: 32.22 kB / 442.8 MB, free: 35.31 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003778/0.2583, allocations: 302.6 kB / 443.1 MB, free: 35.16 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.093e-05/0.2583, allocations: 0 / 443.1 MB, free: 35.16 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.326e-05/0.2583, allocations: 10.91 kB / 443.1 MB, free: 35.15 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.035e-06/0.2583, allocations: 17.22 kB / 443.2 MB, free: 35.14 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003378/0.2587, allocations: 218.3 kB / 443.4 MB, free: 35.08 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001259/0.2599, allocations: 1.046 MB / 444.4 MB, free: 34.39 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0006898/0.2606, allocations: 390.3 kB / 444.8 MB, free: 34.25 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001958/0.2608, allocations: 152.7 kB / 445 MB, free: 34.2 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.304e-05/0.2609, allocations: 3.625 kB / 445 MB, free: 34.2 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.56e-05/0.2609, allocations: 41.53 kB / 445 MB, free: 34.15 MB / 350.1 MB Notification: Performance of pre-optimization done (n=37): time 1.513e-06/0.2609, allocations: 0 / 445 MB, free: 34.15 MB / 350.1 MB Notification: Performance of matching and sorting (n=39): time 0.001707/0.2626, allocations: 1.11 MB / 446.1 MB, free: 33.46 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 2.094e-05/0.2627, allocations: 55.69 kB / 446.2 MB, free: 33.4 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000664/0.2633, allocations: 431.3 kB / 446.6 MB, free: 33.21 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 1.896e-05/0.2634, allocations: 29.7 kB / 446.6 MB, free: 33.18 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 8.722e-05/0.2634, allocations: 209.6 kB / 446.8 MB, free: 33 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 6.655e-05/0.2635, allocations: 136.2 kB / 446.9 MB, free: 32.89 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 8.845e-05/0.2636, allocations: 73.81 kB / 447 MB, free: 32.85 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 6.079e-05/0.2637, allocations: 348.3 kB / 447.4 MB, free: 32.52 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001722/0.2639, allocations: 110.5 kB / 447.5 MB, free: 32.48 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.000184/0.2641, allocations: 171.7 kB / 447.6 MB, free: 32.38 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001393/0.2655, allocations: 0.6132 MB / 448.2 MB, free: 32.13 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.763e-06/0.2655, allocations: 2.438 kB / 448.3 MB, free: 32.13 MB / 350.1 MB Warning: The linear system: 1 : Ge2.Pm = Ge2.Pcmd 2 : Ge2.Pm = Ge2.Pcmd [ 1.0 , -1.0 ; 1.0 , -1.0 ] * [ Ge2.Pm ; Ge2.Pcmd ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge2.Pcmd since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Warning: The linear system: 1 : Ge1.Pm = Ge1.Pcmd 2 : Ge1.Pm = Ge1.Pcmd [ -1.0 , 1.0 ; -1.0 , 1.0 ] * [ Ge1.Pcmd ; Ge1.Pm ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge1.Pm since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Notification: Performance of matching and sorting (n=52) (initialization): time 0.0008417/0.2663, allocations: 0.8013 MB / 449.1 MB, free: 31.52 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.228e-05/0.2663, allocations: 3.969 kB / 449.1 MB, free: 31.52 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.811e-06/0.2663, allocations: 2.906 kB / 449.1 MB, free: 31.52 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0002424/0.2666, allocations: 102.4 kB / 449.2 MB, free: 31.47 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003261/0.2669, allocations: 85.27 kB / 449.2 MB, free: 31.46 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.00253/0.2695, allocations: 7.938 MB / 457.2 MB, free: 23.45 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003725/0.2699, allocations: 42.5 kB / 457.2 MB, free: 23.45 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.95e-05/0.2699, allocations: 11.81 kB / 457.2 MB, free: 23.44 MB / 350.1 MB Warning: Assuming fixed start value for the following 1 variables: Ge2.deltag:VARIABLE(unit = "rad" fixed = true ) "generator angle wrt port" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 6 * Number of states: 0 () * Number of discrete variables: 1 (Cs.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (42): * Single equations (assignments): 39 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 2 systems {(1,1,100.0%), (1,1,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(1,8)} Notification: Performance of prepare postOptimizeDAE: time 0.0001502/0.27, allocations: 175.9 kB / 457.4 MB, free: 23.29 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.236e-05/0.2701, allocations: 36.61 kB / 457.4 MB, free: 23.27 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.567e-05/0.2702, allocations: 57.69 kB / 457.5 MB, free: 23.23 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.835e-06/0.2702, allocations: 2.625 kB / 457.5 MB, free: 23.23 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.146e-06/0.2702, allocations: 0 / 457.5 MB, free: 23.23 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 4.138e-06/0.2702, allocations: 2.625 kB / 457.5 MB, free: 23.23 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0009575/0.2712, allocations: 0.8891 MB / 458.4 MB, free: 22.68 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.504e-06/0.2712, allocations: 0 / 458.4 MB, free: 22.68 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002813/0.2715, allocations: 63.64 kB / 458.5 MB, free: 22.68 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0002026/0.2717, allocations: 75.2 kB / 458.5 MB, free: 22.66 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.614e-05/0.2717, allocations: 13.73 kB / 458.5 MB, free: 22.65 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.00111/0.2728, allocations: 1.89 MB / 460.4 MB, free: 20.92 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.82e-07/0.2729, allocations: 0 / 460.4 MB, free: 20.92 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007183/0.2736, allocations: 0.618 MB / 461 MB, free: 20.58 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 6.146e-05/0.2737, allocations: 114.8 kB / 461.2 MB, free: 20.46 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.666e-05/0.2737, allocations: 10.09 kB / 461.2 MB, free: 20.46 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003734/0.2741, allocations: 38.56 kB / 461.2 MB, free: 20.45 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.032e-05/0.2742, allocations: 29.41 kB / 461.2 MB, free: 20.45 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.636e-05/0.2742, allocations: 9.812 kB / 461.2 MB, free: 20.44 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0005513/0.2747, allocations: 333.3 kB / 461.6 MB, free: 20.3 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.71e-07/0.2747, allocations: 0 / 461.6 MB, free: 20.3 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0004947/0.2753, allocations: 81.5 kB / 461.7 MB, free: 20.29 MB / 350.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 8 (g1.x_scaled[1],g2.x_scaled[1],Cs.y,Ge1.deltag,Ge1.wg,Ge2.thetap,Ge2.deltag,Ge2.wg) * 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 (31): * Single equations (assignments): 30 * Array equations: 0 * Algorithm blocks: 0 * 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 {(1,8)} Notification: Performance of Backend phase and start with SimCode phase: time 0.000932/0.2762, allocations: 1.163 MB / 462.8 MB, free: 19.42 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.0007743/0.277, allocations: 0.6595 MB / 463.5 MB, free: 18.97 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 3.326e-06/0.277, allocations: 0 / 463.5 MB, free: 18.97 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0003429/0.2773, allocations: 299.7 kB / 463.8 MB, free: 18.79 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000433/0.2778, allocations: 60.16 kB / 463.8 MB, free: 18.76 MB / 350.1 MB Warning: The linear system: 1 : Ge2.Pm = Ge2.Pcmd 2 : Ge2.Pm = Ge2.Pcmd [ -1.0 , 1.0 ; -1.0 , 1.0 ] * [ Ge2.Pcmd ; Ge2.Pm ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge2.Pm since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Warning: The linear system: 1 : Ge1.Pm = Ge1.Pcmd 2 : Ge1.Pm = Ge1.Pcmd [ -1.0 , 1.0 ; -1.0 , 1.0 ] * [ Ge1.Pcmd ; Ge1.Pm ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge1.Pm since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Warning: The linear system: 1 : Ge2.Pm = Ge2.Pcmd 2 : Ge2.Pm = Ge2.Pcmd [ 1.0 , -1.0 ; 1.0 , -1.0 ] * [ Ge2.Pm ; Ge2.Pcmd ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge2.Pcmd since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Warning: The linear system: 1 : Ge1.Pm = Ge1.Pcmd 2 : Ge1.Pm = Ge1.Pcmd [ -1.0 , 1.0 ; -1.0 , 1.0 ] * [ Ge1.Pcmd ; Ge1.Pm ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge1.Pm since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway. Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.005736/0.2835, allocations: 4.798 MB / 468.6 MB, free: 15.45 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002633/0.2838, allocations: 0.8345 MB / 469.5 MB, free: 14.74 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0001786/0.284, allocations: 45.05 kB / 469.5 MB, free: 14.73 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001642/0.2842, allocations: 131 kB / 469.6 MB, free: 14.64 MB / 350.1 MB Notification: Performance of SimCode: time 5.61e-07/0.2842, allocations: 0 / 469.6 MB, free: 14.64 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.0316/0.3158, allocations: 8.016 MB / 477.6 MB, free: 13.88 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 11.46/11.78, allocations: 12.45 kB / 477.7 MB, free: 13.87 MB / 350.1 MB (rm -f AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.pipe ; mkfifo AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.pipe ; head -c 1048576 < AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.pipe >> ../files/AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.sim & python3 -m fmpy simulate --output-file AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary_res.csv --start-time 0 --stop-time 2000 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 0.4 AES_AES_Coursework_ElecSys_case_studies_Primary_secondary_tertiary.fmu > AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.pipe 2>&1)