The Theory and Method of Design and Optimization for Railway Intelligent Transportation Systems (RITS)