Running command: "" <> buildModelFMU(OpenHPL.Tests.HPDraftTube,fileNamePrefix="OpenHPL_OpenHPL_Tests_HPDraftTube",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadModel(OpenHPL): time 2.718/2.718, allocations: 258 MB / 265.1 MB, free: 5.473 MB / 218.7 MB Notification: Performance of FrontEnd - loaded program: time 2.832e-05/2.819e-05, allocations: 4 kB / 327.7 MB, free: 9.914 MB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1436/0.1437, allocations: 60.24 MB / 388 MB, free: 13.58 MB / 330.7 MB Notification: Performance of FrontEnd - scodeFlatten: time 0.5487/0.6924, allocations: 98.4 MB / 486.4 MB, free: 7.277 MB / 378.7 MB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0003065/0.6928, allocations: 84.92 kB / 486.5 MB, free: 7.266 MB / 378.7 MB Notification: Performance of FrontEnd - DAE generated: time 0.1755/0.8683, allocations: 33.79 MB / 0.5081 GB, free: 3.301 MB / 394.7 MB Notification: Performance of FrontEnd: time 2.365e-06/0.8684, allocations: 0 / 0.5081 GB, free: 3.301 MB / 394.7 MB Notification: Performance of Transformations before backend: time 0.0001576/0.8685, allocations: 43.67 kB / 0.5081 GB, free: 3.262 MB / 394.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 379 * Number of variables: 379 Notification: Performance of Generate backend data structure: time 0.007993/0.8765, allocations: 1.913 MB / 0.51 GB, free: 1.422 MB / 394.7 MB Notification: Performance of prepare preOptimizeDAE: time 6.035e-05/0.8766, allocations: 8.031 kB / 0.51 GB, free: 1.414 MB / 394.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.00169/0.8783, allocations: 237.3 kB / 0.5102 GB, free: 1.18 MB / 394.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.002539/0.8809, allocations: 0.9033 MB / 0.5111 GB, free: 404 kB / 394.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 8.989e-05/0.881, allocations: 51.94 kB / 0.5111 GB, free: 352 kB / 394.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.000347/0.8814, allocations: 95.28 kB / 0.5112 GB, free: 260 kB / 394.7 MB Notification: Performance of preOpt removeEqualFunctionCalls (simulation): time 0.003766/0.8851, allocations: 1.184 MB / 0.5124 GB, free: 15.48 MB / 410.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.003405/0.8886, allocations: 1.312 MB / 0.5137 GB, free: 14.46 MB / 410.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.63e-05/0.8886, allocations: 4 kB / 0.5137 GB, free: 14.45 MB / 410.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001674/0.8888, allocations: 0 / 0.5137 GB, free: 14.45 MB / 410.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.142e-05/0.8889, allocations: 36 kB / 0.5137 GB, free: 14.42 MB / 410.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01557/0.9045, allocations: 5.251 MB / 0.5188 GB, free: 10.25 MB / 410.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.007759/0.9123, allocations: 1.513 MB / 0.5203 GB, free: 9.129 MB / 410.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001301/0.9136, allocations: 0.5115 MB / 0.5208 GB, free: 8.805 MB / 410.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.001478/0.9151, allocations: 0.8848 MB / 0.5217 GB, free: 7.742 MB / 410.7 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 5.7e-05/0.9152, allocations: 53.73 kB / 0.5217 GB, free: 7.691 MB / 410.7 MB Notification: Performance of pre-optimization done (n=155): time 5.431e-06/0.9152, allocations: 0 / 0.5217 GB, free: 7.691 MB / 410.7 MB [/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OMCompiler/build/lib/omlibrary/OpenHPL 1.1.1/Waterway/SurgeTank.mo:116:3-116:16:writable] Error: Model is structurally singular, error found sorting equations 40: surgeTank.Mdot = surgeTank.mdot * surgeTank.v; 38: surgeTank.M = surgeTank.m * surgeTank.v; 43: surgeTank.F_g = surgeTank.m * data.g * surgeTank.cos_theta; 42: surgeTank.F_p = (penstock.p_i - data.p_a) * surgeTank.A; 34: der(surgeTank.M) = surgeTank.Mdot + surgeTank.F; 24: der(tail.m) = 0.0; 20: tail.A = tail.H * (tail.w + 2.0 * tail.H * tan(0.0174532925199433 * tail.alpha)); 22: tail.F_f = 0.0; 21: tail.m = data.rho * tail.A * tail.L; 16: discharge.v = discharge.Vdot / discharge.A_; 15: discharge.Vdot = penstock.mdot / data.rho; 23: 0.0 = tail.A * (data.p_a - discharge.p_o) + data.g * data.rho * tail.A * tail.H - tail.F_f; 17: discharge.M = data.rho * discharge.L * discharge.Vdot; 18: discharge.F_f = OpenHPL.Functions.DarcyFriction.Friction(discharge.v, discharge.D_, discharge.L, data.rho, data.mu, discharge.p_eps); 19: der(discharge.M) = data.rho * discharge.Vdot ^ 2.0 * (1.0 / discharge.A_i + (-1.0) / discharge.A_o) + discharge.p_i * discharge.A_i + discharge.m * data.g * discharge.cos_theta + (-discharge.F_f) - discharge.p_o * discharge.A_o; 48: turbine.dp = penstock.p_o - discharge.p_i; 7: control.y = control.offset + (if time < control.startTime then 0.0 else if time < control.startTime + control.duration then (time - control.startTime) * control.height / control.duration else control.height); 47: turbine.dp = turbine.Vdot ^ 2.0 * data.p_a / (turbine.C_v_ * control.y) ^ 2.0; 5: der(reservoir.m) = 0.0; 1: reservoir.A = reservoir.H * (reservoir.w + 2.0 * reservoir.H * tan(0.0174532925199433 * reservoir.alpha)); 3: reservoir.F_f = 0.0; 2: reservoir.m = data.rho * reservoir.A * reservoir.L; 10: intake.v = intake.Vdot / intake.A_; 4: 0.0 = reservoir.A * (data.p_a - intake.p_i) + data.g * data.rho * reservoir.A * reservoir.H - reservoir.F_f; 11: intake.M = data.rho * intake.L * intake.Vdot; 12: intake.F_f = OpenHPL.Functions.DarcyFriction.Friction(intake.v, intake.D_, intake.L, data.rho, data.mu, intake.p_eps); 28: penstock.v = penstock.Vdot / penstock.A_; 46: turbine.Vdot = if turbine.WaterCompress then penstock.mdot / ((1.0 + data.beta * (penstock.p_o - data.p_a)) * data.rho) else penstock.mdot / data.rho; 13: der(intake.M) = data.rho * intake.Vdot ^ 2.0 * (1.0 / intake.A_i + (-1.0) / intake.A_o) + intake.p_i * intake.A_i + intake.m * data.g * intake.cos_theta + (-intake.F_f) - penstock.p_i * intake.A_o; 30: penstock.F_f = OpenHPL.Functions.DarcyFriction.Friction(penstock.v, penstock.D_, penstock.L, data.rho, data.mu, penstock.p_eps); 31: der(penstock.M) = data.rho * penstock.Vdot ^ 2.0 * (1.0 / penstock.A_i + (-1.0) / penstock.A_o) + penstock.p_i * penstock.A_i + penstock.m * data.g * penstock.cos_theta + (-penstock.F_f) - penstock.p_o * penstock.A_o; 29: penstock.M = data.rho * penstock.L * penstock.Vdot; 6: intake.Vdot = data.rho; 27: penstock.Vdot = penstock.mdot / data.rho; 9: intake.Vdot = intake.mdot / data.rho; 44: surgeTank.mdot = intake.mdot - penstock.mdot; 37: surgeTank.mdot = data.rho * surgeTank.Vdot; 41: surgeTank.F = surgeTank.F_p + (-surgeTank.F_f) - surgeTank.F_g; 39: surgeTank.v = surgeTank.Vdot / surgeTank.A; 33: der(surgeTank.m) = surgeTank.mdot; 36: surgeTank.F_f = OpenHPL.Functions.DarcyFriction.Friction(surgeTank.v, surgeTank.D, surgeTank.l, data.rho, data.mu, surgeTank.p_eps); 35: surgeTank.m = data.rho * surgeTank.A * surgeTank.l; for variables turbine.dp(4), surgeTank.Vdot(6), surgeTank.F_p(10), surgeTank.l(12), penstock.dp(19), tail.Vdot_i(28), reservoir.H(46), discharge.Vdot(31), surgeTank.F(13), discharge.p_o(33), intake.Vdot(38), tail.A(30), intake.mdot(44), tail.m(29), tail.H(26), discharge.dp(32), turbine.Kdot_i_tr(3), reservoir.A(50), control.y(45), reservoir.m(49), reservoir.F_f(47), intake.F_f(42), reservoir.Vdot_i(48), intake.dp(39), discharge.F_f(36), penstock.mdot(25), turbine.look_up_table.y[1](1), discharge.p_i(34), penstock.p_i(21), surgeTank.M(15), penstock.v(24), discharge.v(37), penstock.M(22), intake.M(41), surgeTank.F_f(9), surgeTank.m(16), surgeTank.v(11), surgeTank.F_g(8), penstock.F_f(23), penstock.Vdot(18), surgeTank.mdot(17), discharge.M(35) Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!