4 ms·
This is one of the greatest, most HN comments of all time! I'd love to do some hardware stuff but it always seems so inapproachable for a software-only person.
by aidos 10y ago
This is one of the greatest, most HN comments of all time! I'd love to do some hardware stuff but it always seems so inapproachable for a software-only person.
"more than one puffer would be active at once" — sounds like a job for prime numbers!
- jacquesm 10y ago> sounds like a job for prime numbers! And that's exactly how it was solved. The puffers are now spaced prime distances apart and that took care of that, it would be harder for a longer belt because then you'd start wasting an awful lot of space next to the belt.
- hedgehog 10y agoI think a Golomb ruler would be a good start for spacing.
- jacquesm 10y agoInteresting I had never heard of the term. Thank you for the pointer!
- neonkiwi 10y agoThis is an interesting problem. I'm trying to visualize this and I must be thinking about the problem incorrectly; perhaps you can help me wrap my head around it. Since the pieces fall onto the faster conveyor belt with random spacing, isn't it possible that two consecutive pieces will have the spacing of the puffers they are destined for (within margins), regardless of the puffer placements?
- jacquesm 10y agoThe spacing of the conveyor 'traps' is equal, the conveyor belt speeds are a constant. If the puffers are equidistant the chances of overlap are substantially higher than if they don't. Most conveyor traps take only one or two parts along. If there are many more parts they tend to fall in a clump and won't be classified so then there also is no problem. In the end the error rate went down a lot because of a less predictable spacing. But you are right that if the pieces would fall with random spacings that it would not matter what the distance between the puffer stations would be. The funny thing is that I spent a lot of time measuring out the vertical spacing on the conveyor in the hopper. If I had done that more sloppily it would have worked better :)
- aws_ls 10y agoI had to think for some time on this one. Finally it occurred to me, that the pieces are some x distance apart on an average. At any snapshot, the pieces are lying with a Gaussian distribution around x multiples along the belt i.e having sigma at x, 2x, 3x,...nx.... So for the bins to not overlap: 1) their width/span-along-the-belt should be lesser than x 2) And they can be placed at x, 3x/2, 5x/2, 7x/2 (i.e. prime multiples of x/2) Wow! Learnt something useful today. Thank you. :) Edit: I realize after posting that, my solution won't work! If somebody can explain how the prime thing works will be great. I can imagine, though, that the bin placements should be such that, at any given time the piece is only in front of a single bin. Meaning, no pair of bins should have a distance of x-multiple. I can guess, perhaps heuristics which work well, can be devised. But it will be great to know the mathematical solution for this.