For the dispatching decision of wagon-flows in railway terminal with intelligent railway transportation system (IRTS), the dispatchers organize not only the passivity wagon-flows, but also active ones according to the need of wagon-flow organization. On the basis of the dispatching decision of passivity wagon-flows, the dynamic dispatching decisions of active wagon-flows in railway terminal are studied. A two-layer mixed-integer optimization model is built. For the characteristics of the model, such as multi-variable, more restrictive conditions, the timeliness requirements for dynamic dispatching and so on, an advanced relevant algorithm is presented to solve the model.