Laboratory generation of solitary waves: an inversion technique to improve available methods