A mathematical programming model of a crop-livestock farm system