Towards model predictive control of longitudinal beam dynamics in synchrotrons