Friday Facts #203 - Logistic buffer chest

Regular reports on Factorio development.

Re: Factorio Friday Friday Facts #203 - Logistic buffer chest

Postby Frightning » Fri Aug 18, 2017 1:12 am

kovarex wrote:https://www.factorio.com/blog/post/fff-203

Edit: 1st example is also solvable with requestor chests.
2nd example is already solvable with requestor chests (unless you had active providers with repair packs in them; but there's no reason to do that).
3rd example would be solvable with slot filtering, so that only the chosen item can be in a given Storage chest. (Edit 2: Slot filtering for chests would be handy for a lot of other reasons as well tbqh)

My favorite clever use of active v. passive providers was something I did in my 0.12 kilobase for the purpose of automating Steel barrel production for crude oil transport, I wanted an all-bot solution that would add barrels as needed, but not allow for excess barrels to end up in storage. The solution was to use passive providers for filled barrels (so they can never end up in storage), and active providers for emptied barrels (so they would be preferentially taken over newly made barrels, which were also available from a passive provider). This functioned as a logibot analog of mechanical priority (as is frequently done with sideloading), but it can't be extended beyond 1 tier (so no source 1>source 2>source 3, or longer chains of priority). Depending on how these buffer chests are implemented, maybe 2-tier will be possible now, but not beyond that, which can still be a problem (e.g. bot operated fuel priority with Wood, Coal, Solid fuel, and Rocket fuel).
Last edited by Frightning on Fri Aug 18, 2017 3:28 am, edited 4 times in total.
Frightning
Filter Inserter
Filter Inserter
 
Posts: 677
Joined: Fri Apr 29, 2016 5:27 pm

Re: Factorio Friday Friday Facts #203 - Logistic buffer chest

Postby Alice3173 » Fri Aug 18, 2017 1:20 am

Faark wrote:Why do they want to add a new chest type? Can't we just use the storage chest with "requests" set for this? As long as nothing is set, it keeps the old behavior, once items are specified (maybe even by circuit network) non matching stuff is cleared and... but i guess having the feature somewhat hidden might be less user friendly than having more options to understand initially.

A more pressing question is: Does them adding a new type of logistics chest somehow negatively impact the game for you? Nobody is forcing you not to use the method you described after all and clearly many people wanted this new chest.
User avatar
Alice3173
Long Handed Inserter
Long Handed Inserter
 
Posts: 65
Joined: Sun Apr 24, 2016 11:35 pm

Re: Factorio Friday Friday Facts #203 - Logistic buffer chest

Postby ili » Fri Aug 18, 2017 7:54 am

You don't really need the Logistic buffer chest you can solve many of this looping problems with the Circuit network like this
viewtopic.php?f=18&t=51904&p=303453#p303453
Attachments
2017-08-18_10-19-28.png
2017-08-18_10-19-28.png (1.59 MiB) Viewed 1324 times
ili
Long Handed Inserter
Long Handed Inserter
 
Posts: 70
Joined: Thu Apr 14, 2016 6:19 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby cpy » Fri Aug 18, 2017 5:08 pm

F5 time! F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5!

Waiting for new FFF is so hard :)
User avatar
cpy
Filter Inserter
Filter Inserter
 
Posts: 683
Joined: Thu Jul 31, 2014 5:34 am

Re: Friday Facts #203 - Logistic buffer chest

Postby Pure Ownage » Fri Aug 18, 2017 10:05 pm

Ridiculously excited about the buffer chest!

Speaking of logistics I would like the robots to prioritise delivery over recharging. It's really annoying to see 200 robots turn around one meter from you to go recharge 4 at a time.
Pure Ownage
Burner Inserter
Burner Inserter
 
Posts: 5
Joined: Fri Aug 18, 2017 9:59 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby neilon96 » Sat Aug 19, 2017 1:08 pm

I'm literally sitting here Celebrating the new Chest!
neilon96
Manual Inserter
Manual Inserter
 
Posts: 1
Joined: Wed May 24, 2017 10:59 am

Re: Friday Facts #203 - Logistic buffer chest

Postby PacifyerGrey » Sat Aug 19, 2017 10:51 pm

Actually Buffer chest without any active request can act like storage chest so why not just merge them?
PacifyerGrey
Filter Inserter
Filter Inserter
 
Posts: 625
Joined: Wed Jun 29, 2016 10:02 am

Re: Friday Facts #203 - Logistic buffer chest

Postby Klonan » Sat Aug 19, 2017 11:31 pm

PacifyerGrey wrote:Actually Buffer chest without any active request can act like storage chest so why not just merge them?


Buffer chest without any request will not accept items, it will act as a passive provider
User avatar
Klonan
Factorio Staff
Factorio Staff
 
Posts: 2812
Joined: Sun Jan 11, 2015 2:09 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby PacifyerGrey » Sun Aug 20, 2017 7:27 am

Klonan wrote:
PacifyerGrey wrote:Actually Buffer chest without any active request can act like storage chest so why not just merge them?


Buffer chest without any request will not accept items, it will act as a passive provider

Ok, Passive provider it is.
So why not merge with passive provider then If it can 100% replace one?
PacifyerGrey
Filter Inserter
Filter Inserter
 
Posts: 625
Joined: Wed Jun 29, 2016 10:02 am

Re: Friday Facts #203 - Logistic buffer chest

Postby Klonan » Sun Aug 20, 2017 11:16 am

PacifyerGrey wrote:
Klonan wrote:
PacifyerGrey wrote:Actually Buffer chest without any active request can act like storage chest so why not just merge them?


Buffer chest without any request will not accept items, it will act as a passive provider

Ok, Passive provider it is.
So why not merge with passive provider then If it can 100% replace one?


Then it would not provide the desired functionality
User avatar
Klonan
Factorio Staff
Factorio Staff
 
Posts: 2812
Joined: Sun Jan 11, 2015 2:09 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby PacifyerGrey » Sun Aug 20, 2017 12:30 pm

Klonan wrote:
PacifyerGrey wrote:
Klonan wrote:
PacifyerGrey wrote:Actually Buffer chest without any active request can act like storage chest so why not just merge them?


Buffer chest without any request will not accept items, it will act as a passive provider

Ok, Passive provider it is.
So why not merge with passive provider then If it can 100% replace one?


Then it would not provide the desired functionality

Man you are really saving words :)
But I got it. To fulfill the request buffer chests needs other type of provider.
PacifyerGrey
Filter Inserter
Filter Inserter
 
Posts: 625
Joined: Wed Jun 29, 2016 10:02 am

Re: Friday Facts #203 - Logistic buffer chest

Postby jerocom » Mon Aug 21, 2017 2:06 pm

That is a great idea, but there is a active provider chest too, and what would do that? (it is not in the scheme)
jerocom
Burner Inserter
Burner Inserter
 
Posts: 7
Joined: Sun Jun 11, 2017 7:24 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby Jap2.0 » Tue Aug 22, 2017 1:10 am

jerocom wrote:That is a great idea, but there is a active provider chest too, and what would do that? (it is not in the scheme)


Active providers push all items in them to other chests (with the priority system, of course). So they are used sometimes in, for example, bot-based train unloading systems where they will push ores out (to requester chests, then buffer chests, then storage chests, if I got my priorities right) so the unloader doesn't get clogged.
There are 10 types of people: those who get this joke and those who don't.
Jap2.0
Filter Inserter
Filter Inserter
 
Posts: 713
Joined: Tue Jun 20, 2017 12:02 am

Re: Friday Facts #203 - Logistic buffer chest

Postby Keks » Tue Aug 22, 2017 9:27 am

Jap2.0 wrote:
jerocom wrote:That is a great idea, but there is a active provider chest too, and what would do that? (it is not in the scheme)


Active providers push all items in them to other chests (with the priority system, of course). So they are used sometimes in, for example, bot-based train unloading systems where they will push ores out (to requester chests, then buffer chests, then storage chests, if I got my priorities right) so the unloader doesn't get clogged.



if there's a filter set to allow that item

not sure if that filter is binary or you can limit it to a certain number though.
Keks
Burner Inserter
Burner Inserter
 
Posts: 15
Joined: Sun Sep 27, 2015 12:55 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby Jap2.0 » Wed Aug 23, 2017 12:45 am

Keks wrote:
Jap2.0 wrote:
jerocom wrote:That is a great idea, but there is a active provider chest too, and what would do that? (it is not in the scheme)


Active providers push all items in them to other chests (with the priority system, of course). So they are used sometimes in, for example, bot-based train unloading systems where they will push ores out (to requester chests, then buffer chests, then storage chests, if I got my priorities right) so the unloader doesn't get clogged.



if there's a filter set to allow that item

not sure if that filter is binary or you can limit it to a certain number though.


I assume you can filter them to any number, like requester chests, but I may be wrong.
There are 10 types of people: those who get this joke and those who don't.
Jap2.0
Filter Inserter
Filter Inserter
 
Posts: 713
Joined: Tue Jun 20, 2017 12:02 am

Re: Friday Facts #203 - Logistic buffer chest

Postby Klonan » Wed Aug 23, 2017 1:04 am

Jap2.0 wrote:
Keks wrote:
Jap2.0 wrote:
jerocom wrote:That is a great idea, but there is a active provider chest too, and what would do that? (it is not in the scheme)


Active providers push all items in them to other chests (with the priority system, of course). So they are used sometimes in, for example, bot-based train unloading systems where they will push ores out (to requester chests, then buffer chests, then storage chests, if I got my priorities right) so the unloader doesn't get clogged.



if there's a filter set to allow that item

not sure if that filter is binary or you can limit it to a certain number though.


I assume you can filter them to any number, like requester chests, but I may be wrong.


That's right, the requesting is identical to requester chests
User avatar
Klonan
Factorio Staff
Factorio Staff
 
Posts: 2812
Joined: Sun Jan 11, 2015 2:09 pm

Re: Factorio Friday Friday Facts #203 - Logistic buffer chest

Postby PunkSkeleton » Mon Sep 04, 2017 7:55 pm

Muche wrote:
TheTom wrote:* Main thread posts "network update" messages into a queue.
* Separate thread regularly applies those to a separate network map.
* Threads calcualte route proposals as asked.
Simple. Accept that a route may become invalid during an update - just reschedule a reroute.
...
Train networks do NOT change brutally between updates (yes, you may drop a piece of train track, but that will not change the network in most cases and if it does - gues what, not all trains got the update, happens in real life. The map structure also does not change brutally between updates. Small updates - are ignored until the entity asks for a new route.

Let's imagine the following scenario:
Bots are removing/placing rails which changes the rail network causing rerouting.
On your beefy 8-core machine the recalculation happens immediately, a train repaths and goes his merry way. A bot places another rail piece.
On your friend's lowly 2-core machine, the recalculation happens in the following tick, during which the bot places the rail piece. The train repaths and chooses different path (using the newly placed rail).
Congrats, you now have a desync.

The difference from real life is that all players are mere clients logged into the universe server which is simulating the reality, whereas in Factorio all players simulate their own universe.

You totally miss the point of multi-threaded programming. It's not like: make something happen sometime in the past. It's like: we've got to do some work before next game update, let's divide the work and everyone tell me when it's done. There's really no difference between hardware - the update cycle will finish when all work is done. What he is suggesting is to have a separate object in memory responsible for train network. Update this at the beginning of frame cycle and then push train recalculation to another thread.

factoriouzr wrote:If routes become invalid during game updates, then how are train paths kept? How are biter paths cached (this was an optimization you guys did and explained in a previous Friday facts)? Even if routes become invalid at game updates, that just suggests that you should use a different algorithm that doesn't suffer from the problem. I don't see any reason why you can cache all these paths and update them only when the appropriate entities are added or removed, and just keep using the cached path info most of the time.

The problem here is that you have no separate copy of the train network. If you do the update in parallel then the entities will "advance to the next frame" independently of train network update. Apart from possible crashes (get pointer value, try to access memory but the memory has already been released because an entity was destroyed) that would lead to desyncs if on machine A route X changing entity update happens before route X and on machine B it happens after route X calculation. Then you have 2 different train paths and a desync.
Also this seems like a main problem of multi-threading in Factorio - you have a huge list of entities which affect other entities and so on.
PunkSkeleton
Inserter
Inserter
 
Posts: 33
Joined: Sun Oct 09, 2016 2:10 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby c0bRa » Mon Sep 25, 2017 8:52 am

I really need the bufferr chests in my new factory <3

Please release them :D
c0bRa
Inserter
Inserter
 
Posts: 34
Joined: Sun Nov 13, 2016 8:33 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby JohnyDL » Thu Sep 28, 2017 1:30 pm

Okay I think I've got this so for request priority the most important to least important is

Player/Requester chests (closest)
Buffer chests
Storage chests

for provider priority

Player (Trash)/Active providers (closest)
Storage Chests
Buffer/Passive providers (closest)

This makes me think there's going to be a few odd moments

say for example an expandable solar array is part of my base and due to bad planning it sits between solar production and rockets the rocket will grab resources I'd wanted to be on standby for the solar array and it has to request more from the place they're produced, I suppose this does the job but depending on setup that could cause 2 or 3 bots to do what had been the job of one bot.

another example is a centrally located buffer area for things the player might want access to by hand or by bot if it's between production of something and a requester/assembler that uses that same something the buffer chest might not remain full of the requested items

Recycling seems to be made easier by buffer chests but there might be problems with it here's my suggestion keep the request priority the same but tweak provider priority giving different orders to construction, player requests and logistics and also allow a little buffer to buffer action

The buffer to buffer action I'm suggesting shouldn't cause loops because it's not every item in a buffer chest that's eligible it's only those above the request level and to have a looping effect the providing buffer would have to drop below it's request level while the receiving buffer would have to rise above its request level since the requesting buffer chest only asks for as many as it needs and the providing buffer only provides down to it's request level that shouldn't happen (assuming bots will take only as many as are needed/permitted and not their maximum carry load between buffers). Along side this a more complicated idea might be setting a buffer to request 0 of an item would make it a storage chest for that/those item(s) so it requests all of them it can hold, in this mode it shouldn't request accept anything from other buffers (to prevent looping) and it would output the items like a storage chest to buffers requesters or the player

For logistics I'd suggest
Player (Trash)/Active providers (closest)
Storage Chests/Buffer (excess items even to other buffers) (closest)
Passive providers
Buffer (items that have been requested)

This would allow the buffer chest to be a true buffer within the logistics system and for items only to go out into the logistics world from the buffer as a last resort generally increasing the buffer chest's logistical power (though not without providing interesting complexities to deal with I'm sure) and reducing the number of logistics bots doubling up on doing the same job moving by preferring provider requester routing for items over provider buffer requester routing.

For construction/player
Active providers
Storage
Buffer/Passive providers (closest)

This is because the intent of buffers seems to be to move items closer to where they're needed for players' benefit and construction so prioritising based on chest type for them would actually reduce their usefulness in this capacity, the closest item that does the job is the best item to do the job in these cases but still with the intent that the storage chests and active providers should be emptied and that the player trash is an undesirable target to get items from.
JohnyDL
Filter Inserter
Filter Inserter
 
Posts: 500
Joined: Fri May 16, 2014 3:44 pm

Re: Friday Facts #203 - Logistic buffer chest

Postby seePyou » Tue Oct 03, 2017 1:02 pm

"The memory transfer speed itself is not that slow, but the waiting (latency) time between ordering and receiving it is. "

Doesn't that describe the memory value "CAS Latency" ? Or am I wrong? If I'm not wrong, why have memory modules gone to such a high CAS latency value in this day and age? I am a senior in the world of PC and gaming, so I do remember the times when memory modules with 4 CAS latency were prized! Now they are non-existent.

What happened?
seePyou
Inserter
Inserter
 
Posts: 20
Joined: Mon Apr 03, 2017 3:17 pm

PreviousNext

Return to News

Who is online

Users browsing this forum: Pixel_Builder and 7 guests