Page 1 of 1

Arithmetic Combinators: Constants only as 2nd op

Posted: Thu Nov 10, 2016 6:33 am
by Jürgen Erhard
I've looked at FFF 88, but I see no rationale for why only the second combinator can be a number.

I've a pattern for loading bots into roboports (thankfully, we can now read the numbers), and that, for the main base, has a constant comb with the numbers of bots I want (two items in it, construction and logistics bots) and two arith combs to calculate the number of bots of each type I still need, which then set a requester chest.

But for an outpost, I don't want to be that elaborate, so just one arith for construction bots would suffice. Only... I need arith and const comb, because I cannot code "N - number of construction bots" with just one arith comb. I could code "number of bots - N"... and then negate this with a second arith comb.

And the combinators are too big anyway... :P

Re: Arithmetic Combinators: Constants only as 2nd op

Posted: Fri Nov 11, 2016 6:16 am
by DaveMcW
Roboport (Logisitic robot signal, Construction robot signal)
|
Arithmetic combinator (Each * -1 → Each)
|
Constant combinator (Logistic robot demand, Construction robot demand)
|
Requester chest