On-board optimisation of vehicle or vehicle train operation