The future of broadband applications depends on wide deployment of fiber networks with dense wavelength-division multiplexing (DWDM) technology. We present a general solution to dynamic adaptive path computation in such networks that can be incorporated into an intelligent control plane, including a GMPLS-based solution. The solution is based on the concept of channel graph, a novel model to capture all wavelength switchinglimitations at network nodes. The biggest difference between our model and the existing models in the literature is that we also allow non-elementary paths, i.e., paths containing loops, to satisfy wavelength-continuity constraints at nodes incapable of wavelength conversion.