Who's on First?

sniper297

Coconut God
Running tests with AI traffic in two directions, on a route with mostly doubletrack but a lot of singletrack choke points on it;

http://www.trainsim.com/vbts/showthread.php?311523-AI-traffic-how-screwy-can-you-get

Twice now I've seen that rare event where two AI trains approaching from opposite directions arrive at their respective signals at the exact same instant. Watching the switchstands at both ends flipping back and forth until one or the other gains control of both switches got me to wondering - how do they decide, some kind of rock-paper-scissors subroutine, or is it just a wrestling match until one of them wins the right of way? It goes on for a couple minutes in some cases, but never ends in a complete stalemate, one of them always wins and the traffic gets moving again.
 
I've wondered too. I did the 3 to 9 to 2 headed west and 2 headed north mess that is around Penn Station in Baltimore. Lots of crossovers and such so most trains can access most platforms. My AI kept getting confused. Having several turnouts between them and their destination resulted in it sitting and flipping turnouts ad. infinitum.

Signals did not help.

But if I clicked on a stop signal while this was going on, I'd get sent to a turnout that was in NO way associated with the train's route to it's destination.

I finally elected to change the track layout. Not so real now, but it works...
 
I cheated like that in a bunch of places, found it got lost using crossovers sometimes, so I made flyovers and unders for one route, and for the other one I simply stretched the crossover far enough to make it a short section of triple track. 2 hours into the latest test and they're all running perfectly, I was just wondering how they sort out the priority if both hit the signal at the exact same instant. Actual crossings, as in diamonds, you need a lot of fooling around with Trigger multiple signals to make that work, so no diamond crossings on this route.

http://www.trainsim.com/vbts/showthread.php?311607-American-Flyer
 
Route developers lament, sometimes trying to think up names for places on fictional routes you just go into brainlock.

10459408.jpg
 
Route developers lament, sometimes trying to think up names for places on fictional routes you just go into brainlock.

You want names? Here's one of the greatest Internet sources I've ever seen, a real treasure. Click on the Resource link of the second pages (the site's links are not perfect, but it does work) and you can find thousands and thousands of names from every nation, race, and ethnic group, an amazing piece of work.

http://www.gaminggeeks.org/Resources/KateMonk/
 
Last edited:
I usually use station names from the film Brief Encounter, including Churley, Lea Green, Langley, Millford Junction, Broadham Junction and Ketchworth.

However, I do have a few made up town names which I throw into routes.

New Town
Old Town
Central Station - This station identifies the center of the route.
Gerrards Cross
Sidings Lane
Quarry Lane
Quarry Junction
Castle Walk
Castle Lane
Castle Sidings
Castle Quay
Bridge House
Acton Bridge - Named after a station in the UK
Banks Heath - Named after a Trainz Route

North Junction and South Junction, these are usually at either end of the route, to determine which direction AI trains are going.

Hope these names help.

Joe Airtime
 
I am developing a new route and I have chosen to name the towns/stations east -west alphabetical. Still working on the names, using a combination of local streets and towns, something easy to remember and pronounce.

John
 
I use local cities and towns near me. Their relative locale maybe mixed up but town names are the same. Acton, South Acton, Weymouth, Leominster are all real towns but are miles away from each other. I also have some made up ones such as Bowdon, Parkdale, and Lynnwood.

If you look at Lin Wescott's and John Armstrong's model railroad plan books, you'll find plenty of names like Howe's Bayou. :)

John
 
Well, anyway finished and uploaded;

American Flyer,<kuid:522774:100852>
American Flyer Template 1,<kuid:522774:100864>

So for those who have TS2010 or TS12 you can park yourself by the yard bridge or The Strangler and watch the signals and switchstands flipping back and forth while they play rock-paper-scissors. Subject to the usual DLS delays and unpredictability, of course. Oddly enough it doesn't happen very often, and in all the hours of testing I only saw one SPAD report from an AI train. Even if it's a parade of 4 trains all riding the yellow boards of the one ahead meeting a parade coming the other way, it always sorts itself out within 10 minutes at the most.
 
There is an easy way to fix this.

On the DLS there are 2 driver commands that will solve this issue, and really simple to setup.

They are

1. ChangeSVariable, kuid:131986:155581, When a train is approaching a junction or bottle neck, have it set a variable say,"bottleneck 1" to equal 2

2. WaitUntilSVariable, kuid:131986:155583, When the other train is approaching the bottle neck it will have a "Wait until bottleneck = 1"

You set both commands up the same and which ever one arrives 1st will be able to set the junctions 1st.

On the train leaving the bottle neck area it sets the variable back to 1 allowing the other train to set the junctions and proceed.

Think about it a bit its not hard

Its really quite simple

Hope this helps

Cheers

Lots
 
Huh? Sounds pretty complicated to me, but I'll give them a shot at some point.

Original MSTS Port Ogden & Northern it took quite a while to get AI traffic to behave while allowing the player to do whatever he wanted, my solution for that was the "2 routes in 1" concept - the AI trains had their own tracks separate from the player tracks, with the player route merging with and diverging from the AI route at "shared" single track sections, with absolute signals and automatic switches that the player couldn't throw during an activity. Clumsy kludge, but the way MSTS AI train traffic was programmed it was the only way to do it. When I first got Trainz I was surprised to see that Phil Skene had done something similar with the Trainz PO&N route, but after some experimenting I found it's really not necessary - the Trainz AI in 2010 and 12 is psychotic, but very intelligent, so it rarely has any trouble figuring it out by itself. Using enough trackmarks in the right places you can route it almost anywhere, as long as you have signals configured to keep them honest.
 
I like your wait at trackmark approach for the AI drivers. I may try that myself on my route at those more complicated junctions where the AI drivers all go for the grab all at once like the ladies at Bloomingdales on Dollar Day! :D

John
 
Hi John

I like your wait at trackmark approach for the AI drivers.

Hey good you gonna try it.

Did you know that using this exact same setup, You can do another neat little trick as well. You can create a genuine priority train setup.

By duplicating you your commands for the train using the junctions and using for a Priority Train. You place a trackmark say 5 to 10 miles further down the track that sets the variable earlier giving it priority to the set of junctions.

Hope it helps

Cheers

Lots
 
Back
Top