This paper propose firefly algorithm for optimizing the distance travel of a robot arm for a given sequence of operations by determining the relative positions and orientations of the stations in the workcell. B-Star-Tree and Sequence Pair representation schemes are used to generate the initial layouts. For a given sequence of operations, the firefly algorithm was able to achieve a layout that yields a near minimum distance of travel. Minimising the total distance travel of the robot arm indirectly minimises the cycle time of the robot workcell. Simulation results show the sequence pair representation method performs better efficiency among the two methods applied in terms of reducing the distance. © Springer International Publishing AG 2016.