Abstract Railroad managers must determine (1) which pairs of terminals are to be provided with direct train connections, (2) the frequency of service, (3) how the individual cars are routed through the available configuration of trains and intermediate terminals, and (4) how cars are physically grouped or “blocked” within trains. The objective is to minimize the sum of train costs, car time costs, and classification yard costs, while not exceeding limits on train size and yard volumes. These decisions are modeled as a mixed-integer programming problem, where the decision to operate a given train connection corresponds to 0–1 variable. With no limits on train size, the model can be solved very efficiently using Lagrangian relaxation. If the solution contains some overloaded trains, which is likely, heuristic adjustments are necessary to obtain a feasible operating plan.