1. A method of assigning spectrum and selecting a route for a connection between a source node and a destination node within an optical network, wherein a plurality of optical links connect the source node with the destination node, said method comprising: determining a spectrum demand for the connection; for each optical link, identifying one or more potential spectrum allocations for the connection that satisfy the spectrum demand, wherein each of said potential spectrum allocations starts with either a starting frequency or an end of a previously allocated spectrum; for each potential spectrum allocation, determining a corresponding set of available optical links to obtain a residual graph that represents the residual capacity on each of the set of available optical links; and selecting a route based on the residual graphs.