Optimisation of the Resource of Land-Based Livestock Systems to Advance Sustainable Agriculture: A Farm-Level Analysis

: Land dedicated to livestock contributes at least 40% of the global agricultural output. While advances in the application of geospatial information systems and remote sensing technologies o ﬀ er much to agriculture, capturing and using that rich spatial biophysical information is not a feature available in most farm systems models. In this paper, we tackle this gap describing a land-based integrated grazing farm optimisation and resource allocation model (AgInform ® ) that departs from the use of whole farm and average data, to the integration of biological data obtained directly from each of the land units within the farm. The model allows the exploration of the dynamics of biophysical and ﬁnancial performance of the farm in a steady-state, single-year approach, where the opening and closing values of the biological elements of the farm system conditions must remain the same (e.g., animal numbers, herbage mass), unless otherwise speciﬁed. The user supplies pasture growth rates, minimum and maximum acceptable pasture masses for each land management unit (LMU), di ﬀ erential boundary conditions to deliver deﬁned environmental outcomes, animal performance (sheep, beef and deer), farm costs and market prices. The linear programming (LP) equations formed by AgInform ® can be divided into a single objective and constraints (which accommodate the boundaries), including those placed on individual LMUs. The optimization routine uses this information to identify the mix of livestock production enterprises that maximises proﬁt for the business. The model in maintaining the link between available pasture mass and livestock requirements for each LMU throughout all calculations, enables the livestock type and number carried, along with the pasture mass required on each LMU throughout the year to achieve the required animal performance levels to be included as model outputs. A hill land sheep and beef farm consisting of seven distinct LMUs was used as a farm-level case to assess if AgInform ® (1) has su ﬃ cient ﬂexibility to integrate biological information from each LMU; (2) could use the speciﬁed livestock performance targets to derive a feasible livestock policy that optimised resource use and farm returns; (3) can assign each fortnight animal type and number and herbage mass to each LMU; and (4) can mimic reality to produce credible solutions.


Introduction
Land dedicated to livestock contributes at least 40% of the global agricultural output and secures livelihoods for nearly 1.3 billion people [1]. Land use and land cover datasets have identified pasture or rangeland as the most extensive form of used land, accounting for 22-26% of the earth's ice-free land surface [2,3]. According to the World Bank collection of development indicators 42.2% of all land in New Zealand was in agricultural production in 2015. Of that over 80% is dedicated to livestock and includes close to 2.5 million hectares in dairying and nearly 9 million hectares in sheep and beef systems [4]. The sheep and beef systems vary from extensive sheep systems in high land to intensive sheep and beef finishing (https://beeflambnz.com/data-tools/farm-classes). There are approximately 5500 sheep and beef farms on hill land in New Zealand. This is around half of all sheep and beef farms. Hill country sheep and beef farms are a mixture of flat (10%), rolling (32%) and hill and steep land (41%) (https://beeflambnz.com/knowledge-hub/PDF/FS077-hill-country-sheep-beef). In addition to different slope classes, farms include landscapes with a variety of parent materials and soil types, vary in their susceptibility to erosion, have pronounced aspect differences and can be found at a range of altitude [5] (p. 121), all of which influence pasture growth, the sheep and cattle livestock policy, livestock and land management practices, allocation of inputs and ultimately farm performance. Most of this landscape variation is captured within an environmental farm plan [6] or wider environment management package [7]. However, the underlying geospatial data are still used sparingly in farm systems analysis and decision making on the optimal livestock policy and practices and allocation of inputs, beyond soil conservation and decisions on fertiliser inputs. This is in part because of the limited availability of discrete performance data (e.g., pasture growth rates) with geospatial references and in part because of the architecture of many of the existing farm livestock systems models. The continuing advances in the application of geospatial information systems and remote sensing technologies in agriculture, offers exciting options to address the former by providing more farm-level information [8,9]. Capturing and using that rich information in farm systems decision-making requires extending the analytics of existing farm systems models. Currently they are not a feature available in most farm systems model. Where they are found they are largely limited to exploring the influence of a change in practice on one part of the farm has on the whole farm system that also requires the user to select and impose the necessary farm systems changes [10][11][12].
In the future, a critical component of any analytical approach that attempted to embrace spatial variation would be a farm systems model framework that can integrate discrete geospatial biological data obtained independently from different parts of a farm, so responses to inputs or constraints can be isolated to that part of the farm. Further, any model framework would need an optimization routine to link this biophysical variability into a combined financial objective function to search the solution space for alternative configurations of the farm system. This was part of the underlying philosophy in the development of MIDAS (Model of an Integrated Dryland Agricultural System), a whole-farm model utilising linear programming (LP) and jointly describing biological, managerial, financial and technical aspects of dryland farming in the Merredin region of Western Australia [13]. The LP approach [14] creates the "opportunity to capture the elusive enterprise interactions often missed or poorly captured by gross margin analysis." In a review of the use of LP in farm systems analysis, [15] found that spatial heterogeneity was a feature of only two of the industrialised agricultural applications. They noted that MIDAS allowed up to eight land management units (LMU) or soil types to be specified. In most cases the use of LP has and continues to be limited to optimising the farm as a single land unit to consider a single change [16][17][18][19][20][21][22][23][24]. For example, [16] developed a LP for a dairy farm system to investigate the link between per cow production, nitrogen (N) fertiliser inputs and feeding wilted silage, [17]'s LP quantified the value and feasibility of including new forage germplasm into the farm system (dairy, dairy with bull beef or bull beef only), [19]'s LP determined optimal feeding regimes in dairy grazing systems, [21] investigated N pollution from New Zealand dairy farms, [23] modelled dairy grazing systems and [24]'s LP maximised dairy farm gross margin under several greenhouse gas (GHG) emissions restriction scenarios. A feature missing from these LP-based models of pastoral farm systems, as it is for most other farm systems models, is the ability to integrate the contribution of the individual land units that differ in productive capacity; ability to physically support livestock, production and respond to inputs or practice change, through to production costs and emissions.
In this paper, we describe a model framework that tackles the inability of most farm systems models to incorporate spatial biophysical variation as an integral part of the analysis. From this challenge a land-based integrated grazing farm optimisation and resource allocation model (AgInform ® ) has emerged that departs from the use of whole farm and average data, to the integration of biological data obtained directly from each of the land units within a farm system. The model allows the exploration of the dynamics of biophysical and financial performance of the farm in a steady-state, single-year approach, where the opening and closing values of the biological elements of the farm system conditions must remain the same (e.g., animal numbers, pasture mass), unless otherwise specified. Critically, the model framework maintains the link between available pasture and livestock requirements for each LMU throughout all calculations to enable the livestock type and number carried and the pasture mass required on each LMU throughout the year to achieve the required animal performance levels to be included as model outputs. The initial test of AgInform ® was conducted using an existing hill land sheep and beef farm consisting of seven distinct LMU, to assess the ability of the model to integrate biological data obtained directly from each of the land units and use specified livestock performance targets to derive a feasible livestock policy that optimised resource use and farm returns.

Model Framework
Conceptually AgInform ® is not complicated (Figure 1). In constructing the model, a farm is split into individual land units, largely based on differences in pasture growth, in turn based on differences in soils, slope, aspect, altitude, but the program also considers such factors as the amount of infrastructure and distance from it. The concept that a farm is made up of individual areas referred to as a LMU is not new [25]. LMUs can be defined as near contiguous areas of land that can be farmed or managed in a similar way due to underlying physical similarities. They represent a static snapshot of how the land is currently configured and used, or an insight into how land could be used if all physical opportunities were realised. The separation of the farm into individual LMUs according to their productive characteristics and response to inputs and practices provides a basis for the differential management of the biophysical resources (http://beeflambnz.com/lep/).
In the model, the LMUs are divided into those that can be used to produce pasture and winter crop or those that can only produce pasture. The area of crop and its location is decided by AgInform ® . The pasture can either contribute to the existing feed pool or can be added to the supplementary feed pool as either hay or silage if it is feasible to harvest supplementary feed on that LMU. The model can then choose to use that supplementary feed when required. The feed pool supports livestock (sheep, cattle or deer). Livestock can move between LMUs and can also be sold (e.g., at weaning, prime across the year or as culls). Livestock sales and supplementary feed sales are sources of income for the farm system, while the costs for these activities are those associated with running the livestock and making and feeding supplementary feed.
Importantly, the costs associated with land (e.g., fertiliser, cultivation, weed control, repairs and maintenance) or those associated with running the enterprise (e.g., communication and accountancy) are not included in the costs of running an animal enterprise (e.g., animal health and labour). Rather, they are attributed to each LMU (as the land costs) or to an overall cost to run the enterprise. The measure of profit is Earnings Before Interest, Tax, Depreciation and Amortisation (EBITDA) [26]. AgInform ® identifies the number of animals (type, age class) to be allocated to each of the LMUs each fortnight of the year, and appropriate animal sale dates (and numbers) along with movements between LMUs. AgInform ® is a combination of an annual financial budget (the objective function, which is maximised), feed budget (feed reserves plus growth balances feed consumed, plus that added to reserves and conserved) and livestock reconciliation budget (opening animal numbers plus increases, balances closing animals, minus deaths and sales). Each of these are divided into 26 fortnightly periods. The model framework does not sum the available pasture mass from across the LMUs, before exploring the livestock options, but maintains the link between available pasture mass and livestock requirements for each LMU throughout all calculations (Figure 1). This enabled the livestock type and number carried on each LMU throughout the year to be included as a model output and used to inform grazing practice. The feed budget within each LMU must balance, with the additional proviso that the standing herbage mass (i.e., amount of feed or pasture) at the end of the year must equal that at the start of the year, ensuring that the feed/pasture component of the system is not eroded. To ensure this in the model the amount of feed on hand at 31 December must equal the amount of feed available on 1 January.
The sheep system within AgInform ® is breeding and finishing, with both meat and wool produced. The cattle system within AgInform ® is a beef cow system that can sell calves at weaning or finish them. A common practice on mixed livestock farms in New Zealand is to grow dairy heifers from weaning until they return home for their first calving and thus this grazing component is also included. The deer system is a venison production system, with velvet antler as a by-product. Equal numbers of adult breeding stock at the start and end of year are also required to ensure steady state. The steady state is also a proxy for the farm system that maximizes profit within defined boundaries, AgInform ® is a combination of an annual financial budget (the objective function, which is maximised), feed budget (feed reserves plus growth balances feed consumed, plus that added to reserves and conserved) and livestock reconciliation budget (opening animal numbers plus increases, balances closing animals, minus deaths and sales). Each of these are divided into 26 fortnightly periods. The model framework does not sum the available pasture mass from across the LMUs, before exploring the livestock options, but maintains the link between available pasture mass and livestock requirements for each LMU throughout all calculations (Figure 1). This enabled the livestock type and number carried on each LMU throughout the year to be included as a model output and used to inform grazing practice. The feed budget within each LMU must balance, with the additional proviso that the standing herbage mass (i.e., amount of feed or pasture) at the end of the year must equal that at the start of the year, ensuring that the feed/pasture component of the system is not eroded. To ensure this in the model the amount of feed on hand at 31 December must equal the amount of feed available on 1 January.
The sheep system within AgInform ® is breeding and finishing, with both meat and wool produced. The cattle system within AgInform ® is a beef cow system that can sell calves at weaning or finish them. A common practice on mixed livestock farms in New Zealand is to grow dairy heifers from weaning until they return home for their first calving and thus this grazing component is also included. The deer system is a venison production system, with velvet antler as a by-product. Equal numbers of Agriculture 2020, 10, 331 5 of 23 adult breeding stock at the start and end of year are also required to ensure steady state. The steady state is also a proxy for the farm system that maximizes profit within defined boundaries, where forage availability is not eroded, or animal numbers and liveweights compromised. The defined boundaries can be extended to include differential boundary conditions or constraints before optimisation to maximize profit, and recognise farm systems must operate within environmental limits (e.g., limit physical damage to soils, emissions to air and water).Deer in the model are restricted in the first instance to LMUs with the appropriate landscape units and soil types, required fencing and other infrastructure. The model can select the optimal size of LMUs for an investment to change the pattern of forage supply.
Linear programming [27][28][29] was chosen as the optimisation methodology as it allows an objective to be maximised (e.g., measure of profit) subject to constraints that define the farm system, including the physical limits on area in pasture, upper and lower limits of herbage mass, livestock numbers and sales. Further, it creates the basis for the future development of stochastic and nonlinear optimisation routines. The formulation is an allocation model [30,31] with the best allocation of the finite pasture, forage crops and supplementary feed resources available on each LMU to specific economic livestock activities. AgInform ® is a steady-state model of a single year cycle of a pastoral farming system, designed to assist with strategic decision-making. The structure of AgInform ® allows for extension from a single-to a multiyear model.

Objective
The objective (Z) is the financial budget that is being maximised, subject to meeting all the constraints. It contains the costs and income for the farm system. (1)

Animal Income
There are several sources of animal income such as store (nonprime) animals, prime animals, cull ewes, cows and hinds, as well as grazing rising one year (R1yr) and rising two year (R2yr) dairy replacements for dairy farmers. These are described in Equation (2). Weaner lambs, beef calves and deer are split into sex groups at weaning. Animals that will be sold store or finished and sold prime are split into quintiles, the average weight of which is calculated from the weaning weight and coefficient of variation of each species within sex class.
SellStore ikts where: Price Store kts is the net price (of cartage, yardage and commission) of an animal sold store at weaning, weight band k(k = 1, . . . , 5), type t (sheep, cattle, deer) and sex s (s = 1 . . . t n ) (n = 2 for sheep and deer-male and female; n = 3 for cattle-male, female and castrates), SellStore ikts is the number of store animals sold at weaning from LMU i, weight band k(k = 1, . . . , 5), type t and sex s, Price Prime jkats is the net price of animals sold prime in period j, weight band k, type t, of sex s and age a (sheep and deer n = 2-up to one year old, over one year of age; cattle n = 3-up to one year old, one year old and less than two; greater than 2 year old), SellPrime ijkats is the number of animals from LMU i sold prime in period j, weight band k, type t, of sex s and age a, Price Cull jt is the net price of a cull animal, type t, sold in period j (post-pregnancy scanning, post weaning), SellCull ijt is the number of cull animals, type t, sold from LMU i in period j, Price DairyGrazer a is the net price received per fortnight for a dairy grazer of age a (up to one year old, over one year of age), DairyGrazer ija is the number of dairy grazers of age n in period j and on LMU i.
Store prices are an input ($/kg liveweight) for all livestock species, as are cull prices ($/kg carcass weight). The carcass weight for cull animals is estimated using the dress out percentage and liveweight, both of which are inputs.
The carcass weight of prime animals is also calculated from the liveweight at sale day and dress out percentage. For prime deer, there is no grading based on fat-depth. The meat schedule has weight classes and sex classes. In both sheep and beef, the meat schedule includes grading based on the fat depth over the 12th rib, 11cm from the carcass midline (GR fat depth). The GR in cattle is estimated from the carcass weight, sex and breed of the animal, with the equations developed using output from BeefSpecs (http://beefspecs.agriculture.nsw.gov.au/) which produced rump (P8) fat depth. These were then converted to GR fat depth using equations of [32]. The GR for sheep carcasses was derived from data from years 1982 to 1983 of the Wiremu trial [33] and are based on carcass weight and sex (ewe and wether). The equations are summarised in Appendix A.

Animal Costs
The costs associated with animals can be represented as: where: Cost Adult t is the cost of running an adult female of type t for a fortnight (animal heath, labour, shearing etc.). For sheep wool income is subtracted from these costs, Adults ijt is the number of adult females on LMU i in period j, of type t, Cost Repl ta is the cost of running a replacement female of type t and age a for a fortnight, Repl ijta is the number of replacement females of age a (up to one year old, over one year old), type t, on LMU i in period j, Cost Fin t,a is the cost of running a finishing animal, of type t, and age a for a fortnight, Fins ijktas is the number of finishing animals of type t, age a t , sex s, weight band k, on LMU i in period j, Agriculture 2020, 10, 331 7 of 23

Animal Transfer Costs
Sheep, beef and young dairy cattle can move between any two LMU on a fortnightly basis. Deer can only move between the deer LMUs, defined by the fencing infrastructure. There is a cost of moving animals between LMUs (currently the same cost applies to the movement of animals between LMUs. A future upgrade should allow for the cost to vary. This would account for the situation where transportation is required to shift animals between LMUs, or where there is a large labour costs and or distances for animals to walk between LMUs. Ewes and hinds can be moved between LMUs post weaning through to two weeks prior to parturition. Beef cows can be moved from 14 weeks post calving (or weaning whichever is earliest) to two weeks prior to calving.
Cost TranAdult t is the cost of moving an adult female of type t from one LMU to another, Adults ii jt is the number of adults of type t moved at the end of period j from LMU i to i where i i , is the cost of moving a young animal (replacement or finishing animal) of type t and age a from one LMU to another, Fin Trans ii jkats is the number of finishing lambs of type t, sex s, age a, weight band k moved at the end of period j from LMU i to i , where i i , Repl Trans ii jta is the number of replacement females of type t, age a moved at the end of period j from LMU ito i where i i , Cost TranDGraz a is the cost of moving a dairy grazer of age a from one LMU to another, DairyGrazer Trans ii ja Number of dairy grazers of age a moved at the end of period j from LMU i to i , where i i .

Supplementary Feed Income
These are the costs associated with making and feeding out supplementary feed, as well as transferring supplementary feed between LMUs (an option to purchase supplementary feed will be added in a future version). where: Agriculture 2020, 10, 331

of 23
Cost SuppMake is the cost ($/kg DM) to make supplementary feed, SuppFeed Made ij is the amount of supplementary feed (kg DM) made in LMU i and period j, Cost SuppFed is the cost ($/kg DM) of feeding out supplementary feed, SuppFeed Fed ij is the amount (kg DM) of supplementary feed fed out in LMU i and period j, Cost Supp Tran is the cost of transferring supplementary feed between LMUs (Currently this is a single cost regardless of which LMUs the transfer occurs between. In the future, this will be altered to reflect specific actions on a LMU that might include lease blocks, run-offs, or large farms), SuppFeed Trans ii is the amount of supplementary feed transferred between LMU i and i where i i .

Forage Crop Costs
The costs associated with planting and feeding a crop can vary with LMU. These costs can be represented as: where:

Cost
Crop i is the cost ($/ha) of establishing the crop and replanting the area back into pasture in LMU i, Crop i is the area (ha) of crop planted in LMU i.

Land Costs
The costs associated with maintaining the land which includes fertiliser, weed and pest control, fence repairs and maintenance can vary significantly between LMUs. These costs can be represented as: where: Cost Land ij is the cost ($/ha) of maintaining LMU i for period j, Land ij is the area (ha) of LMU i in period j.

Enterprise Costs
These costs are primarily associated with running the business and not linked directly to a specific livestock type or class, or LMU, or are not included elsewhere. Costs such as legal, accountancy and communication costs are included in this category.

Constraints-Land Area
When the option to have variably sized LMU areas is invoked, a series of constraints are required to ensure LMUs are allocated correctly over the year.
where: When the option to have variably sized LMU areas is invoked, constraints in Equation (9) are modified to ensure LMUs are allocated correctly over the year. For each group of variable LMUs: where: i a to i n represent LMUs a to n that vary in size for that group.
And to ensure LMUs remain the same size over the 26 periods, for all variable sized LMUs: where: P i,j is 1 when period j is the sowing date of the crop in LMU i 0 otherwise, G i,j is 1 when period j is the sowing date of the new grass in LMU i 0 otherwise.

Constraints-Feed
These constraints ensure feed is apportioned correctly. Firstly, for each LMU crop production is balanced with fortnightly feeding. where: Crop For each period j within each LMU i, the feed removed and closing herbage mass must balance that grown and opening herbage mass. where: E f f y m is the efficiency of making supplementary feed (the proportion of dry matter present at harvest that is available to be fed out), AnimalRQs ij is the dry matter (DM)kg requirement of animals on LMU i in period j (the feed requirements of sheep and cattle are estimated using GrazPlan equations [34] and for deer [35][36][37]. The feed requirements allow for the utilisation of the feed (i.e., the proportion of DM that disappears which is consumed by the animals), PGrown ij is the kg of DM grown on LMU i in period j, Land ij is area of land in pasture on LMU i in period j, SuppFeed Fed ij is the kg of DM of supplementary feed fed on LMU i in period j, E f f y f is the efficiency of feeding supplementary feed (the proportion of DM fed out that is consumed by the animals), There is a limit on the amount of supplementary feed that can be fed in any period, with the user specifying the maximum proportion of the intake. Further, no finishing animals are included in this estimation.
DGrazerRQs ija (13) where: x t , x dg is the specified maximum proportion of the diet coming from supplementary feed for animals of type t (sheep, beef cattle, deer) and dairy grazers, respectively, AdultRQs ijt is the DM requirement (kg) of an adult female of type t on LMU i for period j, ReplRQs ijat is the DM requirement (kg) of a female replacement ewe replacements of type t, age a, on LMU i for period j, DGrazerRQs ija is the DM requirement (kg) of dairy grazer of age a, on LMU i for period j.
Herbage mass (PCover ij ) at the end of each period j on each LMU i are constrained to fall between minimum (mincover ij ) and maximum values (maxcover i,j ).

Constraints-Animals
For each LMU there are several constraints to control livestock numbers. The number of adult female replacements is given by: where: Repl ijat is the number of replacement animals of type t, age group a (a = 2) on LMU i period j (where j = c the period in which the post weaning adult cull occurs), RepRate t is the replacement rate for adults of type t, Adults ijt is the number of adult females of type t on LMU i period j (where j = p the period mating begins).
The number of postweaning cull adult females of type t is given by (j = p, the period mating begins) and the age of replacements a = 2: and cull dry adult females post pregnancy scanning (these are culled two weeks after scanning) where: Adults ijt is the number of adult females of type t on LMU i in period j = ps (where ps is the period of pregnancy scanning), Dry t is the proportion adult females of type t that are dry (not pregnant) at pregnancy scanning, Culls ij+1t is the number of dry adult females of type t culled from LMU i in the period after scanning.
At weaning, young animals are split into two sexes, (with cattle the males can be further split into castrates and entire) then each sex is split into five (k) equal sized groups based on liveweight. The replacement females are assumed to come equally from the five weight groups. Adults t,i,p is the number of adult females in LMU i present at the start of parturition (j is period of parturition) and NW is the number of progeny weaned per adult of type t present at the start of parturition (assuming a 50% sex ratio and 20% of animals of each sex are in each weight band, gives the 0.1 weighting to NW in Equations (19) and (20)).

Fin Wnd
Similarly, for the male progeny weaned, for each LMU i, The number of progeny at weaning then needs to be tied to (equal) the number at the end of the period (j), allowing for sales, transfers to and from other LMUs, where: Fin WndTrans ii k jkats is the number of finishing animals of type t, age 1, sex s, weight band k that are transferred from LMU i to LMU i in the period weaning occurs.
For each LMU i, weight class k, type t, sex s, in the period of weaning and age class 1, Constraints are needed to tie the numbers of finishing animals between periods, allowing them to be sold prime at the beginning of the period (SellPrime ijkats ) and for transfers between LMUs. Also, Surv Fin t allows for survival between periods for different animal types t. Note that no animals are sold in the period after the weaning period. For each LMU i, period j, weight class k, age a, and sex s: For each LMU i and period j, the constraints used to transition adult females from one period to the next, allowing for deaths and transfers in and out to other LMUs is: where: Surv Adults t is the probability of an adult female of type t surviving from one period to the next Adult transfers are not permitted from two weeks prior to parturition until weaning for sheep and deer, and eight weeks post parturition for cattle.
At culling after weaning, adult females are culled and replacements (age = 2) enter the adult mob: Dairy grazers have transition constraints between periods, except without the culls. The starting period for weaners is the period specified from the input and the exit date is specified. The same process occurs with yearling dairy grazers.
Cattle can be excluded from LMUs for any number of periods (e.g., to minimise damage over winter on a sensitive landscape).

Inputs
The data inputs required by AgInform ® are not dissimilar from most farm systems models but differ in requiring biological data for each of the LMUs that make up the farm (Table 1). The type of data ranges from physical (e.g., effective land area, pasture production, physical properties and condition of each LMU), livestock (e.g., animal weights, growth rates, key dates) to financial data (e.g., meat schedules and farm costs, including those associated with each LMU).

Outputs
The outputs from AgInform ® are the Livestock types, classes and numbers that would maximise profit (EBITDA) for the farm resources within pre-defined constraints, inputs and specified livestock performance levels ( Table 2). Fortnightly animal numbers allocated to each LMU, animal sale dates and weights are reported along with pasture and crop information, including herbage masses for each LMU, crop and supplementary feed consumption.

Results
Results include (i) an initial test of the model with a farm-level case (Base farm) to assess the integrity of the model, (ii) test of the models ability to explore the influence a single theoretical change in a key livestock input to the farm-level case, an increase in the number of lambs born per ewe by 20% (Fecund farm), has on the outputs of the model and (iii) using the model output for assessing environmental impacts.

Running AgInform ® with the Farm-Level Case (Base Farm)
Initial testing of the model with a farm-level case (Base farm) was undertaken to assess if the architecture of the model (i) has sufficient flexibility to integrate biological information from each LMU, (ii) could use the specified livestock performance targets to derive a feasible livestock policy that optimised resource use and farm returns, (iii) can mimic reality to produce credible solutions and (iv) allocates each fortnight animal type and number and herbage mass to each LMU.
The farm-level case (Base farm) was in the Whanganui region of New Zealand (specific latitude −39.8 • and longitude 175.0), average rainfall of 1250 mm (varying between 700 to 1450 mm per annum) and 15 km from the Tasman Sea in the Whanganui river catchment. The landscapes vary from flat and easy rolling with soil derived from volcanic ash, and the hill and steep land derived from unconsolidated sandstones, which are prone to erosion (Table 3). Like many North Island sheep and beef farms, which generally carry sheep and beef cattle, pastures are dominated by ryegrass and white clover pasture on the flat and rolling and include low fertility forage species on the hill and steep land units that are not cultivatable. A large proportion of this farm is in planted forest (450 ha) or regenerating native forest (200 ha). The farm owner also has a separate land parcel of 31 ha which is closer to the coast in an area near Westmere (specific latitude −39.9 and longitude 175.0) and has a lower rainfall (928 mm) but similar variability (731 to 1450 mm), and is farmed as an LMU integrated with the rest of the farm by transporting livestock and supplementary feed between the two. Pasture growth curves, the energy content and pasture utilisations levels for the four LMU in pasture are presented in Figure 2. Key dates, animal performance and costs for the farm are listed in Appendix B.
Agriculture 2020, 10, x FOR PEER REVIEW 14 of 23 from the sheep animal costs. Sheep were assumed to require 10% more labour per head than cattle, and cattle had a 50% higher animal health cost than sheep on a per head basis. Supplementary feed and winter cropping costs were not included in these calculations as they are options considered by the mode. The optimal farm system from running AgInform ® with the farm-level case (Base farm) inputs in Appendix B consisted of 4930 ewes (at 1 July), replacement young stock retained (2200), and lambs finished and sold (5238). Whilst beef cattle could be included in the system, the system was slightly more profitable with sheep alone with the input costs for producing beef and lamb and associated schedules. The model could be constrained to include a specified number of beef cattle as part of the livestock policy.
The advantage in not summing the pasture available from across the LMUs, before exploring the livestock options, but maintaining the link between available pasture and livestock requirements from each LMU throughout the calculations (Figure 1), enabled the livestock type and number carried on each LMU throughout the year to be included as a model output and used to inform grazing practice (Figure 3).
The model, in minimising the number of ewes on LMU1 in late autumn, and then maximising the number of lambing ewes on LMU1 in the spring and lambs post weaning (Figure 3) was maximising the value of the available feed on the most productive part of the farm, with feed of the highest quality. Pasture was accumulated in late autumn on LMU1 as part of the iterations to maximise returns (Figure 4). A total of 5238 lambs were sold prime with an average sale date of 21 May (Figure 3). Farm costs for the Whanganui farm in Table 1 came from 2012 MPI Farm Monitoring report for Central North Island Hill Country Sheep and Beef (http://www.mpi.govt.nz/newresources/publications? title=Farm%20Monitoring%20Report) as detailed farm accounts were not available. These were split into animal (e.g., animal health, labour, breeding, etc.), land (e.g., rates, fertiliser, lime, etc.) and enterprise costs (e.g., accountancy, legal, etc.). The animal costs were allocated to sheep and cattle. For sheep, the wool revenues were deducted from the sheep animal costs. Sheep were assumed to require 10% more labour per head than cattle, and cattle had a 50% higher animal health cost than sheep on a per head basis. Supplementary feed and winter cropping costs were not included in these calculations as they are options considered by the mode. The optimal farm system from running AgInform ® with the farm-level case (Base farm) inputs in Appendix B consisted of 4930 ewes (at 1 July), replacement young stock retained (2200), and lambs finished and sold (5238). Whilst beef cattle could be included in the system, the system was slightly more profitable with sheep alone with the input costs for producing beef and lamb and associated schedules. The model could be constrained to include a specified number of beef cattle as part of the livestock policy.
The advantage in not summing the pasture available from across the LMUs, before exploring the livestock options, but maintaining the link between available pasture and livestock requirements from each LMU throughout the calculations (Figure 1), enabled the livestock type and number carried on each LMU throughout the year to be included as a model output and used to inform grazing practice ( Figure 3). Agriculture 2020, 10, x FOR PEER REVIEW 15 of 23  The model, in minimising the number of ewes on LMU1 in late autumn, and then maximising the number of lambing ewes on LMU1 in the spring and lambs post weaning (Figure 3) was maximising the value of the available feed on the most productive part of the farm, with feed of the highest quality. Pasture was accumulated in late autumn on LMU1 as part of the iterations to maximise returns ( Figure 4). A total of 5238 lambs were sold prime with an average sale date of 21 May (Figure 3).

Influence of a Change in a Key Livestock Input on Model Outputs
To test the ability of the model to explore the influence a single theoretical change in a key livestock input in the farm-level case (Base Farm) in Appendix B, the number of lambs born per ewe was increased by 20% (from 1.68 foetuses per pregnant ewe at mid pregnancy to 1.88). This is whilst maintaining lamb survival from birth to weaning at 83%. Ewe liveweight was also increased by 7.4 kg from 60 kg to achieve the increases in fecundity (Fecund farm) and the farm was modelled again in AgInform ® . Replacement ewe lambs had to grow faster to achieve a heavier liveweight when entering the flock. With the Fecund farm the model selected fewer ewes at 1st July (4433), given the higher feed demands of ewes (as they were heavier and had greater energy requirements for pregnancy, lactation and lamb growth up to weaning) and therefore fewer replacement young stock ( Figure 3). This would be expected. However, the model sold more lambs prime (5405) with the same average sale date (21 May). With the Fecund farm, the model made greater use of LMU4 for ewes than it did for the Base farm. Likewise, the model placed more of the replacement ewe lambs on LMU 1 in the farm-level case (Fecund farm), after weaning.
The Base farm generated a lower EBITDA than the Fecund farm, due to greater ewe numbers and replacements generating greater total costs and fewer lambs generating less income ( Table 4). The greater number of livestock in the Base farm resulted in the value of livestock (at 1st July) being greater than in the Fecund farm. Therefore, an investment analysis is required to compare the two options. Assuming the EBITDA remains constant over time, a Net Present Value (NPV) was calculated, using a 5% p.a. discount rate (as there is no price-cost inflation in the model, this is an estimate of the NZ risk free rate). The NPV was converted to an annuity to improve the interpretability of the analysis. The annuity per ha increased by 10.9%. However, the annuity per ewe increased by 23.3% reflecting the extra value of a more fecund ewe.

Influence of a Change in a Key Livestock Input on Model Outputs
To test the ability of the model to explore the influence a single theoretical change in a key livestock input in the farm-level case (Base Farm) in Appendix B, the number of lambs born per ewe was increased by 20% (from 1.68 foetuses per pregnant ewe at mid pregnancy to 1.88). This is whilst maintaining lamb survival from birth to weaning at 83%. Ewe liveweight was also increased by 7.4 kg from 60 kg to achieve the increases in fecundity (Fecund farm) and the farm was modelled again in AgInform ® . Replacement ewe lambs had to grow faster to achieve a heavier liveweight when entering the flock. With the Fecund farm the model selected fewer ewes at 1st July (4433), given the higher feed demands of ewes (as they were heavier and had greater energy requirements for pregnancy, lactation and lamb growth up to weaning) and therefore fewer replacement young stock (Figure 3). This would be expected. However, the model sold more lambs prime (5405) with the same average sale date (21 May). With the Fecund farm, the model made greater use of LMU4 for ewes than it did for the Base farm. Likewise, the model placed more of the replacement ewe lambs on LMU 1 in the farm-level case (Fecund farm), after weaning.
The Base farm generated a lower EBITDA than the Fecund farm, due to greater ewe numbers and replacements generating greater total costs and fewer lambs generating less income ( Table 4). The greater number of livestock in the Base farm resulted in the value of livestock (at 1st July) being greater than in the Fecund farm. Therefore, an investment analysis is required to compare the two options. Assuming the EBITDA remains constant over time, a Net Present Value (NPV) was calculated, using a 5% p.a. discount rate (as there is no price-cost inflation in the model, this is an estimate of the NZ risk free rate). The NPV was converted to an annuity to improve the interpretability of the analysis. The annuity per ha increased by 10.9%. However, the annuity per ewe increased by 23.3% reflecting the extra value of a more fecund ewe.

Utility of the AgInform ® Output for Inclusion in Other Models
The AgInform ® outputs from the farm-level case (Base Farm) and (Fecund farm) were used within the OVERSEER ® nutrient budget model (https://www.overseer.org.nz/), to explore their value in assessing the impact the two farm systems have on nutrient losses to water and GHG to air. In New Zealand reporting on emissions to air and water using the OVERSEER ® Nutrient budget (v6.2.2) is rapidly becoming an integral part of the livestock industries operating environment. There was no change in the risk of phosphorus (P) loss between the Base Farm and Fecund farm as predicted by OVERSEER ® . However, nitrate (N) leaching lost to water reduced from 15 to 11 kg/ha/yr for LMU 3, resulting in a small overall decrease (4%) for the pastoral LMUs (Table 5). Inclusion of the forestry blocks of the farm in the analysis reduced the overall N and P losses from the Base Farm and Fecund farm by 40 and 34%, respectively (Table 5). At this point in time, OVERSEER ® does not estimate GHG emissions from the livestock carried on each LMU [38]. Estimated methane production dropped from 1805 to 1679 kg CO 2 -e/ha/yr (7%), nitrous oxide emissions fell from 657 to 631 kg CO 2 -e/ha/yr (4%), with an overall decline from 2627 to 2471 kg CO 2 -e/ha/yr, a 6% decline, with the shift from the Base Farm to the Fecund farm. The output from AgInform ® , with its capacity to link the amount of pasture grown and subsequently eaten by a specific livestock type from each LMU, would allow these overall GHG estimates to be broken down across the farm. Inclusion of the carbon (C) sequestered by the regenerating native forest on LMU 6 of 0.1 to 1.0 t CO 2 /ha/yr and planted forestry up to 6.5 t CO 2 /ha/yr on LMU5 and LMU7 in the C budget has the potential to offset a significant percentage of the emissions from the livestock on the pastoral units of the farm. AgInform ® does not currently include C sequestration or emissions, but the structure would allow the inclusion of both as part of the optimisation routine.

Discussion
The farm-level case demonstrates that AgInform ® can create and then analyse a farm system from the pasture growth data from each of the individual LMUs that make up the farm, animal demands created by performance targets, costs associated with managing each LMU and livestock class, and income from the sale of livestock to maximise income. It also completes a livestock reconciliation budget resulting in an optimal solution for a farm operation and reports animal purchase and sale dates and supplementary feed details. The current study adds to the use of LP in farm systems, which continues to be largely limited to consider a single change, with the farm as a single land unit [22][23][24]. Incorporating spatial variability as an integral element of the optimisation, provides significant benefit in understanding the economic and practical implications of imposing constraints on the utilization of resources within a farm system. This was recognised in the design of MIDAS, where four soil types were included for both cropping and therefore also for sheep [13]. Others [39] have demonstrated the potential advantages from considering variability when constructing farm systems to improve the financial outcome, compared with analysis limited to averages only. Models which consider variability in farm system planning in a more automated manner have the potential to provide additional insights to research outcomes and challenge current farm system design. As [15] reported, however, including spatial heterogeneity was a feature of only two of the industrialised agricultural applications of LP.
A decision early in the development of the model framework was to avoid aggregating the available pasture from across the LMUs before exploring the livestock options, but rather maintaining the link between available pasture and livestock requirements for each LMU throughout all calculations (Figure 1). This enabled the livestock type and number carried on each LMU throughout the year to be included as a model output and used to inform grazing practice (Figure 3), as can the changes in herbage mass required on each LMU throughout the year to achieve the required animal performance levels ( Figure 4). Understanding the contribution of each LMU to current production and returns is the first step in exploring where future gains are possible and in parallel where losses to receiving environments can be limited. In an investigation of a differential approach to nutrient management [40], found adjusting nutrient inputs to the individual requirements of each land unit resulted in net gross margin improvements of 7 to >40%, compared with equal treatments across all landscape units that made up a farm.
A picture of where and when livestock graze is a powerful visual tool with which to consider the current use of the farms resources and to examine the effect a change in practice (or indeed multiple changes) has on the livestock policy and the use of the land resources of the farm system ( Figure 3). Similarly, a picture of the herbage mass on each LMU throughout the year to achieve the required animal performance levels, is another useful output for the user over current models (Figure 4). These are an important piece of intelligence in operationalizing any change to the farm system.
Changing ewe fecundity (Fecund farm), a key livestock input in the farm-level case, as an option to test the model's function, was selected on the basis that lambs born are a major determinant of profitability of hill country sheep and beef systems. The fecundity of the New Zealand ewe flock has increased from 100% in 1990 to 129% in 2018 through continuous improvement in genotype and adoption of a range of new technologies. This has led to a reduction in the sector environmental footprint [41]. Lifting the number of lambs born per ewe by 20% in the fecund farm resulted in a 10% reduction in breeding ewe numbers, no change in the average sale date of lambs, some changes in the use of the four LMUs ( Figure 3) and associated pasture covers (Figure 4), when compared to the base farm. There was also a small reduction in nitrate leaching (Table 3) and in the GHG emissions, from the reduction in capital stock (ewes) wintered. The analysis highlights the importance of reducing ewe numbers, but also the implications to use and management of each LMU to realise the potential from an increase in the fecundity of the ewe.
In New Zealand, reporting on emissions to water (nutrients) and air (GHG) using the OVERSEER ® nutrient budget model is rapidly becoming an integral part of the operating environment for the livestock industry, so it is important farm systems models can interface with this software. Looking forward, the farm-level case analysis highlighted the importance of inclusion of the areas in forest in future analysis within farm system models, as it contributes directly to lowering the environmental footprint of the livestock operation, but also to ensure all resources of the farm are part of an integrated decision making process. At this stage, emission to water and air are not yet considered in AgInform ® but could be added as a constraint within which the farm systems would have to operate.
A significant issue, we believe, in pastoral farm system design and analysis is that we are often limited by our own imagination in identifying options and exploring solutions. This might not be a limitation when experienced users are conducting simple analyses, but as we look at increasing the level of complexity, for example by considering LMUs as well as variability and simultaneously imposing environmentally driven constraints to the production system, recognition of services beyond food and fibre [42] and additional currencies (e.g., C), solutions will probably lie outside our current experiences. Thus, there is the need to develop models which can point the user towards quite unique solutions without precedent to better inform decision making, acknowledging that judgement calls are based on a combination of experience and evidence. The LP approach allow users to include a wider range of farm system design issues and constraints into the analyse and the potential to suggest solutions which are beyond the imagination of the user that lead to some quite novel approaches to farm system design that might be counterintuitive.

Summary and Conclusions
AgInform ® is an optimisation model which uses LP to define the optimal livestock policy for a land-based pasture-based farm system by capturing the spatial heterogeneity found in the underlying land-based resources as it influence pasture growth and utilisation by livestock throughout the year to maximise, within boundaries, EBITDA. It is a single year, steady-state-model. The model provides a useful framework for better understanding the dynamics between resource economics, environmental considerations and farmer partialities. The next step in the development of AgInform ® is to enhance it so that we can better understand the impact of year to year variation on pasture-based farm systems. This will allow a better understanding of the impact of variation on farm decision making.