Priority Specifics

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
TwentyEighty
Fast Inserter
Fast Inserter
Posts: 170
Joined: Thu Jan 10, 2019 3:11 pm
Contact:

Priority Specifics

Post by TwentyEighty »

Hi,

I have a couple of questions about Priority that I couldn't find answered in the manual or forum.

1. Is priority "global" across different materials, or just local to a single material.

Ex. Will iron plates with provide and request priority 2 always be serviced before copper plates with provide and request priority 1?

2. If priority is "global" across different materials, then which is more important, provide or request priority?

Ex. If I have an iron provider with provide priority=2, and an iron requester with request priority=0, and a copper provider with provide priority=1, and a copper requester with request priority=1, which one gets serviced first?

reapersms
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Jun 17, 2018 4:55 am
Contact:

Re: Priority Specifics

Post by reapersms »

I may be talking out of my ass here, haven't looked through the code, but my understanding of LTN is that whenever it goes through the process of creating a delivery:

It picks a request to try and fill with a train. Higher priority requests get preference.
It looks through the providers to find a suitable source, picking the highest priority one.
It creates a delivery from that provider, at size min( min(requested, provided), train capacity ), and marks the amount down somewhere as in transit
It loops back to the top and continues until it has gone through them all, or runs out of trains to dispatch

In your example, I would expect it would dispatch copper trains until it thinks the request is filled (or the provider runs dry), then iron trains, and do that every N seconds or so

TwentyEighty
Fast Inserter
Fast Inserter
Posts: 170
Joined: Thu Jan 10, 2019 3:11 pm
Contact:

Re: Priority Specifics

Post by TwentyEighty »

Thank you. That sounds logical and helps me figure out what priority to use for e.g. waste products. I hope Optera can see this and confirm.

reapersms
Long Handed Inserter
Long Handed Inserter
Posts: 69
Joined: Sun Jun 17, 2018 4:55 am
Contact:

Re: Priority Specifics

Post by reapersms »

I suspect the best approach looks something like a ~3 tier approach:

Prov2: produces a lot of them, needs to keep it cleared out to not block critical things
Req2: most useful/highest throughput sink for them
Req1: decent sink
Req0: dump, large storage, worst sink (burner, etc). If the byproduct has general uses, probably best to tie it to large storage and a Prov0, with circuitry set up to keep the storage from filling up completely.

The priority spread can of course be expanded out if there's a complicated setup, but the general idea is to skip hauls to the dump area if there's another use, and have the product generally available for low-throughput uses.

Network partitioning trickery might also be useful for some of it.

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

Re: Priority Specifics

Post by Optera »

Priority is assigned to specific stops for all their requested and provided items.

LTN goes through requests in order of priority > age and providers in priority > amount.
Additionally network id, train length and force must be a possible combination between requester, provider and train.

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 446
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: Priority Specifics

Post by GrumpyJoe »

if you start working with prorities, like desrcibed by reapersms, you may as well start putting priority into your station BPs

I have mine set to 5 by default, in every station. can go up or down from there whenever needed
Specially for wanting to go down, as without priority i belive default is 1 when not set? (anyway, its just one more signal in a combinator, and when i need it, its already there)

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

Re: Priority Specifics

Post by Optera »

Priorities can be negative.
I'm using none = 0 as default and negative for trash.

TwentyEighty
Fast Inserter
Fast Inserter
Posts: 170
Joined: Thu Jan 10, 2019 3:11 pm
Contact:

Re: Priority Specifics

Post by TwentyEighty »

reapersms wrote:
Wed Apr 03, 2019 5:38 am
I suspect the best approach looks something like a ~3 tier approach:

Prov2: produces a lot of them, needs to keep it cleared out to not block critical things
Req2: most useful/highest throughput sink for them
Req1: decent sink
Req0: dump, large storage, worst sink (burner, etc). If the byproduct has general uses, probably best to tie it to large storage and a Prov0, with circuitry set up to keep the storage from filling up completely.

The priority spread can of course be expanded out if there's a complicated setup, but the general idea is to skip hauls to the dump area if there's another use, and have the product generally available for low-throughput uses.

Network partitioning trickery might also be useful for some of it.
Exactly :) Just wasn't sure on how to set up the priorities to do this
GrumpyJoe wrote:
Wed Apr 03, 2019 10:20 am
if you start working with prorities, like desrcibed by reapersms, you may as well start putting priority into your station BPs

I have mine set to 5 by default, in every station. can go up or down from there whenever needed
Specially for wanting to go down, as without priority i belive default is 1 when not set? (anyway, its just one more signal in a combinator, and when i need it, its already there)
Totally agree I do that anyway. I knew you could go negative though, I just like having one fewer thing to press when I change something. And actually I set everything to a multiple of 10 so down the line I can tweak something to be in between if I want.
Optera wrote:
Wed Apr 03, 2019 6:07 am
Priority is assigned to specific stops for all their requested and provided items.

LTN goes through requests in order of priority > age and providers in priority > amount.
Additionally network id, train length and force must be a possible combination between requester, provider and train.
Thanks for the response. Let me just make sure I understand your phrasing, you're confirming that LTN iterates requests first (in priority > age order) and for each request, tries to find a provider (in priority > amount order). It doesn't iterate providers looking for requests. That sounds silly typing it out but just double checking.

eduran
Filter Inserter
Filter Inserter
Posts: 344
Joined: Fri May 09, 2014 2:52 pm
Contact:

Re: Priority Specifics

Post by eduran »

TwentyEighty wrote:
Wed Apr 03, 2019 2:24 pm
Thanks for the response. Let me just make sure I understand your phrasing, you're confirming that LTN iterates requests first (in priority > age order) and for each request, tries to find a provider (in priority > amount order). It doesn't iterate providers looking for requests. That sounds silly typing it out but just double checking.
Yes, that is how LTN does it. Requests are sorted first by priority and afterwards (if priority is identical) by age. LTN iterates over all requests in that order and tries to find a suitable provider and train. If multiple providers exist, highest priority is used first. In case of identical priority, the provider with the largest inventory is chosen.

TwentyEighty
Fast Inserter
Fast Inserter
Posts: 170
Joined: Thu Jan 10, 2019 3:11 pm
Contact:

Re: Priority Specifics

Post by TwentyEighty »

Great thanks

Post Reply

Return to “Logistic Train Network”