[0.8.5] Train Pathfinding Issue

Post your ideas and suggestions how to improve the game.
Post Reply
Telarin
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Tue Mar 05, 2013 2:17 pm
Contact:

[0.8.5] Train Pathfinding Issue

Post by Telarin » Fri Jan 03, 2014 3:57 pm

This is somewhere between a defect and a suggestion, so feel free to move it, but I felt it was more of a defect myself, so posted it here.

I constructed the following structure, with the hopes of allowing multiple trains to share a single long section of track without having to wait for the entire length to clear before proceeding, basically building a passing siding (common in real world railroad systems):

Image

Expected behavior:
Train A approaches from the west on track section 1, while at the same time Train B is approaching from the east on Track 4.
Train A enters Track 3, causing the signal light for this section to turn red
My expectation is that at this point, Train B would proceed on Track 2, allowing the two trains to pass, however, Train B simply pulls up at the signal light for Track 3, causing a deadlock

Suggested fixes:
1) Have trains recalculate their route each time they reach a switch, this would allow them to make a decision regarding blocked tracks, and hopefully pick an alternate path if one is available
2) Have all trains recalculate their routes each time the status of a section of track changes. This seems like it would end up being a lot more CPU intensive in large rail systems, but might work better for busy systems.

kovarex
Factorio Staff
Factorio Staff
Posts: 7291
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by kovarex » Fri Jan 03, 2014 4:02 pm

I personally solve this by having the 2 + 3 section one-directional.
Lets say you allow just east direction to 2 and west to 3 and it will work correctly (I used it this way in my games)

Telarin
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Tue Mar 05, 2013 2:17 pm
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by Telarin » Fri Jan 03, 2014 5:32 pm

Yeah, that sounds like a reasonable workaround. How do you go about making a section one-way?

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by Nirahiel » Sat Jan 04, 2014 4:40 pm

Place signals posts only on the right of the one way section :)

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10467
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by ssilk » Sat Jan 04, 2014 7:58 pm

I think this is not a bug. But it should be explained much better in the docs, because it is quite difficult to understand.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

slpwnd
Factorio Staff
Factorio Staff
Posts: 1837
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by slpwnd » Tue Jun 17, 2014 3:01 pm

Technically this is not a bug. Though the suggestions made are valid. Trains path recalculation should be more elaborate than it is now so trains can deal with situations like this. This is something we want to add for sure, but this topic belongs to ideas & suggestions (so moving it there).

Using one direction only lines as suggested by others is a solution for now.

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by sillyfly » Tue Jun 17, 2014 4:55 pm

kovarex wrote:I personally solve this by having the 2 + 3 section one-directional.
Lets say you allow just east direction to 2 and west to 3 and it will work correctly (I used it this way in my games)
So - if I understand correctly (after a few tests) - a signal on one side is regarded as if the other side has a signal which is constantly red?
This need to be documented somewhere! I always assumed if there is no signal in the direction the train is moving - it can always go! (i.e. - a signal in one direction is equivalent to a signal in the other direction being constantly green )

arl85
Fast Inserter
Fast Inserter
Posts: 162
Joined: Tue Jun 10, 2014 7:08 am
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by arl85 » Tue Jun 17, 2014 9:32 pm

sillyfly wrote:
kovarex wrote:I personally solve this by having the 2 + 3 section one-directional.
Lets say you allow just east direction to 2 and west to 3 and it will work correctly (I used it this way in my games)
So - if I understand correctly (after a few tests) - a signal on one side is regarded as if the other side has a signal which is constantly red?
yes, it's quite natural for who played OTTD: a signal can only be passed from the side with the lights and never from its back.

quoting their wiki:
OTTD Wiki wrote:Although the one-way (block) signal appears there is only one side of the signal facing the passing direction, technically speaking, the disappeared signal of the other side still exists and is red permanently to block the entrance from that side
Do you need help taking screenshots in-game? have a look to my guide to calculate screenshot dimensions

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10467
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.8.5] Train Pathfinding Issue

Post by ssilk » Wed Jun 18, 2014 4:18 am

On our wiki: Pass by stations
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: BaggyK, Bing [Bot]