Multi-train trajectory planning