Recommended Posts

FlatTiger19    2

Not sure if this actually exists in the game, I don't think so it I couldn't find it. 

So here is my question. Is there a way to optimise automation, for example say I have a smart storage with 20 medicines packs and I connect it to a pharmacy, with a not gate so the dupes stop producing medicine packs when the storage container is full (20 packs). When a dupe get sick they take a pack out of the storage and they start making new ones. 

Is there a way to let's say make between 10-20 medicine packs, make the packs until the storage has reached 20, stop producing until the storage is at 10 and make the inventory again till 20. 

Now it seems to be a waste of time to have a surplus as the dupes continue producing when one item is taken out of the storage.

I know the memory gate works this way but the smart containers only have 1 automation output. 

This obviously also applies to other ingredients like food and materials 

Maybe it would be a nice suggestion to add the option.

Share this post


Link to post
Share on other sites
Saturnus    2,938
Posted (edited)

It's not easily done. And not really needed. I've posted a solution to only checking a fridge or smart storage once per cycle here

In my current game I use a fridge for exactly that purpose you describe.

I also have a master fridge that stores all cooked food. When that is full the grill is turned off.
Then I have a raw berry fridge that only stores raw berries. When that is full the farm stations are turning off. Effectively halving the farm output.
There's also a peppernut fridge that if full enables the espresso machine which quickly uses any surplus peppernuts.
The last thing is a pressure plate where all fertilizer from the fertilizer synths is dumped. When above 2t the fertilizer synths are turned off.

The reason is that when dupes find food in the wild this will get cooked and eaten first, automatically lowering the farm output for a while. And all farms etc is optimized to overproduce slightly so that I can just stop them for a while with the automation described above, and in the linked post.

EDIT: Note. You need a spill over fridge that accepts all of the above at a lower priority setting. Otherwise especially food storing fridges can get clogged up by half-eaten meals.

Edited by Saturnus
  • Thanks 1

Share this post


Link to post
Share on other sites
beowulf2010    373
Posted (edited)

Only way to do that is to have 2 sensors.

In your specific case you'd need 2 smart storage containers, both set to the appropriate weight that 10 medicine packs would be. 

Each will be wired directly into either the Set or Reset port. The one wired into the Set port will have a Not gate and a higher priority than the Reset container. 

I'll make an example tonight to make sure I described the connections properly. 

Edited by beowulf2010

Share this post


Link to post
Share on other sites
KittenIsAGeek    982
57 minutes ago, FlatTiger19 said:

Is there a way to let's say make between 10-20 medicine packs, make the packs until the storage has reached 20, stop producing until the storage is at 10 and make the inventory again till 20. 

There is, but as @Saturnus says, its not easily done.

36 minutes ago, Saturnus said:

It's not easily done. And not really needed. I've posted a solution to only checking a fridge or smart storage once per cycle here

I disagree about "not really needed."  There are a LOT of reasons for there to be a hysteresis on smart storage and refrigerators.  Simply going active when full isn't quite enough -- especially since they won't take the "extra" after they hit the threshold you have set. They're active only when you can't stuff any more in.   I've used a solution similar to the one Saturnus posted, but I've never been happy with it.

Ways in which this could be made easier:

  1. Smart storage ought to have an active range, like smart batteries.
  2. Alternatively, if they went active when below (or above) a specific threshold, that would work too.

Basically, the "logic active" needs to be independent of the storage unit's capacity slider.  As they're currently designed, the slider affects the unit's capacity, which indirectly alters the logic active simply because the total potential capacity has changed.  If you're at 99.99% of capacity (too full for that LAST berry...) it won't ever actually trigger the active logic -- which is where all the various methods to handle the problem start to break down.

tl;dr:  There is no simple method to accomplish what you need.  I also disagree with @Saturnus -- it is needed.

Share this post


Link to post
Share on other sites
avc15    231
Posted (edited)

You can also do this with materials production, like plastics, ceramics, steel, etc.

Is a great way to remove some micro from the game: instead of continuing to click the production buttons your dupes just make enough to keep you supplied in the short term, then stop.

One, I never did this with medicine since storing medicine was bugged a few updates ago.

Second, instead of setting a "band" for production I just let them produce more for something like 1/2 cycle after the storage reached its upper limit, and then made an "overflow" bin at lower priority. So I only let the building turn on if the main container is no longer full for like a quarter of a cycle, and then I let it stay enabled for around a half cycle after it becomes full.

I am certain others have similar builds that specifically involve medicines. And, so you know, there is some trickery involved with packing the storage & filtering your ON condition because when a dupe comes to retrieve things from storage it can mess up your logic pretty easily.

Edited by avc15

Share this post


Link to post
Share on other sites
Saturnus    2,938
Posted (edited)
36 minutes ago, KittenIsAGeek said:

I disagree about "not really needed." 

The sentence should have been "not really needed... in this case".

If you dig in the archives on this forum you can find at the very least a hundred cases where I've argued that smart storages and fridges should be smart in the same way as smart batteries are with hysteresis. I'm more than positive you already knew that I only meant in this particular case it's not really needed, and you already knew my position on hysteresis on smart storages and fridges.

Never-the-less. I offered the OP (and others in a similar situation) a practical solution to the problem that even though there's several people here that have argued for hysteresis controls in smart storages and fridges since the very first day of the preview they were introduced and raised the issue countless times already only to be ignored by the devs.

Edited by Saturnus
  • Like 2

Share this post


Link to post
Share on other sites
Nightinggale    770

So basically you want a storage container, which turns output off when it reached max setting and turns on when it goes below min. If it's in between, then it shouldn't change state. Judging from my work with automation modding during the last few days, that sounds surprising not tricky to introduce in a mod.

I should mention that I wouldn't call it trivial. There is an issue with automation state, which needs to be saved (don't mix with state machine, which is actually a named concept in the code). There is also the issue with adding another slider, though a fallback could be to let min be 50% of the slider, hence working if the GUI is tricky.

I think I will give this idea a go even though I planned something else for my next task. I view my chance of a useful output within reasonable time to be reasonable despite the fact that the task contains a few unknowns.

Share this post


Link to post
Share on other sites
KittenIsAGeek    982
35 minutes ago, Saturnus said:

I'm more than positive you already knew that I only meant in this particular case it's not really needed, and you already knew my position on hysteresis on smart storages and fridges.

I had forgotten your stand on smart storages and fridges and so it wasn't clear that you were referring to that specific situation.  Now that you brought it to my attention, I do remember and I feel a little silly.  Anyway!  I'm going to go prod Nisbit into digging some more tunnels.  

  • Like 1

Share this post


Link to post
Share on other sites
Saturnus    2,938
1 minute ago, KittenIsAGeek said:

I had forgotten your stand on smart storages and fridges and so it wasn't clear that you were referring to that specific situation.  Now that you brought it to my attention, I do remember and I feel a little silly.  Anyway!  I'm going to go prod Nisbit into digging some more tunnels.  

Alright. It was also presumptuous of me to expect anyone to remember my position on the matter seeing as it has been a while since it was last brought. I apologize.  

  • Like 1

Share this post


Link to post
Share on other sites
beowulf2010    373

Yep, I was actually right off the top of my head.  (Small wonder as I seem to always seem to get Memory Toggle when designing things in game and have to rebuild it almost every time)

Basic automation layout:

Spoiler

5ce0c21fb1133_BasicLayout.thumb.jpg.8fcb2176187182af449a723d6d3fdd1b.jpg

In your specific case, this will start making Medicine Packs when there are less than 10 and stop making them when you have 20 (or more). You will need to set both Smart Storage to 10kg and make sure the left container's priority is higher than the right hand one.

(For other ranges, the left container will be the minimum or "start" value and the right one will be the maximum you want less the minimum value. So, if you want no more than 5,000kg of Iron but no less than 2,000, the left container would be set to 2,000kg and the right container set at 3,000kg.)

Here's what the automation looks like when you have less than the 10 packs you asked for:

Spoiler

5ce0c2cd060cc_MinimumTooLow.thumb.jpg.8046efde21bab3a6637aeff4da7e4d09.jpg

And here's what the automation looks like when you have the 20 packs in your example:

Spoiler

5ce0c2d68632a_MaximumFull.thumb.jpg.7ebd593661036564667caa5e7ffa858c.jpg

 

  • Like 2

Share this post


Link to post
Share on other sites
FlatTiger    0
11 hours ago, Saturnus said:

It's not easily done. And not really needed. I've posted a solution to only checking a fridge or smart storage once per cycle here

In my current game I use a fridge for exactly that purpose you describe.

I also have a master fridge that stores all cooked food. When that is full the grill is turned off.
Then I have a raw berry fridge that only stores raw berries. When that is full the farm stations are turning off. Effectively halving the farm output.
There's also a peppernut fridge that if full enables the espresso machine which quickly uses any surplus peppernuts.
The last thing is a pressure plate where all fertilizer from the fertilizer synths is dumped. When above 2t the fertilizer synths are turned off.

The reason is that when dupes find food in the wild this will get cooked and eaten first, automatically lowering the farm output for a while. And all farms etc is optimized to overproduce slightly so that I can just stop them for a while with the automation described above, and in the linked post.

EDIT: Note. You need a spill over fridge that accepts all of the above at a lower priority setting. Otherwise especially food storing fridges can get clogged up by half-eaten meals.

Thanks all, I will give both suggestions a try to see which works well for the setup. Indeed it would be nice if the automated machinery/containers would get like a slider as the smart batteries have with a minimum and maximum quantity. Having 2 fridges with a not gate and memory toggle for all the productions also seem a bit much.

6 hours ago, beowulf2010 said:

Yep, I was actually right off the top of my head.  (Small wonder as I seem to always seem to get Memory Toggle when designing things in game and have to rebuild it almost every time)

Basic automation layout:

  Hide contents

5ce0c21fb1133_BasicLayout.thumb.jpg.8fcb2176187182af449a723d6d3fdd1b.jpg

In your specific case, this will start making Medicine Packs when there are less than 10 and stop making them when you have 20 (or more). You will need to set both Smart Storage to 10kg and make sure the left container's priority is higher than the right hand one.

(For other ranges, the left container will be the minimum or "start" value and the right one will be the maximum you want less the minimum value. So, if you want no more than 5,000kg of Iron but no less than 2,000, the left container would be set to 2,000kg and the right container set at 3,000kg.)

Here's what the automation looks like when you have less than the 10 packs you asked for:

  Reveal hidden contents

5ce0c2cd060cc_MinimumTooLow.thumb.jpg.8046efde21bab3a6637aeff4da7e4d09.jpg

And here's what the automation looks like when you have the 20 packs in your example:

  Reveal hidden contents

5ce0c2d68632a_MaximumFull.thumb.jpg.7ebd593661036564667caa5e7ffa858c.jpg

 

Thanks all, I will give both suggestions a try to see which works well for the setup.

Indeed it would be nice if the automated machinery/containers would get like a slider as the smart batteries have with a minimum and maximum quantity. Having 2 fridges with a not gate and memory toggle for all the production items also seem a bit much.

Share this post


Link to post
Share on other sites
beowulf2010    373
7 hours ago, FlatTiger said:

Thanks all, I will give both suggestions a try to see which works well for the setup.

Indeed it would be nice if the automated machinery/containers would get like a slider as the smart batteries have with a minimum and maximum quantity. Having 2 fridges with a not gate and memory toggle for all the production items also seem a bit much.

Yeah. It is a bit much. I pretty much only use it for Iron, Steel and Ceramic production.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now