An alternative pension reform for Spain based on optimisation techniques