Computer-implemented method for controlling a distribution of pressure and flow in a water supply system which comprises a plurality of pumping stations, comprising the method steps: (a) reading in a computer-assisted hydraulic model of the water supply system, wherein the computer-assisted hydraulic model is designed to map a time-dependent distribution of pressure and flow in the water supply system, (b) determining resource-optimised pressure and flow target values ((D1,F1),..., (Di,Fi),..., (Dn,Fn)) for the pumping stations (P1,..., Pn) in the water supply system for a specified forecast period using the computer-assisted hydraulic model by means of a first method of optimisation, (c) reading in a computer-assisted pumping model for a pumping station (Pi), wherein the pumping model is designed to map an operational behaviour of pumping devices in the pumping station (Pi), (d) determining resource-optimised operating parameters (Ri) for the pumping devices in the pumping station (Pi) using the computer-assisted pumping model at a specified time by means of a second method of optimisation as a function of the pressure and flow target value of this pumping station for the specified time after the method step of determining resource-optimized pressure and flow target values for the pumping stations, and (e) outputting the resource-optimised operating parameters (Ri) for controlling the pumping devices in the pumping station (Pi), wherein by means of the second method of optimisation an efficiency value of the pumping station is determined, the computer-assisted hydraulic model is updated using the efficiency value of the pumping station and is used for determining the resource-optimised pressure and flow target values for the pumping stations in the water supply system. (a) reading in a computer-assisted hydraulic model of the water supply system, wherein the computer-assisted hydraulic model is designed to map a time-dependent distribution of pressure and flow in the water supply system, (b) determining resource-optimised pressure and flow target values ((D1,F1),..., (Di,Fi),..., (Dn,Fn)) for the pumping stations (P1,..., Pn) in the water supply system for a specified forecast period using the computer-assisted hydraulic model by means of a first method of optimisation, (c) reading in a computer-assisted pumping model for a pumping station (Pi), wherein the pumping model is designed to map an operational behaviour of pumping devices in the pumping station (Pi), (d) determining resource-optimised operating parameters (Ri) for the pumping devices in the pumping station (Pi) using the computer-assisted pumping model at a specified time by means of a second method of optimisation as a function of the pressure and flow target value of this pumping station for the specified time after the method step of determining resource-optimized pressure and flow target values for the pumping stations, and (e) outputting the resource-optimised operating parameters (Ri) for controlling the pumping devices in the pumping station (Pi), wherein by means of the second method of optimisation an efficiency value of the pumping station is determined, the computer-assisted hydraulic model is updated using the efficiency value of the pumping station and is used for determining the resource-optimised pressure and flow target values for the pumping stations in the water supply system.