Simulation - based Real - time Scheduling in a Flexible Manufacturing System