Implement Metropolis sampler for compartments