  We give an algorithm to construct a translation-invariant transport kernel
between ergodic stationary random measures $\Phi$ and $\Psi$ on $\mathbb R^d$,
given that they have equal intensities. As a result, this yields a construction
of a shift-coupling of an ergodic stationary random measure and its Palm
version. This algorithm constructs the transport kernel in a deterministic
manner given realizations $\varphi$ and $\psi$ of the measures. The
(non-constructive) existence of such a transport kernel was proved in [8]. Our
algorithm is a generalization of the work of [3], in which a construction is
provided for the Lebesgue measure and an ergodic simple point process. In the
general case, we limit ourselves to what we call constrained densities and
transport kernels. We give a definition of stability of constrained densities
and introduce our construction algorithm inspired by the Gale-Shapley stable
marriage algorithm. For stable constrained densities, we study existence,
uniqueness, monotonicity w.r.t. the measures and boundedness.
