Modelling and scheduling of a Flexible Manufacturing System