Train-Sim.Com
MSTS Activity Design

AI trains overtaking player trains - a simple solution

Notice to all visitors and members of the Train-Sim.Com message forums:
If you plan on using a signature banner in your posts, we would like to remind you that there is a maximum size for banners. That maximum is 450 pixels wide by 120 pixels high, and not to exceed 25k. Your compliance is appreciated. FORUM RULES Problems? There are two common reasons for problems with logging in and posting messages. The first is that you are running a firewall that prevents your messages from being sent to the server. The other is that you have cookies disabled; the DCForum software requires cookies to work properly.

Previous Topic | Next Topic

Printer-friendly copy Email this topic to a friend

Reading Topic #1534

Member since Mar-17-03 · 5 posts

Dear allI've read numerous posts about how to get AI trains to pass player trains. Some have said it can't be done, others recommend drastic solutions. The simplest involves two reverse points and some shuffling backwards and fowards. The consensus seems to be that you can't have it as a routine part of your operation.For some time I've been routinely routing my player train into passing loops and layby's on Pat Dalton's 1930's S&C and being passed by following trains. The solution is a variation on the double reverse point method, takes seconds to set up and works every time.Say my player service is a slow freight. I have a faster AI train following behind. I route my player path into the passing loop. just before the exit signal I insert a reverse point. Then, as close as I can behind the 1st reverse point I insert a 2nd reverse point. I pull into the loop and stop short of the 1st reverse point. The mainline signals clear and the AI train passes through. I then move forward and pass the 1st reverse point. As soon as the block is clear the exit signal clears and I'm on my way. I think the assumption has been that reverse points are something you have to approach and cross with the end of your train. They're not, they're activated if your train is in contact. They also represent discontinuites in a path, with each successive segment (reversed path) activated by touching the reverse point preceding it. The above works because your player path stops at the reverse point until your train moves over it. Until you get there the AI path is able to extend on to the mainline ahead of you and the AI train can overtake. By placing the 2nd reverse point immediately behind the 1st, when you touch the 1st you also straddle the 2nd. BOTH reverse points are activated simultaneously and your path is now projecting out of the loop. No shuffling back and forwards.If I'm far enough ahead of schedule, I simple pull straight through to the reverse point and am cleared on my way without waiting. Or,if I want I can sit there all day and watch the traffic go by simply by never passing over the 1st reverse point.The same principal can be used for other purposes. I'll often set up an activity with an engine pulling out of a siding and backing on to a train while AI traffic is cleared on on to the mainline ahead of me. Simply use reverse points to get your engine to the point of backing on to your train and ensure that there is a reverse point straddled by your waiting carriages. As you couple up, those carriages become part of your player service, the reverse point they straddle is activated, your forward path set and the signal will clear if the block is free.Forgive me if this has been said before, but the last posts I saw on this topic suggested it couldn't be done. It can and its great fun!CheersGreg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

RE: AI trains overtaking player trains - a simple solut, ATF1224, Mar-18-03, 10:17 AM, (1) RE: AI trains overtaking player trains - a simple solut, ATF1224, Mar-18-03, 05:40 PM, (2) RE: AI trains overtaking player trains - a simple solut, CharlieB, Mar-19-03, 08:36 PM, (3) RE: AI trains overtaking player trains - a simple solut, np2156, Mar-20-03, 05:49 PM, (4) RE: AI trains overtaking player trains - a simple solut, mikedc3, Mar-21-03, 00:01 AM, (5) RE: AI trains overtaking player trains - a simple solut, Mark1616, Mar-22-03, 09:26 AM, (6) RE: AI trains overtaking player trains - a simple solut, gc, Mar-24-03, 03:05 AM, (8) RE: AI trains overtaking player trains - a simple solut, seern, Mar-22-03, 03:21 PM, (7) RE: AI trains overtaking player trains - a simple solut, gc, Mar-24-03, 04:25 AM, (9) RE: AI trains overtaking player trains - a simple solut, GaryG, Mar-25-03, 01:27 AM, (10) RE: AI trains overtaking player trains - a simple solut, gc, Mar-25-03, 06:32 AM, (11) RE: AI trains overtaking player trains - a simple solut, GaryG, Mar-25-03, 08:44 PM, (12) RE: AI trains overtaking player trains - a simple solut, gc, Mar-26-03, 03:30 AM, (13) RE: AI trains overtaking player trains - a simple solut, GaryG, Mar-26-03, 04:00 AM, (14) RE: AI trains overtaking player trains - a simple solut, OTTODAD, Mar-26-03, 07:25 AM, (15)

Conferences | Topics | Previous Topic | Next Topic

Member since Feb-25-03 · 112 posts

RE: AI trains overtaking player trains - a simple solut

AI trains overtaking player trains - a simple solution – image 1

Now THAT is a good idea. I'll give it a try this afternoon. while I work on my NS Activity.

Jake Mensel
<<>Mº$† Wåñ†èd bý †hè ÁTF<>>

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Feb-25-03 · 112 posts

RE: AI trains overtaking player trains - a simple solut

AI trains overtaking player trains - a simple solution – image 2

Well, I was going to but I see I need to find a place to pull it off, hehe.

Jake Mensel
<<>Mº$† Wåñ†èd bý †hè ÁTF<>>

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 145 posts

RE: AI trains overtaking player trains - a simple solut

Wow! I wish I'd read this BEFORE I finished my latest Ohio Rail activity. It would have solved a significant problem with tabbing through a red and getting a restricted speed. Thanks for sharing your creative solution to a vexing problem. Charlie

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 92 posts

RE: AI trains overtaking player trains - a simple solut

Well, I tried it out in my "Blizzard Run" activity (where the diverted NP freight gets overtaken by the Empire Builder at Essex), but now I'm getting stopped by the red signal on my way into Essex. I know I'm not facing any oncoming traffic there. I do have the Empire Builder set up to start just after the signal, but I got there a good 10-15 minutes before the Builder makes its appearance, so I'm not sure if that's what's causing the red signal. I'll have to try moving the Builder's starting point back before the signal and see if that works, but I'm worried that I'll only end up with the same problem in the previous block.

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 127 posts

RE: AI trains overtaking player trains - a simple solut

Just tested this on the ORRR. It worked!! I did have to do a lil reverse at the end of the siding for the signal to clear but then I was on my way.
Thanks for the tip Greg. MDC

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 55 posts

RE: AI trains overtaking player trains - a simple solut

Hi! It is a very clever idea! Let me just ask you, does the exit signal shows "stop" as long as you don't touch the reverse point?
Thanks.
Mark

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Mar-17-03 · 5 posts

RE: AI trains overtaking player trains - a simple solut

MarkIt certainly should do. Reverse points break the path into segments with each segment activated by touching the reverse point immediately before it.So until you reach the reverse point your path stops so the signal doesn't clear.cheersGreg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 346 posts

RE: AI trains overtaking player trains - a simple solut

LAST EDITED ON Mar-22-03 AT 03:22 PM (EDT)

Greg, I just tried it on the KHP at Banff and works without any problems. I am curious, how did you stumble across this? We all know that the AE is full of functions that no one knows about and every once in a while someone stumbles across a new one. This is a major find for us activity designers. We don't have to resort to visual tricks to do overtaking trains. I am including some pictures of my test for all to see. As to the signal staying red until the second reverse point is tripped. Will test it out. I do know that if you trip the second point before the block is clear it stays red until it is clear. I also want to see how switch nodes effect this. The first shot is of the stopped player train and the AI approaching, the second shows the AI already passed the signal at Banff west and the third is the player train just getting ready to pass the approach dwarf as it enters the main.

Sharon Evans
Glen Allen, Virginia
Activities are what makes MSTS run.

Attachments
AI trains overtaking player trains - a simple solution – image 3
http://www.train-sim.com/dcforum/User_files/3e7cc4cd73af3bb1.jpg
AI trains overtaking player trains - a simple solution – image 4
http://www.train-sim.com/dcforum/User_files/3e7cc4e3743ec23c.jpg
AI trains overtaking player trains - a simple solution – image 5
http://www.train-sim.com/dcforum/User_files/3e7cc4f774a4a83c.jpg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Mar-17-03 · 5 posts

RE: AI trains overtaking player trains - a simple solut

G'day SharonI was mucking around with a player service that was just a locomotive and then attaching to a train in the station. I accidentally placed a reverse point under the carriages, coupled up and it instantly became active without any movement down the path. The rest followed.I've also discovered that you can get AI trains to pass each other as well. The trick is that the following train must be following closely behind the first. As the first train enters the loop there is a period of time (which can be very short) when it is clear of the main but hasn't yet hit the reverse points. Hence its path is no longer cluttering up the main and hasn't yet been projected forward. Just as when the diverted train is a player service, the following train can now 'project' its path forward past the loop and the first train stops and waits. Of course, unlike wiyh a player train you can't stop short of the reverse points and wait for the following train to catch up, so if the following train is too far behind then the first train just runs through the loop and proceeds without stopping. Again, it takes less time to set up than to write down.Some would ask why you would want the AI traffic leap-frogging down the line. If, like me, you're attempting to simulate a railway service, then you'll understand. I start by creating a sort of dummy player service (short path in a siding) and create a master traffic file with all the services for a given period. Every service uses a full path. It starts somewhere (siding or terminal platform) real and ends somewhere real. Trains never just pop up on the mainline and then disappear. When I've created a complete master traffic file I then create player services that run as extras or just extract services from the master traffic file to use as player services (saving a new version of the traffic file with the 'borrowed' service removed..). So for me, every service must run on a true path. In a couple of hours you can create dozens of completely different activities based around the one master traffic file. Having AI trains performing in a prototype fashion just saves a lot of mucking around.Hope the above is useful to others.CheersGreg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 169 posts

RE: AI trains overtaking player trains - a simple solut

Hi GregI've been doing some tinkering with your idea and have found one
shortcoming. Sharon & I tinker with the Kicking Horse Pass route
primarily, with its fairly long trains.What I've discovered is the train must be able to fit entirely on
the track between the node where the Reverse Points are and the
previous node. If the train is longer than this, there will be a
failure of the path setup - the exit switch and signal will never
operate for you (there is a partial way around this but it's not
guaranteed to work).Actually, the Route Editor will indicate a problem. If your train
disappears when you get to the Reverse Points, you will have a problem
when you run the activity. I have found that the RE with all its
shortcomings is accurate with signals. If it has a signal that won't
change, that will also be the case when you run the activity. The AE
may show Mexican Standoffs that won't actually happen but I have
found it to be totally accurate when it shows signals not changing.I proved the length problem entirely with the AE, I kept playing with
train lengths/Reverse Point location until my train actually moved
to the Red signal and waited instead of just disappearing. When I got
to this point, I saved and tested - it worked entirely as advertised.The reason this is a problem on the KHP - most KHP passing tracks
have sidings or wyes leading off, thus additional nodes. The Main
track does run full length without additional nodes. The problem with
staying on the main and letting the AI do the run around is another
MSTS bug shows up.On the KHP, the sidings have a 15MPH restriction and AI trains, once
slowed to a restricted speed will never resume speed.Just my $0.02 worth of comments, thanks for pointing out this good
observation to us. There will be some great new activities appearing.
Sharon and I worked toward getting an AI train to pass for weeks but
only partial success. I did use a Reverse Point and did get the AI to
pass but of course, I never could get the signal.GaryG

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Mar-17-03 · 5 posts

RE: AI trains overtaking player trains - a simple solut

G'day GaryAlways a catch, isn't there! I've been using it mostly on an upgraded version of the S&C - Pat Dalton's 1930's version. Being a British route the trains are pretty short and,yes, the loops I have used all have stretches of track long enough to take the train without touching additional nodes. So I've never had your problem.Still, in at least some locations on most routes this might add some additional possibilities.I'll have a little play and see what happens myself.
CheersGreg
Greg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 169 posts

RE: AI trains overtaking player trains - a simple solut

Hi GregRP = Reverse PointFound a way around the long train problem.I've included an edited clip from the RE.The key I found is the RPs do not need to be placed closely
together as you described. As long as part of the train is
over both points at the same time, it will work.I'm just guessing at this summarization to the problem I was
having ... as long as there are no nodes between the 2nd RP
and the rear of the train when the 1st RP is crossed it will
work ok.Note that I'm referring to the order we placed the RPs with
the 2nd actually being the one we reach first when we run the
Activity.If I move the 2nd RP anywhere left of the first Wye switch
we will fail. The positioning of the first point does not
appear to be critical. I moved it far enough that with normal
running speeds, it's difficult to pass before the AI train
gets signal control. I can see both departing signals and
have found that as soon as the other signal changes from the
Stop aspect, I can pass the 1st RP and still allow the AI to
keep the path.I hope this helps explain what I found (clear as mud) GaryG

Attachments
AI trains overtaking player trains - a simple solution – image 6
http://www.train-sim.com/dcforum/User_files/3e81021621dd98b1.jpg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Member since Mar-17-03 · 5 posts

RE: AI trains overtaking player trains - a simple solut

G'day GaryIf what you describe works when there are track nodes around then that is wonderful. If there aren't then it is still worth placing reverse points close together as the path can then be used by trains of any length without further editing. After all, if you place them too far apart you're back to the problem I was trying to solve - that of having to reverse your train.Whch brings this full circle. The whole point about using double reverse points in this way is that the reverse points are a means to an end and, although the path does a quick double shuffle, the train doesn't. It has nothing to do with reversing! What this is really about is stopping your path in its tracks so that it no longer projects forward (until you want it to). I'd love to call it a 'broken path' but Microsoft/Kuju already use that term for something else. I really want to invent something to describe the collective effect of two reverse points in conjunction so I'll call it a 'Stop in Tracks' point, SIT for short. A SIT point lets your path sit in one place.Most of this discussion has been about using SIT points to allow AI trains to pass your player train, but SIT points have loads of other possibilities. Here's a few (not all tested): 1 On some lines 'starter' signals were placed at the departure end of every platform. In manually signalled territory the starter sometimes wasn't cleared for stopping trains until the train was in the platform. A SIT point adjacent to the platform could simulate this.2 If you want a train to slow to a sustained crawl, place a SIT point after every block signal. The effect should be to progressively clear the path forward one block at a time, with the signal always clearing to it's most restrictive aspect.2 Got a long branchline joining a mainline with the junction protected by a signal? Place a SIT point short of the junction signal and you can delay your clearance on to the main.3 Variation on the above. Imagine a yard with a long lead (to avoid the node problem)on to the mainline, once again with the mainline protected by signal on the branch track. Your path enters the yard, proceeds through the lead and on to the mainline. With a SIT point just before the signal protecting entrance to the main, you should be able to shunt the yard to your heart's content. Your path won't project forward on to the main and stop traffic there until you pull forward to the SIT point. The virtual equivalent of 'asking for the road'. It'll be interesting to see what works and what doesn't.Sorry to ramble.
cheersGreg

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 169 posts

RE: AI trains overtaking player trains - a simple solut

LAST EDITED ON Mar-26-03 AT 04:01 AM (EDT)

HiWell I think a new door has been opened for Activity designers
with whatever you wish to call this procedure.I do know I got seern's attention with a test activity I put
together.I pulled into the Banff passing track, waited a while, the 1955
Canadian pulled up to the station, stopped about three minutes
(that's what got her attention I think) then departed. About four
minutes later my Stop signal cleared and I was able to follow it.The types of things we've tried many times but gotten nowhere
with until now.As far as putting them RPs far apart - well it all depends on if
the piece of track has any nodes between the entry and exit as well
as the length of the train. Remember, the Reverse Point locations
are customized for each trains path. Long train - perhaps split
RPs, short train close RPs.Another thing to keep in mind, if you watch the speed and timing so
you know about where the player train will be located when the AI
train appears, you can then perhaps place the RPs more distant from
the signal. This way, the AI train already has its path and signals
set by the time the player train crosses the RPs. This way the
player has much leeway in a stopping point and yet still gets the
signal when its time. Experiment....Thanks
GaryG

Alert | IP

Printer-friendly page | Edit | Reply | Reply With Quote | Top

Charter Member · 2152 posts

RE: AI trains overtaking player trains - a simple solut

Thanks to SNIPER mentioning this discussion in the Main Forum and having read all the messages, the Signalling FOG is slowly lifting in my Brain.GLAD JIM IS BACK ! I have been testing Multi-Return Loops and WYEs for some time now and been guessing with regards to Signalling. Got it mostly right, more by accident and logic than design. Thanks guys, Thread Bookmarked !O t t o

Alert | IP


[ Home | MSTS Forum | MSTS FAQ | File Library ] Copyright © 2002 by Nels Anderson. All Rights Reserved.

Restored from the Train-Sim.Com archive, captured June 22, 2003. About this archive.