train pathfinding

Post all other topics which do not belong to any other category.
Post Reply
User avatar
-root
Filter Inserter
Filter Inserter
Posts: 651
Joined: Tue Jul 01, 2014 11:24 pm
Contact:

train pathfinding

Post by -root »

Is there anyway of turning that path recalculate value down to say 10 secs? Or even 5 secs? I think if this can be tweaked down from 30 secs, it might solve a problem I have.

Trains are too dumb to realize that there are open stations nearby, so I'm using chain signals to try and browbeat them into going into an open station, as opposed to waiting stupidly at a signal.

User avatar
-root
Filter Inserter
Filter Inserter
Posts: 651
Joined: Tue Jul 01, 2014 11:24 pm
Contact:

Re: train pathfinding

Post by -root »

please disregard. I have learnt something new about train pathfinding today.

Here's what I learnt. If there is a train that has "left" a station, but doesn't leave the block, the pathfinding will consider that station "open" and you can potentially clog a stacker system.

EDIT: Here is a picture to show what I mean. Kovarex, guys, you gotta fix this. This is completely dumb. Surely you can get one train to check if another train is going to the exact same station and maybe have one of them decide to go somewhere else.

The station with all the green lines in the centre of the picture is where everything on the map is trying to go. There are additional stations "past" that one.
Image

The pathfinding isn't sophisticated enough to "see" them because there is no train technically at the first station station.

If anyone has a work around or hack to avoid this issue, I'd love to know about it.

Rockstar04
Fast Inserter
Fast Inserter
Posts: 171
Joined: Sun Feb 17, 2013 4:31 pm
Contact:

Re: train pathfinding

Post by Rockstar04 »

I could be very wrong, but I was always under the impression that for trains to use mutiple stations with the same name, they have to be aligned like this


==============X=====

==============X=====

Where X is the station

bobucles
Smart Inserter
Smart Inserter
Posts: 1669
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: train pathfinding

Post by bobucles »

What point are you trying to get at? Trains will try to hit every station in their route, even if it means getting in line. Don't overload your primary stations.

Currently you can't tell trains to pick between multiple stations or to make their routes depend on logistic factors. They do not know where to pick up goods or where to drop them off or why any of that matters. All they know is to perform their route in order. So pick good routes and make sure there are enough stations to support it.

Vin
Fast Inserter
Fast Inserter
Posts: 106
Joined: Sat Jun 21, 2014 2:46 pm
Contact:

Re: train pathfinding

Post by Vin »

bobucles wrote:What point are you trying to get at? Trains will try to hit every station in their route, even if it means getting in line. Don't overload your primary stations.

Currently you can't tell trains to pick between multiple stations or to make their routes depend on logistic factors. They do not know where to pick up goods or where to drop them off or why any of that matters. All they know is to perform their route in order. So pick good routes and make sure there are enough stations to support it.
Root can correct me if I'm wrong, but I assume those stations have the same name. The train should pick an empty one on arrival, but the current implementation of pathfinding makes them a bit more dumb than they should be.

@root - you can work around this issue by using stations in your stacker to force revaluate once they hit it.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: train pathfinding

Post by Boogieman14 »

Vin wrote: Root can correct me if I'm wrong, but I assume those stations have the same name. The train should pick an empty one on arrival, but the current implementation of pathfinding makes them a bit more dumb than they should be.
I suspect those same-named stops will only function correctly when they're behind the same (single) signal (call it a station entry signal). I remember fiddling with that in the past (0.10 era, probably) and things not working correctly when there were two signals leading into the block before the blocks with the stops. Also, I have to disagree with the assessment that trains decide on their route at the very start. In my last game, I have stations with two stops, where a third train will consistently enter the first stop that opens up and there's no way this will have been determined at departure already, not when it happens correctly this consistently.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

OBAMA MCLAMA
Filter Inserter
Filter Inserter
Posts: 337
Joined: Fri May 30, 2014 4:23 am
Contact:

Re: train pathfinding

Post by OBAMA MCLAMA »

Hah yup.. I anticipated this would be a problem with that screenshot of yours root, v12.4 fix has not fixed enough.
I built mine to be more balanced, equal length between every station. They still somewhat favor stations, but I countered the problem by having lots of trains.
I have 4 stations, 4 trains arriving will use either 2 or 3 stations, most of the time 3. The 5th train would use the fourth station. So im using 10 trains as a bare minimum for it.

What could fix everything, is by adding a pick station signal. Use it right before the trains enter the stacker.

And by saying that, a temp fix I have yet to test but I will try in 1 hour.... is... a station before the trains enter the stacker.. for zero seconds.
Its not something I would use in my world due to throughput problems, but it might actually help with recaclulating the path if you place it before the stacker. I dont think it will, but its something to test for me and you root.
When i stream twitch i always answer questions and try to help, come visit me.

Post Reply

Return to “General discussion”