LTN Content Reader

by Optera

Display LTN's Provider and Requester contents for specific Network ID's as combinator output.

Content
1 year, 4 months ago
0.16 - 1.1
42.1K
Circuit network

g Current Station's Request

5 years ago

Is there any way to get the delivery a station is currently proccessing, be it using this or any other way? The "X item" in the message "Creating delivery from ... to: X item", I mean.

I think I do understand how this mod works (by reading the entire networks combined requests), so it probably won't do, but I'd really like to know if something like what I described is feasible should I want to implement it by myself.

5 years ago
(updated 5 years ago)

Getting only Deliveries would be even simpler than summing up provided and requested items.

Check the Interface_Demo from in LTN. It writes all data LTN exposes to logfile.
https://github.com/Yousei9/Logistic-Train-Network/blob/master/Interface_Demo/control.lua

Dispatcher.Deliveries contains all information about a delivery including train and stop names.

To get the exact stop by unit_number either make a lookup table of [name] = unit_number. since LTN currently requires provider/requester having unique names it will work for your purpose without having to worry about duplicate name handling.

The other option would be to use LTN's Stop_Data.activeDeliveries and compare that to Dispatcher.Deliveries.train.id to get the pair and then use the name do decide which is provider and requester.

4 years ago

I'd like to support this feature request -- having a combinator output all planned item quantities of the next few scheduled deliveries / collections before the train is actually there would bring two major advantages:

  • If one requesting station hasn't enough throughput, I'd like to use two of them. There is no station cluster mechanism available, thus, it could happen that both stations request the item (e.g. 4000 Iron, not knowing if I need another 4000 a few seconds later) and I get delivered too much (8000) -- or if I request half the quantity, there are unnecessarily many half-empty trains (2x2000). => Getting the expected delivery already upon scheduling, we could send the request to two stations (alternating, to avoid simultaneous scheduling), and reduce the requested amount by the amount already expected at the other station, to find out whether a second train has to be dispatched (e.g. because no provider has the necessary amount, or the amount doesn't fit into a single train.)

  • Having a huge central storage with a bunch of provider stations has two problems:
    -- The items might take more than 120s to get to the train, when large quantities are required. => As soon as the request is scheduled, we could start filling the loading chests even before the train is there with a "current requests" combinator
    -- The items might be fetched twice on starvation, causing the second train not to get an item anymore and drive around empty. => Items of a current request at the provider could be reserved with an output of the next orders quantities.

4 years ago

Version: 0.1.9
Date: 2019-02-10
Features:
- added delivery content reader

4 years ago
(updated 4 years ago)

That one does read the sum of all deliveries of all stations on the network, not just a single (nearest/adjacent/cable-connected) station, doesn't it?

4 years ago

yes

4 years ago

My idea would be to get a single station's information -- as far as I can tell, this was also what the op was referring to.

4 years ago

Generating a custom UI for a combinator with dropdown of available stops is outside the scope of what I am willing to do with this mod.

New response