This paper addresses the scheduling of machines, an Automated Guided Vehicle (AGV) and two robots in a Flexible Manufacturing System (FMS) formed in three loop layouts, with objectives to minimize the makespan, mean flow time and mean tardiness. The scheduling optimization is carried out using Sheep Flock Heredity Algorithm (SFHA) and Artificial Immune System (AIS) algorithm. AGV is used for carrying jobs between the Load/Unload station and the machines. The robots are used for loading and unloading the jobs in the machines, and also used for transferring jobs between the machines. The algorithms are applied for test problems taken from the literature and the results obtained using the two algorithms are compared. The results indicate that SFHA performs better than AIS for this problem.