Advanced Modelling And Simulation Of Water Distribution Systems With Discontinuous Control Elements