Optimising the cost of biomethane grid injection