variable track resistance

martinvk

since 10 Aug 2002
If I understand it correctly, the direction markers work by making it appear to the AI that a section of track is very very long. Since the pathing calculation attempts to find the shortest path to the destination, this effectively prevents a track from being selected.

Would it be possible to create a variable resistance marker that adds a smaller but defined amount of logical distance? The idea is to discourage the use of a specific track but not have an absolute prohibition. The exact amount would be user determined. So through trains would be encouraged to use the mainline but could use a secondary track if the main is blocked. AI trains which are supposed to use the secondary would still be able to use it by having a destination track marker to go to also placed on that track.
 
Last edited:
If I understand it correctly, the direction markers work by making it appear to the AI that a section of track is very very long. Since the pathing calculation attempts to find the shortest path to the destination, this effectively prevents a track from being selected.

Would it be possible to create a variable resistance marker that adds a smaller but defined amount of logical distance? The idea is to discourage the use of a specific track but not have an absolute prohibition. The exact amount would be user determined. So through trains would be encouraged to use the mainline but could use a secondary track if the main is blocked. AI trains which are supposed to use the secondary would still be able to use it by having a destination track marker to go to also placed on that track.


This sounds like a good idea, Martin and is almost on the same line as DRicketts' idea with the priority marker.

John
 
Somehow I don't think this is possible. As I suggested to Drickets, use priority markers in a negative way.

Say your trains are priority 2. Place priority 1 or 3 markers where you don't want your train to go and leave the main line clear. If the main line is blocked the train will use alternative routes but stay on the mainline if it is clear.

Trevor
 
Tried the priority markers. Since they are not absolute, kind of hard to judge the results.

Assuming the default priority is 2, I placed priority markers 1 and 3 on bypassing sidings. Some AI trains still used those sidings when going from A to B. Not every time but often enough that I'll looking for a way to keep them on the right track.

One side of a dual track path, AI trains travel left to right, only stopping at the station platform if it is in their commands.

Code:
A====\==============/=======B
      \============/
        [platform]
True, track marks could be added to the mainline and every AI train be given extra commands to "Navigate via" but I'm trying to avoid having to update every AI train. I would instead like to influence the pathing process so AI trains only stop at the stations they need to and avoid the others. Naturally they just drive right through but it does look silly to seemingly have an AI train go out of its way to pass next to a platform when there is a perfectly good through line one track over.
 
Hi Nartin - I presume that the default position of the switches is pointing to the straight line. If the priority markers do not always work then either the core code will need changing or extra commands will need to be issued.

The ideal would be that the "navigate to trackmark" command first tries the path laid out by the default switch settings before trying other paths.

I tried making a new "drive to trackmark" command which works out its own path as above. It is working but has lots of problems in controlling the switches and tends to switch them back and forth a lot. Also, it easily gets confused when the track is complex.

Sorry I can't help further.

Trevor
 
Back
Top