How to dispatch more trains

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

How to dispatch more trains

Post by gexxo »

One question Optera:
How quickly are trains dispatched? When having the log messages on, it seems that there is never more than 1 train every 1-2 seconds being dispatched, at least I don't see the log messages coming in faster. Is that true?

I am asking be because I think I have hit that limit, i.e. I need more trains than the network can dispatch: I have various stations requesting around 52k iron and enough stations that provide around 52k iron. I have the provider/requester threshold set to 4k (a full train with two wagons). I have enough trains waiting at depots. Still, I am not getting the number of trains enqueued at that station I would anticipate, even after waiting some minutes/hours. With 52k, I would anticipate that around 12-13 trains are getting queued to transport iron to it. However, the most I see is 3-4, sometimes 5.

So, what could be the bottleneck here? Is it the train dispatching speed? Is it that some of my depots are empty and the system waits for trains in them, while other depots have enough trains? How could I solve my bottleneck here?

My overall train network consists of around 200 trains.
Last edited by Optera on Thu Jul 20, 2017 10:07 am, edited 3 times in total.
Reason: split into new topic with fitting title

Mobius1
Fast Inserter
Fast Inserter
Posts: 191
Joined: Thu Feb 09, 2017 12:05 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Mobius1 »

gexxo wrote:One question Optera:
How quickly are trains dispatched? When having the log messages on, it seems that there is never more than 1 train every 1-2 seconds being dispatched, at least I don't see the log messages coming in faster. Is that true?

I am asking be because I think I have hit that limit: I have various stations requesting around 52k iron and enough stations that provide around 52k iron. I have the provider/requester threshold set to 4k (a full train with two wagons). I have enough trains waiting at depots. Still, I am not getting the number of trains enqueued at that station I would anticipate. With 52k, I would anticipate that around 12-13 trains are getting queued to transport iron to it. However, the most I see is 3-4, sometimes 5.

So, what could be the bottleneck here? Is it the train dispatching speed? Is it that some of my depots are empty and the system waits for trains in them, while other depots have enough trains? How could I solve my bottleneck here?

My overall train network consists of around 200 trains.
Gotta keep in mind that the station will request based on the input signal, if your station is expecting 52k iron, it won't create new work orders, if your station has a train limit signal, it won't create any new work orders past that train limit. If you hooked up your requester signal to a logistic network, check the math to see if when you don't have enough iron the lamp is receiving the 52k request signal.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Mobius1 wrote: Gotta keep in mind that the station will request based on the input signal, if your station is expecting 52k iron, it won't create new work orders, if your station has a train limit signal, it won't create any new work orders past that train limit. If you hooked up your requester signal to a logistic network, check the math to see if when you don't have enough iron the lamp is receiving the 52k request signal.
The input signal is -52k in my test, the station is completely empty. I have no train limit set, but I also tried setting an explicit limit of 15 trains. Didn't help. No signal is hooked up to a logistics network.

I have attached a screenshot depicting the situation:
trainlimit.png
trainlimit.png (7.44 MiB) Viewed 7815 times
Another thing that makes me suspicious that I have hit the dispatch speed limit is that the dispatch messages appear exactly at these 1-2 second intervals. So it seems the system is always busy dispatching traings all the time, this just is not enough for my base, it needs more trains dispatched per second.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

gexxo wrote:One question Optera:
How quickly are trains dispatched? When having the log messages on, it seems that there is never more than 1 train every 1-2 seconds being dispatched, at least I don't see the log messages coming in faster. Is that true?

I am asking be because I think I have hit that limit, i.e. I need more trains than the network can dispatch: I have various stations requesting around 52k iron and enough stations that provide around 52k iron. I have the provider/requester threshold set to 4k (a full train with two wagons). I have enough trains waiting at depots. Still, I am not getting the number of trains enqueued at that station I would anticipate, even after waiting some minutes/hours. With 52k, I would anticipate that around 12-13 trains are getting queued to transport iron to it. However, the most I see is 3-4, sometimes 5.

So, what could be the bottleneck here? Is it the train dispatching speed? Is it that some of my depots are empty and the system waits for trains in them, while other depots have enough trains? How could I solve my bottleneck here?

My overall train network consists of around 200 trains.
It's correct ,the limit of trains dispatched is 1 train every 60 ticks.
To keep performance reasonable I spread polling station inputs over 59 ticks and use 1 tick to generate a single delivery.

My recommendation is to use longer trains to increase throughput. Your screenshot shows stations for tiny L-2C. In comparison my megabase runs on 100+ L-8C-L (using upgraded locomotives)

Another common bottleneck is requester and provider having limit trains set too low.

Should you really need faster dispatching and your rig can handle it you can edit dispatcher_update_interval in config.lua.
I've tested it down to 10 ticks back in 1.1.x. It should still be working, but will put quite some load on your rig.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Optera wrote:
gexxo wrote:One question Optera:
How quickly are trains dispatched? When having the log messages on, it seems that there is never more than 1 train every 1-2 seconds being dispatched, at least I don't see the log messages coming in faster. Is that true?

I am asking be because I think I have hit that limit, i.e. I need more trains than the network can dispatch: I have various stations requesting around 52k iron and enough stations that provide around 52k iron. I have the provider/requester threshold set to 4k (a full train with two wagons). I have enough trains waiting at depots. Still, I am not getting the number of trains enqueued at that station I would anticipate, even after waiting some minutes/hours. With 52k, I would anticipate that around 12-13 trains are getting queued to transport iron to it. However, the most I see is 3-4, sometimes 5.

So, what could be the bottleneck here? Is it the train dispatching speed? Is it that some of my depots are empty and the system waits for trains in them, while other depots have enough trains? How could I solve my bottleneck here?

My overall train network consists of around 200 trains.
It's correct ,the limit of trains dispatched is 1 train every 60 ticks.
To keep performance reasonable I spread polling station inputs over 59 ticks and use 1 tick to generate a single delivery.

My recommendation is to use longer trains to increase throughput. Your screenshot shows stations for tiny L-2C. In comparison my megabase runs on 100+ L-8C-L (using upgraded locomotives)

Another common bottleneck is requester and provider having limit trains set too low.

Should you really need faster dispatching and your rig can handle it you can edit dispatcher_update_interval in config.lua.
I've tested it down to 10 ticks back in 1.1.x. It should still be working, but will put quite some load on your rig.
Thanks for the info! However, changing the value in the config does not seem to work. I tried setting it from 60 to 20. The result was that no trains at all were sent :(. What could be the reason for this issue?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

gexxo wrote: Thanks for the info! However, changing the value in the config does not seem to work. I tried setting it from 60 to 20. The result was that no trains at all were sent :(. What could be the reason for this issue?
No available trains, no provider, with this little info I can only guess.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Optera wrote:
gexxo wrote: Thanks for the info! However, changing the value in the config does not seem to work. I tried setting it from 60 to 20. The result was that no trains at all were sent :(. What could be the reason for this issue?
No available trains, no provider, with this little info I can only guess.
Sorry, I expressed myself a bit unclearly: There were 100s of trains available and 100s of providers and requesters. My factory is dispatching the maximum of 1 train per second. But once I set the dispatcher_update_interval to a lower value, I can wait for 30 minutes or longer for a delivery: No single further train will be dispatched. The mod seems to malfunction completely once the setting is lowered. Once I set it back to 60, everything is working fine again and I get one new delivery per second.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

gexxo wrote:Sorry, I expressed myself a bit unclearly: There were 100s of trains available and 100s of providers and requesters. My factory is dispatching the maximum of 1 train per second. But once I set the dispatcher_update_interval to a lower value, I can wait for 30 minutes or longer for a delivery: No single further train will be dispatched. The mod seems to malfunction completely once the setting is lowered. Once I set it back to 60, everything is working fine again and I get one new delivery per second.
My test map works fine with dispatcher_update_interval = 20.
Did you extract the whole mod and change only dispatcher_update_interval in config.lua?

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Optera wrote:
gexxo wrote:Sorry, I expressed myself a bit unclearly: There were 100s of trains available and 100s of providers and requesters. My factory is dispatching the maximum of 1 train per second. But once I set the dispatcher_update_interval to a lower value, I can wait for 30 minutes or longer for a delivery: No single further train will be dispatched. The mod seems to malfunction completely once the setting is lowered. Once I set it back to 60, everything is working fine again and I get one new delivery per second.
My test map works fine with dispatcher_update_interval = 20.
Did you extract the whole mod and change only dispatcher_update_interval in config.lua?
Yes, I did. And it works again if I change the value back to 60 in the extracted mod, so I guess I did not mess something up there. How can I help further to find the problem here?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Optera »

gexxo wrote:
Optera wrote:
gexxo wrote:Sorry, I expressed myself a bit unclearly: There were 100s of trains available and 100s of providers and requesters. My factory is dispatching the maximum of 1 train per second. But once I set the dispatcher_update_interval to a lower value, I can wait for 30 minutes or longer for a delivery: No single further train will be dispatched. The mod seems to malfunction completely once the setting is lowered. Once I set it back to 60, everything is working fine again and I get one new delivery per second.
My test map works fine with dispatcher_update_interval = 20.
Did you extract the whole mod and change only dispatcher_update_interval in config.lua?
Yes, I did. And it works again if I change the value back to 60 in the extracted mod, so I guess I did not mess something up there. How can I help further to find the problem here?
enable debug logging, let it run for a few minutes and send me the logfile.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Optera wrote:
gexxo wrote:
Optera wrote:
gexxo wrote:Sorry, I expressed myself a bit unclearly: There were 100s of trains available and 100s of providers and requesters. My factory is dispatching the maximum of 1 train per second. But once I set the dispatcher_update_interval to a lower value, I can wait for 30 minutes or longer for a delivery: No single further train will be dispatched. The mod seems to malfunction completely once the setting is lowered. Once I set it back to 60, everything is working fine again and I get one new delivery per second.
My test map works fine with dispatcher_update_interval = 20.
Did you extract the whole mod and change only dispatcher_update_interval in config.lua?
Yes, I did. And it works again if I change the value back to 60 in the extracted mod, so I guess I did not mess something up there. How can I help further to find the problem here?
enable debug logging, let it run for a few minutes and send me the logfile.
It seems that my problem vanished after upgrading from 1.3.4 to 1.3.5. I can now set the setting to a lower value and it works. So resolved for now :). If I encounter the problem again, I will let you know and record logs. Thanks for your attention!

Mobius1
Fast Inserter
Fast Inserter
Posts: 191
Joined: Thu Feb 09, 2017 12:05 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Mobius1 »

gexxo wrote:The input signal is -52k in my test, the station is completely empty. I have no train limit set, but I also tried setting an explicit limit of 15 trains. Didn't help. No signal is hooked up to a logistics network.

I have attached a screenshot depicting the situation:
image
Another thing that makes me suspicious that I have hit the dispatch speed limit is that the dispatch messages appear exactly at these 1-2 second intervals. So it seems the system is always busy dispatching traings all the time, this just is not enough for my base, it needs more trains dispatched per second.
Sorry about the delay on the response. That picture shows a loop on your circuitry. You're using the same green wire connecting 2 stations and the lamps of both LTN stops, they don't like when you do that, make sure to isolate the information you wanna deliver to your station with a combinator (arithmetic or logic) with something like "each + 0 | each" just to don't allow the wire to collect info from the lamp, only send info to the lamp.

gexxo
Inserter
Inserter
Posts: 35
Joined: Thu Feb 23, 2017 6:44 pm
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by gexxo »

Mobius1 wrote:
gexxo wrote:The input signal is -52k in my test, the station is completely empty. I have no train limit set, but I also tried setting an explicit limit of 15 trains. Didn't help. No signal is hooked up to a logistics network.

I have attached a screenshot depicting the situation:
image
Another thing that makes me suspicious that I have hit the dispatch speed limit is that the dispatch messages appear exactly at these 1-2 second intervals. So it seems the system is always busy dispatching traings all the time, this just is not enough for my base, it needs more trains dispatched per second.
Sorry about the delay on the response. That picture shows a loop on your circuitry. You're using the same green wire connecting 2 stations and the lamps of both LTN stops, they don't like when you do that, make sure to isolate the information you wanna deliver to your station with a combinator (arithmetic or logic) with something like "each + 0 | each" just to don't allow the wire to collect info from the lamp, only send info to the lamp.
Not true :). If you watch carefully, the green wires just cross :).

Mobius1
Fast Inserter
Fast Inserter
Posts: 191
Joined: Thu Feb 09, 2017 12:05 am
Contact:

Re: [Mod 0.14/0.15] Logistic Train Network 1.3.4

Post by Mobius1 »

gexxo wrote:Not true :). If you watch carefully, the green wires just cross :).
In that case, check if any train in your depot can physically reach that station, if for some reason you have a weird signal somewhere that is preventing a train from reaching that station it won't flash "no path" instead it just won't create the delivery.
If there's no issues on the tracks, check if the trains in the depot have capped wagons, you request threshold is 4k so make sure that all the trains that you want to go to that station can carry 4k units of iron ore.
If that's also checked, try resetting the stationary trains, by clearing their schedule, add only the depot with any condition and send him to go to that station, it should start working.
If you got this far and it still not working, then I don't know what is the issue :(

Post Reply

Return to “Logistic Train Network”