In order to cope with the capacity waste produced by the increasing diversity and imbalance of spatio-temporal demands in passenger travel,an optimization method of flexible train composition scheduling in urban rail transit under the online coupling/decoupling mode is proposed.Firstly,the operation scenarios of trains with flexible composition under the online coupling/decoupling mode are described,in which the relationship of running interval with operational time of various tasks and turnaround capability is analyzed.Then,with the optimization goal of minimizing operating cost for the company,an optimization model for flexible train composition scheduling under the online coupling/decoupling mode is established and its algorithm is designed.Finally,an example is constructed relying on an urban rail transit line of a city to validate the effectiveness of the model and the algorithm.The results show that compared to the single train routes,long-short train routes,and multiple train composition modes,the operating cost of flexible train composition under online coupling/decoupling operation mode can be reduced by 27.5%,15.4%,and 6.0%,respectively,and the number of train units can be decreased by 23.8%,15.3%,and 4.7%,respectively.This mode can reduce the number of train units,save train running miles,and lower operating costs for the company while guaranteeing passenger service level.Furthermore,it is expected to further leverage its advantages in the context of continuously upgrading train control technologies.Considering that online coupling/decoupling operations of train may cause certain disruptions to trunk line operations,this mode is more suitable for lines with unsaturated capacity and off-peak periods of passenger flow on saturated capacity lines.