I thought I had trains figured out!

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

I thought I had trains figured out!

Post by BorealisD »

Hey all,

I've been working on my 1000 SPM megabase, and I decided to update to the latest experimental version of the game. I saved a copy of my map before I updated, of course.

Ever since I changed to the 16 experimental, lots of my trains are refusing to go to open stations nearby with the same name. I'm trying to figure out if it's something that I messed up with signaling, or if it is due to the update. Here's a picture of one of my stations (pretty much all my train stackers are doing this now, however):

Image

This kind of train stacker has been working for many hours at this point - I'm using trains extensively, and I've placed thousands of signals. I think I have it correct. Usually, when I have multiple trains at a stacker, and a nearby station opens up with the same name, the trains will move through an open rail and go to the other station. However, my trains are just sitting at the stacker now waiting for this specific station to open. Is there something I don't know?
Last edited by BorealisD on Tue Feb 13, 2018 2:57 pm, edited 1 time in total.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: I thought I had trains figued out!

Post by Koub »

There was a bug that you probably used as a feature, that added a huge penalty when a station was occupied, and that made some shared name station routing work.
It has been corrected.
Koub - Please consider English is not my native language.

Loewchen
Global Moderator
Global Moderator
Posts: 8285
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: I thought I had trains figued out!

Post by Loewchen »

I doubt this change is the reason the behaviour here though, the penalty is still way higher than necessary to get the train to go to the furthest station in this setup and the most left station should be most attractive anyway. Post the save with the player next to the issue please.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: I thought I had trains figued out!

Post by eradicator »

For how long are they waiting? It still takes a few (20-30ish?) seconds for trains to reroute at a chain signal as far as i understand. Also that second train from the left looks odd. It's not stopped at the same position as all the others.

BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

Re: I thought I had trains figured out!

Post by BorealisD »

Hello - thanks for the replies!

To answer some of your questions/observations:
eradicator: The trains are waiting there permanently, and won't reroute at all no matter how long I wait. The second train from the left is a bit odd because I was moving the trains around manually between signals trying to get them to recalculate their route - I unassembled parts of the stacker and moved the signals around too, no luck.

Loew: I'll post the save when I get home

Koub: Does that mean I'll have to give each station a unique name and reroute the trains? I can do that, I just want my copper plate trains, for example, to go to the nearest empty copper plate drop station. If I have to I'll assign trains to a specific station (time consuming, but not the end of the world).

Edit: I just realized, looking at the image, that something might not be clear - the open station in the picture is NOT the same name as the other "copper plate drop", it's a station for dropping something else (green chips I think). The other open stations with the "copper plate drop" name are at other nearby facilities connected to the rail network. Previous to updating, the trains in this stacker would move out of the stacker through any open rail and go to the other facility when a "copper plate drop" station opened up. This is a problem that is occurring at other facilities throughout my base as well.

Loewchen
Global Moderator
Global Moderator
Posts: 8285
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: I thought I had trains figured out!

Post by Loewchen »

BorealisD wrote:Edit: I just realized, looking at the image, that something might not be clear - the open station in the picture is NOT the same name as the other "copper plate drop", it's a station for dropping something else (green chips I think). The other open stations with the "copper plate drop" name are at other nearby facilities connected to the rail network. Previous to updating, the trains in this stacker would move out of the stacker through any open rail and go to the other facility when a "copper plate drop" station opened up. This is a problem that is occurring at other facilities throughout my base as well.
No need for a save then, this is the behaviour Koub described and working as intended.

BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

Re: I thought I had trains figured out!

Post by BorealisD »

Hello Loewchen - just to verify then - this behavior was "fixed" in the latest patch? Is there a reason for this "fix"? If it is intended behavior that trains will no longer find open stations with the same name nearby, is there another way to force trains to look for open stations with the same name? If not, I'll get busy renaming my stations I guess!

Alternatively, if I attached each station to a circuit network with the rail signal leading into the station, and simply had the station turn off when occupied, would that work?

Thanks for the help

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: I thought I had trains figured out!

Post by eradicator »

@OP.

The fix fixed only that trains parked in station gave more penalty than they should. Penalty means that all other trains think the way to that station just became really long. So your problem is that now the in-use station has the correct penalty and so near trains don't falsely believe that stuff on the other side of the road is "closer" anymore.

I turn off stations when they're occupied and it works really well, you just have to make sure that there's always at least one station of the name active, otherwise trains en-route will go into "no path" mode. I use a fake station with a circut-turned-off signal in front of it to keep the station name "alive" to avoid no path, but thats just one way.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: I thought I had trains figured out!

Post by Koub »

Does this answer your questions (the fix, and the explanation in the linked bug report) ? :
FactorioBot wrote: Bugfixes
  • Fixed that train arriving to station could give astronomically big penalty causing trains to go through weird places. (54042)
Source

Right now, I just react to the text part of your OP : I can't see the pictures, I'm between two meetings at work, and most image hosting sites are banned for security reasons. I wouldn't have problems if the images were uploaded directly into the forum, instead of (imgur/tinypic/insert random hosting site here).
Koub - Please consider English is not my native language.

BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

Re: I thought I had trains figured out!

Post by BorealisD »

Thank you, I think I can fix it now. Next time I'll upload images directly to the site.

Ringkeeper
Fast Inserter
Fast Inserter
Posts: 141
Joined: Wed Feb 03, 2016 7:16 pm
Contact:

Re: I thought I had trains figured out!

Post by Ringkeeper »

looking at the picture, they go from top to bottom correct? and the other station with same name is also to the south?
The chain signal to the south is red, so that way is blocked.

The other 2 ways go through stations i guess which adds 1000 ? penalty , so after the "fix" that penalty is too high.

And why do you have (again just guessing from picture) locos in both direction on your trains? On big maps/extensive use that makes little sense to me, as you want them to drive only in one direction without reversing. So you pull dead weight.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: I thought I had trains figued out!

Post by Aeternus »

Koub wrote:There was a bug that you probably used as a feature, that added a huge penalty when a station was occupied, and that made some shared name station routing work.
It has been corrected.
If you want to recreate the bug/feature though, simply set a combinator to read when a train is at the station, and deactivate the station on that condition. The train will still finish loading until it's departure condition(s) are met, but since the station isn't active, it isn't a valid destination for any other trains.

BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

Re: I thought I had trains figured out!

Post by BorealisD »

Hey Ringkeeper - the path to the south leads to the station where the red chips are picked up. In any case, both of the rails heading north are open and green all the way to main rail line. Before I updated to the latest version the trains would leave by any open line to go find an open "copper plate drop" station.

Aeternus, and others - I tried the circuit route of connecting the station to any object, then enabling the station only when the contents of the station are "everything = 0". It replicates some of the behavior I had before, but now when I have more trains than stations (I want more trains than stations to ensure a constant supply), some of those trains will "no path" as long as those stations are filled, leading to backed up trains on the main line.

Eradicator: you said
"I turn off stations when they're occupied and it works really well, you just have to make sure that there's always at least one station of the name active, otherwise trains en-route will go into "no path" mode. I use a fake station with a circut-turned-off signal in front of it to keep the station name "alive" to avoid no path, but thats just one way."
- would you mind explaining/providing a picture of this "fake station"? I'm not super great with circuits yet (all I've done is kovarex stuff).

I really wish I could figure out a way to replicate how it was running before easily - my whole base was running quite smoothly. I've started to rename all the stations with unique identifiers "1 IP Pick" and "2 IP Pick" for 1rst Iron plate pickup and 2nd iron plate pickup, for example. Now I'll have to go and reroute every single train so that it has a specific target... it seems a bit pointless, but it's getting better.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: I thought I had trains figured out!

Post by Jap2.0 »

BorealisD wrote:Hey Ringkeeper - the path to the south leads to the station where the red chips are picked up. In any case, both of the rails heading north are open and green all the way to main rail line. Before I updated to the latest version the trains would leave by any open line to go find an open "copper plate drop" station.

Aeternus, and others - I tried the circuit route of connecting the station to any object, then enabling the station only when the contents of the station are "everything = 0". It replicates some of the behavior I had before, but now when I have more trains than stations (I want more trains than stations to ensure a constant supply), some of those trains will "no path" as long as those stations are filled, leading to backed up trains on the main line.

Eradicator: you said
"I turn off stations when they're occupied and it works really well, you just have to make sure that there's always at least one station of the name active, otherwise trains en-route will go into "no path" mode. I use a fake station with a circut-turned-off signal in front of it to keep the station name "alive" to avoid no path, but thats just one way."
- would you mind explaining/providing a picture of this "fake station"? I'm not super great with circuits yet (all I've done is kovarex stuff).

I really wish I could figure out a way to replicate how it was running before easily - my whole base was running quite smoothly. I've started to rename all the stations with unique identifiers "1 IP Pick" and "2 IP Pick" for 1rst Iron plate pickup and 2nd iron plate pickup, for example. Now I'll have to go and reroute every single train so that it has a specific target... it seems a bit pointless, but it's getting better.
Setting a signal red via the circuit network give trains a sigificant penalty - 1k or 2k tiles worth.
There are 10 types of people: those who get this joke and those who don't.

BorealisD
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Feb 13, 2018 1:28 pm
Contact:

Re: I thought I had trains figured out!

Post by BorealisD »

Interesting - thanks. Where are you getting that information? I'd like to read about it a bit, but I haven't had much luck finding my own sources on relatively simple train circuits.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: I thought I had trains figured out!

Post by eradicator »

https://wiki.factorio.com/Railway/Train_path_finding for the pathing penalties.

@Fake Station:
You just need a signal that is permanently red. The condition doesn't matter. And then behind the signal i have a copy of every station i want at least one enabled off. Be aware that the trains will still route towards this station, so make sure they don't get into a dead end on their way there.
fake_station.jpg
fake_station.jpg (160.41 KiB) Viewed 4064 times
full_station.jpg
full_station.jpg (463.03 KiB) Viewed 4064 times

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: I thought I had trains figured out!

Post by Aeternus »

Simple way to set a station red when a train arrives: Read train ID, then set Enable/Disable with condition T=0. Needs only a circuit connection between station and power pole, no combinator magic needed. Any train arriving will set T to the train ID. So the station deactivates. The train meanwhile will continue it's load/unload until the departure conditions are met.

I've not played around the pathing issues yet, but having more trains on the main loop then stations to receive them... I consider to already be faulty design. Send a train when a station is ready. Send 2 if 2 stations are ready to receive them. Never more then they can handle. This requires you to know the amount of stations that can handle trains which can get tricky. In vanilla it means maintaining a circuit network globally, which at huge ranges can get problematic with biters getting on the tracks, tearing down power/signal poles. You can produce some power locally at mining bases, but in vanilla I don't think there is a reliable way to get signals to distant mining outposts if your power grid keeps getting interrupted.
And an artillery base per mining outpost seems somewhat... excessive.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: I thought I had trains figured out!

Post by eradicator »

Aeternus wrote:I've not played around the pathing issues yet, but having more trains on the main loop then stations to receive them... I consider to already be faulty design. Send a train when a station is ready.
Eeer...what?! Faulty design? Having more trains than station is required for any but the most basic networks. That is what stackers are for. Having more trains than stacker holdings...now that might become problematic. But is hardly faulty design. But blocking a trains departure because the target station is occupied? That's insanity. Trains don't travel instantaneously, they need to leave as early as possible.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: I thought I had trains figured out!

Post by Aeternus »

No, the -stacker- is where those excess trains are supposed to be waiting while there is no station ready to receive them. If you release all trains from the stacker immediately then why bother having one at all? Your main loop becomes a de-facto stacker that way, and that's when things get clogged up.
There should never be more trains heading to loading stations on the main loop then there are stations ready to receive such a train. The main loop is not a buffer for trains!

Post Reply

Return to “Gameplay Help”