Longitudinal elastic stress impulse induced by impact through a spring-dashpot system: Optimization and inverse problems for the spring stiffness