Train scheduling plays a significant role in the optimal use of the railway resources and satisfaction of customers. This paper presents a novel innovation, which is the elasticity of train length, or the possibility of compression and stretching of the train length in accordance with rail route conditions. The proposed sustainable model provides optimal train scheduling with minimum travel time as well as optimal revenue and cost by developing a balance between length, speed, traction power, and energy consumption of trains while there is the possibility of carrying homogeneous and heterogeneous commodities. Thus, the new model is referred to as the sustainable elastic train scheduling model. Implementing the model in a real case using an introduced genetic algorithm proves its success and increases railway revenues by at least 48 percent with the saving of 25 percent in time. Sensitivity analysis of the model reveals the model is more sensitive to changes in the objective function of travel time. In addition to 50% improvement in using railroad capacity, it is possible to achieve the minimum increase of 71% in revenue.