A method for controlling a variable displacement pump by calculation by a controller using a closed-center-type directional control valve, the method allowing effective utilization of the variable displacement pump while avoiding the risk of engine stall is provided. The method includes determining a first virtual discharge pressure and a second virtual discharge pressure. The method includes controlling the variable displacement pump based on a smaller value of the first virtual discharge pressure and the second virtual discharge pressure.