Table of Contents Author Guidelines Submit a Manuscript
Advances in Agriculture
Volume 2016 (2016), Article ID 2313695, 6 pages
Research Article

A Mixed Integer Programming Poultry Feed Ration Optimisation Problem Using the Bat Algorithm

1Department of Applied Mathematics, National University of Science & Technology, P.O. Box AC939, Ascot, Bulawayo, Zimbabwe
2Department of Agricultural Economics and Extension, University of Zimbabwe, P.O. Box MP167, Mt Pleasant, Harare, Zimbabwe
3Department of Agricultural Economics, Education and Extension, Bindura University of Science Education, Private Bag Box 1020, Bindura, Zimbabwe

Received 12 June 2016; Accepted 29 November 2016

Academic Editor: Christos Tsadilas

Copyright © 2016 Godfrey Chagwiza et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


In this paper, a feed ration problem is presented as a mixed integer programming problem. An attempt to find the optimal quantities of Moringa oleifera inclusion into the poultry feed ration was done and the problem was solved using the Bat algorithm and the Cplex solver. The study used findings of previous research to investigate the effects of Moringa oleifera inclusion in poultry feed ration. The results show that the farmer is likely to gain US0.89 more if Moringa oleifera is included in the feed ration. Results also show superiority of the Bat algorithm in terms of execution time and number of iterations required to find the optimum solution as compared with the results obtained by the Cplex solver. Results revealed that there is a significant economic benefit of Moringa oleifera inclusion into the poultry feed ration.

1. Introduction

The cost of feed significantly contributes to the profitability of animal farming and has been estimated to constitute of the total costs of poultry production [1, 2]. If a farmer manages to reduce the cost of feed then a significant amount of profit can be realised. It is important to develop methods that can effectively cut down the costs of feeds. In this research, an attempt to cut down the costs of poultry feeds is carried out. The research has been motivated by the success of the experiment carried out by Gadzirayi et al. [3] to substitute soyabean as source of proteins by Moringa oleifera. Most economies of developing countries are agro-based and this study is likely to improve the livelihood of farmers in poultry production.

Feed ration formulation is a particular challenge especially if new nutritive mixtures are involved. Feed mixing can be classified as an hard problem. Vast literature exists that deals with the formulation of feed ration and modelling of these formulations. Several mathematical tools have been used to solve feed ration formulation problems such as Pearson’s Square method [4], goal programming (GP) [57], multiobjective goal programming (MOP) [8], multiobjective fractional programming (MOFP) [9], nonlinear programming (NLP) [10], chance constrained programming (CCP) [11, 12], quadratic programming (QP) [13], risk formulation (RF) [14], and linear programming (LP) [1518].

Most of these methods have been found to have difficulties in finding optimal solutions because of the following variables. Ingredient variability due to varying, fluctuating, and unstable nutrient components has made it difficult to find optimal solution of the feed mixing problems [19, 20]. Variability of price of the ingredient due to changes in price of the ingredients makes the feed formulation problem complex. Optimisation algorithms have been also used, to a limited extent, for animal diet formulation such as genetic algorithm (GA) [21] and evolutionary algorithm [22].

In this paper, researchers seek to formulate a mixed integer programming (MIP) problem for the feed ration formulation with the objective of finding the optimal quantities of Moringa oleifera inclusion in the poultry feed ration to substitute, to a certain level, soyabean which is expensive as compared to Moringa oleifera. Bat algorithm is used to solve the MIP. The remainder of the paper is arranged as follows. In Section 2, a review of the Bat algorithm is presented and in Section 3 formulation of the MIP is presented. Implementation of the Bat algorithm, results, and discussions are presented in Section 4 and conclusions are drawn in Section 5.

2. Review of the Bat Algorithm

The Bat algorithm was first introduced by Yang [23] and the algorithm is inspired by the echolocation behaviour of bats. Microbats are believed to use echolocation in most of their time to detect prey and avoiding obstacles. The bats emit a loud sound pulse and listen to the echo bouncing from the surrounding objects. The Bat algorithm assumes that all bats use echolocation and bats fly randomly and that the loudness varies from positive to a minimum constant value. The following are the steps of the Bat algorithm.(i)Bat population initialisation(ii)Definition of pulse frequency(iii)Initialisation of pulse rate and loudness(iv)Generation of the new solution through adjusting frequency(v)Updating velocities and locations or solutions and if the current pulse rate is greater than the initial pulse, then a solution is found among the best solutions(vi)Generation of a new solution by flying randomly(vii)Accepting the new solution and increasing the pulse and reducing loudness if the current pulse is less than the previous loudness(viii)Ranking the bats and finding the best current solution(ix)Postprocessing results and visualizationThe Bat algorithm has been modified and applied to various optimisation problems such as the studies by Khooban and Niknam [24], Taha et al. [25], He et al. [26], Alihodzic and Tuba [27], Sathya and Mohamed Thameem Ansari [28], Huang et al. [29], and Goyal and Patterh [30]. This research is the first of its kind to apply the Bat algorithm to solve a feed ration formulation optimisation problem.

3. Formulation of the Feed Ration Problem

In this section, a feed ration formulation problem that provides an alternative source of proteins is formulated. The research is motivated by the success of the experiment carried out by Gadzirayi et al. [3] on the inclusion of Moringa oleifera as a source of proteins for the broiler feed ration. Table 1 presents definitions of the parameters and variables that are used in this research.

Table 1: Definitions of parameters and variables.
3.1. The Mathematical Programming Model

The feed ration formulation problem is formulated as a MIP problem. The objective function is to maximise profit. The MIP is presented by (1)–(8). Equation (1) is the objective function. The ingredients providing proteins are taken to be soyabean and Moringa oleifera. The main purpose of the model is to find the optimal quantity of Moringa oleifera inclusion in the feed that maximise profit, in this case, in terms of the best broiler weight. The integer part of the objective function is whether to include or not soyabean in the feed ration as source of proteins.

Equations (2) and (3) are the nutrients level restrictions for both proteins and other nutrients, respectively. In this paper, operational costs include electricity and water rates, purchase costs of the broiler chicks, and labour and maintenance costs. The proteins found in both Moringa oleifera leaf meal (MOLM) and soyabean inclusion in the feed ration should be greater than or equal to the minimum requirement (see (2)) and this also applies to the other ingredients that provide other nutrients. Equation (4) presents the weight limit constraint. The weight of each bird should be equal to at least average feed conversion ratio multiplied by the total quantity of feed ration that the bird consumed up to the end of its life time. This constraint is important to ensure that the aspect of palatability of the feed ration is included in the model. The volume balance constraint is presented by (5). Equation (6) is the premix requirement constraint and (7) shows that we either include soyabean or not to the feed ration. The sign restriction constraint is presented by (8).

4. Results and Discussions

4.1. Brief Explanation of Data Generation Experiment

The experiment was carried out at the Research Farm Unit of the Bindura University of Science Education in Zimbabwe. Twenty-five Harbbad day old chicks were used in the study. Day old chicks were randomly allocated to 5 MOLM inclusion levels (%) diets, , , , , and . The feed rations were formulated using soyabean, maize, and mature Moringa oleifera leaves at different graded levels. In this study, the feed ration which uses soyabean as source of proteins only will be referred to as the standard feed ration. Moringa oleifera provenance from Mutoko district of Zimbabwe was used since it is more commonly grown by farmers in Zimbabwe. Table 2 presents information of the poultry feed ration formulation specifications.

Table 2: Composition of broiler starter and finisher feed rations formulated with inclusion of MOLM.

Table 3 presents nutrients composition of the ingredients that were used in the feed ration formulation for both broiler starter and finisher feed. Six main nutrients were considered, namely, proteins, ash, ether, nitrogen, fibre, and energy. Maximum available nutrients in each ingredient and the cost of each ingredient per kg are shown in Table 4.

Table 3: Nutrients composition of the ingredients and their costs.
Table 4: Maximum nutrients content available in the ingredient.

The average feed intake and live weight gain of the birds after six weeks are represented in Table 5.

Table 5: Average feed intake and live weight (grams) for 6 weeks for the 5 MOLM inclusion levels.
4.2. Implementation of the Bat Algorithm and Results

Experimental analysis of the mixed integer programming problem is solved using the Bat optimisation algorithm in MATLAB 7.0.4 on a PC with AMD E-300 APU with Radeon™ @1.30 GHz and 4.00 GB RAM. A total of 65 runs were performed recording the best solution for each run. Table 6 shows the average quantity of nutrients each ingredient contributes for each kilogram of the processed feed ration obtained after implementing the algorithm. The results obtained by the Bat algorithm are compared with those obtained by Cplex, a commercial solver in Table 7. The selling price is taken to be US$3.00/kg and the operational costs calculated are US$0.05/day/bird.

Table 6: Average optimal quantity of nutrients per processed kg of the feed ration.
Table 7: Payoff table.

The results show that a farmer can gain a profit of US$2.50 per bird when there is 5.3% inclusion level of MOLM in the feed ration as compared to US$1.61 gained if MOLM is excluded. The farmer who uses a feed ration with 5.3% inclusion level of MOLM will benefit US$0.89 more per bird as compared to the one who uses soyabean only as source of proteins. The results also show that broilers that are fed with the feed ration including MOLM on average gain less weight as compared to those fed with the feed ration without MOLM. Although this is the case, its contribution to the profit is insignificant compared to the feed ration cost due to high cost of soyabean. The feed intake of broilers fed with the standard feed ration was higher as compared to those that were fed with MOLM inclusion feed ration. This also explains the reason why the profit the farmer can get after using the standard feed ration is lower than that the farmer can get after using MOLM inclusion feed ration.

Comparison of the results obtained by implementing the Bat algorithm and the Cplex solver shows superiority of the Bat algorithm over Cplex solver in terms of execution time to obtain the optimal solution. The execution time taken by the Bat algorithm to achieve optimality is 1.02 minutes while Cplex required 2.98 minutes to achieve optimality. This can be attributed to the ability of the Bat algorithm to limit exploration as the bat is guided by the direction of the sound and can analyse the size of the prey without wasting time to visit the prey and learn that it is too big for it. It means that the Bat algorithm is capable of identifying useless solution paths without necessarily exploring or visiting them. This results in the algorithm being faster in terms of execution time to achieve optimality.

5. Conclusion

Several researchers have attempted to improve feed rations formulation by introducing new ingredients that are cost effective. Moringa oleifera leaf meal inclusion in broiler feed rations has not been spared. The available researches do not provide optimal MOLM inclusion level to the feed rations that maximises profits of the farmer but rather concluded the importance of this ingredient. In this study, an optimal MOLM inclusion level is found to be 5.3%. The feed ration has been formulated as a mixed integer programming problem and solved by using the Bat algorithm and Cplex solver. The results show that the farmer can gain US$0.89 more profit if they are to adopt the feed ration. Bat algorithm produced better solution and needs less execution time and number of iterations as compared to Cplex solver. There is also an economic benefit of using Moringa oleifera as a source of proteins in formulation of the poultry feed ration.

Competing Interests

The authors declare that they have no competing interests.


  1. A. J. F. Webster, Understanding the Dairy Cow, Blackwell Scientific Publications, New Jersy, NJ, USA, 2nd edition, 1993.
  2. S. P. Rose, Principles of Poultry Science, CAB International, Wallingford, UK, 1997.
  3. C. T. Gadzirayi, B. Masamha, J. F. Mupangwa, and S. Washaya, “Performance of broiler chickens fed on mature moringa oleifera leaf meal as a protein supplement to soyabean meal,” International Journal of Poultry Science, vol. 11, no. 1, pp. 5–10, 2012. View at Publisher · View at Google Scholar · View at Scopus
  4. J. Wagner and T. Stanton, Formulating ration with Pearson's Square, 2014,
  5. A. M. Anderson and M. D. Earle, “Diet planning in the third world by linear and goal programming,” The Journal of the Operational Research Society, vol. 34, no. 1, pp. 9–16, 1983. View at Publisher · View at Google Scholar
  6. T. Rehman and C. Romero, “Goal programming with penalty functions and livestock ration formulation,” Agricultural Systems, vol. 23, no. 2, pp. 117–132, 1987. View at Publisher · View at Google Scholar · View at Scopus
  7. Z. Babić and T. Perić, “Optimization of livestock feed blend by use of goal programming,” International Journal of Production Economics, vol. 130, no. 2, pp. 218–223, 2011. View at Publisher · View at Google Scholar · View at Scopus
  8. F. Zhang and W. B. Roush, “Multiple-objective (goal) programming model for feed formulation: an example for reducing nutrient variation,” Poultry Science, vol. 81, no. 2, pp. 182–192, 2002. View at Publisher · View at Google Scholar · View at Scopus
  9. P. Lara, “Multiple objective fractional programming and livestock ration formulation: a case study for dairy cow diets in Spain,” Agricultural Systems, vol. 41, no. 3, pp. 321–334, 1993. View at Publisher · View at Google Scholar · View at Scopus
  10. V. R. Guevara, “Use of nonlinear programming to optimize performance response to energy density in broiler feed formulation,” Poultry Science, vol. 83, no. 2, pp. 147–151, 2004. View at Publisher · View at Google Scholar · View at Scopus
  11. W. B. Roush and T. L. Cravener, “Stochastic true digestible amino acid values,” Animal Feed Science and Technology, vol. 102, no. 1–4, pp. 225–239, 2002. View at Publisher · View at Google Scholar · View at Scopus
  12. D. Sirisatien, G. R. Wood, M. Dong, and P. C. H. Morel, “Two aspects of optimal diet determination for pig production: efficiency of solution and incorporation of cost variation,” Journal of Global Optimization, vol. 43, no. 2-3, pp. 249–261, 2009. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  13. J. T. Chen, “Quadratic programming for least-cost feed formulations under probabilistic protein constraints,” American Journal of Agricultural Economics, vol. 55, no. 2, pp. 175–183, 1973. View at Publisher · View at Google Scholar
  14. J. M. Torres-Rojo, “Risk management in the design of a feeding ration: a portfolio theory approach,” Agricultural Systems, vol. 68, no. 1, pp. 1–20, 2001. View at Publisher · View at Google Scholar · View at Scopus
  15. F. V. Waugh, “The minimum-cost dairy feed,” Journal of Farm Economics, vol. 33, no. 3, pp. 299–310, 1951. View at Publisher · View at Google Scholar
  16. D. L. J. Alexander, P. Morel, and G. Wood, “Feeding strategies for maximising gross margin in pig production,” in Global Optimization: Nonconvex Optimization and Its Applications, vol. 85 of Nonconvex Optimization and Its Applications, pp. 33–43, Springer Science+Business Media, New York, NY, USA, 2006. View at Publisher · View at Google Scholar
  17. S. Chakeredza, F. K. Akinnifesi, O. C. Ajayi, G. Sileshi, S. Mngomba, and F. M. T. Gondwe, “A simple method of formulating least-cost diets for smallholder dairy production in sub-Saharan Africa,” African Journal of Biotechnology, vol. 7, no. 16, pp. 2925–2933, 2008. View at Google Scholar · View at Scopus
  18. M. S. Htun, T. T. Thein, and P. Tin, “Linear programming approach to diet problem for black tiger shrimp in shrimp aquaculture,” in Proceedings of the 6th Asia-Pacific Symposium on Information and Telecommunication Technologies (APSITT '05), pp. 165–170, Yangon, Myanmar, November 2005. View at Scopus
  19. P. R. Tozer, “Least-cost ration formulations for holstein dairy heifers by using linear and stochastic programming,” Journal of Dairy Science, vol. 83, no. 3, pp. 443–451, 2000. View at Publisher · View at Google Scholar · View at Scopus
  20. A. G. Munford, “The use of iterative linear programming in practical applications of animal diet formulation,” Mathematics and Computers in Simulation, vol. 42, no. 2-3, pp. 255–261, 1996. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  21. M. A. Şahman, M. Çunkaş, Ş. İnal, F. İnal, B. Coşkun, and U. Taşkiran, “Cost optimization of feed mixes by genetic algorithms,” Advances in Engineering Software, vol. 40, no. 10, pp. 965–974, 2009. View at Publisher · View at Google Scholar · View at Scopus
  22. R. A. Rahman, R. Ramli, Z. Jamari, and K. R. Ku-Mahamud, “Evolutionary algorithm approach for solving animal diet formulation,” in Proceedings of the 5th International Conference on Computing and Informatics (ICOCI '15), Istanbul, Turkey, 2015.
  23. X. S. Yang, “A new metaheuristic bat-inspired algorithm,” in Nature Inspired Cooperative Strategies for Optimization (NICSO 2010), vol. 284 of Studies in Computational Intelligence, pp. 65–74, Springer, Berlin, Germany, 2010. View at Publisher · View at Google Scholar
  24. M. H. Khooban and T. Niknam, “A new intelligent online fuzzy tuning approach for multi-area load frequency control: self adaptive modified bat algorithm,” International Journal of Electrical Power and Energy Systems, vol. 71, pp. 254–261, 2015. View at Publisher · View at Google Scholar · View at Scopus
  25. A. M. Taha, S.-D. Chen, and A. Mustapha, “Bat algorithm based hybrid filter-wrapper approach,” Advances in Operations Research, vol. 2015, Article ID 961494, 5 pages, 2015. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  26. X.-S. He, W.-J. Ding, and X.-S. Yang, “Bat algorithm based on simulated annealing and gaussian perturbations,” Neural Computing and Applications, vol. 25, no. 2, pp. 459–468, 2014. View at Publisher · View at Google Scholar · View at Scopus
  27. A. Alihodzic and M. Tuba, “Improved bat algorithm applied to multilevel image thresholding,” The Scientific World Journal, vol. 2014, Article ID 176718, 16 pages, 2014. View at Publisher · View at Google Scholar · View at Scopus
  28. M. R. Sathya and M. Mohamed Thameem Ansari, “Load frequency control using Bat inspired algorithm based dual mode gain scheduling of PI controllers for interconnected power system,” International Journal of Electrical Power & Energy Systems, vol. 64, pp. 365–374, 2015. View at Publisher · View at Google Scholar · View at Scopus
  29. G. Huang, W. Zhao, and Q. Lu, “Bat algorithm with global convergence for solving large-scale optimization problem,” Application Research of Computers, vol. 30, no. 5, pp. 1–10, 2013. View at Google Scholar
  30. S. Goyal and M. S. Patterh, “Performance of bat algorithm on localization of wireless sensor network,” International Journal of Computers and Technology, vol. 6, no. 3, 2013. View at Google Scholar