Signal Sorter

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
mboxdk
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Dec 28, 2022 7:27 pm
Contact:

Signal Sorter

Post by mboxdk »

Slow if there are many signals at the input, but it works! :D
It's thread safe and supports negative values. Some letter signals are reserved.
Also I think about much faster solutions..
While I was doing this, I forgot what for.. :D

Capture.PNG
Capture.PNG (1.57 MiB) Viewed 2304 times
Senior Combinator Developer :lol:

User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Signal Sorter

Post by ickputzdirwech »

Before I might think about a use case I would be interested what it actually does?
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write

mboxdk
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Dec 28, 2022 7:27 pm
Contact:

Re: Signal Sorter

Post by mboxdk »

ickputzdirwech wrote:
Wed Jan 04, 2023 12:03 am
Before I might think about a use case I would be interested what it actually does?
It separates and sorts signals

input - one signal: A20 B10 C30
output - three signals: B10, A20, C30
Senior Combinator Developer :lol:

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: Signal Sorter

Post by DaleStan »

I don't understand what you mean by that. Can you post screenshots of the input and output? The tooltips for the input and output power poles seem like they should work well.

mboxdk
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Dec 28, 2022 7:27 pm
Contact:

Re: Signal Sorter

Post by mboxdk »

You can see everything on the bottom power poles. I'm sorry, I thought I made the interface obvious.
Capture.PNG
Capture.PNG (1.86 MiB) Viewed 2220 times
Senior Combinator Developer :lol:

Nidan
Filter Inserter
Filter Inserter
Posts: 254
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Signal Sorter

Post by Nidan »

Power pole plus lamp screams output, but a description in plain English is always useful, so we can get a better idea what a circuit does from just reading the post and not having to try it out ingame.

As examples: Adds signal I to the output indicating that this is the Ith lowest number. Signals that must not be in the input (You wrote "Some letter signals are reserved."; at least I by the looks of it.). What happens if multiple signals have the same value? What happens if the are more than 8 inputs? How can you expand it to more than 8 outputs?

And if you want to go the extra mile, a breakdown/overview of what each section of combinators does.

mboxdk
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Dec 28, 2022 7:27 pm
Contact:

Re: Signal Sorter

Post by mboxdk »

Nidan wrote:
Wed Jan 04, 2023 9:37 pm
Power pole plus lamp screams output, but a description in plain English is always useful, so we can get a better idea what a circuit does from just reading the post and not having to try it out ingame.
I'm sorry, it's more interesting to come up with this than to describe everything in detail. :roll:

Nidan wrote:
Wed Jan 04, 2023 9:37 pm
As examples: Adds signal I to the output indicating that this is the Ith lowest number. Signals that must not be in the input (You wrote "Some letter signals are reserved."; at least I by the looks of it.). What happens if multiple signals have the same value? What happens if the are more than 8 inputs? How can you expand it to more than 8 outputs?
I is just signal index, like index in sorted array.

I forgot what signals I reserved. I need to recheck each combinator to say more.

if multiple signals have the same value they will be sorted anyway to different outputs. I can't predict in what order.

if the are more than 8 inputs the rest of the signals will be discarded.

It's quite easy to expand it, just need to copy the bottom memory section to the right side and assign indexes to these combinators:
Capture.PNG
Capture.PNG (1.5 MiB) Viewed 2187 times
I also know how to make it so that there is no need to write the index manually)
Nidan wrote:
Wed Jan 04, 2023 9:37 pm
And if you want to go the extra mile, a breakdown/overview of what each section of combinators does.
asd.PNG
asd.PNG (1.75 MiB) Viewed 2187 times
Yellow - "thread safe" input memory, that does not allow to break everything if input is updating too fast. Really useful thing in long calculations. :idea:
Red - disassembles the signal into its component parts and looks for the minimum. viewtopic.php?f=193&t=104572
Green - subtracts the found minimum signal from the input and assigns an index to it and writes it to the buffer memory. Then the cycle continues.
Blue - memory block that contains the buffer memory and output memory. When the process is completed, the result is copied from the buffer to the output memory.
Senior Combinator Developer :lol:

Post Reply

Return to “Combinator Creations”