A connection between a source node and a destination node is automatically
routed and switched in a WDM photonic network, on receipt of a connection
request. A switching and routing mechanism selects a plurality of valid
link paths using a path tree, where invalid branches are eliminated based
on constraints received in the connection request, and on a link and path
cost functions. A regenerator placement tree is used for determining a
plurality of viable regenerator paths for each valid link path. On the
regenerator placement tree, non-viable branches are eliminated based on
constraints received with the request and on regenerator availability at
the intermediate nodes along the respective path, and on the
specification of these available regenerators. Next, the switching and
routing mechanism assigns a set of wavelengths to each viable regenerator
path, and estimates the performance of the path using a Q estimator. The
regenerator paths are ordered according to their performance and the
switching and routing mechanism attempts to setup a paths to serve the
request, starting with the best path.