Combinatorial techniques to optimally customize an automated production line with rotary transfer and turrets