Modeling for development of simulation tool: Cattle diet formulation

This paper presents algorithms for simulation tool development to formulate and compute cattle diet at different stages of livestock. Algorithms are proposed for bi-criteria models. The objectives taken are minimization of cost and maximization of the shelf life of animal feed mix. Other objectives achieved by these algorithms are inclusion of nutrient variability in the feed mix and minimization of the deviations. For developing the algorithms, combination of three mathematical programming techniques: linear, stochastic and goal programming is used. Computational and technological interface is included in the field of animal diet formulation by developing the algorithms, which provides better and faster results. Twenty mathematical models are solved by proposed algorithms and obtained results showed superiority of algorithm 2 in terms of nutrient variability whereas algorithm 1 provides better results in terms of lesser cost and more shelf life. Algorithm 3 is taking the two objectives in parallel and providing the optimal feed mix at minimum deviations from the target values of the cost and the shelf life.


Introduction
*Mathematical models have been used for livestock industry for more than a century. Major objectives are maximization of weight gain, milk yield, profit and nutrient utilization. The key to achieve these objectives is to provide nutritionally balanced diet to the animal. To fulfill the nutrient requirement of animal, diet formulation is the basic need of the livestock industry. Animals need different amount of nutrients at different growth stages. Therefore, while formulating the animal diet, different feed ingredients are combined to provide required nutrients to the animal at different stages of growth and production. Animal diet formulation models have been developed for commercial purposes as well as for livestock development. Numerous mathematical programming techniques have been used for animal diet formulation for last many decades.
In 1951, a linear programming model has been used to develop the feeding problem in mathematical form (Waugh, 1951). A paper has been written for fish feed formulation using linear programming technique and results in better productivity as compared to hit and trial method (Nath and Talukdar, 2014). A detailed review article has been presented based on mathematical programming techniques used for animal diet formulation chronologically (Saxena and Chandra, 2011). Another review article for different animal diet formulation techniques has been presented in 2014 (Saxena and Khanna, 2014a). Goal Programming (GP) has been used for formulating nutritionally balanced diet in which one hundred and fifty food raw materials satisfying the daily nutritional requirements of Thais have been used. The diet achieved by GP has shown improvement over conventional Linear Programming (LP) technique (Anderson and Earle, 1983). A paper has been presented in 1984 in which limitations of linear programming for rigidity of constraint set and singularity of objective function was discussed . A paper has been presented in which goal programming technique was used for diet formulation and it showed that GP offers better results over standard LP techniques . A paper has been published in 1987 in which several decision criteria have been considered using the Goal programming technique (Rehman and Romero, 1987). Multicriteria and goal programming have been mixed to obtain blend of feed ingredients (Žgajnar and Kavčič, 2009). A goal programming model has been developed in 2011 to determine an optimal blend of feed ingredients for livestock and is solved by linear programming (Zoran and Tunjo, 2011). The combination of linear programming and weighted goal programming has been used to develop a nonparametric model for the consideration of optimization of multiple goals (Prišenk et al., 2013a). In 2013, the optimization of feed rations for active and trained sport horses has been done with the help of weighted goal programming in which two different sub-models have been developed, the first sub-model is based on the linear programming (LP) technique and the second is based on weighted-goal programming (WGP). The results showed that the ration was approximately 10% cheaper without surpluses of any of the nutrient (Prišenk et al., 2013b). A nonlinear programming model has been developed for weight gain in sheep (Saxena, 2006). Comparison of linear and nonlinear programming techniques for animal diet formulation has been discussed (Saxena, 2011). Linear, Stochastic and goal programming has been combined in a paper for optimizing dairy cow ration at minimum cost and maximum shelf life (Saxena and Khanna, 2015a). Weighted goal programming has been used to optimize dairy cow ration at different stages of livestock (Saxena and Khanna, 2015b). Linear and stochastic programming techniques were used for incorporation of nutrient variability in animal diet formulation (Tozer, 2000).
A paper has been presented to minimize the adverse effects of the over achievement of certain nutrient ingredients (Saxena and Khanna, 2014b). Nonlinear programming has been used for obtaining balanced feed mix for dairy cow at minimum cost along with the objective of better shelf life (Saxena and Khanna, 2015c). An iterative multi objective optimization method has been used to control the over-or under-formulation of the animal feed mix as both have adverse effects in terms of cost, performance of the animal and overall reproductively (Abayomi et al., 2016). Linear programming algorithm has been used in a web application to find the minimum cost involved in poultry feeding (Hasan et al., 2015). A mixed integer linear programming model has been developed and is coded using object-oriented programming language C# (Sahman et al., 2015). Dairy cattle have different requirements for nutritional values of feed blend at different stages of prepuberty, puberty, lactation, breeding and gestation (NRC, 2001).
In the available literature a number of problems have been solved and objectives have been achieved using linear programming. Few objectives have also been achieved using goal programming. In this paper a technique is proposed to achieve the objectives of cost minimization and shelf life maximization including nutrient variability by using nonlinear programming. This approach provides better results as it overcome the rigidity of linear constraints. It provides more reliable results being based on combination of linear, stochastic and goal programming. The algorithms fasten the procedure of obtaining the results as compared to the conventional methods. The literature available has the application of mathematical programming to various objectives of animal diet formulation but technological advancement is still not approachable up to the desired level. This paper develops algorithm for the technological intervention in the field of animal diet formulation. In this paper, three algorithms are developed for minimization of cost and maximization of the shelf life of feed mix to achieve different weight stages. These algorithms determine optimum values of feed components to achieve these two objectives. After achieving both of these objectives, algorithm is developed to minimize the deviations for achieved goals. This algorithm improves the obtained results from the previously developed algorithms. After developing the algorithms numerical verification of the results is done with the help of dairy cattle data. Numerical example is discussed in detail to illustrate the working of algorithm which shows that this algorithmic approach for getting results is more systematic, easy to use and involves less time and higher gains. Hence this technical intervention of algorithmic approach gives an efficient method of formulating animal diet for more sustainable dairy industry.

Material and methods
To develop the algorithms, mathematical models are formulated using linear, stochastic and goal programming techniques. Following notations are used for mathematical modeling: Z objective function, per unit cost of feed ingredient j, quantity of jth feed ingredient in the feed mix, amount of nutrient i available in the feed ingredient j, minimum requirement of ith nutrient, i index identifying nutrient components with i = 1, 2, ..., m, j index identifying feed ingredients with j =1, 2, …, n.
The first algorithm (Algorithm 1) is developed to achieve the objective of obtaining a diet at minimum cost at different stages of livestock. Algorithm 1 calculates optimum value of feed ingredients to obtain feed mix at minimum cost. This algorithm (Algorithm 1) also achieves the second objective of obtaining a feed blend with maximum shelf life by changing the coefficient values of the objective function. This objective will be achieved by reducing the water content of feed mix. Mathematical model for cost and water content minimization is given below (Eq. 1): Linear programming model is formulated for determination of optimum values of feed ingredients to achieve weight at different stages of livestock at minimum cost and maximum shelf life. Algorithm 1 to achieve these two objectives for animal diet is given below.

Algorithm for animal diet at minimum cost and maximum shelf life (Algorithm 1)
Step 1: Define nature of objective function (max. or min.) Step 2: Input number of decision variables (i.e. j).
Step 3: Input cost coefficients (per unit cost cj s of each feed ingredient (xj)) cj s for j=1 to 16, to formulate objective function.
Step 4: Input technological coefficients aij s and requirement variables (nutrient requirements) bi s for i=1 to 6 and j=1 to 16 to formulate the constraints.
Step 5: Formulate the linear mathematical model.
Step 6: Introduce artificial variables to get basis matrix as we are not getting identity matrix as basis matrix.
Step 8: Construct simplex table of phase I with 6 basic variables.
Step 10: (i) If optimality condition is satisfied then (a) stop (b) write the optimal solution of phase I, go to step 12 (ii) else (a) find leaving variable, (b) entering variable and (c) the pivot element. (d) Construct the simplex table.
Step 12: construct the simplex table of Phase II.
Step 14: (i) If optimality condition is satisfied then, (a) stop (b) write the optimal solution of the problem. (ii) else (a) find leaving variable (b) entering variable (c) the pivot element. (d) construct the simplex table.
Flow chart for algorithm 1 is shown in Fig. 1. Diet formulated by algorithm 1 provides the optimum results in terms of minimum cost and maximum shelf life but it does not take nutrient variability into account. Nutrient variability is an important aspect of animal diet formulation. Nutrient content of the diet may vary widely at different stages of livestock and it could affect the growth rate of animal negatively. Deterministic assumption of linear programming may also be invalid because of presence of variation in nutrient content. This variation in nutrient content can be taken into account by use of stochastic programming. In the presence of variability, it is possible to determine the probability that the nutrient concentration in the ration meets or exceeds the specified requirements in the feed mix.
Therefore stochastic programming models are introduced to consider the variability of nutrition values of feed ingredients. To introduce the variability of nutrient components, nonlinear variance of each nutrient ingredient is added at a desired probability level in the mathematical model. 2 represents variance of nutrient i in ingredient j and it is included with a certain probability level, z represents level of probability and rest of the variables are defined as above. Mathematical model is given below (Eq. 2): Algorithm 2 presents the algorithm to obtain the animal diet at minimum cost including and maximum shelf life of feed mix with nutrient variability inclusion.

Algorithm for animal diet at minimum cost and maximum shelf life including nutrient variability (Algorithm 2)
Step 1: Define nature of objective function (max. or min.) Step 2: Input number of decision variables (i.e. j).
Step 3: Input cost coefficients cj s for j=1 to 16 to formulate objective function.
Step 4: Input technological coefficients aij s and requirement variables bi s for i=1 to 6 and j=1 to 16 to formulate the constraints.
Step 5: Input probability level and standard deviation for i=1 to 6 and j=1 to 16.
Step 6: Calculate z for the given probability level.
Step 7: Formulate the Stochastic mathematical model.
Step 8: Introduce artificial variables to get basis matrix as we are not getting identity matrix as basis matrix.
Step 10: Construct simplex table of phase I with 6 basic variables.
Step 12: (i) If optimality condition is satisfied then (a) stop (b) write the optimal solution of phase I, go to step 14 (ii) else (a) find leaving variable, (b) entering variable and (c) the pivot element. (d) Construct the simplex table Step 13: Repeat step 11-12.
Step 14: Construct the simplex table of Phase II.
Step 16: (i) If optimality condition is satisfied then, (a) stop (b) write the optimal solution(feed mix) of the problem. (ii) else (a) find leaving variable (b) entering variable (c) the pivot element. (d) Construct the simplex table.
Flow chart for algorithm 2 is shown in Fig. 2. Now algorithm is developed to minimize the deviations of the above formulated models. Mathematical model is formulated with the help of goal programming. Two goals are formed for minimization of the deviations for cost and water content minimization. For each goal, the objective functions of linear programming model are reconstructed as constraints with deviation variables. Rest of the constraints is same as in linear programming model. The objective function of the goal programming model becomes the sum of the deviation variables, corresponding to the constraints of cost and water content minimization, which is to be minimized as both of the objectives may not be fully satisfied simultaneously. Mathematical model is given as (Eq. 3).  Algorithm for minimizing the deviations is given below:

Algorithm for Goal Programming Model (Algorithm 3)
Flow chart for this algorithm 3 is shown in Fig. 3.
Step 1: Set the goals.
Step 2: Input goals as constraints.
Step 3: Input hard constraints.  Fig. 3: Flow chart for algorithm 3 (goal programming models) Step 4: Add deviation variables to the goal constraints.
Step 5: Identify the variables to be minimized in the objective function.
Step 6: Write the goal programming model.
Step 7: Introduce artificial variables to get basis matrix.
Step 9: Construct simplex table of phase I with 8 basic variables.
Step 11: (i) If optimality condition is satisfied then (a) stop (b) write the optimal solution of phase I, go to step 13 (ii) else (a) find leaving variable, (b) entering variable and (c) the pivot element. (d) Construct the simplex table Step 12: Repeat step 10-11.
Step 13: Construct the simplex table of Phase II.
Step 15: (i) If optimality condition is satisfied then, (a) stop (b) write the optimal solution of the problem.
(ii) else (a) find leaving variable (b) entering variable (c) the pivot element.
(d) Construct the simplex table.

Results and discussion
Three algorithms have been developed and 20 formulated models have been solved by combination of these algorithms. Algorithm 1 is based on linear programming model and provides results for feed mix components at minimum cost and maximum shelf life; algorithm 2 is based on stochastic programming model and provides results for feed mix components at minimum cost and maximum shelf life including nutrient variability; algorithm 3 minimizes the sum of deviation of decision variables for both of the above said goals. Solutions obtained by these algorithms include the maximum participation of nutrients in the animal diet with minimum deviation for the solution variables. This technique is proposed as combination of three algorithms which make the solution better at each step.
Dairy cattle data has been used as a numerical example of the developed algorithms. Optimization models have been developed for dairy cattle data (NRC, 2001). Table 1 and Table 2 show the input data of dairy cattle.  Optimized values of both objective functions are represented by Table 3.
It is clear from Table 3 that minimum value of cost and water content is achieved by algorithm 1. Table 3 represents the result in terms of value for objective function.  It is clear from Figs. 4 and 5 that more feed ingredients are included in the diet when evaluated by algorithm 2. It can be concluded from Table 3 and Figs. 4 and 5 that though minimum values of objective function is achieved by algorithm 1 but in terms of feed ingredient inclusion and nutrient variability, algorithm 2 is providing better results.
For achievement of better shelf life, water content from the diet is minimized. Algorithm 1 and 2 are used for this purpose. The only difference lies is in mathematical formulation, Algorithm 1 is based on linear model while algorithm 2 is based on stochastic model. Results for decision variable values for better shelf life from algorithm 1 are shown by Fig. 6 and from algorithm 2 are shown by Fig. 7.
It is deduced from Figs. 6 and 7 that more feed ingredients can be included in feed mix by using algorithm 2 as compared to algorithm 1. It is analyzed from graphical results that when algorithm is formulated by stochastic programming model, it provides better results in the sense of nutrient variability as compared to linear programming model but results are better in terms of value of objective function as achieved by algorithm 1. It is clear from the results that more variables can be included in the animal feed mix when programmed by algorithm based on stochastic programming model. By comparison of algorithms, it is clear that nutrient variability is better achieved by using algorithm 2 for each weight class. Wheat Straw, wheat bran, rice bran and canola meal has higher share in animal feed mix than the other feed ingredients. Other variables with higher share in the feed mix are Alfalfa hay, cottonseed meal, barley grain, soyabean meal. All these results proved that the technical intervention of this algorithmic approach to the problem of animal diet formulation is of great use in terms of higher gains and saving time, cost and manpower. It has converted complex computation in a rational and more efficient process.

Conclusion
In this paper algorithms are developed for the development of simulation tool. The blend of linear, stochastic and goal programming models is used for developing the algorithms. The algorithms determine the optimal livestock feed mix. This paper represents an innovative approach towards introduction of technology and leads to software development in the area of animal diet formulation. The paper represents algorithmic approach to bicriteria model and can be extended to multi-criteria models. Hasan NA, Khodary IE, and Dahab MY (2015). Developing a generic decision support system for poultry feeding. International Journal of Advances in Engineering Sciences, 5