Algorithm for a Microfluidic Assembly Line