Choose your region

    Lists show the case studies of your region first. Browse and search still hold every case study.

    Europe
    North America

    NS plans its shunting yards in minutes with AI

    Dutch rail operator NS uses HIP, a local search algorithm from Utrecht University research, to draft the plans that park, clean and couple its trains at shunting yards.

    Nederlandse SpoorwegenNetherlandsRailIn production
    Scale
    Smaller hubs such as Enkhuizen, Leeuwarden and Vlissingen
    Scenario
    Train shunting yard planning
    Business function
    Supply chain and logistics
    Who built it
    Built with a partner (Utrecht University)
    Human oversight
    Assists people
    Organization
    Enterprise, 10,000 to 99,999 employees
    AI types
    Optimization
    Users
    around 120
    Sites
    32

    Sources and their publishers

    This case study draws on reporting by the following publishers. Enterprise AI Case Studies combined these accounts and added its own explanation. The reporting, and every passage quoted from it, belongs to whoever published or supplied it.

    1. Utrecht University

    2. Delft University of Technology

    3. Europe's Rail Joint Undertaking

    4. Union Pacific

    5. INFORM

    tl;drNS now drafts plans for smaller shunting yards in minutes and plans days ahead instead of weeks.See the results

    View the solutionBuild this solution yourself

    Nederlandse Spoorwegen (NS), the main Dutch passenger rail operator, uses an AI-based planning method at its shunting yards1. The Hybrid Integrated Planning Method (HIP) drafts where trains park, when they’re cleaned and inspected, and how they move between platform and yard1, 3.

    HIP rests on a local search algorithm that Roel van den Broek developed for his PhD at Utrecht University, in research that NS funded1, 2. NS then built the algorithm into its own planning software3.

    As of March 2026, NS uses HIP at smaller hubs such as Enkhuizen, Leeuwarden and Vlissingen1. There it generates plans within minutes, and NS plans days in advance instead of weeks1.

    Before the deployment

    Outside the rush hours, NS parks its surplus train units at shunting yards, where they’re also cleaned, inspected and coupled1. The yards lie close to major stations in urban areas, so their space is very limited4.

    • Manual planning: A team of around 120 planners prepared the yard plans, largely by hand1.
    • Long lead time: Planners started more than a month before execution, when little was known about the real situation on the day1.
    • Costly changes: If the timetable changed in the final month, for example after track damage, a month’s worth of plans had to be redone1.
    • Full yards: Dutch shunting yards reached occupancies of up to 90%4.
    • Slow earlier tool: NS’s earlier tool, OPG, took so long to compute that it held no advantage over human planners3.

    The planning problem joins several NP-hard problems2. It matches arriving units to departing trains, schedules cleaning and maintenance, and parks trains so that the yard runs without conflicts2.

    What was built

    HIP drafts a complete shunting and service plan for one station and its yards, and planners turn the best draft into the final schedule1, 3.

    • Initial plan builder: Solves the subproblems in turn. It matches arriving and departing trains, selects a yard and a route for each train, and assigns parking tracks3.
    • Local search algorithm: Generates hundreds of possible plans, keeps the best, and refines it through hundreds of small variations1. It continues until it finds a plan without delays, crossings or track length violations6.
    • Driver assignment: The local search also chooses the shunting drivers’ shifts, by using heuristics6, 3.
    • Planners: Polish the algorithm’s best plan into the final schedule, and can adjust any plan as they see fit1.

    “Humans remain in control. AI is a support tool.”

    Joris Snijders, implementation lead for the planning software at NS1

    Alternatives considered

    • Decomposition into subproblems: NS’s earlier OPG tool solved each subproblem separately. The results were poor because the subproblems didn’t interact, and the tool was too slow to beat human planners3.
    • Mixed integer linear program: The researchers compared their local search with an existing mixed integer linear program on realistic NS instances. The local search was the first method to solve real-world instances of the complete problem2.

    Rollout

    Figure 1From a research algorithm to use at smaller hubs
    From a research algorithm to use at smaller hubsThe local search algorithm was published online in Transportation Science in November 2021. Its findings were presented at the RAIL Lab kickoff in November 2023. NS reported tests of a better initial plan builder in December 2024. A TU Delft thesis in September 2025 described HIP as soon to be employed. In March 2026, Utrecht University announced that NS uses the method at smaller hubs.Nov 2021Nov 2021 · Local search algorithm published · Documented in source [2]Local search algorithm publishedNov 2023Nov 2023 · Findings presented at RAIL Lab kickoff · Documented in source [5]Findings presented at RAIL Lab kickoffDec 2024Dec 2024 · NS reports tests of a better initial plan · Documented in source [6]NS reports tests of a better initial planSep 2025Sep 2025 · HIP described as soon to be employed · Documented in source [3]HIP described as soon to be employedMar 2026Mar 2026 · In use at smaller hubs · Documented in source [1]In use at smaller hubsFrom a research algorithm to use at smaller hubsThe local search algorithm was published online in Transportation Science in November 2021. Its findings were presented at the RAIL Lab kickoff in November 2023. NS reported tests of a better initial plan builder in December 2024. A TU Delft thesis in September 2025 described HIP as soon to be employed. In March 2026, Utrecht University announced that NS uses the method at smaller hubs.Nov 2021Nov 2021 · Local search algorithm published · Documented in source [2]Local searchalgorithm published2 yrsNov 2023Nov 2023 · Findings presented at RAIL Lab kickoff · Documented in source [5]Findings presentedat RAIL Lab kickoff1 yr 1 moDec 2024Dec 2024 · NS reports tests of a better initial plan · Documented in source [6]NS reports tests ofa better initial plan9 moSep 2025Sep 2025 · HIP described as soon to be employed · Documented in source [3]HIP described assoon to be employed6 moMar 2026Mar 2026 · In use at smaller hubs · Documented in source [1]In use at smaller hubs
    • Key milestone
    Sources [1][2][3][5][6]
    The algorithm was published in 2021 and reached NS's smaller hubs in 2026.

    The phases took the method from a published algorithm to use at smaller hubs1, 2. NS plans to extend HIP to larger hubs such as Amsterdam and Utrecht, and eventually to all 32 stabling yards1.

    Technology and architecture

    Figure 2How HIP turns yard data into a shunting plan
    How HIP turns yard data into a shunting planThe timetable and rolling stock assignment, the station and yard layout, and the service tasks and staff feed the initial plan builder in HIP. The builder passes a complete plan that may still contain conflicts to the local search algorithm. The local search removes the conflicts and assigns drivers, then hands the best plan to NS planners, who polish it into the final yard schedule. No part of the figure is inferred.arrivals and departures (data) · Documented in source [3]tracks and routes (data) · Documented in source [3]tasks and drivers (data) · Documented in sources [1] [6]plan with conflicts (data) · Documented in sources [3] [6]best conflict-free plan (handoff to people) · Documented in sources [1] [6]polished schedule (data) · Documented in source [1]PLANNING DATAHIP PLANNING SOFTWARENS PLANNING TEAMTimetable and rolling stock · Data · Documented in sources [3] [6]DATATimetable androlling stockStation and yard layout · Data · Documented in sources [1] [3]DATAStation andyard layoutService tasks and staff · Data · Documented in sources [1] [6]DATAService tasksand staffInitial plan builder · System · Documented in sources [3] [6]SYSTEMInitial planbuilderLocal search algorithm · AI model · Documented in sources [1] [2] [6]AI MODELLocal searchalgorithmNS planners · Team · Documented in source [1]TEAMNS plannersFinal yard schedule · Data · Documented in source [1]DATAFinal yardschedulearrivals anddeparturestracks androutestasks anddriversplan withconflictsbestconflict-freeplanpolishedscheduleHow HIP turns yard data into a shunting planThe timetable and rolling stock assignment, the station and yard layout, and the service tasks and staff feed the initial plan builder in HIP. The builder passes a complete plan that may still contain conflicts to the local search algorithm. The local search removes the conflicts and assigns drivers, then hands the best plan to NS planners, who polish it into the final yard schedule. No part of the figure is inferred.arrivals and departures (data) · Documented in source [3]tracks and routes (data) · Documented in source [3]tasks and drivers (data) · Documented in sources [1] [6]plan with conflicts (data) · Documented in sources [3] [6]best conflict-free plan (handoff to people) · Documented in sources [1] [6]polished schedule (data) · Documented in source [1]PLANNING DATAHIP PLANNING SOFTWARENS PLANNING TEAMTimetable and rolling stock · Data · Documented in sources [3] [6]DATATimetable androlling stockStation and yard layout · Data · Documented in sources [1] [3]DATAStation and yard layoutService tasks and staff · Data · Documented in sources [1] [6]DATAService tasks and staffInitial plan builder · System · Documented in sources [3] [6]SYSTEMInitial plan builderLocal search algorithm · AI model · Documented in sources [1] [2] [6]AI MODELLocal search algorithmNS planners · Team · Documented in source [1]TEAMNS plannersFinal yard schedule · Data · Documented in source [1]DATAFinal yard schedulearrivals and departurestracks and routestasks and driversplan with conflictsbest conflict-free planpolished schedule
    • AI component
    • Data
    • Handoff to people
    Sources [1][2][3][6]
    A local search turns HIP's rough starting plan into a conflict-free plan that planners finish.

    The builder hands the local search a complete plan that can still contain conflicts6. The builder uses simple heuristics based on mixed integer programming (MIP) and constraint programming (CP). Because the plan is allowed to contain conflicts, it’s easy to construct6. The local search follows the simulated annealing framework4.

    Layer What they used Role Source
    Solution platform Hybrid Integrated Planning Method (HIP) NS’s planning software that produces the plan for a station and its yards 1, 3
    Optimizer Initial plan heuristics (MIP and CP) Build a complete starting plan that may still hold conflicts 3, 6
    Optimizer Local search algorithm Removes conflicts through small changes and assigns drivers 1, 4, 6
    Review workbench Plan adjustment by planners Planners polish and adjust the drafted plans 1

    Data inputs

    • Timetable and rolling stock: The arrival and departure times and train compositions, fixed before the yard plan is made3, 6.
    • Station and yard layout: The available tracks and the possible routes from each platform to each yard1, 3.
    • Service tasks: Cleaning, toilet emptying, and mechanical inspections or repairs that each train needs6.
    • Staff and safety rules: The available staff and the rules for safe shunting that a human planner also applies1.
    • Test instances: Realistic instances from NS, on which the researchers tested the local search2.

    How one yard plan flows through HIP

    1. A train arrives at a platform, and its passengers disembark. From then on, the node planner is responsible for the train6.
    2. The initial plan builder matches each arriving train unit to a departing train3.
    3. The builder selects a yard and a route for each train, and then assigns its parking track3.
    4. HIP combines the results into a plan graph, which is the input for the local search3.
    5. The local search makes small changes until the plan is conflict-free, and it assigns the drivers6.
    6. A planner polishes the best plan into the final schedule1.

    Results

    Metric Before After Scope and timeframe Reported by
    Planning horizon Weeks in advance Days in advance Smaller hubs where NS uses HIP, as of March 2026 NS, measured1
    Time to generate a plan Not disclosed Within minutes Smaller stations, as of March 2026 Utrecht University, measured1
    • Planning horizon: How far ahead of the day of operation planners fix a yard plan. Planning later lets NS take in timetable changes and leaves more room for planning passenger services1.
    • Time to generate a plan: Covers smaller stations. In research tests presented in November 2023, the algorithm found a plan option for Enkhuizen within a few seconds5.

    Lessons learned

    NS funded the research and then built the algorithm into its own planning software2, 3. Han Hoogeveen, who proposed the approach to NS, said the PhD work showed that it worked and convinced the NS board to invest1.

    HIP works at smaller hubs only for now1. A local search run took around one hour for Amersfoort and more than 10 hours for Utrecht, and after 10 hours the Utrecht plan still held a couple of dozen conflicts3, 6.

    The local search makes many random small changes, so its plans lack a clear structure6. NS states that plans are easier to understand and execute when they share a structure, and it tests better initial plans with Utrecht as the demonstrator6.

    The rollout took longer than first expected. In December 2023, Utrecht University expected the software to go into operation the next year5. Its use at smaller hubs was announced in March 20261.

    Planners keep their role. They polish every plan, and NS designed the system so that they can change any plan1.

    The planning speed and horizon figures are statements by NS and Utrecht University, from the university’s announcement1.

    Case study scorecard

    Build this solution yourself

    Analysis

    What you need

    • A digital model of each station and yard: You need the tracks, the routes from each platform to each yard, and the service facilities, because HIP plans every move against them1, 3.
    • A settled timetable and rolling stock plan: NS makes the yard plan after the timetable and the rolling stock assignment are fixed, so you need both as input6.
    • Planners who finish the plans: NS planners polish each plan, and the random changes of the local search make plans harder to read, so you need people in the loop1, 6.
    • Small yards to start with: HIP plans small hubs in minutes, while the Utrecht node ran for hours without a conflict-free plan, so start where the problem is small1, 6.

    Reference architecture

    Scheduling and routing optimization

    A scheduling and routing optimization solution computes who or what goes where, in what order, and when, within the constraints that apply. An optimizer builds a plan from the work, live positions and conditions, and the organization's rules, and rebuilds it as conditions change. Planners approve or finish the plan or steer it through limits, and the people who carry it out can depart from it.

    A check mark shows a building block that this case study's sources document.

    Open the reference architecture

    Others who built it

    • Union Pacific: Its Block Optimizer combines its team’s expertise with machine processing to group rail cars earlier and cut re-sorting at terminals7.
    • PSA Antwerp: In March 2026, its Europa Terminal went live with INFORM’s Integrated Terminal Scheduler, which optimizes move schedules for stacking cranes, straddle carriers and quay cranes8.

    Cite this case study

    Enterprise AI Case Studies. "NS plans its shunting yards in minutes with AI." Updated Nov 21, 2026. https://case-studies.ai/case-studies/operational-technology/OT-034-shunting-yard-planning-ns/

    @misc{csai-ot-034,
      author = {{Enterprise AI Case Studies}},
      title = {{NS plans its shunting yards in minutes with AI}},
      year = {2026},
      note = {Updated 2026-11-21},
      url = {https://case-studies.ai/case-studies/operational-technology/OT-034-shunting-yard-planning-ns/}
    }

    Sources

    The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership

    1. Source 1:

      National railway operator NS uses smart software for planning at shunting yards

      Partner or vendorUtrecht University, Mar 11, 202611 Mar 2026Accessed Nov 21, 202621 Nov 2026

      Supporting excerpts (19)
      • NS is deploying a new AI-based method to plan trains at shunting yards.
      • The algorithm is based on research by Roel van den Broek, who completed his PhD on the subject at Utrecht University.
      • Outside the timetable, these units must be parked, cleaned, inspected and coupled before being put back into service.
      • Planning at these sites is still largely done manually by a team of around 120 planners.
      • They prepare the plans more than a month before execution, based on the information available at the time about the eventual real-life situation, which is still limited.
      • If the timetable changes in the final month before implementation, for example due to damage to the track, a month’s worth of plans has to be rescheduled.
      • For smaller stations, the system can now generate plans within minutes, taking into account all the aspects a human planner must consider: available tracks and staff, required service tasks, and rules for safe shunting.
      • Joris Snijders, responsible at NS for implementing the new software
      • It generates hundreds of possible plans, from which the best is selected. The algorithm then creates hundreds of variations on that plan, with small adjustments to the original.
      • Planners subsequently polish the algorithm’s best plan into a final schedule.
      • The so-called Hybrid Integrated Planning Method (HIP)
      • Because of the time savings we achieve, we move from planning weeks in advance to planning days in advance. That allows us to incorporate changes at a later stage. It also creates more room for planning passenger services.
      • For the time being, the algorithm can be used at smaller hubs, such as the stations of Enkhuizen, Leeuwarden and Vlissingen. The ambition is to eventually deploy it at larger hubs as well, including Amsterdam and Utrecht.
      • Ultimately we want to plan train movements at all 32 stabling yards in this way. Within a European subsidy project we are working to further develop the method.
      • The system has been designed so that users can still adjust plans as they see fit.
      • Humans remain in control. AI is a support tool.
      • This algorithm proves that fundamental research can find its way into practical application.
      • He proposed the new approach to NS.
      • Roel van den Broek subsequently demonstrated brilliantly that this approach really works, and that convinced the NS board to invest in it.
    2. Source 2:

      A local search algorithm for train unit shunting with service scheduling

      AcademicUtrecht University, Nov 10, 202110 Nov 2021By Roel van den Broek, Han Hoogeveen, Marjan van den Akker, and Bob HuismanAccessed Nov 21, 202621 Nov 2026

      Supporting excerpts (6)
      • This problem originates from Dutch Railways, which is the main railway operator in the Netherlands.
      • The problem consists of matching train units arriving on a shunting yard to departing trains, scheduling service tasks such as cleaning and maintenance on the available resources, and parking the trains on the available tracks such that the shunting yard can operate conflict-free.
      • These different aspects lead to a computationally extremely difficult problem, which combines several well-known NP-hard problems.
      • The proposed solution method is compared with an existing mixed integer linear program in a computational study on realistic instances provided by Dutch Railways.
      • We show that our local search algorithm is the first method to solve real-world problem instances of the complete shunting and scheduling problem.
      • This research was funded by a grant from Dutch Railways.
    3. Source 3:

      Constraint Programming for Rail Workforce Scheduling

      AcademicDelft University of Technology, Sep 5, 20255 Sep 2025By Aura Sofia Elisabetta LohrDocumentAccessed Nov 21, 202621 Nov 2026

      Supporting excerpts (12)
      • This led Nederlandse Spoorwegen (NS), the main passenger railway operator in the Netherlands, to develop the HIP (Hybride Integrale Planmethode), an algorithm that generates a solution for the TUSP at their stations.
      • The algorithm works by creating an initial solution, which is then used as input to a local search, producing a feasible solution.
      • At that time, NS used a tool named OPG to solve all TUSP subproblems. However, the computation time was so high that it was not an advantage in comparison to using human planners.
      • Nonetheless, it is hard to achieve good results with this method as there is no interaction between the different subproblems.
      • The HIP is the algorithm soon to be employed to compute the shunt plan at a station at NS.
      • First, the matching of arrival and departure trains is calculated.
      • which is the yard selection and shunt routing
      • input is the possible routes from each platform to each yard. In yard selection, trains are distributed to the available yards.
      • Then, the corresponding parking tracks for each train in the yard are assigned
      • The final plan graph is then the input for the local search.
      • Currently, the drivers’ schedules for the shunt trains are computed in the local search of the HIP.
      • around one hour for Amersfoort and more than 10 hours for Utrecht
    4. Source 4:

      A Local Search Algorithm for Train Unit Shunting with Service Scheduling (author manuscript)

      AcademicUtrecht University, Jan 20, 202120 Jan 2021By Roel van den Broek, Han Hoogeveen, Marjan van den Akker, and Bob HuismanDocumentAccessed Nov 21, 202621 Nov 2026

      Supporting excerpts (4)
      • Due to the proximity of shunting yards in the Netherlands to major stations, located in urban areas, their size, and thus their parking capacity, is very limited, reaching occupancies of up to 90%.
      • We have based our algorithm on the Simulated Annealing framework
      • A shunting and service plan constructed by the local search is then feasible if and only if none of the relaxed problem constraints are violated.
      • The maximum computation time is based on preferences of NS.
    5. Source 5:

      NS to work with algorithms AI Labs

      Partner or vendorUtrecht University, Dec 19, 202319 Dec 2023Accessed Nov 21, 202621 Nov 2026

      Supporting excerpts (3)
      • He presented his findings during the kickoff event of the RAIL Lab, that took place in November. The software is expected to be put into operation next year.
      • Van den Broek developed an algorithm that calculates an option for a station like Enkhuizen within a few seconds
      • The algorithm also works for larger stations like Amsterdam and Utrecht, but it requires significantly more computing time—more than ten hours.
    6. Source 6:

      Report on the description of algorithms for long-term timetabling, short-term timetabling and rolling stock planning (MOTIONAL Deliverable D6.1)

      OrganizationEurope's Rail Joint Undertaking, Dec 3, 20243 Dec 2024By Jord Boeijink and Carlo ManninoDocumentAccessed Nov 21, 202621 Nov 2026

      Supporting excerpts (20)
      • Jord Boeijink NSR Author Section 8.2
      • requiring planners to start weeks in advance.
      • The trains arrive at a platform track in the station, the passengers disembark, and the doors close. From this point onward the train is the responsibility of the node planner
      • The rolling stock stabling plan is created after the timetable has been created, the network planning has been completed, and rolling stock has been assigned to the trains.
      • The trains stabled on a node might require service, such as, internal and external cleaning, toilet emptying, and mechanical inspections or repairs.
      • The core of the solver is a local search algorithm.
      • but it is allowed to contain infeasibilities, such as delays, crossings and track length violations.
      • Driver shifts do not need to be explicitly determined in the initial plan, as these are chosen heuristically by the local search solver.
      • Since infeasibilities (or conflicts) are allowed such an initial plan can be easily constructed, and this is currently done with relatively simple heuristics (using MIP, CP) with many simplifications.
      • local search is then used to iteratively improve the plan by small, local mutations to the plan until a conflict-free plan has been found.
      • This works fine for smaller nodes, but makes the problem hard to solve for large nodes like Utrecht.
      • (after 10 hours the node of Utrecht still has a couple of dozens conflicts)
      • Secondly, the local search creates plans with no clear structure
      • This is undesired since plans are easier to understand and execute if they are always of a more or less similar structure.
      • the plans can be made more recognizable to planners.
      • The node of Utrecht, also the demonstrator for this research
      • Prior to these algorithms a matching has already been determined using an existing MIP model.
      • experiments were performed on real life scenarios.
      • For each experiment the scenarios were run with 18 random seeds
      • However, the new method is able to solve more instances within the allotted time (8 vs. 3).
    7. Source 7:

      Fewer Stops, Faster Service: The Future of Freight Rail

      OrganizationUnion Pacific, Oct 8, 20258 Oct 2025Accessed Nov 21, 202621 Nov 2026

      Supporting excerpts (2)
      • Block Optimizer combines our team’s expertise with machine processing to identify opportunities to group rail cars earlier in their journey.
      • helps minimize re-sorting at terminals
    8. Source 8:

      INFORM Enables High-Performance Hybrid Operations at PSA Antwerp's Europa Terminal

      Partner or vendorINFORM, May 27, 202627 May 2026Accessed Nov 21, 202621 Nov 2026

      Supporting excerpts (2)
      • INFORM and PSA Antwerp announce the successful go-live of the Integrated Terminal Scheduler (ITS) at Europa Terminal in March 2026.
      • INFORM’s ITS was selected to optimize move schedules for Automated Stacking Cranes (ASCs), Straddle Carriers (SCs), and Quay Cranes (QCs) throughout all phases of the upgrade and beyond.

    More in Operational Technology

    View all