I am trying to use Metropolis-Hastings to optimise a cost function concerned with the nutrition and Greenhouse gas emissions (GHGEs) associated with an array of food types.