Text this: Optimal control of railway vehicle system