A model for synchronization of services and last train problems on regional passenger railway networks