A genetic algorithm (GA) is proposed to optimise train movements using appropriate coast control that can be integrated within automatic train operation (ATO) systems, The coast control output for a train changes with the interstation distances and gradient profiles, and the current operating conditions of the mass rapid transit (MRT) system, namely, (i) train schedules, (ii) expected passenger loads and (iii) expected track voltages. The algorithm generates an optimum coast control based on evaluation of the punctuality, riding comfort and energy consumption. Before the train sets off to the designated station, a coast control table is generated that will be referenced by the train at runtime for deciding when to initiate coasting or resume motoring control. Each coast control table is encoded into variable length chromosomes with each gene representing the relative position between stations where coasting should be initiated or terminated. Each generation is evolved from mating of the paired equal-length chromosomes with possibilities of crossover, mutations, gene duplications and gene deletions. The key feature of this method is that it has a solid mathematical foundation. Effectively, the implementation provides good, credible and fast solutions for this variable and multiobjective optimisation problem. The algorithm has the potentials for on-line implementation for producing the coast control lookup table for each interstation run before the train sets off. The results, although preliminary, suggest that the method is promising.