Computer-implemented method for controlling a distribution of pressure and flow in a water supply system (WVS) which comprises a plurality of pumping stations, comprising the method steps: (a) reading in (S1) a computer-assisted hydraulic model (HM) 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 (S2) 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 (HM) by means of a first method of optimisation (OPT1), (c) reading in (S3) a computer-assisted pumping model (PM) 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 (S4) resource-optimised operating parameters (Ri) for the pumping devices in the pumping station (Pi) using the computer-assisted pumping model (PM) at a specified time by means of a second method of optimisation (OPT2) as a function of the pressure and flow target value of this pumping station for the specified time after the method step of determining (S2) resource-optimized pressure and flow target values for the pumping stations, and (e) outputting (S5) 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 (HM) 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 (S1) a computer-assisted hydraulic model (HM) 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 (S2) 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 (HM) by means of a first method of optimisation (OPT1), (c) reading in (S3) a computer-assisted pumping model (PM) 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 (S4) resource-optimised operating parameters (Ri) for the pumping devices in the pumping station (Pi) using the computer-assisted pumping model (PM) at a specified time by means of a second method of optimisation (OPT2) as a function of the pressure and flow target value of this pumping station for the specified time after the method step of determining (S2) resource-optimized pressure and flow target values for the pumping stations, and (e) outputting (S5) 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 (HM) 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. <EOS>