Singular solutions and the S matrix in the interference theory of molecular shape resonances. II. Simulation of resonances by the many-well model