Numerical study of a linear accelerator using laser-generated proton beams as a source