Numerical study of the Kadomtsev–Petviashvili equation and dispersive shock waves