Page 1 of 1

[0.12] Combinator Use & Abuse

Posted: Sat Jul 18, 2015 11:51 pm
by GopherAtl
With the release of 0.12.0, we're finally getting our hands on combinators, and while some of the most coveted practical applications have to wait until we get additional sensors and circuit-network-enabled devices in 0.13, there's a lot of things, but practical and impractical, that can be done with these new toys. I thought a thread where people could share their inventions and discoveries using these new features would be appropriate!

To start it off, a technical note, a single Decider Combinator set to "=0" is a nor gate. If you know your circuit logic, you'll realise that means deciders, all by themselves, are logically complete. Now, you could make logic gates before, using smart inserters, but such systems tended to be slow and clunky; no more!

Friday Facts #88 showed us a simple timer using combinators, but that's just the tip of the iceberg.

With a Decider being a nor gate, just 2 of them can make a compact and reliable S-R latch...

Image

Those make a basis for any number of other practical systems.

On a whim, I decided to set up a 7-segment decoder, that displays the number of items in a chest. I used... quite a few combinators (93, to be exact, though I'm sure it could be optimized considerably) but it was just a proof-of-concept. It refreshes almost instantly to any change in the quantity in the chest. I only gave it 3 digits, but it's scalable, and you could expand it to as many digits as you liked easily.

Image
(forgive the ugliness, it's not a polished installation in a real build, just a proof-of-concept in a test world)
abridged yet lengthy rough explanation
I can't possibly be the only one playing with the new toys, so what kinds of contraptions are other people working on? Big or small, practical or absurd, share it here!

Re: [0.12] Combinator Use & Abuse

Posted: Sun Jul 19, 2015 12:15 am
by ratchetfreak
The wire condition of the smart inserter, pumps can test against other signals

So you can say that a small pump into a cracking plant should only pump when there is more heavy than light oil without any combinators/deciders

Re: [0.12] Combinator Use & Abuse

Posted: Sun Jul 19, 2015 12:20 am
by orzelek
ratchetfreak wrote:The wire condition of the smart inserter, pumps can test against other signals

So you can say that a small pump into a cracking plant should only pump when there is more heavy than light oil without any combinators/deciders
This is my only and most important use of combinators. No more checking if one of tanks overflows and everything stops. I did use a combinator actually - only pump use would be even more simple :D

Re: [0.12] Combinator Use & Abuse

Posted: Sun Jul 19, 2015 11:20 am
by Sander Buruma
Before trying to replicate what you made, I'd only made a series of lights that light up sequantially as an input gets higher until it resets and starts over.
<Interlude + Music>
I have it working for 3 digits and any more digits should be no problem.
I'm wondering, are the first 10 DCs of a block really necessary? I've removed them from my circuit and simply converted the input signal directly to 0-7 segment signals and it works all the same just as well. I'm trying to think of a solution that uses less combinators for each digit but nothing has come of that so far.

Heres a video of it working.
http://youtu.be/JbZex775pgU

Re: [0.12] Combinator Use & Abuse

Posted: Sun Jul 19, 2015 12:44 pm
by GopherAtl
@Sander Buruma: nope, you're right, I realized somewhat later that those 10 were completely redundant, just never came back to update my post here. I shared a save (at someone's request) on reddit that one with them removed as well as the 3 digits pictured.

Re: [0.12] Combinator Use & Abuse

Posted: Mon Jul 20, 2015 3:24 am
by Peter34
orzelek wrote:This is my only and most important use of combinators. No more checking if one of tanks overflows and everything stops. I did use a combinator actually - only pump use would be even more simple :D
I'm still waiting for a Youtube tutorial explaining how to make something like that.

Re: [0.12] Combinator Use & Abuse

Posted: Mon Jul 20, 2015 5:29 am
by johanwanderer
Peter34 wrote:
orzelek wrote:This is my only and most important use of combinators. No more checking if one of tanks overflows and everything stops. I did use a combinator actually - only pump use would be even more simple :D
I'm still waiting for a Youtube tutorial explaining how to make something like that.
Do you mean something like this?
20150720-01-oil-condition.png
Sorry, no combinators :)

Basically, I have it set up so that heavy->light will only run if I have more than 1K heavy, and light -> petroleum gas will only run if there are more than 1K light oil. I know this is not exactly the intended result (crack A > B if there are more A than B) but I like having a stockpile of both heavy oil (for lubricant) and light oil (for solid fuel) on hand.

Also my petroleum line is currently disconnected because I'm trying to clean up the extra tank (middle-left)

Re: [0.12] Combinator Use & Abuse

Posted: Mon Jul 20, 2015 9:40 am
by Sander Buruma
I was thinking that perhaps we could hold on to trains by emptying them of fuel and only refilling them later on when we want them to continue, using combinators. However trains retain a bit of fuel from their last unit of fuel consumed, can we solve that somehow?

Re: [0.12] Combinator Use & Abuse

Posted: Mon Jul 20, 2015 10:42 am
by MeduSalem
Sander Buruma wrote:I was thinking that perhaps we could hold on to trains by emptying them of fuel and only refilling them later on when we want them to continue, using combinators. However trains retain a bit of fuel from their last unit of fuel consumed, can we solve that somehow?
Nope... You'll have to wait for 0.13 when trainstops get smart too. Then you won't have the problem anymore as the upgraded trainstops will offer the option to make a train wait.