Abstract
Feed formulation is a typical multi-objective optimization problem that aims to minimize cost while satisfying multiple nutritional constraints. However, existing methods often suffer from limitations in handling nonlinear constraints, high-dimensional decision spaces, and solution feasibility. To address these challenges, this study proposes a multi-objective feed formulation method based on an improved Non-dominated Sorting Genetic Algorithm II (NSGA-II). A hybrid Dirichlet–Latin Hypercube Sampling (Dirichlet-LHS) strategy is introduced to generate an initial population with high feasibility and diversity, together with an iterative normalization-based dynamic repair operator to efficiently handle ingredient proportion and nutritional constraints. In addition, an adaptive termination mechanism based on the hypervolume improvement rate (Hypervolume Termination, HVT) is designed to avoid redundant computation while ensuring effective convergence of the Pareto front. Experimental results demonstrate that the Dirichlet–LHS strategy outperforms random sampling, Dirichlet sampling, and Latin hypercube sampling in terms of hypervolume and solution diversity. Under identical nutritional constraints, the improved NSGA-II reduces formulation cost by 1.52% compared with multi-objective Bayesian optimization and by 2.17% relative to conventional feed formulation methods. In a practical application to meat sheep diet formulation, the optimized feed cost is reduced to 1162.23 CNY per ton, achieving a 4.83% cost reduction with only a 1.09 s increase in computation time. These results indicate that the proposed method effectively addresses strongly constrained multi-objective feed formulation problems and provides reliable technical support for precision feeding in intelligent livestock production.
1. Introduction
In recent years, heuristic optimization algorithms, including particle swarm optimization (PSO) [1] and the Non-dominated Sorting Genetic Algorithm II (NSGA-II) [2], have been widely applied to complex control, modeling, and optimization problems. These methods have demonstrated strong capabilities in handling nonlinear, multi-objective, and constrained problems, and have been successfully employed in robust system identification [3], robot path planning [4], industrial scheduling [5], and evolutionary multi-objective optimization research [6]. Their population-based search mechanisms and flexibility make them particularly suitable for problems characterized by conflicting objectives and complex constraint structures.
In parallel, probabilistic model-based sequential optimization approaches, especially Bayesian optimization, have attracted increasing attention due to their ability to efficiently explore expensive or black-box objective functions [7]. Such methods have been progressively introduced into decision-support systems for animal production [8], including applications in animal nutrition optimization, breeding strategy design, and farm-level management decision-making [9]. These developments have contributed to the broader advancement of intelligent animal husbandry by enabling data-driven optimization under uncertainty and limited experimental budgets.
Feed formulation design and feed processing strategies constitute a fundamental component of modern livestock production systems. Rational ration formulation directly affects nutrient availability, animal growth performance, feed efficiency, and economic sustainability [10]. The primary objective of feed formulation is to satisfy animal nutritional requirements while minimizing production costs and ensuring feed quality and consistency [11]. However, this task has become increasingly challenging under the combined influence of climate change [12], intensified environmental pressures on agricultural systems [13], and the growing diversification of feed resources driven by alternative protein sources and agro-industrial by-products [14]. These factors have led to instability in feed ingredient supply [15] and variability in nutritional composition, thereby increasing formulation uncertainty and economic risk [16]. Moreover, climate-induced heat stress has been shown to reduce feed intake efficiency and animal growth performance [17], further complicating ration optimization [18].
From a methodological perspective, feed formulation problems are commonly formulated as constrained optimization problems, involving either single or multiple objectives such as cost minimization, nutrient balance, and environmental impact reduction [19]. Traditional feed formulation approaches are predominantly based on linear programming (LP). Early studies demonstrated that LP-based models can effectively improve production efficiency and reduce feed costs under simplified nutritional constraints [20]. Subsequent research extended these approaches to pasture-based beef cattle and sheep systems [21], as well as dairy ration formulation using nonlinear or mixed-integer programming frameworks [21]. However, while these models are effective for least-cost ration design, they exhibit limited flexibility in addressing multiple conflicting objectives and complex constraint interactions [22]. To enhance practical applicability, LP-based decision-support tools have been developed to incorporate local feed availability and market prices, improving cost efficiency in real-world feeding management [23]. Moreover, recent work has applied mathematical optimization frameworks to precision-fed dairy cattle diet formulation [24], demonstrating that optimized ration design can reduce feed cost and increase income over feed cost compared with conventional ration strategies [25].
Nevertheless, with the increasing diversity of feed ingredients, the growing number of nutritional indicators, and the emergence of nonlinear and many-objective constraint relationships, the limitations of traditional LP-based methods have become increasingly evident. These limitations have motivated the introduction of intelligent optimization algorithms into feed formulation research. For example, Altun and Şahman [26] applied particle swarm optimization to mixed feed cost optimization and reported superior performance compared with conventional optimization methods in nonlinear problem settings. Akintan et al. [27] systematically reviewed data-driven and AI-enabled decision-support approaches for animal feed formulation, highlighting their potential to enhance feed efficiency, animal performance, and system resilience. From a methodological perspective, Liang et al. provided a comprehensive survey of evolutionary constrained multi-objective optimization methods, systematically summarizing key techniques for handling complex constraint structures and conflicting objectives [28]. Peña et al. [29] investigated multi-objective stochastic programming for feed formulation, focusing on balancing feed cost with lysine and metabolizable energy requirements under uncertainty. Related studies have further shown that evolutionary and genetic algorithm-based approaches can outperform traditional linear programming methods in poultry and livestock feed cost optimization [30]. Moreover, recent research has increasingly integrated data-driven, machine learning [31], and advanced optimization frameworks into livestock feed formulation and decision-making processes, demonstrating improvements in production efficiency and economic performance compared with conventional methods [32].
In summary, heuristic and intelligent algorithms show broad application prospects in solving multi-objective optimization problems under complex constraints [33]. However, current feed formulation optimization still faces several challenges, including difficulties in cost control caused by large fluctuations in feed ingredient prices and the high computational cost associated with optimization under complex and high-dimensional constraint spaces. For example, Bayesian optimization often requires the construction and repeated updating of surrogate models when addressing complex nonlinear optimization problems [34], which demands substantial computational resources and leads to high computational cost in multi-objective settings [35]. Motivated by these challenges, this study develops an improved optimization approach based on the heuristic algorithm NSGA-II, aiming to achieve a balanced trade-off between optimization efficiency and convergence performance in feed formulation problems.
2. Materials and Methods
2.1. Problem Description
Feed formulation is inherently a trade-off problem between economic efficiency and nutritional adequacy. In practical livestock production systems, minimizing feed cost is essential for improving economic profitability, while ensuring adequate intake of key nutritional components is critical for supporting animal growth performance and feed utilization efficiency. Among various nutritional indicators, lysine is widely recognized as a limiting amino acid in ruminant and monogastric diets, and metabolizable energy is a core determinant of growth and production performance. However, improving nutritional quality often leads to increased feed cost, resulting in inherently conflicting objectives. This naturally motivates the formulation of feed formulation as a multi-objective optimization problem.
From an engineering and decision-support perspective, feed formulation should not be optimized with respect to a single criterion, but rather through a balanced consideration of multiple conflicting objectives. Following this principle, and in line with commonly adopted practices in feed formulation optimization studies, this work considers three objectives: minimizing total feed cost while maximizing lysine content and metabolizable energy. This objective configuration has been widely used in the literature to represent the fundamental trade-off between economic efficiency and nutritional performance, and allows a systematic exploration of Pareto-optimal solutions for decision-making.
Formally, the feed formulation problem is expressed as a constrained multi-objective optimization model:
where denotes the decision variable vector, and each element represents the proportion of the i-th feed ingredient in the formulation on a mass basis. The dimension d corresponds to the total number of candidate feed ingredients included in the formulation, and all decision variables are continuous.
In Equation (1), , , and denote the unit cost vector, lysine content vector, and metabolizable energy vector of the candidate feed ingredients, respectively. These vectors do not represent fixed scalar values, but ingredient-specific parameter vectors whose elements characterize the economic and nutritional properties of each ingredient. The objective values are determined by the weighted linear combination of these ingredient-specific coefficients with the decision vector , reflecting the system-level cost and nutritional outcomes of a given formulation.
The constraint set in Equation (2) ensures the practical feasibility of the formulation. The proportion normalization constraint enforces that the ingredient proportions sum to one. The nutritional constraint guarantees that essential nutrient requirements are satisfied within predefined bounds, where is the nutrient composition matrix and and denote the lower and upper requirement limits, respectively. The bound constraint restricts the inclusion level of each ingredient according to practical feeding considerations.
It should be emphasized that both the set of design variables (i.e., candidate feed ingredients) and the associated coefficient vectors are instance-dependent and can be constructed based on different nutritional standards or databases. In this study, the same general formulation in Equations (1) and (2) is instantiated under different data settings. For benchmark experiments and methodological comparisons with existing studies, ingredient composition and cost data consistent with commonly used literature sources are adopted to ensure comparability. For the practical meat sheep diet formulation case, the coefficient vectors and nutrient matrix are constructed using China-specific ingredient composition data and nutritional standards. Therefore, the proposed optimization model is not restricted to a specific feed composition standard and can be generalized to different production contexts.
Although the objective functions in Equation (1) are linear with respect to the decision variables, the overall optimization problem remains highly nontrivial due to the high-dimensional continuous decision space, strong coupling among nutritional constraints, strict proportion normalization, and upper bounds on ingredient inclusion levels. Moreover, lysine and metabolizable energy appear in the model as ingredient attributes and are aggregated through formulation proportions to form system-level nutritional objectives, rather than being redundantly or independently optimized. The inherent heterogeneity among ingredient-specific economic and nutritional coefficients leads to conflicting objectives and a generally non-convex feasible region. Consequently, the problem gives rise to a Pareto-optimal solution set rather than a single optimal solution, motivating the use of population-based evolutionary multi-objective optimization methods.
While the objective structure of the feed formulation problem considered in this study is aligned with commonly adopted cost–nutrition trade-off formulations, the novelty of this work does not lie in redefining the objective functions themselves. Instead, it lies in addressing the challenges arising from their integration with strong proportion constraints, heterogeneous ingredient standards, and high-dimensional continuous decision spaces. These characteristics substantially increase the difficulty of obtaining feasible and well-distributed Pareto-optimal solutions using conventional approaches, thereby providing a clear motivation for the improved optimization framework proposed in this study.
2.2. NSGA-II Algorithm
NSGA-II is a multi-objective optimization algorithm proposed by Deb et al. [36]. It is primarily designed to solve multi-objective optimization problems in which multiple objectives are mutually conflicting and has become one of the most widely used multi-objective evolutionary algorithms. Compared with standard genetic algorithms, NSGA-II exhibits clear advantages in maintaining solution diversity and computational efficiency [37].
The NSGA-II algorithm begins by generating an initial population and evaluating the fitness of each individual based on the selected objective functions. Subsequently, a non-dominated sorting procedure is applied to rank the population into different fronts according to dominance relationships among individuals with respect to multiple objectives. To preserve diversity within each non-dominated front, NSGA-II introduces a crowding distance mechanism, which measures the density of individuals in the objective space. Individuals with larger crowding distances are located in less crowded regions and are therefore assigned higher selection priority.
During the selection stage, NSGA-II employs a tournament selection strategy based on both dominance rank and crowding distance to select individuals from the parent population for reproduction. The selected individuals generate offspring through crossover and mutation operations. The parent and offspring populations are then combined, and non-dominated sorting is performed again. Based on dominance rank and crowding distance, the best N individuals are selected to form the new population.
As the number of iterations increases, the solutions in the population gradually approach the true Pareto-optimal front while maintaining a relatively uniform distribution in the objective space [38]. Owing to the incorporation of elitism and crowding distance control mechanisms, NSGA-II not only improves the efficiency of solving multi-objective optimization problems but also helps reduce the risk of premature convergence to local optima.
3. Improved NSGA-II Algorithm
3.1. Initial Sampling
To address the issues of low feasibility of initial solutions, severe constraint violations, insufficient processing efficiency, and unstable convergence encountered by the standard NSGA-II when dealing with high-dimensional and strongly constrained diet formulation problems, this study introduces a series of key improvements aimed at enhancing the quality of the initial population and strengthening the search capability of the algorithm under complex constraints.
A hybrid Dirichlet–Latin Hypercube Sampling (Dirichlet-LHS) strategy is proposed to generate the initial population. This strategy combines the advantages of the Dirichlet distribution [39] in modeling proportion constraints with the strengths of Latin Hypercube Sampling (LHS) [40] in space-filling design, thereby ensuring both feasibility of initial solutions and population diversity. Unlike conventional random sampling methods, the proposed initialization strategy consists of three main steps: (1) a uniform Dirichlet distribution is constructed based on the dimensionality of ingredient proportions to generate initial solution vectors that satisfy proportion constraints (i.e., ), and upper bounds on ingredient usage are imposed while preserving the proportional structure to ensure the rationality of the basic formulation; (2) LHS is introduced in the vicinity of the feasible solutions obtained above or within the remaining solution space, where the high-dimensional space is partitioned into equiprobable intervals and sampled randomly to enhance the uniformity of space coverage; (3) the samples generated by Dirichlet and LHS are merged and subjected to final normalization to form the initial population.
By integrating the structural constraint enforcement provided by the Dirichlet distribution with the space coverage capability of LHS, the proposed hybrid sampling strategy is able to generate an initial population with high feasibility, strong diversity, and broad coverage, thus providing a high-quality starting point for subsequent optimization. Moreover, by embedding constraints directly into the sampling stage, this strategy effectively avoids the generation of a large number of infeasible solutions under complex constraints, which commonly occurs in traditional Dirichlet sampling and leads to reduced computational efficiency due to extensive post hoc repair operations.
3.2. Dynamic Repair Operator Mechanism
In feed formulation optimization problems, due to the stochastic nature of genetic operators such as crossover and mutation, the generated offspring individuals often violate formulation constraints, for example, exceeding the upper limit of a single ingredient or having ingredient proportions that do not sum to one. This results in an increased number of infeasible solutions and a reduction in overall algorithmic efficiency. To address this issue, this study designs an iterative normalization-based dynamic repair operator to perform real-time correction of individual solutions during the evolutionary process.
Assuming that a feed formulation consists of d ingredients, an individual solution is denoted as where denotes the proportion of the i-th ingredient. The dynamic repair operator is implemented in two sequential steps.
Boundary constraint repair is first applied to each decision variable:
where denotes the upper bound of the i-th ingredient, and clip () represents an element-wise truncation operator.
Proportion normalization is then performed to ensure that the sum of all ingredient proportions equals one:
To prevent division-by-zero errors, when , all decision variables are reset to .
3.3. Adaptive Stopping Mechanism
To address the limitation of traditional genetic algorithms that rely on a fixed number of iterations as the stopping criterion, this study proposes an adaptive termination criterion based on hypervolume (HV). The core idea is to establish a dynamic evaluation window mechanism. The termination condition is defined as:
where denotes the hypervolume increment at generation , is the predefined improvement threshold, and represents the upper limit of consecutive stagnation generations. A maximum stagnation generation limit is also specified, and the algorithm terminates when either the above stagnation condition is satisfied or the maximum stagnation limit is exceeded. This mechanism ensures that a high-quality solution set is obtained while effectively avoiding overfitting or unnecessary long-term computation. The improved algorithmic framework is illustrated in Figure 1.
Figure 1.
Workflow diagram for improving the NSGA-II algorithm.
4. Experiments and Results
4.1. Experimental Setup
To comprehensively evaluate the performance of the proposed improved NSGA-II algorithm and to verify its effectiveness in practical meat sheep diet formulation problems, a systematic experimental framework was designed in this study. The experiments were conducted in three stages: (i) optimization of algorithm hyperparameter configurations; (ii) performance comparison of the improved NSGA-II under different initial sampling strategies, with results further compared against the methods proposed by Peña et al. [29] and Uribe-Guerra et al. [30]; and (iii) application of the improved NSGA-II algorithm to meat sheep diet formulation optimization to validate its generalization ability and practical applicability.
The first stage focused on determining the optimal parameter combination for the improved NSGA-II algorithm to ensure performance stability and result reliability in subsequent comparative experiments. This stage involved three categories of key parameters: (1) core NSGA-II parameters, including population size, crossover probability, and mutation probability, which directly affect the algorithm’s search capability, convergence speed, and solution diversity; (2) parameters related to the adaptive stopping mechanism, including the evaluation window size and hypervolume improvement threshold, which are used to control the termination timing and avoid unnecessary computation; and (3) parameters of the elite solution selection mechanism, with the diversity weight coefficient as the core factor, used to balance cost optimality and diversity of the Pareto solution distribution [41]. To ensure fairness in the comparative experiments, these parameters were kept consistent across different experimental settings.
4.2. Results and Analysis
4.2.1. Ablation Study of the Dynamic Repair Operator
An ablation experimental scheme was designed to evaluate the effectiveness of the dynamic repair operator in terms of algorithmic efficiency and solution quality. The initial population was generated using random sampling to ensure that all comparative experiments started from identical and representative conditions, thereby eliminating the influence of hybrid sampling on the convergence process. The population size was fixed at 200, with a crossover probability of 0.9 and a mutation probability of 0.3. These parameter settings follow common practice in NSGA-II-based optimization. A relatively high crossover probability facilitates effective information exchange among candidate solutions, while a moderate mutation probability helps maintain population diversity and prevents premature convergence, thus achieving a balanced trade-off between convergence speed and solution diversity. Based on the experimental datasets used by Peña [30] and Uribe-Guerra [31], the performance of the algorithm with and without the dynamic repair operator was compared to comprehensively analyze its impact on convergence speed, convergence stability, and search performance. The results are presented in Table 1.
Table 1.
Comparison of results whether dynamic repair operator is enabled or not.
The core advantage of the dynamic repair operator lies in its real-time constraint satisfaction capability. After offspring individuals are generated, the operator immediately performs iterative normalization to simultaneously correct ingredient proportion constraints and boundary constraints on ingredient usage. This immediate repair mechanism significantly reduces the computational overhead associated with evaluating infeasible solutions, improves search efficiency, and avoids degradation of feasible solution quality caused by delayed repair or traditional penalty-based mechanisms. As shown in Table 1, the dynamic repair operator markedly accelerates the convergence process and improves the feasibility and stability of the final solutions, achieving a cost reduction of 1.38% under identical nutritional constraints.
4.2.2. Evaluation of the Hypervolume-Based Adaptive Termination Mechanism
To verify the effectiveness of the adaptive stopping mechanism based on the hypervolume improvement rate (Hypervolume Termination, HVT), its performance in avoiding redundant computation while maintaining the quality of the Pareto front was evaluated. The experiments focused on whether the HVT mechanism could significantly reduce computational cost without degrading, or even while improving, solution quality when replacing a fixed maximum number of iterations.
The experimental parameter settings were kept consistent with those used in the ablation study of the dynamic repair operator, and the dynamic repair operator was enabled to ensure that the HVT experiments were conducted under optimal constraint-handling conditions. All experiments were carried out on the same datasets and application scenarios. The experimental group adopted the HVT-based adaptive stopping mechanism, and the improvement threshold and the upper limit of consecutive stagnation generations were determined through multiple trials. The control group employed a fixed maximum iteration strategy, which was set to 500 generations based on preliminary experiments, slightly exceeding the number of iterations required by the adaptive stopping mechanism to obtain optimal solutions.
The experimental results are summarized in Table 2. When the parameter was set to k = 7, the algorithm converged within only 390 generations, reducing computational cost by approximately 22% compared with the fixed 500-generation strategy. When k < 7, premature termination occurred due to parameter sensitivity, resulting in a significant decline in solution quality, with hypervolume values decreasing by 6.5–6.8% and costs increasing by 4.0–4.1%, confirming the necessity of k ≥ 6. When k > 7, the number of iterations increased substantially (by approximately 255%), while the formulation cost increased by 0.18–1.72%, indicating that excessively extending the search process does not further improve economic performance and may instead lead to overfitting. The hypervolume variation further demonstrates that, in the later stages of optimization, improvements of the Pareto front become saturated, and additional computation yields only marginal gains. In contrast, the HVT mechanism effectively avoids unnecessary long-term computation while ensuring solution quality.
Table 2.
Adaptive stopping mechanism ablation experimental results.
4.2.3. Comparison with Existing Feed Formulation Methods
By comparing the results of the proposed improved NSGA-II algorithm with those reported in previous studies, as summarized in Table 3, the experimental results demonstrate that under the same nutritional constraints adopted in the MFP [29] and MOBO [30] studies, the proposed algorithm achieves lower formulation cost by prioritizing cost as the primary optimization objective and effectively eliminating infeasible solutions through the dynamic repair operator. Specifically, the formulation cost is reduced by 1.52% compared with the MOBO method and by 2.17% compared with the MFP method. In addition, the Pareto solution set obtained by the improved NSGA-II exhibits a wider coverage range, providing decision-makers with more alternative solutions under identical constraint conditions.
Table 3.
Comparison of the optimal solution and corresponding feed composition.
From the perspective of feed composition, the improved NSGA-II algorithm enables more flexible adjustment of ingredient proportions while satisfying key nutritional constraints such as lysine and energy. As a result, certain low-cost ingredients with relatively high utilization efficiency are more effectively incorporated, leading to a further reduction in the overall formulation cost.
Overall, the comparative results indicate that under identical nutritional constraints, the proposed improved NSGA-II algorithm not only achieves superior economic performance but also maintains good solution diversity, demonstrating strong overall advantages in multi-objective feed formulation optimization problems.
4.2.4. Application to Meat Sheep Diet Formulation
In this application case, the coefficient vectors and nutrient composition matrix in Equations (1) and (2) are instantiated using China-specific ingredient composition data and nutritional standards, while the optimization model itself remains identical to the general formulation described in Section 2.1. Table 4 provides the ingredient composition and nutrient profiles used in this application case. To further verify the applicability and effectiveness of the proposed improved NSGA-II algorithm in practical feed formulation design, it was applied to a meat sheep diet formulation optimization problem. This application case is based on the nutritional requirements of meat sheep with a body weight of 40 kg and a daily weight gain of 100 g/d, as specified in the NY/T 816–2021 [42]. Nutrient Requirements of Meat Sheep. The basic feed composition and corresponding nutrient levels are listed in Table 4. Feed cost data were obtained from market surveys and publicly available online sources, with costs expressed in CNY per ton.
Table 4.
Basic feed composition and nutrient levels.
Under the constraints of meeting the minimum requirements for key nutritional indicators such as crude protein (CP) and metabolizable energy (ME), the improved NSGA-II algorithm was employed to perform multi-objective optimization of the meat sheep diet formulation. The optimization results show that the optimal formulation achieved a cost of 1162.23 CNY per ton, while all nutritional indicators met or exceeded the required industry standards.
4.2.5. Effect of Different Initial Sampling Strategies
Table 5 compares the economic and performance outcomes of different initial sampling strategies in meat sheep diet formulation optimization. The results indicate that, compared with random sampling, the hybrid Dirichlet–LHS strategy achieves a 4.83% reduction in formulation cost with an increase in computation time of only 1.09 s. Compared with using Dirichlet sampling or LHS alone, the Dirichlet–LHS strategy demonstrates superior overall performance in terms of cost control and solution quality.
Table 5.
Comparison of economic and performance indicators of different sampling methods.
4.2.6. Convergence Behavior and Population Diversity Analysis
Figure 2 presents a comparative analysis of different initial sampling strategies during the optimization process under the meat sheep nutritional requirements. For each strategy, the left panel illustrates the hypervolume (HV) convergence behavior, while the right panel shows the distribution of solutions in the decision space, enabling a joint evaluation of convergence efficiency and population diversity.
Figure 2.
Comparison of different initial sampling strategies in terms of hypervolume convergence and decision space distribution (a) Random sampling HV curve (b) Random sampling decision space (c) Dirichlet sampling HV curve (d) Dirichlet sampling decision space (e) LHS sampling HV curve (f) LHS sampling decision space (g) Hybrid Dirichlet–LHS HV curve (h) Hybrid Dirichlet–LHS decision space.
For random sampling (Figure 2a,b), the HV curve increases steadily but with noticeable fluctuations, indicating a moderate and relatively unstable convergence process. The corresponding decision space distribution is widely scattered, reflecting good exploration capability but limited guidance toward high-quality feasible regions, which explains the moderate convergence performance.
In the case of Dirichlet sampling (Figure 2c,d), a high initial HV value is achieved due to the strict enforcement of proportion constraints, allowing many solutions to be feasible from the early generations. However, the HV curve exhibits an evident plateau after approximately 100 generations, suggesting premature convergence. This behavior is consistent with the decision space results, where solutions are highly concentrated in a narrow region, indicating insufficient diversity and a tendency to fall into local optima.
For Latin Hypercube Sampling (LHS) (Figure 2e,f), the HV evolution shows a delayed but continuous increase. The first several generations contribute little to HV improvement, mainly because a considerable number of individuals violate constraints and require repair. Once feasibility is gradually achieved, the HV grows more rapidly. The decision space distribution demonstrates improved coverage compared with Dirichlet sampling, confirming the advantage of stratified sampling in enhancing diversity.
The hybrid Dirichlet–LHS strategy (Figure 2g,h) exhibits the most balanced performance. Although its initial HV growth is slower than that of pure Dirichlet sampling, it shows a sustained and stable improvement throughout the optimization process. The decision space distribution is the most widely spread among all strategies, indicating strong exploration ability while maintaining feasibility. This combination effectively alleviates premature convergence and supports the construction of a high-quality initial population. Overall, the results demonstrate that the Dirichlet–LHS hybrid sampling strategy achieves superior performance by jointly considering feasibility, diversity, and convergence stability, making it more suitable for multi-objective optimization problems with strict nutritional proportion constraints.
Figure 3 illustrates the convergence behavior of hypervolume (HV) and formulation cost with respect to the number of generations under different sampling strategies. The HV curve obtained with random sampling exhibits pronounced zigzag fluctuations, reflecting instability in the search process. For Dirichlet sampling, the HV value increases rapidly in the early stages but reaches saturation at an early point, corresponding to premature convergence of formulation cost. Due to low initial feasibility, LHS shows large fluctuations in the HV curve and pronounced oscillations in the cost curve, indicating high repair overhead and relatively low overall optimization efficiency.
Figure 3.
Convergence behavior of hypervolume and formulation cost under different initial sampling strategies.
In contrast, the Dirichlet–LHS strategy presents a steadily increasing HV curve, with formulation cost decreasing progressively without obvious stagnation. Approximately 80% of the optimization process is completed within about 150 generations, demonstrating favorable convergence speed and stability. These results indicate that by jointly improving initial feasibility and space coverage, the Dirichlet–LHS sampling strategy effectively enhances long-term convergence performance and provides an efficient search pathway for meat sheep diet formulation optimization.
4.2.7. Analysis of the Optimized Diet Composition
To further analyze the details of the optimal formulation obtained by the improved NSGA-II algorithm, Table 6 presents the specific proportion of each ingredient in the optimized diet. The results indicate that the ingredient composition achieves a good balance between economic efficiency and synergistic utilization. Low-cost ingredients rich in structural fiber, such as soybean straw, are effectively utilized to support the basal diet structure. Soybean meal, as a high-quality protein source, accounts for a relatively large proportion to meet protein requirements. Energy is mainly supplied by sorghum and corn, whose relatively stable market prices contribute to overall cost control. In addition, dicalcium phosphate is used to precisely regulate calcium and phosphorus levels. Overall, the formulation achieves an optimized cost structure while satisfying nutritional requirements.
Table 6.
Ingredient Proportions of the Optimized Diet.
Table 7 summarizes the key economic and nutritional indicators of the feed formulation obtained using the improved NSGA-II multi-objective optimization algorithm.
Table 7.
Nutritional and cost indicators of the feed formulation.
Under the condition that all predefined nutritional constraints are satisfied, cost is treated as the primary optimization objective while key nutritional indicators, such as crude protein (CP) and metabolizable energy (ME), are simultaneously considered, achieving coordinated optimization of economic performance and nutritional adequacy. The resulting formulation is suitable for meat sheep with a body weight of 40 kg and a daily weight gain of 100 g/d.
4.2.8. Robustness and Sensitivity Discussion
In practical feed formulation scenarios, moderate variations in ingredient costs and nutritional requirement bounds are inevitable due to market fluctuations and management uncertainty. To evaluate the robustness of the proposed multi-objective optimization framework, the sensitivity of the optimized solutions was analyzed from a practical perspective. The results indicate that moderate parameter variations do not significantly affect the feasibility of the optimized formulations or the overall trade-off structure among the three objectives. The optimized solutions remain nutritionally feasible, and the corresponding cost variations are limited, demonstrating that the proposed formulation model and optimization approach are robust under realistic parameter uncertainty.
5. Conclusions
This study addresses the multi-objective optimization problem in meat sheep diet formulation, which requires balancing economic cost and multiple nutritional components, and proposes an improved NSGA-II algorithm. The proposed algorithm aims to overcome the limitations of traditional linear programming methods in handling nonlinear, strongly constrained, and multi-objective problems, as well as the challenges faced by existing heuristic algorithms in feed formulation optimization, such as low-quality initial solutions, inefficient constraint handling, and high computational cost.
The main contributions and innovations of this study can be summarized as follows:
- (1)
- A hybrid Dirichlet–Latin Hypercube initial sampling strategy is proposed, which combines the proportional constraint modeling capability of the Dirichlet distribution with the space-filling advantage of Latin Hypercube Sampling. This strategy effectively improves the feasibility and diversity of the initial population under high-dimensional and strongly constrained conditions. Experimental results demonstrate that the proposed strategy significantly enhances initial population quality and improves the coverage and convergence quality of the Pareto front.
- (2)
- To address ingredient usage constraints and complex nutritional constraints in feed formulation, an iterative normalization-based dynamic repair operator is designed and combined with a penalty mechanism to eliminate infeasible solutions that cannot be repaired, thereby ensuring efficient population evolution within the feasible region. Experimental results show that under identical nutritional constraints, the improved NSGA-II algorithm reduces formulation cost by 1.52% compared with the MOBO method and by 2.17% compared with the MFP method.
- (3)
- An adaptive termination mechanism based on the hypervolume improvement rate is proposed. By dynamically monitoring the convergence status of the Pareto front, this mechanism effectively avoids redundant computation while maintaining solution quality, thereby improving the overall computational efficiency of the algorithm.
- (4)
- The proposed improved NSGA-II algorithm is applied to a practical meat sheep diet formulation optimization problem. The optimization results show that the formulation cost is significantly reduced to 1162.23 CNY per ton, while key nutritional indicators such as crude protein and metabolizable energy meet or exceed industry standards. A substantial improvement in economic performance is achieved with only a slight increase in computation time.
In summary, the improved NSGA-II algorithm integrating Dirichlet–LHS initial sampling, dynamic repair and penalty mechanisms, and the HVT-based adaptive termination strategy provides an efficient and reliable multi-objective optimization solution for meat sheep diet formulation. While ensuring feasibility under high-dimensional and complex constraints, the proposed method effectively balances multiple objectives such as cost minimization and nutritional adequacy, demonstrating strong application potential and practical value.
Author Contributions
Conceptualization, H.Z. and T.B.; methodology, H.Z.; software, H.Z.; validation, H.Z., Y.G. and X.L.; formal analysis, H.Z.; investigation, H.Z.; resources, T.B.; data curation, H.Z.; writing—original draft preparation, H.Z.; writing—review and editing, T.B.; visualization, H.Z.; supervision, T.B. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Ministry of Science and Technology of the People’s Republic of China, under the Science and Technology Innovation 2030 Major Project “Intelligent Farm for Autonomous Operation Based on Swarm Intelligence”, grant number 2022ZD0115800; by the Xinjiang Uygur Autonomous Region Major Science and Technology Project, Key Technologies for Intelligent Farm Platform, grant number 2022A02011-4; and by the Central Government Guiding Local Science and Technology Development Program, Construction of an Intelligent Agriculture Innovation Platform, grant number ZYYD2022B12. The APC was funded by the above-mentioned projects.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data presented in this study are available from the corresponding author upon reasonable request.
Acknowledgments
The authors would like to express their sincere gratitude to Bai Tao for his valuable guidance, constructive suggestions, and continuous support throughout the research and manuscript preparation process. The authors also gratefully acknowledge all co-authors for their contributions, cooperation, and efforts in data preparation, experimental validation, and result analysis. In addition, the authors sincerely thank the funding agencies for their financial support, which made this research possible.
Conflicts of Interest
The authors declare that there are no known competing financial interests or personal relationships that may influence the work reported herein.
References
- Shami, T.M.; El-Saleh, A.A.; Alswaitti, M.; Al-Tashi, Q.; Summakieh, M.A.; Mirjalili, S. Particle Swarm Optimization: A Comprehensive Survey. IEEE Access 2022, 10, 10031–10061. [Google Scholar] [CrossRef]
- Zheng, W.; Liu, Y.; Doerr, B. A First Mathematical Runtime Analysis of the Non-Dominated Sorting Genetic Algorithm II (NSGA-II). Proc. AAAI Conf. Artif. Intell. 2022, 36, 10408–10416. [Google Scholar] [CrossRef]
- Herrero, J.M.; Blasco, X.; Martínez, M.; Ramos, C.; Sanchis, J. Non-Linear Robust Identification of a Greenhouse Model Using Multi-Objective Evolutionary Algorithms. Biosyst. Eng. 2007, 98, 335–346. [Google Scholar] [CrossRef]
- Liu, S.; Tian, Q.; Tang, C. Mobile Robot Path Planning Algorithm Based on NSGA-II. Appl. Sci. 2024, 14, 4305. [Google Scholar] [CrossRef]
- Zhang, W.; Bao, X.; Hao, X.; Gen, M. Metaheuristics for Multi-Objective Scheduling Problems in Industry 4.0 and 5.0: A State-of-the-Arts Survey. Front. Ind. Eng. 2025, 3, 1540022. [Google Scholar] [CrossRef]
- Wang, Z.; Pei, Y.; Li, J. A Survey on Search Strategy of Evolutionary Multi-Objective Optimization Algorithms. Appl. Sci. 2023, 13, 4643. [Google Scholar] [CrossRef]
- Shahriari, B.; Swersky, K.; Wang, Z.; Adams, R.P.; de Freitas, N. Taking the Human Out of the Loop: A Review of Bayesian Optimization. Proc. IEEE 2016, 104, 148–175. [Google Scholar] [CrossRef]
- Jørgensen, E. Decision Support Systems in Animal Production: A Bayesian Future. In Proceedings of the Third European Conference of the European Federation for Information Technology in Agriculture, Food and the Environment, Montpellier, Frankrig, 18–20 June 2001. [Google Scholar]
- Uribe-Guerra, G.D.; Múnera-Ramírez, D.A.; Arias-Londoño, J.D. Swine Diet Design Using Multi-Objective Regionalized Bayesian Optimization 2024. arXiv 2024, arXiv:2409.12919. [Google Scholar]
- van der Poel, A.F.B.; Abdollahi, M.R.; Cheng, H.; Colovic, R.; den Hartog, L.A.; Miladinovic, D.; Page, G.; Sijssens, K.; Smillie, J.F.; Thomas, M.; et al. Future Directions of Animal Feed Technology Research to Meet the Challenges of a Changing World. Anim. Feed Sci. Technol. 2020, 270, 114692. [Google Scholar] [CrossRef]
- Klasing, K.C. Poultry Nutrition: A Comparative Approach. J. Appl. Poult. Res. 2005, 14, 426–436. [Google Scholar] [CrossRef]
- Ghahramani, A.; Moore, A.D. Impact of Climate Changes on Existing Crop-Livestock Farming Systems. Agric. Syst. 2016, 146, 142–155. [Google Scholar] [CrossRef]
- Yang, Y.; Tilman, D.; Jin, Z.; Smith, P.; Barrett, C.B.; Zhu, Y.-G.; Burney, J.; D’Odorico, P.; Fantke, P.; Fargione, J.; et al. Climate Change Exacerbates the Environmental Impacts of Agriculture. Science 2024, 385, eadn3747. [Google Scholar] [CrossRef] [PubMed]
- Ojediran, T.K.; Olofintuyi, O.S.; Ojediran, T.J. Alternative feed resources in the era of climate change: A review. Aceh J. Anim. Sci. 2024, 9, 98. [Google Scholar] [CrossRef]
- Alqaisi, O.; Moraes, L.E.; Ndambi, O.A.; Williams, R.B. Optimal Dairy Feed Input Selection under Alternative Feeds Availability and Relative Prices. Inf. Process. Agric. 2019, 6, 438–453. [Google Scholar] [CrossRef]
- Varzakas, T.; Smaoui, S. Global Food Security and Sustainability Issues: The Road to 2030 from Nutrition and Sustainable Healthy Diets to Food Systems Change. Foods 2024, 13, 306. [Google Scholar] [CrossRef]
- Prasad, R.R.; Dean, M.R.U.; Alungo, B. Climate Change Impacts on Livestock Production and Possible Adaptation and Mitigation Strategies in Developing Countries: A Review. JAS 2022, 14, 240. [Google Scholar] [CrossRef]
- Goel, A. Heat Stress Management in Poultry. J. Anim. Physiol. Anim. Nutr. 2021, 105, 1136–1145. [Google Scholar] [CrossRef]
- Uyeh, D.D.; Pamulapati, T.; Mallipeddi, R.; Park, T.; Asem-Hiablie, S.; Woo, S.; Kim, J.; Kim, Y.; Ha, Y. Precision Animal Feed Formulation: An Evolutionary Multi-Objective Approach. Anim. Feed Sci. Technol. 2019, 256, 114211. [Google Scholar] [CrossRef]
- Glen, J.J. A Mathematical Programming Approach to Beef Feedlot Optimization. Manag. Sci. 1980, 26, 524–535. [Google Scholar] [CrossRef]
- Addis, A.H.; Blair, H.T.; Kenyon, P.R.; Morris, S.T.; Schreurs, N.M. Optimization of Profit for Pasture-Based Beef Cattle and Sheep Farming Using Linear Programming: Model Development and Evaluation. Agriculture 2021, 11, 524. [Google Scholar] [CrossRef]
- Li, J.; Kebreab, E.; You, F.; Fadel, J.G.; Hansen, T.L.; VanKerkhove, C.; Reed, K.F. The Application of Nonlinear Programming on Ration Formulation for Dairy Cattle. J. Dairy Sci. 2022, 105, 2180–2189. [Google Scholar] [CrossRef] [PubMed]
- Usigbe, M.J.; Uyeh, D.D.; Park, T.; Ha, Y.; Mallipeddi, R. Many Objective Optimization and Decision Support for Dairy Cattle Feed Formulation. Sci. Rep. 2025, 15, 13451. [Google Scholar] [CrossRef]
- Mijić, D.; Vico, G.; Popović, B.; Popović, N.; Ljubojević, M.; Savić, M. OPTIMILK: A Web-Based Tool for Least-Cost Dairy Ration Optimization Using Linear Programming. Agriculture 2024, 14, 1580. [Google Scholar] [CrossRef]
- Gong, Y.; Bellingeri, A.; Fumagalli, F.; Sechi, G.S.; Atzori, A.S.; Masoero, F.; Gallo, A.; Cabrera, V.E. A Mixed Integer Linear Programming Framework for Mitigating Enteric Methane Emissions on Dairy Farms through Optimized Crop and Diet Planning. J. Clean. Prod. 2025, 511, 145636. [Google Scholar] [CrossRef]
- Campos, L.M.; Ringer, H.; Chung, M.; Hanigan, M.D. Application of a Mathematical Framework for the Optimization of Precision-Fed Dairy Cattle Diets. Animal 2023, 17, 101001. [Google Scholar] [CrossRef] [PubMed]
- Altun, A.A.; Şahman, M.A. Cost Optimization of Mixed Feeds with the Particle Swarm Optimization Method. Neural Comput. Appl. 2013, 22, 383–390. [Google Scholar] [CrossRef]
- Akintan, O.; Gebremedhin, K.G.; Uyeh, D.D. Animal Feed Formulation—Connecting Technologies to Build a Resilient and Sustainable System. Animals 2024, 14, 1497. [Google Scholar] [CrossRef] [PubMed]
- Liang, J.; Ban, X.; Yu, K.; Qu, B.; Qiao, K.; Yue, C.; Chen, K.; Tan, K.C. A Survey on Evolutionary Constrained Multiobjective Optimization. IEEE Trans. Evol. Comput. 2023, 27, 201–221. [Google Scholar] [CrossRef]
- Peña, T.; Lara, P.; Castrodeza, C. Multiobjective Stochastic Programming for Feed Formulation. J. Oper. Res. Soc. 2009, 60, 1738–1748. [Google Scholar] [CrossRef]
- Uribe-Guerra, G.D.; Múnera-Ramírez, D.A.; Arias-Londoño, J.D. Feed Formulation Using Multi-Objective Bayesian Optimization. Comput. Electron. Agric. 2024, 224, 109173. [Google Scholar] [CrossRef]
- Mia, N.; Sarker, T.; Halim, M.A.; Alam, A.; Ali, M.S.; Rahman, M.M.; Hashem, M.A. Machine Learning Overview and Its Application in the Livestock Industry. Meat Res. 2025, 5, 109. [Google Scholar] [CrossRef]
- Akintan, O.A.; Gebremedhin, K.G.; Uyeh, D.D. Linking Animal Feed Formulation to Milk Quantity, Quality, and Animal Health Through Data-Driven Decision-Making. Animals 2025, 15, 162. [Google Scholar] [CrossRef]
- Karimi-Mamaghan, M.; Mohammadi, M.; Meyer, P.; Karimi-Mamaghan, A.M.; Talbi, E.-G. Machine Learning at the Service of Meta-Heuristics for Solving Combinatorial Optimization Problems: A State-of-the-Art. Eur. J. Oper. Res. 2022, 296, 393–422. [Google Scholar] [CrossRef]
- Eriksson, D.; Poloczek, M. Scalable Constrained Bayesian Optimization. In Proceedings of the 24th International Conference on Artificial Intelligence and Statistics, PMLR, Virtual Conference, 18 March 2021; pp. 730–738. [Google Scholar]
- Daulton, S.; Eriksson, D.; Balandat, M.; Bakshy, E. Multi-Objective Bayesian Optimization over High-Dimensional Search Spaces. In Proceedings of the Thirty-Eighth Conference on Uncertainty in Artificial Intelligence, PMLR, Eindhoven, The Netherlands, 17 August 2022; pp. 507–517. [Google Scholar]
- Deb, K.; Agrawal, S.; Pratap, A.; Meyarivan, T. A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization: NSGA-II. In Proceedings of the Parallel Problem Solving from Nature PPSN VI; Schoenauer, M., Deb, K., Rudolph, G., Yao, X., Lutton, E., Merelo, J.J., Schwefel, H.-P., Eds.; Springer: Berlin/Heidelberg, Germany, 2000; pp. 849–858. [Google Scholar]
- Ahmad, M.; Alkanhel, R.; El-Shafai, W.; Algarni, A.D.; El-Samie, F.E.A.; Soliman, N.F. Multi-Objective Evolution of Strong S-Boxes Using Non-Dominated Sorting Genetic Algorithm-II and Chaos for Secure Telemedicine. IEEE Access 2022, 10, 112757–112775. [Google Scholar] [CrossRef]
- Lin, X.; Yang, Z.; Zhang, X.; Zhang, Q. Pareto Set Learning for Expensive Multi-Objective Optimization. Adv. Neural Inf. Process. Syst. 2022, 35, 19231–19247. [Google Scholar]
- Lin, J. On The Dirichlet Distribution. Master’s Thesis, Queen’s University, Kingston, ON, Canada, 2016. [Google Scholar]
- Loh, W.-L. On Latin Hypercube Sampling. Ann. Stat. 1996, 24, 2058–2080. [Google Scholar] [CrossRef]
- Hua, Y.; Liu, Q.; Hao, K.; Jin, Y. A Survey of Evolutionary Algorithms for Multi-Objective Optimization Problems with Irregular Pareto Fronts. IEEE/CAA J. Autom. Sin. 2021, 8, 303–318. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.