Relaxation and constrained optimization by local processes