Page 1 of 1

Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:06 pm
by McDuff
I've been trying out the LTN system and I can't get the standard blueprints for station combinator setups to control the filters of the stack inserters to work. When a station is working as a provider it outputs the order from the output combinator. However, it looks as if it's not outputting the same info when it's working as a requester.

Wiring it up in the way that people advise means that if, for instance, there is something in a wagon you don't want to be there, the filter gets set to "what's in the wagon" and basically makes itself entirely redundant.

It works this way in the demo save file as well as in the station blueprints that are available in this forum. I can only assume something isn't working as intended, or I've hugely misunderstood something.

I can work around this to some extent with further combinator logic. However I was hoping some people might advise if this is the expected behaviour?

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:23 pm
by Optera
McDuff wrote:Wiring it up in the way that people advise means that if, for instance, there is something in a wagon you don't want to be there, the filter gets set to "what's in the wagon" and basically makes itself entirely redundant.

It works this way in the demo save file as well as in the station blueprints that are available in this forum. I can only assume something isn't working as intended, or I've hugely misunderstood something.

I can work around this to some extent with further combinator logic. However I was hoping some people might advise if this is the expected behaviour?
Are you talking about the first few ticks when a train enters a stop?

Yes, there is a short delay of 1-5 ticks before the combinator shows what should remain in the train and another 1tick delay from subtracting that from the stop output.
If you want to make 100% sure inserters don't start unloading the wrong items use a decider combinator behind the arithmic combinator set to "encoded position of locomotive" != 0 then everything: input count.
2018-01-06-18-27-27-0725074.jpg
2018-01-06-18-27-27-0725074.jpg (67.38 KiB) Viewed 7008 times
blueprint

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:36 pm
by McDuff
No, I mean it's not outputting anything for the whole duration it's in the stop.

The screenshot shows a station with a train in, delivering ore, that's been there for a while. There's no output from the combinator. It seems like there should be, is this expected behaviour or is something wrong somewhere?

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:45 pm
by McDuff
Hold on. The output signal is supposed to be what should stay in the train based on the previous order, rather than what should be unloaded?

So it can't cope with unexpected items in the load, such as copper left over from a previous run or something, that it doesn't know about?

I thought that was supposed to be the point of the filters.

What am I missing?

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:46 pm
by Optera
That means unload the whole inventory read from the stop itself.
The combinator only displays items to keep in the train.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:54 pm
by McDuff
Right, so this is expected behaviour. OK. So the trick is to make sure nothing is left in the wagons between runs, rather than expect the station to filter only for what it expects?

As long as that's what is expected I can work with that. I was just thinking that it should only be unloading what it wants.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:57 pm
by Optera
Unloading only requested items and amounts is exactly what the stations i posted in design thread and previous post do.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 5:57 pm
by McDuff
Is there a list of what signals should be sent in what states?

For eg in the stations blueprint thread the requester station description says "When a train arrives the expected train inventory is sent from the output alongside the train composition." There probably needs to be something to clarify that it's what's expected after the train leaves. I can see what it means now that it's been explained but it's not clear as it stands.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 6:02 pm
by Optera
Ever worked with a loading list aka cargo manifest?
It lists what should be in the inventory when you are done loading and unloading.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 6:09 pm
by McDuff
Optera wrote:Unloading only requested items and amounts is exactly what the stations i posted in design thread and previous post do.
OK, I worked it out, I was testing by dropping things into the cargo wagons, but it doesn't know about those. It only works with the things that were in when it leaves the depot but in my test runs I was just polluting it mid-journey. OK, I've got it now.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 6:23 pm
by Optera
Not quite, for better performance LTN doesn't check inventories in depots and simply assumes completely empty trains with no slots filtered or locked.
The real inventory is only updated once, when leaving the provider.

Re: Requester station output signals for filtering

Posted: Sat Jan 06, 2018 6:41 pm
by McDuff
OK, thanks, that makes sense now.

Re: Requester station output signals for filtering

Posted: Wed Jan 31, 2018 12:00 pm
by TheTom
Optera wrote:
McDuff wrote:Wiring it up in the way that people advise means that if, for instance, there is something in a wagon you don't want to be there, the filter gets set to "what's in the wagon" and basically makes itself entirely redundant.

It works this way in the demo save file as well as in the station blueprints that are available in this forum. I can only assume something isn't working as intended, or I've hugely misunderstood something.

I can work around this to some extent with further combinator logic. However I was hoping some people might advise if this is the expected behaviour?
Are you talking about the first few ticks when a train enters a stop?

Yes, there is a short delay of 1-5 ticks before the combinator shows what should remain in the train and another 1tick delay from subtracting that from the stop output.
If you want to make 100% sure inserters don't start unloading the wrong items use a decider combinator behind the arithmic combinator set to "encoded position of locomotive" != 0 then everything: input count.
2018-01-06-18-27-27-0725074.jpg
blueprint
What is the proper way to do this in .16, particularly when using a mod that has multiple Locomotive types (and cargo for that matter)?

I have the same problem - whenever a train comes that has "stuff" - some unloaders do ONE cycle of unloading it. This is particularly bad because it mostly is totally unrelated - if I visit a station my own personal train is loaded with a lot of stuff and some of it ends up clogging my production.

In the past (0.15) I was using the Train ID (output from Station as signal T, has to be != 0) - but in 0.16 that seems to come earlier than LTN.

Is there a chance to get a custom signal in LTN for this purpose, one that is sent from the output slot (so it comes same time the inventory is valid?)

Re: Requester station output signals for filtering

Posted: Wed Jan 31, 2018 4:35 pm
by Optera
TheTom wrote:What is the proper way to do this in .16, particularly when using a mod that has multiple Locomotive types (and cargo for that matter)?

I have the same problem - whenever a train comes that has "stuff" - some unloaders do ONE cycle of unloading it. This is particularly bad because it mostly is totally unrelated - if I visit a station my own personal train is loaded with a lot of stuff and some of it ends up clogging my production.

In the past (0.15) I was using the Train ID (output from Station as signal T, has to be != 0) - but in 0.16 that seems to come earlier than LTN.

Is there a chance to get a custom signal in LTN for this purpose, one that is sent from the output slot (so it comes same time the inventory is valid?)
Train ID signal always was too early not just since 0.16. Use any Encoded position signal instead.

Re: Requester station output signals for filtering

Posted: Thu Feb 01, 2018 8:35 am
by TheTom
Optera wrote:
TheTom wrote:What is the proper way to do this in .16, particularly when using a mod that has multiple Locomotive types (and cargo for that matter)?

I have the same problem - whenever a train comes that has "stuff" - some unloaders do ONE cycle of unloading it. This is particularly bad because it mostly is totally unrelated - if I visit a station my own personal train is loaded with a lot of stuff and some of it ends up clogging my production.

In the past (0.15) I was using the Train ID (output from Station as signal T, has to be != 0) - but in 0.16 that seems to come earlier than LTN.

Is there a chance to get a custom signal in LTN for this purpose, one that is sent from the output slot (so it comes same time the inventory is valid?)
Train ID signal always was too early not just since 0.16. Use any Encoded position signal instead.
Damn. My problem is that I run 6 different types of trains, 4 diferenttypes of cargo transports. Withou an unified signal that is a lot of complex logic just to get whether a train is available.

Re: Requester station output signals for filtering

Posted: Thu Feb 01, 2018 11:05 am
by Optera
TheTom wrote:Damn. My problem is that I run 6 different types of trains, 4 diferenttypes of cargo transports. Withou an unified signal that is a lot of complex logic just to get whether a train is available.
Using Arithmetic combinators you can convert 2 signals into another: Encoded Position Locomotive 1 + Encoded Position Locomotive 2 = Encoded Position Locomotive