Comparative optimization of production and dispatch of bioenergy in anaerobic digestion supply chains