Control system for mountain railway