Pātuhitia tēnei: Optimal design of flexible manufacturing systems