Help with automation plz!

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Caldasso
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 03, 2018 8:19 pm
Contact:

Help with automation plz!

Post by Caldasso »

Good evening factorio gurus!

I have a question / request to make a circuit that does a certain task.

Basically, I have a set of chests, where I store the trees cut down by the drones or myself. Currently, the maximum value of wood stored in this chest set is 48k.

Well.. here comes the automation that I want to do, but I'm not having enough IQ.

I want that when the amount of wood in this set of chests reaches 47k... a set of 8 solicitor chests will start requesting this wood. That is, until the value of the stored wood drops below 1k. Once it reaches 1k in the storage chest set, requesting chests must stop requesting wood until it returns 48k value.

That is... the solicitor chests will only ask for the wood when it is full. And once emptied (reaching 1k), they only ask again when it reaches 48k again.


To understand why. I have this set of chests that store the "discarded" woods. In order not to keep increasing the number of chests, I created a set of steam generators that will be powered exclusively by the woods. And then I want to automate it... that is, every time the wood storage is full, it "spends" all powering these generators.... when it reaches the minimum value, it stops spending until it accumulates again. And so it goes.

Anyway, who can help me? heheh

Sorry for my english... i'm brazilian.

Thanks

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

From your description, it seem that what you want is a switch.

One way to do is to place 2 belts going up , 2 inserter and 2 belt going down. The 2 inserters and the 4 belts should create a loop so that when you place a fish it goes around.

Then you can wire 2 belts with one wire, with "read content hold", the inserter placing item on those belt should use another wire and "enable if Wood > 47K, and connect to the storage.

The other 2 belts should be wired with again another wire, also " read content hold" and the 2nd inserter "enable if wood < 1K".

Now if you place a fish, it will be on one side when wood is above 47 K, and it will only be placed on the other side when wood is under 1K, and the fish will be move from side to side only when reaching those value.



For this example to function, one should place 1 item on one of the 4 belts, and then it should change side when the wood in the chest is under 2 or above 20.

Then one way to use the switch to generate a request would be to multiply this item by 47000 and output "wood", using an arithmetic combinator connected to the belts and to a requester chest. The following example request 47000 wood in the requester chest if you place more than 20 wood in the steel chest. And stop requesting when the steel chest has less than 2 wood. ( it require a fish as item in the switch ).




There are ways that don't use fish and belts, only combinators, but it's more difficult to understand what is happening and why it works, ( also takes longer to explain :) ).

This method is quite simple, but it's annoying to blueprint because you need to add 1 fish manually, i hope you don't have many different wood storage :)

Caldasso
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 03, 2018 8:19 pm
Contact:

Re: Help with automation plz!

Post by Caldasso »

mmmPI wrote:
Wed Sep 21, 2022 1:45 am
From your description, it seem that what you want is a switch.

One way to do is to place 2 belts going up , 2 inserter and 2 belt going down. The 2 inserters and the 4 belts should create a loop so that when you place a fish it goes around.

Then you can wire 2 belts with one wire, with "read content hold", the inserter placing item on those belt should use another wire and "enable if Wood > 47K, and connect to the storage.

The other 2 belts should be wired with again another wire, also " read content hold" and the 2nd inserter "enable if wood < 1K".

Now if you place a fish, it will be on one side when wood is above 47 K, and it will only be placed on the other side when wood is under 1K, and the fish will be move from side to side only when reaching those value.



For this example to function, one should place 1 item on one of the 4 belts, and then it should change side when the wood in the chest is under 2 or above 20.

Then one way to use the switch to generate a request would be to multiply this item by 47000 and output "wood", using an arithmetic combinator connected to the belts and to a requester chest. The following example request 47000 wood in the requester chest if you place more than 20 wood in the steel chest. And stop requesting when the steel chest has less than 2 wood. ( it require a fish as item in the switch ).




There are ways that don't use fish and belts, only combinators, but it's more difficult to understand what is happening and why it works, ( also takes longer to explain :) ).

This method is quite simple, but it's annoying to blueprint because you need to add 1 fish manually, i hope you don't have many different wood storage :)

First, thank you mmmPI!

Well, I understand your example. However, it is not applicable where needed. Because where I store the wood is far from where I'm going to use it... so, passing belts would be pretty bad.

The ideal is to use the same logistical robots.

I'll leave some prints here for you to understand...

This is where the wood is stored:
arnazena madeira.jpg
arnazena madeira.jpg (995.59 KiB) Viewed 3010 times
Here's where I intend to "burn the wood":
queima madeira.jpg
queima madeira.jpg (1.26 MiB) Viewed 3010 times
And here is the distance from one location to another. That is, the ideal is to do it via robot:
distancia.jpg
distancia.jpg (588.71 KiB) Viewed 3010 times

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

In this case i recommend building the previous blueprint near the area to "burn the wood"; and do some little modifications:

1) the "storage" steel chest can be removed no need to read there.

2) the 2 fish-grabbing inserters need to be connected to the logistic network, one small icon on the top right corner when you click on them, if you select this box, then inserters will read the "wood" quantity in ALL yellow & red chest of the network.

I think this should do the trick, if the "burn wood area" is in the same logistic network with the storage chest. ( hotkey L ).

Also seeing the pictures ,if you have 8 different requester chest, maybe it's better to multiply by 6000 and not 47000, so each chest request only 6000 :)

Or you can use very long wire before the steel chest. ( if you use the blueprint near the "burn wood area" )
Or between the combinator and the requester chest. ( if you use the blueprint near the "storage ). :)

Tertius
Filter Inserter
Filter Inserter
Posts: 650
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Help with automation plz!

Post by Tertius »

Your request to wait for a full chest, then fully empty the chest is somewhat complex to build, while a somewhat simple solution does exist.

Would it be ok if you just define a minimum amount of wood you want to keep, and burn the excess whenever some shows up?
And would it be ok if you don't explicitly read the storage chests but instead read how much wood is available in the circuit network as a whole?

In this case, link a roboport near your burning station with a red wire and activate the "read contents of the logistics network" option. Now you have the amount of wood (and everything else available on that network) on this red wire. Suppose you want to keep 1000 wood and burn everything else. Link the red wire to the input of a decider combinator, and link a green wire to a constant combinator and to the input of the decider combinator as well. In the constant combinator set one signal to wood -1000. This is the negative of the number you want to keep. The signal from the roboport and the signal from the constant combinator is added (it's negative, so it's actually subtracted), so you get the amount of wood to burn.
In the decider combinator, set wood > 0 as criteria and as output wood = input signal.
Link the output of the decider combinator with a red wire to a requester chest and activate its "set requests" option, so this requester chest will request the amount of wood to burn. It dynamically decreases as the wood is delivered (and probably burnt), so as soon as there is 1000 or less left, no more wood will be requested.

That's it.

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Help with automation plz!

Post by astroshak »

TBH once I reach a certain point I don’t bother saving wood, I just send it all for burning. For that I just use a couple boilers on their own power grid to power some useless, redundant radars.

Does it matter that the wood only gets burnt in that large batch? Or is maintaining 1000 wood what’s really important?

Batch important : simplest thing to do would be to have the storage chest at the edge of the logistics network. Use a SR latch on the stack inserter moving the wood from that chest into an Active Provider in its own, small logistics network. This small network is where the boilers would be fed from. SR patch set up to turn the inserter on when wood >=48000 and to disable when wood <1000.

Just maintain 1000 wood in network : don’t even bother with the dedicated wood storage, just put Buffer chests at the boilers asking for a ton of wood. Connect the inserters moving the wood from those Buffer Chests to the boilers to the logistics network and set them to run when Wood > 1000. Then all you have to do is have whatever Requestor Chest is asking for wood is marked to pull from Buffer Chests.

Caldasso
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 03, 2018 8:19 pm
Contact:

Re: Help with automation plz!

Post by Caldasso »

I bring good news folks!

First, thank you for the help of mmmPI, Tertius and astroshak! Thank you very much! The proposed solutions inspired me...

Well, after burning a few neurons, I managed to develop my own solution that suits me perfectly. Follow the printscreens of the arrangement as it turned out.
feito.jpg
feito.jpg (824.44 KiB) Viewed 2931 times
circuito.jpg
circuito.jpg (187.03 KiB) Viewed 2931 times
Basically, when you trigger the full storage "trigger" (48k), a belt will be inserted into the chest on the right.. this will give the command for the 48k to be divided between 8 chests that will request the wood. When the amount of wood stored reaches the bottom "trigger" (currently 3k), it removes the belt from the chest causing it to stop being requested by requesting chests... until it hits the full trigger again (48k).

Very happy to have managed to develop the solution almost "by myself"... eheheh

Hug from Brazil guys!

Tertius
Filter Inserter
Filter Inserter
Posts: 650
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Help with automation plz!

Post by Tertius »

Wow, it seems you plan for a planet wide deforestation, given the amount of boilers. Is this really necessary? You may underestimate the wood drain of a single boiler (or a few boilers) running continuously, without pause.

You created a SR latch with your chest+belt switch (also possible with 3 combinators, see wiki Combinator tutorial), however I feel you make it unnecessarily complicated.

How about this:
2022-09-21 21-31-45 start=2 length=2 fps=10.gif
2022-09-21 21-31-45 start=2 length=2 fps=10.gif (3.3 MiB) Viewed 2913 times


The left part is where the wood is being delivered into storage chests.
The right part is where the wood is being requested and burnt. Both are connected only via logistics network.
I added "only" 40 boilers - they are able to burn 2.2k wood per minute.
The circuit is really easy: First it implicitly subtracts the amount of wood you want to keep (3000) at the combinator input, and the combinator itself divides the wood by the number of chests, so each chest requests only its part. The wood to keep and the number of chests is configured in the constant combinator.

Also keep in mind using the robots for mass items has huge energy demand. Approx. 6.8 MW is used by the above setup to recharge the bots only. This is 10% of the energy gain you get by burning the wood. This will increase (double, triple) with the distance, so if the distance is long enough, you might even break even with energy demand and energy production within the wood transportation and burning alone.

Burning on the spot and directly feeding the energy into the power network is way better, since transporting energy has no energy draw, while transporting items with robots has.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Help with automation plz!

Post by ColonelSandersLite »

Tertius wrote:
Wed Sep 21, 2022 7:48 pm
Wow, it seems you plan for a planet wide deforestation, given the amount of boilers. Is this really necessary? You may underestimate the wood drain of a single boiler (or a few boilers) running continuously, without pause.
I think I usually have roughly the same amount of them as you do in your pic or maybe even double that myself.

The reason being that I just repurpose my steam engines for this once I have moved to nuclear power and stop using steel furnaces. Seems to be plenty to me.

gGeorg
Filter Inserter
Filter Inserter
Posts: 387
Joined: Wed Jun 19, 2019 8:06 pm
Contact:

Re: Help with automation plz!

Post by gGeorg »

ColonelSandersLite wrote:
Fri Sep 23, 2022 4:15 am
The reason being that I just repurpose my steam engines for this once I have moved to nuclear power and stop using steel furnaces. Seems to be plenty to me.
I have made an dual purpose side power-plant. Repurposed steam-wood plant AND emergency power backup at once.

Use filter inserter powered by few solar panels. Standard signal sent by One_static_combinator is "wood". In case of power goes under 3% then One_decider_combinator send signal to inserters "coal". So the filter inserters receive wood AND coal as whitelist. Belt between boilers is half wood half coal. Add Programmable_speaker to give you an info that emergency coal burning is activated.

As result: in regular operation, it burns wood all the time as primary goal to reduce wood stockpile. Once wood is depleted. It is used as emergency backup. In case of low energy it adds option to burn coal(solid fuel also works) as power emergency solution.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

It is also possible to use the wood to generate steam required for coal liquefaction. ;)

Tertius
Filter Inserter
Filter Inserter
Posts: 650
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Help with automation plz!

Post by Tertius »

You say coal liquefaction... I completely ignored coal liquefaction so far, I saw it for restricted maps with almost no oil I don't play.
However, given the vast amount of coal on regular maps you don't even remotely use up once you get access to oil, and given the fact that oil fields deplete too fast, it might be a good idea to stretch the oil supply and the reason for the current coal/oil patch balancing in the first place.
[away for designing a coal liquefaction plant]

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

i mainly use coal liquefaction when i need to make a lot of lubricant, for blue belts or robots because for example i am upgrading my whole bus and my science is stopped during this time, or i plan to use a lot of robots and i don't want their production to stop if science is stopped.

When i do this i am transforming the petroleum gas and light oil into solid fuel and burning it alongside wood to make steam, and power , aiming at having a refinery that doesn't create byproduct when producing lubricant.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Help with automation plz!

Post by ColonelSandersLite »

mmmPI wrote:
Sun Sep 25, 2022 12:47 am
i mainly use coal liquefaction when i need to make a lot of lubricant, for blue belts or robots because for example i am upgrading my whole bus and my science is stopped during this time, or i plan to use a lot of robots and i don't want their production to stop if science is stopped.

When i do this i am transforming the petroleum gas and light oil into solid fuel and burning it alongside wood to make steam, and power , aiming at having a refinery that doesn't create byproduct when producing lubricant.
It's an interesting thought but I honestly have never run into a problem with lubricant being blocked by petroleum.

In my current build, over the past 10 hours without any sci going, I have consumed 17.5 times the petroleum compared to lubricant. By my math, with adv. oil processing, making lubricant and cracking all the light oil to petroleum will result in 1.2 petroleum per lubricant. That's a whole order of magnitude gap.

If you're cranking out blue belts for builds, you're presumably using those blue belts to feed machines and stuff and those late game advanced constructions use a whole lotta red chips.

I guess it's something that *can* happen on paper, but I have a hard time seeing how to actually make it happen in the real world.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

ColonelSandersLite wrote:
Sun Sep 25, 2022 1:30 am
By my math, with adv. oil processing, making lubricant and cracking all the light oil to petroleum will result in 1.2 petroleum per lubricant.

If you're cranking out blue belts for builds, you're presumably using those blue belts to feed machines and stuff and those late game advanced constructions use a whole lotta red chips.

I guess it's something that *can* happen on paper, but I have a hard time seeing how to actually make it happen in the real world.
I'm not sure about the 1.2 petroleum per lubricant : https://kirkmcdonald.github.io/calc.htm ... :null:null

This one says +/- 1500 heavy oil required for 2000 lubricant. And 1500 heavy oil would yield more than 3000 petroleum with advanced oil processing. so it would already be more than 1.2 petroleum per lubricant and there would still be 2700 or so light oil.

It happened to me several time to be blocked by petroleum for lubricant production but none of those happened since i started to use the coal liquefaction in my games :D

Mainly it would be something like have 5000 red belt megabus built , research blue belt, decide to update all to bluebelt, no more tech to research and yellow science not automated.
Not willing to make module due to fast game objective. everything stop except blue belt production , for a time, then lubricant shortage, then blue belt production stop, not every belt is blue = problem, can't upgrade everything, here and there single red belts with the green circle of the upgrade planner looking at me and blinking on the bottom right of the screen remining me of my lack of anticipation :D
Last edited by mmmPI on Sun Sep 25, 2022 3:09 am, edited 1 time in total.

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Help with automation plz!

Post by ColonelSandersLite »

mmmPI wrote:
Sun Sep 25, 2022 1:49 am
ColonelSandersLite wrote:
Sun Sep 25, 2022 1:30 am
By my math, with adv. oil processing, making lubricant and cracking all the light oil to petroleum will result in 1.2 petroleum per lubricant.
I'm not sure about the 1.2 petroleum per lubricant : https://kirkmcdonald.github.io/calc.htm ... :null:null
You're correct there. Guess I punched one of the numbers into the ol' calculator wrong or something. The correct number should be 2.9. So a factor of 6, not an order of magnitude.

https://kirkmcdonald.github.io/calc.htm ... UUN/73vAA=
mmmPI wrote:
Sun Sep 25, 2022 1:49 am
Mainly it would be something like have 5000 red belt megabus built , research blue belt, decide to update all to bluebelt, no more tech to research and yellow science not automated.
I guess maybe this explains it. I usually don't even bother with blues until post rocket. Maybe in very limited quantities here and there for a special need but that's about it. The tier 3 module production alone probably more than eats enough plastic to completely offset the lube.


Edit, oh, I see what I did. Cracking alone produces the lubeX1.2 in gas. Forgot to add in the refinery gas.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2675
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help with automation plz!

Post by mmmPI »

ColonelSandersLite wrote:
Sun Sep 25, 2022 2:29 am
mmmPI wrote:
Sun Sep 25, 2022 1:49 am
Mainly it would be something like have 5000 red belt megabus built , research blue belt, decide to update all to bluebelt, no more tech to research and yellow science not automated.
I guess maybe this explains it. I usually don't even bother with blues until post rocket. Maybe in very limited quantities here and there for a special need but that's about it. The tier 3 module production alone probably more than eats enough plastic to completely offset the lube.
5000 blue belt would require 100 K lube, or 290K petroleum gas 12 storage tanks not that much actually compare to 5000 blue belts, undergound belts costing the same amount.

Still I do not recommend doing what i described, it happened to me, it created problems, to which coal liquefaction helped solve, it's better to avoid problem first rather than fix them after :)

I'm not often using bots, most of my games are train + belts. And i try to upgrade to blue belt as early as possible i'm not often making large buses in factory because i have used them a lot earlier , now typical bus would be small and compact for starter base and have 2 blue belt of iron plate and copper plate and 2 blue belt of green circuit, 1 blue belt mixed red and blue and it wouldn't be filled. 1 mixed steel and coal, 1 mixed stone stone brick and If there is need for extra ressources i would do it outside the starter base , most of the time necessary for the yellow science and the space science or module production if game is planned to last long.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Help with automation plz!

Post by mrvn »

Caldasso wrote:
Wed Sep 21, 2022 2:00 am
And here is the distance from one location to another. That is, the ideal is to do it via robot:
distancia.jpg
At that distance you are probably using up more power for the bots than you gain from the wood. You really should use a belt or train. Or store the wood next to the boilers in the first place (That still wastes power if the tree was on the other side of the base).

As for how to automate it: You need a hysteresis circuit. Something that activates at X and deactivates at Y.

I like to use a fish, 2 inserter and 4 belts for that:
hysteresis.png
hysteresis.png (229.24 KiB) Viewed 2668 times
Note: remove the red wire if you use logistic data instead of direct connection to the wood chests.

The fish can be any item. Could even be wood. Just nothing that will be on the same signal wires from other sources. When the fish is on the connected belt then the burn wood. The top inserter removed the fish when wood is below 1000 and the bottom inserter put the fish back when wood exceeds 49000.

Now if you need to transmit the fish signal wireless then you can use a storage chest instead of the connected belt:
hysteresis2.png
hysteresis2.png (52.39 KiB) Viewed 2668 times
Note: Set the storage chests to filter for fish or you might get random garbage in the chest breaking the circuit. Should have used a provider chest I guess. And never request a fish over the logistic network. :)

Programming of the inserters is the same. But doing this wireless it is much harder to find unique items. With a wire you can keep the wire isolated so only the relevant signal is on it but wireless it all mixes together. You can use train stops and stationary trains though for wireless transmission allowing for dedicated "channels".

Much easier to have the fish circuit next to the requester chests. And you can multiply fish * (wood - 1000) [read from a roboport] / <num chests> to program the requester chests so they request equal amounts and not too much.

PS: I just burn wood whenever "wood > 1000" by putting it on a belt and using a splitter to mix the normal fuel and wood with the input priority set to wood. The steam engines then get a mix of wood and coal or solid fuel and the boilers will switch fuel types whenever they run out of the current type. Having the belt hold a random mix of fuel types is no problem.

Post Reply

Return to “Gameplay Help”