Design and control of manufacturing systems: a discrete event optimisation methodology