How to force recalculation of train paths?
-
- Fast Inserter
- Posts: 121
- Joined: Wed Apr 06, 2016 4:01 am
- Contact:
How to force recalculation of train paths?
Hi,
is there any possibility to force a recalculation of the train pathfinding when a train is waiting at a blue chain signal? Would be usefull for train-stackers/multi-lane train stations.
is there any possibility to force a recalculation of the train pathfinding when a train is waiting at a blue chain signal? Would be usefull for train-stackers/multi-lane train stations.
Re: How to force recalculation of train paths?
It should ...find an open path where one exists. Your question makes it sound as if you have a train that is sitting somewhere and it should be able to find a path but can't. This is probably just a case of a signaling error.
An uploaded save may be helpful here.
An uploaded save may be helpful here.
-
- Long Handed Inserter
- Posts: 51
- Joined: Thu Jun 16, 2016 5:00 am
- Contact:
Re: How to force recalculation of train paths?
Currently, trains only pick a destination when they leave a station - if you have multiple same-named stations, a train will pick one to go to when it leaves the previous station in its schedule. If it's blocked at a signal it can try to pick another path, but it won't pick a different destination at that point.
You can sort of cheat this by putting a station in between and having trains stop there for 0s. This way it should always try to go to a station that is unblocked, since it won't pick a blocked station as a potential destination.
You can sort of cheat this by putting a station in between and having trains stop there for 0s. This way it should always try to go to a station that is unblocked, since it won't pick a blocked station as a potential destination.
Re: How to force recalculation of train paths?
Seems to me that trains should do another check on available stations any time they are stopped (either at a different station or while waiting at a red signal). I have seen this behavior myself where a train sits idle in a stacker just ahead of a pair of stations with the same name because it wants to go to a specific one of those stations that happens to be occupied. You can verify this by mousing over the train and seeing the pathing arrows. Even if the other station with the same name is wide open it will sit and wait for the first one to be vacated.
-
- Fast Inserter
- Posts: 121
- Joined: Wed Apr 06, 2016 4:01 am
- Contact:
Re: How to force recalculation of train paths?
Probably the trick TheSkiGeek mentioned will work I´ll test it later THX
*edit* nah... can´t be like you explained... The Train waits at a blue signal until its current destination becomes free, then it chooses another station (that was already free when the train arrived at the signal). But I´ll test the second 0s station anyway
*edit* nah... can´t be like you explained... The Train waits at a blue signal until its current destination becomes free, then it chooses another station (that was already free when the train arrived at the signal). But I´ll test the second 0s station anyway
Re: How to force recalculation of train paths?
Why not put a new station in the schedule just before the depot with a 0 second wait time? Then it will calculate its arrival station when it knows where is free. Bonus points for sticking waiting space behind the station, so your train enters the "depot" area, passes through the waiting area. Stops at a station to be given a free station (your need to make sure the train was held by a chain signal before hitting the blank station so it was guaranteed a free station), then rolling in. Should work for any number of trains as long as your waiting area is big enough
-
- Filter Inserter
- Posts: 285
- Joined: Thu Jun 09, 2016 5:56 am
- Contact:
Re: How to force recalculation of train paths?
Does giving same name to two stations serve any purpose? I always thought it just confuses player because stations are addressed by some internal ID so you don't know which is which. Am I wrong?
Re: How to force recalculation of train paths?
When you assign a train to go to a station, that is based on the name, not on some internal ID. Even though I may have two separate stations named "Iron Main" when you pull of the list of stations in the scheduler it only shows "Iron Main" once. Trains will use whatever one is available. It's a way to manage high throughput especially on the receiving end if you have a lot of trains, you can have them go to different stations with the same name and it allows for simpler scheduling.
This thread pertains to the fact that trains decide which of those stations to go to when departing the previous stop and will not change their mind even if a better alternative opens up along the way.
This thread pertains to the fact that trains decide which of those stations to go to when departing the previous stop and will not change their mind even if a better alternative opens up along the way.
-
- Filter Inserter
- Posts: 285
- Joined: Thu Jun 09, 2016 5:56 am
- Contact:
Re: How to force recalculation of train paths?
Got it, thanks. If trains are allowed to pick different station while waiting they may go infinite loop back and forth in some cases.
-
- Fast Inserter
- Posts: 121
- Joined: Wed Apr 06, 2016 4:01 am
- Contact:
Re: How to force recalculation of train paths?
Damn It didnt work... Probably I need to build a parallel stacker (not 2 or 3 trains per lane/station)
-
- Inserter
- Posts: 20
- Joined: Sun Jul 03, 2016 8:07 pm
- Contact:
Re: How to force recalculation of train paths?
That is not true. Trains update paths at other times too, both while moving and stationary. I don't know what triggers it though because sometimes it can sit for several minutes before it finds the empty station.TheSkiGeek wrote:Currently, trains only pick a destination when they leave a station - if you have multiple same-named stations, a train will pick one to go to when it leaves the previous station in its schedule. If it's blocked at a signal it can try to pick another path, but it won't pick a different destination at that point.
You can sort of cheat this by putting a station in between and having trains stop there for 0s. This way it should always try to go to a station that is unblocked, since it won't pick a blocked station as a potential destination.
-
- Inserter
- Posts: 45
- Joined: Thu Aug 27, 2015 4:37 pm
- Contact:
Re: How to force recalculation of train paths?
I once read that chain signals have an impact on how trains behave. Is it only for finding paths or also picking (same named) stations?Fushigidane wrote:That is not true. Trains update paths at other times too, both while moving and stationary. I don't know what triggers it though because sometimes it can sit for several minutes before it finds the empty station.TheSkiGeek wrote:Currently, trains only pick a destination when they leave a station - if you have multiple same-named stations, a train will pick one to go to when it leaves the previous station in its schedule. If it's blocked at a signal it can try to pick another path, but it won't pick a different destination at that point.
You can sort of cheat this by putting a station in between and having trains stop there for 0s. This way it should always try to go to a station that is unblocked, since it won't pick a blocked station as a potential destination.
-
- Inserter
- Posts: 20
- Joined: Sun Jul 03, 2016 8:07 pm
- Contact:
Re: How to force recalculation of train paths?
The path finder doesn't see signals, it only sees blocks and if they are free or not. Signals only stop trains from entering reserved blocks.Fahrradkette wrote:I once read that chain signals have an impact on how trains behave. Is it only for finding paths or also picking (same named) stations?Fushigidane wrote:That is not true. Trains update paths at other times too, both while moving and stationary. I don't know what triggers it though because sometimes it can sit for several minutes before it finds the empty station.TheSkiGeek wrote:Currently, trains only pick a destination when they leave a station - if you have multiple same-named stations, a train will pick one to go to when it leaves the previous station in its schedule. If it's blocked at a signal it can try to pick another path, but it won't pick a different destination at that point.
You can sort of cheat this by putting a station in between and having trains stop there for 0s. This way it should always try to go to a station that is unblocked, since it won't pick a blocked station as a potential destination.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to force recalculation of train paths?
the train algorithm needs fixing.
learning how train signals/chain signals function is frustrating as it is.
then you buid something that should work, then does something like this. the train went through a blue chain signal (as it should) but passes the free lane and stops at a blocked one.
learning how train signals/chain signals function is frustrating as it is.
then you buid something that should work, then does something like this. the train went through a blue chain signal (as it should) but passes the free lane and stops at a blocked one.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: How to force recalculation of train paths?
See this topic. I posted a solution there using the circuit network so that a regular signal basically works like a chain signal. As the trains seem to recalculate when they pass signals, it does so upon being allowed into the loading area and automatically picks the available waiting bay. Note it is best if the faux-chain signal is not right up against a curved rail though I personally didn't find any problems with that.impetus maximus wrote:the train algorithm needs fixing.
learning how train signals/chain signals function is frustrating as it is.
then you buid something that should work, then does something like this.
the train went through a blue chain signal (as it should) but passes the free lane and stops at a blocked one.
Money might be the root of all evil, but ignorance is the heart.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to force recalculation of train paths?
thanks Deadly-Bagel. i'll check that out.
Re: How to force recalculation of train paths?
Is this not a bug? If the path the train wants to take is blocked, it should stop at the chain signal.impetus maximus wrote:the train algorithm needs fixing.
learning how train signals/chain signals function is frustrating as it is.
then you buid something that should work, then does something like this. the train went through a blue chain signal (as it should) but passes the free lane and stops at a blocked one.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to force recalculation of train paths?
seems like a bug to me. i don't know if it has been offically reported or not.Zeblote wrote: Is this not a bug? If the path the train wants to take is blocked, it should stop at the chain signal.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: How to force recalculation of train paths?
I don't see a chain signal in the screenshot, is it behind the train?
Money might be the root of all evil, but ignorance is the heart.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: How to force recalculation of train paths?
sorry. cropped it so it was a smaller image and clearer.Deadly-Bagel wrote:I don't see a chain signal in the screenshot, is it behind the train?