This project establishes models to optimize the balance of freight demand across rail and truck modes. In real life situations, trains often travel at different speeds (i.e. passenger trains and freight trains share the same rail network). This incurs train delay whereby reducing the efficiency of the rail network. To provide a solution for this problem, researchers developed heuristic algorithms to improve conventional dispatching rules to reduce the average train delay. Then they built a control model and provided a solution procedure to adapt a dynamic headway concept inspired by new signaling technology, like Positive Train Control (PTC). Rail network data of the Southern California region was collected to perform a detailed simulation analysis. The simulation results show significant improvement of network efficiency brought by the model and algorithms: as high as 21% reduction in average train delay with the best dispatching policy, while with the dynamic headway control model, the average train delay is reduced by 40%. The railway network is therefore shown to have the potential to increase throughput capacity by 20%.