  We present a numerical framework to treat infinite time horizon spatially
distributed optimal control problems via the associated canonical system
derived by Pontryagin's Maximum Principle. The basic idea is to consider the
canonical system in two steps. First we perform a bifurcation analysis of
canonical steady states using the continuation and bifurcation package
pde2path, yielding a number of so called flat and patterned canonical steady
states. In a second step we link pde2path to the two point boundary value
problem solver TOM to study time dependent canonical paths to steady states
having the so called saddle point property. As an example we consider a shallow
lake model with diffusion.
