Linear Programming in the economic estimate of livestock-crop integration : application to a Brazilian dairy farm

A linear programming mathematical model was applied to a representative dairy farm located in Brazil. The results showed that optimization models are relevant tools to assist in the planning and management of agricultural production, as well as to assist in estimating potential gains from the use of integrated systems. Diversification was a necessary condition for economic viability. A total cost reduction potential of about 30% was revealed when a scenario of lower levels of diversification was contrasted to one of higher levels. Technical complementarities proved to be important sources of economies. The possibility of reusing nitrogen, phosphorus, and potassium present in animal waste could be increased to 167%, while water reuse could be increased up to 150%. In addition to economic gains, integrated systems bring benefits to the environment, especially with reference to the reuse of resources. The cost dilution of fixed production factors can help economies of scope to be achieved. However, this does not seem to have been the main source of these benefits. Still, the percentage of land use could increase up to 30.7% when the lowest and the highest diversification scenarios were compared. The labor coefficient could have a 4.3 percent increase. Diversification also leads to drastic transaction cost reductions.


Introduction
Technological development, especially from the mid-twentieth century on, has given priority to farm specialization, aiming to increase land, plant, and animal productivity.Within this specialization, there has been a tendency to separate plant and animal production.Though specialization has allowed increased productivity, it has also led to adverse environmental effects and consequently to a greater uncertainty on the economic results of these systems.
More recently, especially from the last decade of the 20th century onwards, concerns about the planet sustainability have generated a series of issues on agricultural production systems (MA, 2005;Lana, 2009;Place and Mitloehner, 2010;Groot et al., 2012;Dumont et al., 2013;Billen et al., 2014).Given the imminent depletion of certain natural resources, resource recycling has become a relevant strategy.The generation of growing volumes of waste without proper destination and treatment is another consequence of this specialization process.
Facing these challenges, integrated systems maintenance logic has regained relevance (Russelle et al., 2007;Herrero et al., 2010;Lassaletta et al., 2014).According to this view, agricultural systems should aim to reduce the use of inputs and non-renewable resources without, however, drastically reducing productivity and profitability over time (Carof et al., 2013).
In the Economic Theory, diversification strategies are especially justified by what Panzar andWillig (1977, 1981) called "economy of scope".Economy of scope is observed when added unit costs of production are lower than when there is separate production.It is therefore possible to justify system integration from an economic point of view due to the alleged presence of economies of scope.However, understanding the intrinsic reasons, which lead to economy of scope, as well as measuring them, has challenged researchers.
This paper proposes the use of linear programming technique on a dairy farm aiming to measure potential economic gains that result from the integration of different activities.
The hypothesis that the adoption of crop and animal integrated production systems on the same farm can generate significant economic gains and reduce environmental impact is assumed.Given the importance of dairy farming to Brazil, and its peculiarity of being integrated to crop production systems, this activity was chosen for the empirical study, to which a theoretical model was applied and tested.

Material and Methods
Linear programming is one of the main Operations Research techniques (Hillier and Lieberman, 2014).The mathematical model usually consists of linear equations and/or inequalities.There is a linear objective function that is optimized (maximized or minimized) which is subject to a set of constraints.Generically, a linear programming model applied to farm planning is represented by: maximize z = c' x subject to Ax ≤ b; x ≤ 0, in which z represents farm profit; c is the net profit row vector for each activity; x is the column vector of the quantities of each candidate activity; A is the technical coefficient matrix; and b, the column vector of resources (inputs) available on the farm.The technique allows the definition of x variables to ensure maximum z value, observing all constraints.The specific model used in this paper is shown at the end of the Material and Methods section.
To estimate the effects of economies of scope obtained by crop-livestock integration, the mathematical model was applied to a representative database of a commercial farm ("Sítio do Cedro").The farm is located in the municipality of Carmo do Paranaíba, Minas Gerais State,Brazil (19º03.815'S,46º12.548'W).A team of trained researchers collected field data between 2009 and 2010.
The farm comprises 62.5 ha for crops, 22.1 of which are irrigated by a sprinkler system already installed; another 32 ha are arable and can be used for non-irrigated crops.The remaining 8.4 ha are cultivated with tifton pasture in which there are paddocks for young animals.The farm also includes facilities such as stables and roads, as well as a legal forest reserve and permanent preservation.
The main farm activity is raw milk production from purebred Holstein cows.Other products include culled and young animals, corn, and soybeans.The basic animal nutrition is the "complete diet", which consists of forage and concentrate supplied together in the manger.The farm also provides grazing paddocks to allow animals more space and comfort.The milking facility has a capacity of 154 dairy cows.
The main purpose of the model is to define the amount of each candidate production activity that can optimize the system as a whole, maximizing the sum of the monthly operational profit in the planning period considered.
Operating profit refers to the difference between the total revenue of the farm and the sum of all variable and fixed costs, except for return on capital, the owner's wages, and land opportunity.
For crops, the physical unit of variables is the hectare (land area of 10,000 m 2 ).For livestock, the physical unit is the animal itself (the individual).For both crops and number of animals, variables are considered continuous, so that model processing and economic gain estimate are not compromised.
The most usual crops on the farm are: alfalfa (Medicago sativa L.) for silage; sugar cane (Saccharum officinarum L.) for natural forage (chopped cane) and silage; summer (dry) and winter (irrigated) maize (Zea mays L.) for both silage and grain; sorghum (Sorghum bicolor L. Moench) for silage; tifton grass (Cynodon spp.) for grazing and silage; and soybeans (Glycine max L.) for grain.The animals are classified into categories according to age, sex, and productive status (reposition, marketing, and culling).
The month is used as a reference unit, and a total period of 60 months (5 years) is proposed.The use of the month as a time unit is justified by the possibility of allocating activities over time more accurately, especially with respect to crop cycles.Another reason is the possibility of representing some financial expenses and acquisitions that are held monthly, as the payroll of employees and the purchase of inputs.In addition, the model uses specific historical monthly average prices which show some significant production differences throughout the year, especially production seasonality-associated factors.Both input and product marketing candidates have seasonal prices; therefore, this difference may influence purchase decision at specific times.
The animals are fed either farm or market inputs, depending on availability and cost.Animal diet consists of: farm products only, namely alfalfa silage, sugar cane silage, sorghum silage, tifton silage, and pasture; either farm-produced or market-acquired foods such as corn silage, corn grain, soybeans, and soybean meal; and strictly market-purchased foods, like cotton seed, citrus pulp, and minerals.Animal nutritional requirements must be met in five categories: dry matter intake, crude protein, metabolizable energy, water, and minerals.
Three types of nutrients -nitrogen (N), phosphorus (P), and potassium (K) -are used as crop fertilizer.These nutrients are obtained either from commercial fertilizers (urea, superphosphate, and potassium chloride) or animal waste produced on the farm, which may be natural (solid manure) or processed by a digester (liquid manure).
The farm sells milk, calves, heifers, young bulls, cull cows, soybeans, and corn grain.The amount sold of each product is also an endogenous variable.
The farm can exchange soybean grain for soybean meal at a specific exchange rate percentage.When soybeans are produced, the farm can choose to either sell the grain or exchange it for meal.Thus, in practical terms, it is as if the farm also produced soy meal.
The model takes into consideration logistic costs, represented by transportation costs.There are costs associated with the sale of products, the purchase of inputs, distribution of manure to crops and distribution of animal feed.The model also considers external logistics costs, which are related to the acquisition of supplies in the market and the distribution of inputs; internal logistic costs are those associated with animal feed distribution and animal manure distribution in the fields.
Monthly variable crop costs are related to seeds, chemical pesticides and diesel fuel for mechanical operations.For animals, costs are calculated at 12-month intervals (1-year cycles) and distributed into months.In this case, the cost variable comprises semen used for insemination (of cows and heifers), vaccines, and veterinary drugs.Fertilization costs and animal feed are computed separately because they are endogenous variables, thus not being variable cost parameters.Fixed monthly costs comprise electricity, annual fees, depreciation of capital goods, and farm management.
Labor needed for different operations with vegetable crops, animals, fertilizer distribution, and manure distribution is defined by time units (hours of work).This need must be met through the availability of personnel and their working hours.
The water demand of the system consists of water for livestock watering, milking facility cleaning, and crop irrigation.
The mathematical optimization model was implemented in the General Algebraic Modeling System version 24.2.1 and solved by the CPLEX.
Agricultural activity diversification effects were estimated based on the variables obtained from the results of the optimization model.The model was processed nine times considering the productive activity options on the farm.Each time an additional plant production activity was inserted so as to obtain a set of results starting from a specialized system (animal production only) and going on to more diversified ones (one, two, three crops, etc.) until the system with the largest possible number of production activities was obtained.Therefore, nine scenarios representative of specific sets of activities represented by Sn, in which "n" refers to the number of activities carried out on the farm, were analyzed.Thus S2, for example, represents a scenario of two possible production activities, and so on.The scenarios are divided into S1 (animals only), S2 (S1 plus summer maize), S3 (S2 plus winter maize), S4 (S3 plus chopped sugar cane), S5 (S4 plus sugar cane silage), S6 (S5 plus sorghum), S7 (S6 plus tifton silage), S8 (S7 plus alfalfa silage), and S9 (S8 plus soybeans).
To perform the analysis, the following organization of the indicators was proposed: General economic effects of integration -The following indicators for the analysis of overall effects were obtained: Average Monthly Operating Profit: the average monthly operating profit in scenario n; Monthly Average Cost: the average monthly total cost in scenario n; Total Milk Production: the total volume of milk produced in the period considered in scenario n; Total Silage and Fodder Production: the total volume of silage and forage produced in the period considered in scenario n; and Total Grain Production: the total amount of grain produced in the period considered in scenario n.
Effects of local cost technical complementarities -They were considered as suggested by Baumol et al. (1982), Gorman (1985), Leathers (1992), and Chavas and Kim (2007).For the calculation of technical complementarities associated with nutrient reuse, the total volume of animal waste produced throughout the time horizon and applied to vegetable crops in its two forms, solid (fresh manure) and liquid (slurry), had to be obtained.The following indicators for the analysis of complementarities effects were analyzed: Total Nitrogen Complementation: the amount of nitrogen contained in animal waste that is used in the fertilization of crops in the period considered in scenario n; Total Phosphorus Complementation; Total Potassium Complementation; and Total Fertigation Complementation: the volume of water and manure applied to crops in the period considered in scenario n.
Effects of fixed cost presence -As suggested by Baumol et al. (1982), Gorman (1985), and Chavas and Kim (2007).The following indicators for fixed cost presence analysis were considered: Labor Availability Use: the percentage of labor available for productive activities in the period considered in scenario n; Land Availability Use: the percentage of land available for productive activities in the period considered in scenario n; Irrigation System Availability Use: the percentage of irrigation system available for productive activities in the period considered in scenario n; and Milking Structure Availability Use: the percentage of milking structure available for productive activities in the period considered in scenario n.
Effects of transaction logistics costs -As suggested by Teece (1982).To analyze the effects of logistics costs on the diversification of activities, a comparison of selected indicators for the obtained scenarios, calculated in accordance with the methods mentioned earlier in relation to the same indicators obtained from the respective scenarios, and taking for granted the hypothesis of zero logistics costs for inputs acquired on the market (animal feed and plant fertilizer), was proposed.It was expected that in scenarios with no logistical costs -here representative of transaction costs -market purchases would gain competitiveness, thus creating a trend of increased volumes purchased at the expense of local production.Similarly, the presence of transaction costs (logistics) should encourage diversification of activities, so as to economize from the local production of necessary inputs.
Parameters: rpr pt -revenue of product p sold in the market in period t; cct ct -variable cost of production for crop c in period t; act a -variable cost of production for herd category a in period t; wpr -price of water used on the farm; gct gt -price & logistic costs (P&LC) of feed ingredient g purchased in the market in period t; laf ag -logistic cost for feed herd category a with ingredient g; fct ft -P&LC of fertilizer f purchased in the market in period t; lcm cm -logistic cost of manure m supplied to crop c; cpr t -carbon price in period t; gcont gr -nutritional content of nutrient r in feed ingredient g; areq ar -minimum nutritional compound r required by herd category a; cropcv cg -conversion index of crop c into feed ingredient g; cropyld c -agricultural yield of crop c; harv ct -possible harvesting period t for crop c if previously cultivated; area ct -land occupation possibility of crop c in period t; area -total acreage available on the farm; apyld ap -production yield of product p from herd category a; al a -required labor to handle herd category a -excepted feeding labor; cl c -required labor to cultivate crop c; fl ag -required labor to feed herd category a with ingredient g; cml cm -required labor to apply manure m in crop c; labor -total labor available on the farm; muyld am -production of manure m by herd category a; cropnd cnt -fertilizer nutrient n required by crop c in period t; fnc fn -fertilizer nutrient n content in commercial fertilizer f; mnc mn -fertilizer nutrient n content in manure m; ea a -CO 2 emission by herd category a; ep p -CO 2 emission due to logistic activities to sell product p in the market; ef f -CO 2 emission due to logistic activities to acquire fertilizer f; egm g -CO 2 emission due to commercial ingredient g acquisition; egp g -CO 2 emission due to production of ingredient g on the farm; egf ag -CO 2 emission due to logistic activities to feed herd category a with ingredient g; emi m -CO 2 emission due to manure m storage; eml cm -CO 2 emission due to application of manure m in crop c; sqc c -CO 2 sequestration by crop c; war a -required water by herd category a; wci c -required water to irrigate crop c; a -subset of the periods t in which land occupation is possible; addcosts -additional fixed costs (depreciation, energy, taxes, etc.).

Variables:
Z -financial result (operating profit) of farm along the planning horizon; PROD pt -amount of product p sold in period t; CROP ct -acreage of crop c cultivated in period t; XA at -number of animals in herd category a in period t; WCON t -water consumed on the farm in period t; FEDM gt -feed ingredient g purchased in the market in period t; FETM ft -commercial fertilizer f purchased in the market in period t; FETU cmt -manure m supplied to crop c in period t; CO 2 B t -CO 2 -equivalent balance due to all farm activities in period t; FEED agt -feed ingredient g provided to herd category a in period t; FEDP gt -feed ingredient g produced on the farm in period t; FEDI gt -feed ingredient g inventory in period t; MANI mt -manure m inventory in period t.

Results
As a rule in optimization issues, the reality of the modeled situation is initially contrasted to the result obtained from the processing of the proposed model.For such, the scenario in which all productive activities were allowed to be elected (S9) was used (Table 1).
Labor and land are usually fixed factors in an agricultural production system, which is the case of the proposed model.
For each relevant scenario, indicators for logistics cost situations (representing reality) as well as for situations without logistical costs (representing a comparative hypothetical situation) were calculated.

Discussion
The first relevant observation is the impossibility of economic viability on the farm in scenarios 1, 2, and 3; that is, it would not be economically viable to maintain milk production alone, or this scenario added to summer corn (S2), or to irrigated maize (S3).Only after adding sugar cane production for animal feed (S4) would the system be economically viable.Thus, it can be concluded that diversification in dairy cattle production is not only a strategy to obtain technical and economic advantages, but also a necessary condition for their development.
Operational gains are observed to grow as new agricultural activities are inserted into the production system, except for sorghum, which was not recommended by the model (S6) (Table 2).By comparing S9 (most diversified) with S4 (least diversified) operational profits, a 71% reduction was obtained.
Results associated with total production costs were similar, though they showed a slight heterogeneity.In fact, S9 showed the lowest monthly average cost.As a candidate crop plant was excluded from the possibility of production, there was a higher cost tendency.For example, in spite of the fact that S4 had a lower cost than S5, the latter still showed higher profit.Similarly, S7 had a lower cost than S8, but also showed lower profit.Thus, there is an indication  that production costs alone would be enough to analyze profit rather than the effect of activity diversification, since there are a number of other relationships between activities which can positively compensate for slightly higher costs.The total cost technical complementarity is considered to be one of the main sources of scope economy, as discussed in the literature review and as advocated originally by Baumol et al. (1982).
In an attempt to understand the origins of this complementarity, nutrient cycling is a possibility suggested by model results (Table 3).Nitrogen is shown to have greatest reuse, followed by potassium and phosphorous.Considering these three elements, the greater the production diversification, the greater their complementation volume.A direct consequence of this is the reduction in foreign purchases of commercial fertilizers by the farm.In scenario 9, for example, during the five-year study period, the farm could have saved just over 155 t of fertilizer, which is a very significant figure.
The greater reuse of chemical nutrients from scenario 6 to scenario 7 (S6 → S7) is also worth mentioning.The inclusion of tifton silage (S7) and alfalfa silage (S8), both of them irrigated crops, explains the increased possibility of reusing waste by the fertigation system, which shows significantly lower logistics costs, allowing greater, more economic reuse of these nutrients.
The use of an irrigation system, in addition to providing better utilization of liquid animal waste, also provides better use of the water resource itself, which is critical to plant productivity.Following similar reasoning, diversification  by the use of irrigated crops provides greater reuse of water from the milking facility washing system to crop irrigation.Again, a significant increase can be observed when there is a migration from scenarios S4, S5, and S6 to S7, S8, and S9 due to a greater use of the irrigation system.Irrigated crops, besides showing significantly higher productivity, allow production throughout the year, including the dry season, ensuring a more constant supply of forage, with very positive consequences for animal production.Thus, this second form of supplementation could be an important source of economies of scope for the modeled system.The complementarity of local costs generated by highly technological issues is an important reason to seek economies of scope in diversified production systems.The original studies of Baumol et al. (1982) are therefore quite applicable.Gormam (1985) also emphasized the role of complementarities.Leathers (1992) went even further, not only by strengthening the role of technical complementarities as economy of scope pillars, but also by proposing the relaxation of the fixed cost dilution hypothesis as a necessary condition for the observation of economies of scope.The issue of the presence of fixed costs is to be discussed next.
The economy of scope theory had its origin in the assumption that a combination of two or more productive activities at the same unit could dilute their fixed costs (Clark, 1923;Clemens, 1951), as discussed before.
The results showed that the labor factor percentage ranged between 80.2% and 87.5% for the different scenarios, without a clear trend, so one cannot state that a greater activity diversification resulted in an increased use of this production factor (Table 4).Apparently, this effect was due fact that he had conducted long-term farm studies, which, by definition, did not contemplate the presence of fixed production factors.
In this study, though developed in the short term (in which there was the presence of fixed factors and, consequently, fixed costs), an ambiguous effect of such factors on the economy of scope was also observed.Factors such as labor, which shows some flexibility of reallocation between activities, will not necessarily be more intensively used in the face of increased diversification possibility.In other words, in less diverse systems, labor can be intensively used, even as a compensation for technical inefficiencies that might come along with diversification.
The suggested hypothesis was that in scenarios without transaction costs -here represented empirically by transport logistics costs -market purchasing could gain competitiveness, creating a trend of increased volumes purchased at the expense of local production, that is, specialization would be encouraged as opposed to diversification.
In all scenarios, a slight increase in milk production could be observed (Table 5).Because it is the main farm product, the elimination of logistics costs of animal food supplies and plant fertilizers can save expenses, thus allowing an increase in milk production.
In the case of silage and fodder, except for scenarios 4 and 9, there was a slight reduction in production (meaning reduction in plant activity diversification) as logistics costs were eliminated, possibly signaling that transaction costs did stimulate local diversification.Scenario 4 showed the smallest level of diversification, which may be accounted for the almost non-existent effect on the production of fodder and silage.In S9 (Table 5), the small increase in the production of these supplements was due to a reduction in grain production (more specifically soybeans), so that to the fact that labor, as conceived in the model, is a flexible production factor that can be used for different activities.Thus, when changing from a less diversified system into a more diversified one, there is plainly a reallocation factor for the different activities, which does not necessarily allow higher use.
On the other hand, land factor results were higher as activity diversification increased.Greatest diversification occurred when crops that implied greater need for land were used, to the detriment of animal activities which, because of the production management on the farm, are less intensive.Another fixed production factor analyzed was the irrigation system, which met a predetermined maximum area of land.
The results showed that greater diversity implied greater use of the system, and this was especially true for irrigated crops, which are more productive.Therefore, there is a similar effect to that of land, as previously discussed.
Another fixed factor considered in the analysis was the milking system, represented by the physical structure of the facility, milking, and milk cooling system, among others.This factor is directly related to the number of dairy cows and therefore to animal activity.Greater diversification resulted in smaller milking system use, since there is allocation of other factors to more promising plant activities at the expense of animal production, thus generating a milking capacity surplus.
The effect of activity diversification on fixed costs should be considered cautiously, since there are fixed factors associated with different activities which will have fullest use if such activities are prioritized.On the other hand, more flexible factors can be freely reallocated between activities without necessarily increasing their use, but rather redistributing them.
The empirical results obtained in this study are compliant with the evolution of thinking on the reasons for the need of economies of scope.Although intuitively there is strong predisposition to believe in the dilution of production fixed factor costs as production is diversified, empirical results do not always point in that direction.Despite having proposed the local cost complementarity as a source of economy of scope, Baumol et al. (1982) also did so for fixed costs.Gormam (1985) further reinforced the role of fixed costs by saying that their effect could eventually compensate for local cost anti-complementarities and even so generate economies of scope.Leathers (1992) may have been the first economist to question the effective contribution of fixed cost dilution as a condition to obtain economies of scope.What prompted this author to question this source of economy was the this scenario also showed a diversification reduction as a result of reduced transaction costs.
The perception of the effect of logistics costs is clearer when variables associated with technical complementarities, represented by the local reuse of nitrogen, phosphorus and potassium, is analyzed.In all scenarios, it could be observed that, as transaction costs were eliminated, there was a reduction in the reuse of these plant nutrients, once the competitiveness obtained by purchasing them externally (in the market) increased.
In the case of water reuse in the fertigation system, there was volume reduction by eliminating S4-to-S7 logistics costs.As to S8 and S9, there was an increased reuse, even when logistics costs were eliminated.The effect on this variable was, therefore, non-uniform.
Thus, it can be concluded that the presence of transaction costs -here represented by transport logistics costs -has a real effect on the diversification of activities trend.This effect can be more clearly observed on technical complementarities through the reuse of plant nutrients derived from animal waste.Consequently, the hypothesis originally proposed by Teece (1982) stating that transaction costs are relevant sources of economies of scope can be accepted, reinforcing the possibility of economic gains through diversification.In other words, the ease of transfer of sharable input can help explain economies of scope.
Local production is a way of saving transfer costs.Specifically in farming, logistics costs to deal with significant volumes of agricultural products, which generally show a low value (price) and physical unit (weight or volume) ratio, are very significant and their economy can be a key strategy to encourage diversification of agricultural activities at the same property.

Conclusions
Optimization models developed from the linear programming technique are relevant tools to assist in the planning and management of agricultural production units, as well as to assist in understanding the complexity and in estimating potential gains from the use of integrated production systems (livestock and crop at the same production unit).The diversification of activities at the same production unit (farm) not only generates significant economic gains but may also be a necessary condition for economic viability.The results indicated a possibility of a total cost reduction of about 30%, when the scenario with lowest diversification (fewest productive activities) was contrasted to the scenario with highest diversification (greatest number of activities).Technical complementarities developed between activities, especially those associated with animal raising and crops, are small sources of economies of scope.The possibility of total reuse of the nitrogen, phosphorus, and potassium present in animal waste could rise by 167% from the lowest to the highest diversification scenario; reuse of milking water for milking cleaning and fertigation could be risen up to 150%.In addition to economic gains, the use of integrated systems is beneficial to the environment, especially through the reuse of resources that, if otherwise discarded, would cause negative environmental externalities.The dilution of the fixed costs of some production factors can contribute to achieving economies of scope, but does not appear to be the main source of such benefits, at least in production systems where there is reallocation flexibility of such factors to different activities, especially land and labor.Still, the percentage of land use would increase by 30.7% from the lowest to the highest diversification scenario.For the labor factor, there would be a 4.3% variation.The presence of transaction costs -represented in this research by the logistics costs of agricultural input supplies -is another factor that contributes to the choice of diversified production systems.The option for integrated and diversified production systems enables the reduction of transaction costs, thus contributing to economies of scope.

Table 1 -
Comparison of original (real) profile of the farm with the optimized one (scenario S9)

Table 2 -
Monthly average operating profit (Profit), monthly average cost (Cost), total milk production in 60 months (Milk), silage and fodder total production in 60 months (Feed), and total grain production in 60 months (Grain) for the scenarios

Table 4 -
Percentage of use of work, land and irrigation and milking systems

Table 5 -
Comparison between indicators for scenario S9 considering the presence or absence of logistic costs for the purchase of animal feed and fertilizers on the market