Optimised State-Dependent Sampling Control For Heavy-Haul Trains