Revenue management of dedicated passenger railway line was explored on the basis of passengers' buy-up behavior. It was assumed that each itinerary has two kinds of tickets: the first class ones and second class ones. Taking the probability of passengers' buy-up behaviour as known conditions and the nested booking limits of the two classes of tickets of each itinerary as decision variables, the constrained nonlinear integer programming model was established and solved by the particle swarm algorithm. Numerical example results show that along with raizing of the probability of passengers' buy-up behavior, the nested booking limits of the second class tickets reduce gradually and the expected total revenues of the dedicated passenger railway line increase gradually. The effectiveness of the model is proved in practice.