Generation of layout is based on total distance traveled by the material. It first evaluates a given layout and then considers the effect if the department locations are interchanged. Only departments with common borders or of the same area are considered for exchanges of locations. If an improvement becomes visible due to pair wise exchange, the exchange producing the greatest improvement in chosen.