In this paper the modelling and optimization of a class of flexible assembly systems are considered. The pipeline assembly systems are introduced, and the problem of thorughput maximization is approached by a nested two-step optimization procedure, realized by means of a local search algorithm. The application analyzed concerns the maximization of the ratio between the throughput and the cost of a system for the assembly of cash registers. The production system is formed by one or more independent cells; each cell is formed by one or more workstations. For each type of cell, the cell architecture is chosen and the assignment/synchronization of the parts to be assembled is optimized. The solution has been verified via simulation on the basis of a Petri-net representation of the assembly system.