Rail Logistics Dispatcher

by Viidi

Adds a dispatcher (building) to automate railway logistics based on provide and request stations. Has intuitive interface. Was inspired by LTN but went a different way.

Content
a month ago
1.1 - 2.0
4.36K
Logistics Trains

g [FIXED in 2.0.22] Some feedback

3 months ago
(updated 3 months ago)

So I tried to use Rail Logistics Dispatcher as sort of an LTN replacement. Things that I've found out:

  • if you rename a train station after you attached the RLD, the system keeps making train schedules with the old name it had when originally the RLD was attached. This does not happen if you use the RLD's function inside to name the station.
  • if you have a big provider station with the capability of serving many trains, say train limit 4 and various smaller receiver stations with only a train limit of 1 and you make a new receiver station (so it's completely empty) then RLD will dispatch 4 trains to the provider but the second train will go to sleep inside the provider station because the receiver station is full (train limit = 1) and then it blocks the loading of other trains until the receiver is ready to accept the next train. A train schedule should only ever be made if the train limit minimum_of(provider, receiver) is not exceeded.

And rather a feature request:

  • currently you can wire up chests for provider stations directly, but for requester you need to add an arithmetic combinator to create a negative amount of items you want to request. Why? The RLD thingie could do this for us. Just make an explicit receiver mode and let us set minimum delivery (like currently) and maximum fill level and do the calculation inside the RLD, saving us to put down and wire an arithmetic combinator.
3 months ago

Hi. Thanks for the detailed description of the problems.

  1. This looks like a bug - I'll fix it.

  2. This also looks like a bug. And the dispatcher takes into account the train limit, but for some reason it doesn't always work out correctly. Although the formula there is as simple as it gets: train_limit - train_count > 0. But at the same time, it works out as you wrote.

  3. I think it's possible to make an option like "Invert incoming signal" or something like that. I'll think about it.

Thanks again.

3 months ago

1 and 2 fixed in 2.0.22

3 months ago
  • currently you can wire up chests for provider stations directly, but for requester you need to add an arithmetic combinator to create a negative amount of items you want to request. Why? The RLD thingie could do this for us. Just make an explicit receiver mode and let us set minimum delivery (like currently) and maximum fill level and do the calculation inside the RLD, saving us to put down and wire an arithmetic combinator.

I tried to understand the problem, but I came to the conclusion that I do not understand your request.
In most cases, on request stations, you specify the request level in the dispatcher itself. And connect chests to the input port. And nothing more.

On request stations, where the request is controlled by signals, you will not be able to avoid negative values. You still need to connect a chest to the input port, so that the dispatcher takes into account the existing content of the station. And also, a general request with a minus sign must be sent to the input port. The input port will receive the already prepared sum (which is actually the difference between the actual content and the required content).

Can you describe your case in more detail?

3 months ago
(updated 3 months ago)

Thanks, that was quick. Will try to test it tonight.

Can you describe your case in more detail?

So in general I try to replicate LTN standard provider/request stations and not do anything at all with custom circuitry. If I wanted to do a circuit per station, I'd switch using the new interrupt system and not need any mod at all, but that's not what I'm trying to do.

What I currently did (and this might be wrong, but it is working for me) is the following:

On provider stations:
I make a wire daisy chain through all chests and wire that into the RLD's input. I go to the RLD's configuration, select "requester/provider", set train length and click provider at the bottom. I also set something like 4000 items per shipment to only have full trains for ore as an example. Done. The RLD knows how much there is in the chests and provides this to the system.

On requester stations:
I make a wire daisy chain through all chests and wire that into an arithmetic combinators input. On that combinator I select + (addition) and as second value I set for example Iron Ore negative 24'000 (which is desired fill state). Output is Iron Ore count and this output is wired to the RLDs input. Then I configure the RLD and select "requester/provider", set train length and click requester at the bottom. I also set 4000 items per shipment to only have full trains for ore , same as in the provider.

Now if the chests are empty because I just built it, the RLD gets a signal of -24'000 Iron Ore and requests from provider stations. The more the chests are filled, the less the negative value becomes and at sometime no more requests are sent out until the chests empty again.

This is what I currently do and it works.

What I would like to do is to do this without the need of placing an arithmetic combinator. I want a requester station where I can wire the chests directly to the RLD, configure it as a requester station and set that I want shipments of 4000 (already there) but also fill up the chests up to 24'000 (this would be a new GUI element that would need to be added). If that information is in the RLD config, it could do the arithmetic itself to find out what the current fill status of the chests is and how much would be needed and if that is at or above the treshold to send out a request to the system.

This would eliminate the need to put anything other than the RLD lamp to a station, no matter whether it's a pure provider or pure requester station.

So the TL;DR is: The RLD would need a setting to know what a desired fill value/capacity is to be able to work without any circuit element for a pure requester station directly wired to chests.

3 months ago

Why, for example, is this option not suitable?

https://assets-mod.factorio.com/assets/0c3add3c881092c21f7d40d23f46d058ddb3a2c2.png

The dispatcher will maintain a filling level of 2 wagons (2 wagons * 40 stacks * 100 = 8000), but will transport no less than 1 wagon at a time.

3 months ago

Why, for example, is this option not suitable?

Indeed this works. It was not clear to me that it can be set up this way. So yes, RLD already can do what I want it to do. Thanks!

New response