Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr AES_AES.Coursework.Tuning_brushup.PI_loop_analogue_digital.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo", uses=false) Using package ModelicaServices with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo) Using package Complex with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo) Using package AES with version (/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo) Running command: translateModel(AES.Coursework.Tuning_brushup.PI_loop_analogue_digital,tolerance=1e-06,outputFormat="empty",numberOfIntervals=1000,variableFilter="",fileNamePrefix="AES_AES.Coursework.Tuning_brushup.PI_loop_analogue_digital") translateModel(AES.Coursework.Tuning_brushup.PI_loop_analogue_digital,tolerance=1e-06,outputFormat="empty",numberOfIntervals=1000,variableFilter="",fileNamePrefix="AES_AES.Coursework.Tuning_brushup.PI_loop_analogue_digital") [/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/Coursework/ThermSys_case_studies/Heat_network/HC_SS_case_001.mo:3:1-67:19:writable] Warning: Expected the package to have within AES.Coursework.ThermSys_case_studies.Heat_network; but got within AES.Coursework.ThermSys_case_studies.heat_network; (ignoring the potential error; the class might have been inserted at an unexpected location). [/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/Coursework/ThermSys_case_studies/Heat_network/HC_case_001.mo:3:1-55:16:writable] Warning: Expected the package to have within AES.Coursework.ThermSys_case_studies.Heat_network; but got within AES.Coursework.ThermSys_case_studies.heat_network; (ignoring the potential error; the class might have been inserted at an unexpected location). [/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/Coursework/ThermSys_case_studies/Heat_network/HNcontrol_HC_SS_case_002.mo:3:1-91:29:writable] Warning: Expected the package to have within AES.Coursework.ThermSys_case_studies.Heat_network; but got within AES.Coursework.ThermSys_case_studies.heat_network; (ignoring the potential error; the class might have been inserted at an unexpected location). [/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/Coursework/ThermSys_case_studies/Heat_network/HNcontrol_HC_SS_case_001.mo:3:1-85:29:writable] Warning: Expected the package to have within AES.Coursework.ThermSys_case_studies.Heat_network; but got within AES.Coursework.ThermSys_case_studies.heat_network; (ignoring the potential error; the class might have been inserted at an unexpected location). Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/AES main/package.mo): time 0.09178/0.09178, allocations: 21.6 MB / 37.4 MB, free: 0.7578 MB / 24.77 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 3.2.3+maint.om/package.mo): time 0.001218/0.001218, allocations: 184.5 kB / 43.63 MB, free: 3.562 MB / 33.03 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.279/1.279, allocations: 205.1 MB / 254.8 MB, free: 14.24 MB / 202.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 3.2.3+maint.om/package.mo): time 0.0009527/0.0009526, allocations: 107.8 kB / 307.5 MB, free: 11.37 MB / 250.7 MB Notification: Performance of FrontEnd - loaded program: time 0.001167/0.001167, allocations: 55.11 kB / 372.3 MB, free: 59.49 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.07566/0.07685, allocations: 51.96 MB / 424.3 MB, free: 14.52 MB / 298.7 MB Notification: Performance of NFInst.instantiate(AES.Coursework.Tuning_brushup.PI_loop_analogue_digital): time 0.002808/0.0797, allocations: 2.075 MB / 426.4 MB, free: 12.42 MB / 298.7 MB Notification: Performance of NFInst.instExpressions: time 0.001118/0.08085, allocations: 0.749 MB / 427.1 MB, free: 11.66 MB / 298.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001774/0.08105, allocations: 3.938 kB / 427.1 MB, free: 11.66 MB / 298.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0002982/0.08136, allocations: 39.78 kB / 427.2 MB, free: 11.62 MB / 298.7 MB Notification: Performance of NFTyping.typeBindings: time 0.000204/0.0816, allocations: 47.77 kB / 427.2 MB, free: 11.57 MB / 298.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003671/0.08198, allocations: 159.1 kB / 427.4 MB, free: 11.42 MB / 298.7 MB Notification: Performance of NFFlatten.flatten: time 0.000268/0.08225, allocations: 323.3 kB / 427.7 MB, free: 11.11 MB / 298.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001553/0.08242, allocations: 87.08 kB / 427.8 MB, free: 11.02 MB / 298.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001218/0.08255, allocations: 123.5 kB / 427.9 MB, free: 10.9 MB / 298.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001788/0.08273, allocations: 147.4 kB / 428 MB, free: 10.75 MB / 298.7 MB Notification: Performance of NFPackage.collectConstants: time 4.517e-05/0.08279, allocations: 16 kB / 428 MB, free: 10.74 MB / 298.7 MB Notification: Performance of NFFlatten.collectFunctions: time 3.385e-05/0.08283, allocations: 12 kB / 428.1 MB, free: 10.73 MB / 298.7 MB Notification: Performance of NFScalarize.scalarize: time 9.948e-05/0.08293, allocations: 79.67 kB / 428.1 MB, free: 10.65 MB / 298.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001036/0.08304, allocations: 119.2 kB / 428.2 MB, free: 10.53 MB / 298.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0002061/0.08325, allocations: 271 kB / 428.5 MB, free: 10.27 MB / 298.7 MB Notification: Performance of FrontEnd - DAE generated: time 4.428e-06/0.08327, allocations: 0 / 428.5 MB, free: 10.27 MB / 298.7 MB Notification: Performance of FrontEnd: time 8.32e-07/0.08327, allocations: 0 / 428.5 MB, free: 10.27 MB / 298.7 MB Notification: Performance of Transformations before backend: time 4.608e-06/0.08328, allocations: 4 kB / 428.5 MB, free: 10.26 MB / 298.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 43 * Number of variables: 43 Notification: Performance of Generate backend data structure: time 0.001386/0.08468, allocations: 0.7281 MB / 429.2 MB, free: 9.473 MB / 298.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.609e-05/0.08472, allocations: 12.03 kB / 429.3 MB, free: 9.461 MB / 298.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 7.744e-05/0.0848, allocations: 32.56 kB / 429.3 MB, free: 9.43 MB / 298.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006004/0.08541, allocations: 351.4 kB / 429.6 MB, free: 9.047 MB / 298.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.627e-05/0.08544, allocations: 16.7 kB / 429.6 MB, free: 9.031 MB / 298.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.903e-05/0.08548, allocations: 20.38 kB / 429.7 MB, free: 9.012 MB / 298.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003652/0.08585, allocations: 249.5 kB / 429.9 MB, free: 8.758 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.388e-05/0.08588, allocations: 3.938 kB / 429.9 MB, free: 8.754 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.076e-05/0.0859, allocations: 12 kB / 429.9 MB, free: 8.742 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.646e-06/0.08592, allocations: 4 kB / 429.9 MB, free: 8.738 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000364/0.08629, allocations: 200.5 kB / 430.1 MB, free: 8.543 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001039/0.08733, allocations: 0.7032 MB / 430.8 MB, free: 7.789 MB / 298.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.000532/0.08788, allocations: 266.2 kB / 431.1 MB, free: 7.52 MB / 298.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001978/0.08809, allocations: 131.2 kB / 431.2 MB, free: 7.391 MB / 298.7 MB Notification: Performance of preOpt evalFunc (simulation): time 2.596e-05/0.08812, allocations: 3.984 kB / 431.2 MB, free: 7.387 MB / 298.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002694/0.0884, allocations: 197 kB / 431.4 MB, free: 7.176 MB / 298.7 MB Notification: Performance of pre-optimization done (n=24): time 1.743e-06/0.08841, allocations: 0 / 431.4 MB, free: 7.176 MB / 298.7 MB Notification: Performance of matching and sorting (n=24): time 0.002034/0.09045, allocations: 0.9087 MB / 432.3 MB, free: 6.211 MB / 298.7 MB Notification: Performance of inlineWhenForInitialization (initialization): time 4.867e-05/0.09051, allocations: 148.4 kB / 432.5 MB, free: 6.035 MB / 298.7 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0004705/0.09099, allocations: 314.5 kB / 432.8 MB, free: 5.715 MB / 298.7 MB Notification: Performance of collectPreVariables (initialization): time 2.197e-05/0.09102, allocations: 33.7 kB / 432.8 MB, free: 5.676 MB / 298.7 MB Notification: Performance of collectInitialEqns (initialization): time 6.661e-05/0.09109, allocations: 160.3 kB / 433 MB, free: 5.516 MB / 298.7 MB Notification: Performance of collectInitialBindings (initialization): time 5.551e-05/0.09116, allocations: 78.91 kB / 433 MB, free: 5.438 MB / 298.7 MB Notification: Performance of simplifyInitialFunctions (initialization): time 7.017e-05/0.09123, allocations: 49.7 kB / 433.1 MB, free: 5.383 MB / 298.7 MB Notification: Performance of setup shared object (initialization): time 5.719e-05/0.0913, allocations: 342.8 kB / 433.4 MB, free: 5.039 MB / 298.7 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000189/0.09149, allocations: 109.1 kB / 433.5 MB, free: 4.93 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001905/0.09169, allocations: 139 kB / 433.7 MB, free: 4.785 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.001596/0.09329, allocations: 0.7256 MB / 434.4 MB, free: 4.023 MB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.096e-06/0.09331, allocations: 4 kB / 434.4 MB, free: 4.02 MB / 298.7 MB Notification: Performance of matching and sorting (n=33) (initialization): time 0.0008248/0.09414, allocations: 0.5128 MB / 434.9 MB, free: 3.484 MB / 298.7 MB Notification: Performance of prepare postOptimizeDAE: time 3.129e-05/0.09418, allocations: 55.41 kB / 435 MB, free: 3.418 MB / 298.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 5.731e-06/0.09419, allocations: 4 kB / 435 MB, free: 3.414 MB / 298.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.0002314/0.09443, allocations: 76.8 kB / 435 MB, free: 3.336 MB / 298.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001431/0.09458, allocations: 35.91 kB / 435.1 MB, free: 3.301 MB / 298.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001546/0.09614, allocations: 1.734 MB / 436.8 MB, free: 1.438 MB / 298.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002781/0.09643, allocations: 47.83 kB / 436.9 MB, free: 1.391 MB / 298.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.93e-05/0.09646, allocations: 8 kB / 436.9 MB, free: 1.383 MB / 298.7 MB Warning: Assuming fixed start value for the following 4 variables: Process_d.x_scaled[2]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_d.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_a.x_scaled[2]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_a.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.0002483/0.09672, allocations: 217.4 kB / 437.1 MB, free: 1.168 MB / 298.7 MB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.0001929/0.09692, allocations: 123.1 kB / 437.2 MB, free: 1.039 MB / 298.7 MB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.001435/0.09837, allocations: 0.6837 MB / 437.9 MB, free: 328 kB / 298.7 MB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 1.142e-06/0.09838, allocations: 4 kB / 437.9 MB, free: 324 kB / 298.7 MB Notification: Performance of matching and sorting (n=33) (initialization_lambda0): time 0.0006742/0.09906, allocations: 437.2 kB / 438.3 MB, free: 15.87 MB / 314.7 MB Notification: Performance of prepare postOptimizeDAE: time 6.144e-05/0.09914, allocations: 67.33 kB / 438.4 MB, free: 15.79 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.305e-06/0.09915, allocations: 0 / 438.4 MB, free: 15.79 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.000178/0.09933, allocations: 61 kB / 438.4 MB, free: 15.73 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000151/0.09949, allocations: 35.98 kB / 438.5 MB, free: 15.69 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001433/0.1009, allocations: 1.67 MB / 440.1 MB, free: 13.89 MB / 314.7 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002938/0.1012, allocations: 47.89 kB / 440.2 MB, free: 13.84 MB / 314.7 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.483e-05/0.1013, allocations: 15.98 kB / 440.2 MB, free: 13.82 MB / 314.7 MB Warning: Assuming fixed start value for the following 4 variables: Process_d.x_scaled[2]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_d.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_a.x_scaled[2]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Process_a.x_scaled[1]:VARIABLE(fixed = true protected = true ) "Scaled vector x" type: Real [2] Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 2 * Number of states: 0 () * Number of discrete variables: 9 ($whenCondition1,$PRE.PI_d.u,$PRE.PI_d.ulino,$PRE.PI_d.ulin,$PRE.PI_d.xfb,PI_d.u,PI_d.ulino,PI_d.ulin,PI_d.xfb) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (25): * Single equations (assignments): 22 * Array equations: 0 * Algorithm blocks: 2 * 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,5)} Notification: Performance of prepare postOptimizeDAE: time 0.0002305/0.1015, allocations: 231 kB / 440.4 MB, free: 13.59 MB / 314.7 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.432e-05/0.1016, allocations: 35.64 kB / 440.5 MB, free: 13.55 MB / 314.7 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 9.117e-05/0.1017, allocations: 34.17 kB / 440.5 MB, free: 13.52 MB / 314.7 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 4.108e-06/0.1017, allocations: 4 kB / 440.5 MB, free: 13.52 MB / 314.7 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 4.458e-06/0.1017, allocations: 0 / 440.5 MB, free: 13.52 MB / 314.7 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.943e-06/0.1017, allocations: 3.984 kB / 440.5 MB, free: 13.51 MB / 314.7 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003931/0.1021, allocations: 353.3 kB / 440.9 MB, free: 13.12 MB / 314.7 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 3.677e-06/0.1021, allocations: 0 / 440.9 MB, free: 13.12 MB / 314.7 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001518/0.1023, allocations: 27.86 kB / 440.9 MB, free: 13.09 MB / 314.7 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.000456/0.1027, allocations: 195.4 kB / 441.1 MB, free: 12.89 MB / 314.7 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.512e-05/0.1028, allocations: 11.98 kB / 441.1 MB, free: 12.88 MB / 314.7 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.002421/0.1052, allocations: 2.425 MB / 443.5 MB, free: 10.29 MB / 314.7 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.314e-06/0.1052, allocations: 3.938 kB / 443.5 MB, free: 10.28 MB / 314.7 MB Error: Internal error BackendDAE.adjacencyRowEnhanced failed for eqn: algorithm PI_d.u := pre(PI_d.u); PI_d.u.$pDERA.dummyVarA := 0.0; PI_d.ulino := pre(PI_d.ulino); PI_d.ulino.$pDERA.dummyVarA := 0.0; PI_d.ulin := pre(PI_d.ulin); PI_d.ulin.$pDERA.dummyVarA := 0.0; PI_d.xfb := pre(PI_d.xfb); PI_d.xfb.$pDERA.dummyVarA := 0.0; $whenCondition1 := pre($whenCondition1); $whenCondition1.$pDERA.dummyVarA := 0.0; $whenCondition1 := sample(1, 0.0, PI_d.Ts); $whenCondition1.$pDERA.dummyVarA := 0.0; when $whenCondition1 then PI_d.xfb := (PI_d.Ti * PI_d.xfb + PI_d.Ts * PI_d.u) / (PI_d.Ti + PI_d.Ts); PI_d.xfb.$pDERA.dummyVarA := (PI_d.Ti * PI_d.xfb.$pDERA.dummyVarA + PI_d.Ts * PI_d.u.$pDERA.dummyVarA) / (PI_d.Ti + PI_d.Ts); PI_d.ulin := PI_d.K * (SP.y - Process_d.y) + PI_d.xfb; PI_d.ulin.$pDERA.dummyVarA := PI_d.xfb.$pDERA.dummyVarA - PI_d.K * Process_d.y.$pDERA.dummyVarA; PI_d.ulino := PI_d.ulin; PI_d.ulino.$pDERA.dummyVarA := PI_d.ulin.$pDERA.dummyVarA; PI_d.u := max(PI_d.CSmin, min(PI_d.CSmax, PI_d.ulin)); PI_d.u.$pDERA.dummyVarA := if noEvent(PI_d.CSmin > min(PI_d.CSmax, PI_d.ulin)) then 0.0 else if noEvent(PI_d.CSmax < PI_d.ulin) then 0.0 else PI_d.ulin.$pDERA.dummyVarA; end when; Error: Internal error BackendDAEUtil.getAdjacencyMatrixEnhancedScalar failed Error: Jacobian A contains non-linear components. This indicates a singular system or internal generation errors. Notification: Performance of postOpt symbolicJacobian (simulation): time 0.008508/0.1138, allocations: 5.546 MB / 449.1 MB, free: 4.406 MB / 314.7 MB Error: post-optimization module symbolicJacobian (simulation) failed.