The concept of elastic optical network (EON) has been proposed in recent years as a highly spectrum- efficient solution to implement flexible bandwidth channels. Just like the role of routing and wavelength assignment (RWA) problem in traditional wavelength-routed networks, a routing and spectrum assignment (RSA) algorithm deals with the most basic resource management issue in EON. In this work, we use the well-known layered graph model to design two RSA heuristic algorithms named LG-FF and LG-SP. Numerical results show that LG-SP can obtain blocking performance as good as near-optimal solution and meanwhile significantly reduce computational time. It verifies that layered graph model can solve RSA problem more efficiently.