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.0008943/0.0008941, allocations: 84.38 kB / 15.06 MB, free: 1.09 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.00105/0.00105, allocations: 168.7 kB / 15.95 MB, free: 204 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.369/1.369, allocations: 223.3 MB / 240 MB, free: 5.391 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo): time 0.2185/0.2185, allocations: 22.35 MB / 313.4 MB, free: 13.11 MB / 254.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0003507/0.000351, allocations: 7.984 kB / 382 MB, free: 10.4 MB / 318.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3397/0.34, allocations: 55.97 MB / 438 MB, free: 39.36 MB / 350.1 MB Notification: Performance of NFInst.instantiate(AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary): time 0.002284/0.3424, allocations: 2.108 MB / 440.1 MB, free: 37.82 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.001095/0.3435, allocations: 0.7478 MB / 440.9 MB, free: 37.31 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000144/0.3436, allocations: 5.188 kB / 440.9 MB, free: 37.31 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003495/0.344, allocations: 64.23 kB / 440.9 MB, free: 37.29 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0002533/0.3443, allocations: 111.9 kB / 441.1 MB, free: 37.23 MB / 350.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002758/0.3445, allocations: 158.2 kB / 441.2 MB, free: 37.15 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0004314/0.345, allocations: 470.1 kB / 441.7 MB, free: 36.95 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001966/0.3452, allocations: 102.4 kB / 441.8 MB, free: 36.9 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0002184/0.3454, allocations: 193.5 kB / 442 MB, free: 36.83 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0002424/0.3457, allocations: 204.4 kB / 442.2 MB, free: 36.75 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 4.099e-05/0.3457, allocations: 13.06 kB / 442.2 MB, free: 36.75 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 3.875e-05/0.3458, allocations: 15.78 kB / 442.2 MB, free: 36.75 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 9.03e-05/0.3459, allocations: 83.89 kB / 442.3 MB, free: 36.71 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 5.599e-05/0.3459, allocations: 84.83 kB / 442.3 MB, free: 36.64 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0002137/0.3461, allocations: 276.3 kB / 442.6 MB, free: 36.58 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 4.238e-06/0.3462, allocations: 10.78 kB / 442.6 MB, free: 36.57 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.693e-06/0.3462, allocations: 0 / 442.6 MB, free: 36.57 MB / 350.1 MB Notification: Performance of Transformations before backend: time 6.893e-06/0.3462, allocations: 0 / 442.6 MB, free: 36.57 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.001484/0.3477, allocations: 0.7699 MB / 443.4 MB, free: 36.05 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.266e-05/0.3477, allocations: 15.59 kB / 443.4 MB, free: 36.04 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 5.864e-05/0.3478, allocations: 63.77 kB / 443.5 MB, free: 35.98 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.156e-05/0.3479, allocations: 50.69 kB / 443.5 MB, free: 35.96 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006845/0.3486, allocations: 413.5 kB / 443.9 MB, free: 35.68 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.178e-05/0.3486, allocations: 24.16 kB / 444 MB, free: 35.67 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 4.757e-05/0.3486, allocations: 37.16 kB / 444 MB, free: 35.65 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0004428/0.3491, allocations: 300.8 kB / 444.3 MB, free: 35.5 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.426e-05/0.3491, allocations: 0 / 444.3 MB, free: 35.5 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.721e-05/0.3492, allocations: 11 kB / 444.3 MB, free: 35.5 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 9.798e-06/0.3492, allocations: 11.16 kB / 444.3 MB, free: 35.49 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0003654/0.3495, allocations: 221 kB / 444.5 MB, free: 35.42 MB / 350.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001286/0.3508, allocations: 1.04 MB / 445.6 MB, free: 34.75 MB / 350.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0006627/0.3515, allocations: 386.7 kB / 445.9 MB, free: 34.61 MB / 350.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001958/0.3517, allocations: 150.3 kB / 446.1 MB, free: 34.55 MB / 350.1 MB Notification: Performance of preOpt evalFunc (simulation): time 2.358e-05/0.3517, allocations: 2.812 kB / 446.1 MB, free: 34.55 MB / 350.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.607e-05/0.3518, allocations: 37.22 kB / 446.1 MB, free: 34.51 MB / 350.1 MB Notification: Performance of pre-optimization done (n=37): time 2.965e-06/0.3518, allocations: 4 kB / 446.1 MB, free: 34.5 MB / 350.1 MB Notification: Performance of matching and sorting (n=39): time 0.001639/0.3534, allocations: 1.1 MB / 447.2 MB, free: 33.82 MB / 350.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 2.756e-05/0.3535, allocations: 62.11 kB / 447.3 MB, free: 33.75 MB / 350.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0006024/0.3541, allocations: 433.1 kB / 447.7 MB, free: 33.57 MB / 350.1 MB Notification: Performance of collectPreVariables (initialization): time 1.891e-05/0.3541, allocations: 29.7 kB / 447.7 MB, free: 33.53 MB / 350.1 MB Notification: Performance of collectInitialEqns (initialization): time 9.752e-05/0.3542, allocations: 202.3 kB / 447.9 MB, free: 33.36 MB / 350.1 MB Notification: Performance of collectInitialBindings (initialization): time 7.696e-05/0.3543, allocations: 147.9 kB / 448.1 MB, free: 33.25 MB / 350.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.414e-05/0.3543, allocations: 4 kB / 448.1 MB, free: 33.24 MB / 350.1 MB Notification: Performance of setup shared object (initialization): time 6.781e-05/0.3544, allocations: 351.6 kB / 448.4 MB, free: 32.91 MB / 350.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000176/0.3546, allocations: 110.9 kB / 448.5 MB, free: 32.87 MB / 350.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001897/0.3548, allocations: 172.9 kB / 448.7 MB, free: 32.77 MB / 350.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0002028/0.355, allocations: 134.1 kB / 448.8 MB, free: 32.71 MB / 350.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.342e-06/0.355, allocations: 0 / 448.8 MB, free: 32.71 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.Pm ; Ge1.Pcmd ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge1.Pcmd 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.0008483/0.3558, allocations: 0.7944 MB / 449.6 MB, free: 32.09 MB / 350.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.613e-05/0.3559, allocations: 4.969 kB / 449.6 MB, free: 32.09 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.062e-06/0.3559, allocations: 2.406 kB / 449.6 MB, free: 32.09 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0002583/0.3561, allocations: 106.9 kB / 449.7 MB, free: 32.04 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003193/0.3565, allocations: 82.91 kB / 449.8 MB, free: 32.04 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.002642/0.3591, allocations: 7.297 MB / 457.1 MB, free: 24.67 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003272/0.3595, allocations: 43.95 kB / 457.2 MB, free: 24.66 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.168e-05/0.3595, allocations: 13.62 kB / 457.2 MB, free: 24.66 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 (linear and non-linear blocks): 0 * Torn equation systems: 3 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems: 2 {(1,100.0%) 1,(1,100.0%) 1} * Non-linear torn systems: 1 {1 8} Notification: Performance of prepare postOptimizeDAE: time 0.0001618/0.3597, allocations: 173.3 kB / 457.3 MB, free: 24.5 MB / 350.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 6.014e-05/0.3597, allocations: 44.75 kB / 457.4 MB, free: 24.48 MB / 350.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 8.758e-05/0.3598, allocations: 51.5 kB / 457.4 MB, free: 24.44 MB / 350.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 3.246e-06/0.3598, allocations: 2.812 kB / 457.4 MB, free: 24.44 MB / 350.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.727e-06/0.3598, allocations: 0 / 457.4 MB, free: 24.44 MB / 350.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 5.4e-06/0.3599, allocations: 7.406 kB / 457.5 MB, free: 24.43 MB / 350.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001019/0.3609, allocations: 0.8805 MB / 458.3 MB, free: 23.9 MB / 350.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.614e-06/0.3609, allocations: 0 / 458.3 MB, free: 23.9 MB / 350.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003016/0.3612, allocations: 67.84 kB / 458.4 MB, free: 23.89 MB / 350.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.0001964/0.3614, allocations: 76.77 kB / 458.5 MB, free: 23.86 MB / 350.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.502e-05/0.3614, allocations: 10.34 kB / 458.5 MB, free: 23.86 MB / 350.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001133/0.3626, allocations: 1.712 MB / 460.2 MB, free: 22.3 MB / 350.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.633e-06/0.3626, allocations: 3.953 kB / 460.2 MB, free: 22.3 MB / 350.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007072/0.3633, allocations: 0.6036 MB / 460.8 MB, free: 21.97 MB / 350.1 MB Notification: Performance of postOpt removeConstants (simulation): time 7.065e-05/0.3634, allocations: 116.2 kB / 460.9 MB, free: 21.86 MB / 350.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 4.446e-05/0.3634, allocations: 11.22 kB / 460.9 MB, free: 21.85 MB / 350.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003216/0.3638, allocations: 36.83 kB / 461 MB, free: 21.84 MB / 350.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.75e-05/0.3638, allocations: 30.75 kB / 461 MB, free: 21.84 MB / 350.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.792e-05/0.3639, allocations: 13.8 kB / 461 MB, free: 21.83 MB / 350.1 MB Notification: Performance of sorting global known variables: time 0.0005739/0.3645, allocations: 324.8 kB / 461.3 MB, free: 21.7 MB / 350.1 MB Notification: Performance of sort global known variables: time 1.8e-07/0.3645, allocations: 4 kB / 461.3 MB, free: 21.7 MB / 350.1 MB Notification: Performance of remove unused functions: time 0.0005393/0.365, allocations: 82 kB / 461.4 MB, free: 21.68 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 (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 8} Notification: Performance of Backend phase and start with SimCode phase: time 0.0009775/0.366, allocations: 1.16 MB / 462.6 MB, free: 20.82 MB / 350.1 MB Notification: Performance of simCode: created initialization part: time 0.0007554/0.3668, allocations: 0.6396 MB / 463.2 MB, free: 20.37 MB / 350.1 MB Notification: Performance of simCode: created event and clocks part: time 2.635e-06/0.3668, allocations: 0 / 463.2 MB, free: 20.37 MB / 350.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0003146/0.3671, allocations: 297.3 kB / 463.5 MB, free: 20.19 MB / 350.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004314/0.3675, allocations: 55.89 kB / 463.6 MB, free: 20.16 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.Pm ; Ge1.Pcmd ] = [ 0.0 ; 0.0 ] might be structurally or numerically singular for variable Ge1.Pcmd 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.00479/0.3723, allocations: 3.295 MB / 466.8 MB, free: 18.22 MB / 350.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002686/0.3726, allocations: 0.8256 MB / 467.7 MB, free: 17.52 MB / 350.1 MB Notification: Performance of simCode: alias equations: time 0.0001819/0.3728, allocations: 54.56 kB / 467.7 MB, free: 17.5 MB / 350.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001951/0.373, allocations: 133.6 kB / 467.9 MB, free: 17.4 MB / 350.1 MB Notification: Performance of SimCode: time 5.21e-07/0.373, allocations: 0 / 467.9 MB, free: 17.4 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02411/0.3971, allocations: 7.612 MB / 475.5 MB, free: 16.89 MB / 350.1 MB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.000159/0.3973, allocations: 224.4 kB / 475.7 MB, free: 16.65 MB / 350.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 1.992/2.389, allocations: 0 / 475.7 MB, free: 16.65 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 & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator --tempDir=temp_AES_AES_Coursework_ElecSys_case_studies_Primary_secondary_tertiary_fmu --startTime=0 --stopTime=2000 --timeout=50 --tolerance=1e-06 AES_AES_Coursework_ElecSys_case_studies_Primary_secondary_tertiary.fmu > AES_AES.Coursework.ElecSys_case_studies.Primary_secondary_tertiary.pipe 2>&1) Environment - environmentSimulation: