SciELO - Scientific Electronic Library Online

vol.45 issue2Effects of polymer coated slow-release urea on ruminal fermentation and nutrient total tract digestion of beef steers author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand



  • text new page (beta)
  • English (pdf)
  • Article in xml format
  • How to cite this article
  • SciELO Analytics
  • Curriculum ScienTI
  • Automatic translation


Related links


Revista Brasileira de Zootecnia

On-line version ISSN 1806-9290

R. Bras. Zootec. vol.45 no.2 Viçosa Feb. 2016 


Simulation of diets for dairy goats and growing doelings using nonlinear optimization procedures

Leonardo Siqueira Glória1 

Matheus Lima Corrêa Abreu2 

Norberto Silva Rocha3 

Tadeu Silva de Oliveira4 

Raphael dos Santos Gomes2 

Nardele Moreno Rohem Júnior2 

Laila Cecília Ramos Bendia2 

Alberto Magno Fernandes4 

1 Universidade Federal de Viçosa, Programa de Pós-graduação em Genética e Melhoramento, Viçosa, MG, Brasil.

2 Universidade Estadual do Norte Fluminense Darcy Ribeiro, Programa de Pós-graduação em Ciência Animal, Campos dos Goytacazes, RJ, Brasil.

3 Universidade Federal dos Vales do Jequitinhonha e Mucuri, Departamento de Zootecnia, Unaí, MG, Brasil.

4Universidade Estadual do Norte Fluminense Darcy Ribeiro, Laboratório de Zootecnia, Campos dos Goytacazes, RJ, Brasil.


The objective of this study was to simulate total dry matter intake and cost of diets optimized by nonlinear programming to meet the nutritional requirements of dairy does and growing doelings. The mathematical model was programmed in a Microsoft Excel(r) spreadsheet. Increasing values of body mass and average daily weight gain for growing doelings and increasing body mass values and milk yield for dairy does were used as inputs for optimizations. Three objective functions were considered: minimization of the dietary cost, dry matter intake maximization, and maximization of the efficiency of use of the ingested crude protein. To solve the proposed problems we used the Excel(r) Solver(r) algorithm. The Excel(r) Solver(r) was able to balance diets containing different objective functions and provided different spaces of feasible solutions. The best solutions are obtained by least-cost formulations; the other two objective functions, namely maximize dry matter intake and maximize crude protein use, do not produce favorable diets in terms of costs.

Key Words: decision support system; diet formulation; diet optimization; goat nutrition


Feeding is one of the most important components of the livestock activity. The productive animal must be fed properly to express its genetic potential, and feeding represents a high proportion of the total production costs. In two small dairy goat production systems in North-western Rio de Janeiro State, Brazil, 41 to 73% of the total effective operating costs consisted of concentrates (Vieira et al., 2009). Least-cost optimization procedures are used to find the most suited combination of foods that meets animal requirements (Agrawal and Heady, 1972). Linear programming tools generally able to solve the problem of diet formulation, such as the Simplex method (Agrawal and Heady, 1972; Tedeschi et al., 2000). Nevertheless, the complexity of the animal physiology and the interactions among the food eaten and digestive and metabolic processes that occur in the animal organism (Dijkstra et al., 2005) demand the use of nonlinear programming to obtain more accurate diet formulations (Jardim et al., 2013; 2015).

Nonlinear programming can be used to simulate scenarios from input data (De Los Campos et al., 2013). On the other hand, simulation studies can be used to predict specific virtual situations before making decisions or to improve our understanding of certain phenomena. From this perspective, the aim of this study was to simulate scenarios where three objective functions were optimized: least-cost of diets were minimized, dry matter intake of simulated diets were maximized, and ratios of metabolizable protein intake to crude protein intake were maximized. These problems were considered as general nonlinear programming problems, in which target performances and nutritional requirements of dairy does and growing doelings and usual dairy goat feeds were used as inputs.

Material and Methods

The Microsoft Excel(r) spreadsheet was used to program a mathematical model that combines the conceptual and mathematical structures of the CNCPS - Cornell Net Carbohydrate and Protein System (Fox et al., 2004) to estimate nutritive value of feeds, and the NRC (2007) equations to calculate nutrient requirement of growing doelings and lactating does. The steady-state pool size and digestibility of fiber in the ruminoreticulum were modeled according to Vieira et al. (2008a,b). Acronyms and symbols used in equations that describe the system are listed in Tables 1 and 2.

Table 1 Definitions of symbols and acronyms used in the text1 

Table 2 Equations and variables used in the simulation to estimate the nutritive value of feeds. Acronyms are listed in Table 1.  

The diets for growing doelings and lactating does were formulated as a general nonlinear programming problem subjected to constraints of equalities and inequalities. Three different problems were optimized by considering three different objective functions separately:

The objective function Z (Eq. 1) is represented by the linear combination of constant ci, i.e., the unitary dry matter cost of the i-th ingredient; xi represents the unknown dry matter intake of the i-th ingredient. The objective function W (Eq. 2) is the total dry matter intake, and the objective function K (Eq. 3) is the proportion of the crude protein ingested (CPI) transformed into metabolizable protein; MEI and MPI are the intakes of metabolizable energy (MJ/day) and metabolizable protein (g/day) intakes, respectively; MEt is the metabolizable energy required (MJ/day); and MPt is the metabolizable protein required (g/day; Table 3). The term RFMmax corresponds to the maximum fiber retention capacity of the rumen (g/day); EFI is the effective fiber concentration of the diet (g/kg of dry matter); and FIj is the fiber increment added to the minimum fiber content set (200 g/kg of dry matter). FIj values were increased successively by adding 50 g/kg of dry matter constant increments to the minimum concentration of effective fiber for dairy does, and 25 g/kg of dry matter constant increments for growing doelings until feasible solutions were no longer achieved.

Table 3 Equations used in simulations to compute nutritional requirements1 

1 All symbols and acronyms are based on definitions of AFRC (1993).

Constraints to the use of urea were also added. It is recommended that the urea supply should not exceed 40 g per 100 kg of body weight (BW), and two hypothetical situations were considered to balance rumen ammonia nitrogen (RANB, g/d):

RANB ≥ 0 (8)

or RANB ≥ −200 (9)

The RANB is a relationship between ammonia and carbohydrates available to the rumen microorganisms (Russel et al., 1992; AFRC, 1993; Fox, 2004). In addition, a maximum limit of 50 g/kg of diet dry matter for crude fat concentration was set for all simulations (NRC, 2001).

Simulations for growing doelings were made by varying the mass of the animal from 17 to 35 kg of BW with 3 kg BW increments. The diets were optimized to meet maintenance requirements and nutrient demands generated by daily weight gains ranging from 0 to 150 g/day, with 25 g/day constant increments. The simulations for lactating does were made by varying the weight of the animal from 50 to 80 kg with 5 kg BW increments, and milk production ranging from 2 to 9 kg/day with 0.5 kg/day increments.

We solved the presented problems by using the Excel(r) Solver(r) spreadsheet. This tool uses a generalized reduced gradient algorithm to optimize nonlinear problems (Lasdon et al., 1978).

The prices of the feed ingredients used in the model (Table 4) were taken in December 2010, as current market prices in the northern and northwestern regions of Rio de Janeiro State. The nutritional composition of the feeds was obtained from tables contained in CNCPS (Sniffen et al., 1992), Nutrient Requirements of Beef Cattle (NRC, 1996), and Nutrient Requirements of Dairy Cattle (NRC, 2001).

Table 4 Prices1, chemical composition, digestion and passage parameters, and physical effectiveness of fiber of each feed ingredient2,3 

1 Brazilian currency R$ 1.00 = US$ 0.64 in July, 2011; and R$ 1.00 = US$ 0.32 in July, 2015.

2 The subscript i denotes the i-th feed ingredient.

3 See Table 1 for definitions of symbols and acronyms.

4 High values indicate that λr " ke.


The Excel(r) Solver(r) was efficient to obtain feasible solutions to the proposed problems. Simulations with increments for daily gain and milk yield resulted in positive linear relationships between production levels and MEI, and production levels and MPI (Figures 1a, 1b, 1c and 1d). Sometimes, the space of feasible solutions differed remarkably. However, the increments in the fiber content of the diet caused an increased dry matter intake until a maximum point was achieved. Afterwards, a sharp decrease in the solution space was observed at higher fiber concentrations in the diet (Figures 1e and 1f). The number of feasible solutions was higher for fiber contents ≤500 g/kg of diet dry matter for lactating does (Figure 1e). However, for growing doelings, only the level of 725 g/kg of fiber in the diet reduced the space of feasible solutions considerably (Figure 1f).

Figure 1 Metabolizable energy intake (MEI, MJ/d) in relation to milk yield (MY, kg/d) (1a); metabolizable protein intake (MPI, g/d) in relation to MY( kg/d) (1b); MEI (MJ/d) in relation to average daily gain (ADG, g/d) (1c); MPI (g/d) in relation to ADG (g/d) (1d); dry matter intake (DMI, g/kg0.75 per day) in relation to diet fiber content (NDF) for dairy goat (g/kg) (1e); DMI (g/kg0.75 per day) in relation to NDF for growing goat (g/kg) (1f). 

The optimization for maximum dry matter intake, i.e., objective function W or Eq. 2, resulted in more expensive diets for growing doelings in comparison with the other objective functions (Figure 2a). The maximization of the crude protein utilization or objective function K (Eq. 3, Figure 2b) produced diets with intermediate costs and, obviously, the minimum cost optimization (objective function Z, Eq. 1) was the most efficient objective function to minimize diet costs (Figure 2c). For all simulations, the increase in the production performance (milk yield or daily gain) increased diet costs (Figures 2 and 3). The RANB constraints (RANB ≥ 0 and RANB ≥ −200) did not influence the cost of the diets (Figures 3a, 3b, 3c and 3d). The space of feasible solutions was insensitive to the RANB constraint, and although the dietary cost increased with more challenging performance levels, the same solution space can be observed by comparing Figure 3a with 3b for milk yield, and Figure 3c with 3d for average daily gain.

Figure 2 Diet costs (R$) in relation to average daily gain (kg/d), using maximum intake as the objective function (2a); using maximum efficiency of utilization of crude protein as the objective function (2b); and using minimum cost as the objective function (2c). 

Figure 3 Diet costs (R$) in relation to milk yield (kg/d) using RANB ≥ 0 (3a); in relation to milk yield (kg/d) using RANB ≥ -200 (3b); in relation to average daily gain (kg/d) using RANB ≥ 0 (3c); and in relation to average daily gain (kg/d) using RANB ≥ -200 (3d). 


Linear optimization systems require an estimate of the dry matter intake as an input to solve the problem of least-cost diets (Tedeschi et al., 2000). However, the nonlinear nature of diet formulation is characterized by the interdependence between animal requirements and the food consumed (Jardim et al., 2013; 2015).Therefore, the solution or the optimized diet and its expected dry matter intake influences the values of the components of the constraints. In the model proposed in this study, intake is an output of the nonlinear optimization procedure.

The metabolizable protein and metabolizable energy intakes increase as animal production increases, because of higher demands for nutrients generated by growth, milk yield, and pregnancy (NRC, 2007). However, dry matter intake has a physical limit, imposed by the dietary fiber content, and the maximal capacity of fiber retention in the rumen (Mertens, 1994; Vieira et al., 2008b). The rumen size limits animal capacity due to fill, and because fiber generally passes from the reticulorumen more slowly, it has a great filling effect because of the distension it causes in rumen walls (Allen, 1996). The simulations with higher fiber content in the diet limits the space of feasible solutions (Figures 1e and 1f). According to Mertens (1987), higher milk productions constrain the fiber content in dairy cow diets, and this was observed here for dairy does diets (Gonçalves et al., 2001).

Speculations are made about the advantage of maximizing the dry matter intake of farm animals. Mertens (1987) developed simple mathematical models that can be used to predict maximum intake. However, simulations in which maximum dry matter intake was set as the objective function (Eq. 2) resulted in more expensive diets (Figure 2). The feedstuffs used as protein sources are, generally, more expensive than energy sources and, for this reason, simulations used to maximize protein utilization efficiency were made (Eq. 3). Nevertheless, the cost of protein-optimized diets using Eq. 3 as the objective function resulted in intermediary dietary costs (Figure 3). Least-cost diet formulation (Eq. 1) was the most effective procedure to reduce the cost of the diet under the same dietary constraints (Figure 3).

The rumen microorganisms can synthesize protein from non-protein nitrogen and ammonia is the main source of nitrogen for microbial protein synthesis (Russel et al., 1992). The amount of ruminal ammonia nitrogen can be estimated by the sum of endogenous nitrogen recycling with nitrogen originated from degradation of dietary protein and dietary non-protein nitrogen, and by discounting nitrogen retained by bacteria (Russel et al., 1992; Vieira et al., 2000a,c). The RANB indicates if rumen ammonia nitrogen is adequate to meet bacterial requirements. A positive RANB is essential to maximize ruminal degradation of the feed (Leng, 1990), and so, nitrogen deficiency decreases carbohydrate fermentation and the growth rate of fiber fermenting bacteria like F. succinogenes that become unable to ferment cellobiose if RANB < 0 (Maglione and Russel, 1997). The scenario in which RANB < 0 occurs in tropical pastures, specifically in the dry season, when the forage nutritive value and availability are reduced remarkably (Vieira et al. 2000b,c). The constraint expands the space for feasible solutions compared with RANB ≥ −200, which could result in cheaper diets, but the cost of the diets did not differ between these two constraints (Figure 3). The CNCPS fractionation scheme is a useful tool to estimate the nutritive availability of protein and carbohydrate fractions in feeds and has been used to estimate the ruminal availability of protein and carbohydrates of tropical feeds (Cabral et al., 2000).

Dairy goat farming is an important activity that can generate income and wealth for farmers. This activity can produce enough wealth to the succession of the family business, which is an important tool for generating jobs and income (Vieira et al., 2009), mainly in the state of Rio de Janeiro, because of its unique goat milk production systems that favor the development of special products for specific markets (Santos Junior et al., 2008). Therefore, the control of production costs is mandatory. In that sense, nutrition models would assist in the optimization of small ruminant production scenarios (Tedeschi et al., 2010). Among all variables regarding nutrition of ruminants, passage rate estimates affect the utilization of fiber by small ruminants too; therefore, models based on the retention of fiber in the rumen are needed to properly formulate goat diets (Tedeschi et al., 2012; Regadas Filho et al., 2014a,b; Jardim et al., 2013; 2015). In this regard, the simulation of different scenarios could help in the decision-making process and to improve the understanding of the dynamics of goat nutrition and feeding.


The Microsoft Excel(r) Solver(r) allows for the balance of diets for dairy goats and growing doelings using different objective functions. Least-cost formulations provide better solutions in terms of overall costs of the diets than maximization of dry matter intake or crude protein use do. There is no net improvement of maximizing both dry matter intake and efficiency of use of crude protein. The predictions obtained with this model are in accordance with ruminant nutrition theories, and the nonlinear programming problem of the diet can be modeled to simulate different scenarios for decision-making, which is useful for developing strategies for increasing profitability of dairy goat production systems.


The fourth author is grateful for the postdoctoral fellowship provided by the Rio de Janeiro Research Foundation (Fundação Carlos Chagas Filho de Amparo à Pesquisa do Estado do Rio de Janeiro - FAPERJ), document no. E-26/101.429/2014, and the Brazilian Federal Agency for the Support and Evaluation of Graduate Education (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - CAPES), document no. E-45/2013-PAPDRJ.


AFRC - Agricultural and Food Research Council. 1993. Energy and protein requirements of ruminants. CAB International, Walingford. [ Links ]

Agrawal, R. C. and Heady, E. O. 1972. Operations research methods for agricultural decisions. Ames, Iowa State University. [ Links ]

Allen, M. S. 1996. Physical constraints on voluntary intake of forages by ruminants. Journal of Animal Science 74:3063-3075. [ Links ]

Cabral, L. D.; Valadares Filho, S. C.; Malafaia, P. A. M.; Lana, R. P.; Silva, J. F. C.; Vieira, R. A. M. and Pereira, E. S. 2000. Frações protéicas de alimentos tropicais e suas taxas de digestão estimadas pela incubação com proteases ruminais. Revista Brasileira de Zootecnia 29:2316-2324. [ Links ]

De los Campos, G.; Hickey, J. M.; Pong-Wong, R.; Daetwyler, H. D. and Calus, M. P. 2013. Whole-genome regression and prediction methods applied to plant and animal breeding. Genetics 193:327-345. [ Links ]

Dijkstra, J.; Forbes, J. M.; and France, J. 2005. Quantitative aspects of ruminant digestion and metabolism. CABI, Cambridge. [ Links ]

Fox, D. G.; Tedeschi, L. O.; Tylutki, T. P.; Russell, J. B.; Van Amburgh, M. E.; Chase, L. E.; Pell, A. N. and Overton, T. R. 2004. The Cornell Net Carbohydrate and Protein System model for evaluating herd nutrition and nutrient excretion. Animal Feed Science and Technology 112:29-78. [ Links ]

Gonçalves, A. L.; Lana, R. P.; Rodrigues, M. T.; Vieira, R. A. M.; Queiroz, A. C. and Henrique, D. S. 2001. Padrão nictemeral do pH ruminal e comportamento alimentar de cabras leiteiras alimentadas com dietas contendo diferentes relações volumoso:concentrado. Revista Brasileira de Zootecnia 6:1886-1892. [ Links ]

Jardim, J. G.; Vieira, R. A. M.; Fernandes, A. M.; Araujo, R. P.; Glória, L. S., Rohem Júnior, N. M.; Rocha, N. S. and Abreu, M. L. C. 2013. Application of a nonlinear optimization tool to balance diets with constant metabolizability. Livestock Science 158:106-117. [ Links ]

Jardim, J. G.; Vieira, R. A. M.; Fernandes, A. M.; Araujo, R. P.; Glória, L. S.;; Rohem Júnior, N. M. Rocha, N. S. and Abreu, M. L. C. 2015. Corrigendum to "Application of a nonlinear optimization tool to balance diets with constant metabolizability". Livestock Science 173:119-120. [ Links ]

Lasdon, L. S.; Waren, A. D.; Jain, A. and Ratner, M. 1978. Design and testing of a generalized reduced gradient code for nonlinear programming. ACM Transactions on Mathematical Software 4:34-50. [ Links ]

Leng, R. A. 1990. Factors affecting the utilization of "poor-quality" forages by ruminants particularly under tropical conditions. Nutrition Research Reviews 3:277-303. [ Links ]

Maglione, G. and Russell, J. B. 1997. The adverse effect of nitrogen limitation and excess-cellobiose on Fibrobacter succinogenes S85. Applied Microbiology and Biotechnology 48:720-725. [ Links ]

Mertens, D. R. 1987. Predicting intake and digestibility using mathematical models of ruminal function. Journal Animal Science 64:1548-1558. [ Links ]

Mertens, D. R. 1994. Regulation of forage intake. p.450-493. In: Forage quality, evaluation and utilization. Fahey Jr., G. C., ed. The American Society of Agronomy Inc., Crop Science Society of America Inc., and Soil Science Society of America Inc., Madison. [ Links ]

NRC - National Research Council. 1996. Nutrient requirements of beef cattle. 7th ed. National Academy Press, Washington, DC. [ Links ]

NRC - National Research Council. 2001. Nutrient requirements of dairy cattle. 7th ed. National Academy Press, Washington, DC. [ Links ]

NRC - National Research Council. 2007. Nutrient requirements of small ruminants: sheep, goats, cervids, and New World camelids. National Academies Press, Washington, DC. [ Links ]

Regadas Filho, J. G. L.; Tedeschi, L. O.; Cannas, A.; Vieira, R. A. M. and Rodrigues, M. T. 2014a. Using the Small Ruminant Nutrition System to develop and evaluate an alternative approach to estimating the dry matter intake of goats when accounting for ruminal fiber stratification. Journal of Dairy Science 97:7185-7196. [ Links ]

Regadas Filho, J. G. L.; Tedeschi, L. O.; Vieira, R. A. M. and Rodrigues, M. T. 2014b. Assessment of the heterogeneous ruminal fiber pool and development of a mathematical approach for predicting the mean retention time of feeds in goats. Journal of Animal Science 92:1099-1109. [ Links ]

Russell, J. B.; O'Connor, J. D.; Fox, D. G.; Van Soest, P. J. and Sniffen, C. J. 1992. A net carbohydrate and protein system for evaluating cattle diets: I. Ruminal fermentation. Journal of Animal Science 70:3551-3561. [ Links ]

Santos Junior, E.; Vieira, R. A. M.; Henrique, D. S. and Fernandes, A. M. 2008. Characteristics of the dairy goat primary sector at the Rio de Janeiro State, Brazil. Revista Brasileira de Zootecnia 37:773-781. [ Links ]

Sniffen, C. J.; O'Connor, J. D.; Van Soest, P. J.; Fox, D. G. and Russell, J. B. 1992. A net carbohydrate and protein system for evaluating cattle diets: II. Carbohydrate and protein availability. Journal of Animal Science 70:3562-3577. [ Links ]

Tedeschi, L. O.; Cannas, A. and Fox, D. G. 2010. A nutrition mathematical model to account for dietary supply and requirements of energy and other nutrients for domesticated small ruminants: The development and evaluation of the Small Ruminant Nutrition System. Small Ruminant Research 89:174-184. [ Links ]

Tedeschi, L. O.; Cannas, A.; Solaiman, S. G.; Vieira, R. A. M. and Gurung, N. K. 2012. Development and evaluation of empirical equations to predict ruminal fractional passage rate of forages in goats. Journal of Agricultural Science 150:95-107. [ Links ]

Tedeschi, L. O.; Fox, D. G. and Russell, J. B. 2000. Accounting for ruminal deficiencies of nitrogen and branched-chain amino acids in the structure of the Cornell net carbohydrate and protein system. p.224-238. In: Proceedings of Cornell Nutrition Conference for Feed Manufacturers. New York State College of Agriculture & Life Sciences, Cornell University, Rochester. [ Links ]

Vieira, R. A. M.; Cabral, A. J.; Souza, P. M. D.; Fernandes, A. M.; Henrique, D. S. and Real, G. S. C. P. C. 2009. Dairy goat husbandry amongst the household agriculture: herd and economic indexes from a case study in Rio de Janeiro, Brazil. Revista Brasileira de Zootecnia 38:203-213. [ Links ]

Vieira, R. A. M.; Pereira, J. C.; Malafaia, P. A. M.; Queiroz, A. C. and Gonçalves, A. L. 2000a. Fracionamento e cinética de degradação in vitro dos compostos nitrogenados da extrusa de bovinos a pasto. Revista Brasileira de Zootecnia 29:880-888. [ Links ]

Vieira, R. A. M.; Pereira, J. C.; Malafaia, P. A. M.; Queiroz, A. C. and Gonçalves, A. L. 2000b. Fracionamento dos carboidratos e cinética de degradação in vitro da fibra em detergente neutro da extrusa de bovinos a pasto. Revista Brasileira de Zootecnia 29:889-897. [ Links ]

Vieira, R. A. M.; Pereira, J. C.; Malafaia, P. A. M.; Queiroz, A. C.; Jordão, C. P. and Gonçalves, A. L. 2000c. Simulação da dinâmica de nutrientes no trato gastrintestinal: aplicação e validação de um modelo matemático para bovinos a pasto. Revista Brasileira de Zootecnia 29:898-909. [ Links ]

Vieira, R. A. M.; Tedeschi, L. O. and Cannas, A. 2008a. A generalized compartmental model to estimate the fibre mass in the ruminoreticulum: 1. Estimating parameters of digestion. Journal of Theoretical Biology 255:345-356. [ Links ]

Vieira, R. A. M.; Tedeschi, L. O. and Cannas, A. 2008b. A generalized compartmental model to estimate the fibre mass in the ruminoreticulum: 2. Integrating digestion and passage. Journal of Theoretical Biology 255:357-368. [ Links ]

Received: June 19, 2016; Accepted: August 03, 2016

Corresponding author:

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License