The planning of livestock ecosystems