Tips and tricks for efficient AI traffic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest

    #1

    Tips and tricks for efficient AI traffic

    I recently tried to create a custom activity using TrainSimulation's BNSF Seligman Sub. I defined it as a simple 2 hr run from Winslow to the entrance of the Phoenix Sub near Williams.

    I created a traffic file containing 72 trains, 36 eastbound and 36 westbound, and separated their start times 40 min apart, starting from midnight + 1 sec (since OpenRails does not load the traffic if there is a 0 second value in the trf file). I figured this would be good enough to be close to the 70-80 trains per day in real life.

    The end result was that by the time I reached Canyon Diablo bridge (only half an hour from the start), I encountered 6 eastbounds at almost 5 minute intervals and I definitely realized I had done something wrong. Also, in the Alt-F9 window, I could see 27 trains, 26 AI and my own. And my GPU temp was skyrocketing high with the FPS almost lagging.

    I checked some of the original maker's activity traffic files, and I could see that they defined at most 36 trains in any trf file. And in most activities, they kept the player's line free and only kept traffic in the opposing line (If the activity is westbound, almost all the traffic defined is eastbound).

    Now while I think halving the number of trains and doubling the spacing to 80-90 mins in my custom activity will be my best option to keep both lines engaged relatively realistically, I wonder if any of you have any tips for effective AI traffic handling in general.
    Last edited by Guest; 07-28-2025, 08:44.
  • oper190
    1000 Post Veteran



    • May 2010
    • 1498
    • Port Charlotte, FL
    • English
    • MSOR

    #2
    From my own experience building activities for myself:
    1) There is no need for traffic on the same line as you player train, except to put a train ahead so you might get Yellows and Reds if you are to fast. You'll never see any of them anyway so it's just a waste of resources, thus the high temp for the GPU.
    2) Spacing traffic can be tricky and may require some testing as each route handles trains differently, pending on signals, and especially on routes where you have single track sections. I've encountered waits for two or three trains if the AIs or placed to close together, and get backed-up real fast. Plus as you said, they come by to often.
    3) Your are planning a 2 hour activity with 24 hours worth of traffic. You only need about 4 hours worth of traffic as the first AI needs to start about 2 hours before yours if it's making the full run. That would be about 6 to 7 AI trains for your run. ( 40 trains each way per day equals 1.6 train per hour - one train about every 40 minutes ).
    Geary "Mr. Hart" Gerhardt - Owner and CEO of Hart Rail Lines, Hart Commuter Railways, and Hart Rail Cars. Also the defunct Hart Electric Transit.
    Its Your Train Sim World, sim as you please.

    Comment

    • geepster775
      2500 Post Veteran


      • Sep 2006
      • 2846
      • .
      • General

      #3
      The activities were designed to add some overtakes of slower trains moving in the same direction as the player. Not sure if anyone would need 36 of them moving the same direction as the player as most would never be seen.

      One of the differences between the ORTS and MSTS versions of the route involved a change in some siding lengths, extending some and resulting in the relocation of switch nodes, when it became apparent that the siding lengths in the MSTS version were too short for some to be used effectively for this overtake ballet they had planned. Changing these siding lengths changed the TDB and as a result the old MSTS version activities could not be imported because of broken paths.
      My Open Rails videos https://www.youtube.com/@lakecities3663/videos

      Comment

      Working...