Application of a genetic algorithm in solving problems of environmental protection in agro-industrial production

. The study is devoted to the problems of environmental protection in agro-industrial production. The purpose of the work is to identify the main aspects of the negative impact of agro-industrial complexes on natural resources and to develop effective strategies to reduce environmental impact. The research methodology includes an analysis of the use of chemical fertilizers, pesticides and water resources, as well as an assessment of their impact on soil, water bodies and the atmosphere. The results obtained make it possible to identify key factors influencing the level of pollution and determine the prospects for the introduction of eco-technologies in agricultural production. The study provides important information for the development and implementation of sustainable development policies in the agro-industrial sector, taking into account the balance between food production and environmental conservation.


Introduction
In the modern world, environmental issues are becoming increasingly relevant, especially in the context of the developing agro-industrial complex.Agricultural activities aimed at food production play a key role in meeting the needs of the population.However, in parallel with the increase in agricultural production, serious environmental problems arise related to the pollution of water resources, soils and the atmosphere.Research into the environmental impacts of agriculture is essential for developing sustainable production strategies that balance food needs with responsible use of natural resources.In this study, we focus on the main aspects of the environmental impact of agriculture, focusing on water pollution [1].
The purpose of our research is to analyze the environmental consequences of the agroindustrial complex on water resources and develop proposals to reduce the negative impact.We will look at the main sources of water pollution, such as the use of chemical fertilizers, pesticides, and the impact of livestock farming.A detailed study of these factors will allow us to develop practical recommendations and strategies aimed at improving the environmental sustainability of agro-industrial production.The results of the study can be used to develop policies and practical solutions that promote more responsible use of natural resources in the agricultural sector and create a balance between food production and environmental protection.The scientific novelty of the proposed research lies in the integration of mathematical optimization methods, such as genetic algorithm and simplex method, to solve the problem of environmental protection in agro-industrial production.Approaching the problem through a combination of these methods provides the opportunity for a more in-depth analysis and effective management of environmental aspects in agriculture [2].
Environmental quality assessment is a comprehensive process aimed at measuring and analyzing the state of the environment, identifying and assessing the factors affecting it, and determining the effectiveness of measures taken to protect and restore it.This process includes several key steps [3] : Collect data on the state of air, water, soil, biodiversity and other aspects of the environment.This may include the use of sensors, surveys and statistics.
Evaluate collected data to identify trends, pollution levels, changes in biodiversity and other indicators.The analysis allows us to determine how susceptible the environment is to human activity.
Comparison of the obtained data with established norms and standards that are defined to protect the environment and human health.This involves assessing how current levels meet established standards.
Determining the impact of various sources of pollution, changes in natural ecosystems and other factors on the environment.This also includes assessment of the impact on human health and living organisms.
Based on data analysis and impact assessment, recommendations are developed to improve the situation.These could be measures to reduce pollutant emissions, restore ecosystems, introduce impact reduction technologies, and others.
Environmental quality assessment is a process that requires constant monitoring and periodic review.Information about changes in the environment may require adjustments to policies and measures to maintain and improve environmental quality.Environmental quality assessment is essential for effective natural resource management, sustainable development, and ensuring human health and biodiversity.It also plays an important role in the development and implementation of environmental policies and strategies at the national, regional and local community levels.The use of both a genetic algorithm and a simplex method within one study makes it possible to evaluate their relative advantages and complementarity in solving complex environmental problems.Consideration of the variables and dynamic conditions of agricultural production, which is a relevant and important aspect in the conditions of a changing natural environment.The study is aimed at developing an integrated approach to environmental protection, taking into account both linear and nonlinear dependencies between parameters and factors in agricultural production [4][5].

Materials and methods
The studies analyzed chemicals for which sanitary standards are usually established in soil, and their typical quantitative values in different regions of the world [6]: Heavy metals:  Lead ( Pb ) : Typically in the range of 50-100 mg/kg soil. Cadmium ( Cd ) : Typically in the range of 0. To develop an optimal mathematical model in the field of environmental protection in agro-industrial production, various aspects can be considered, such as efficient use of resources, waste management, pollution minimization and others.Below is a generalized mathematical model that can be adapted to specific conditions and requirements: The decision variables are: Objective function: Minimize: ( , ,..., ) min Restrictions: Budget restrictions: Restrictions on resource use: Limits on emissions and pollution: Efficient use of resources: , ,..., 0 Where: 1 2 ( , ,..., ) Objective function.
To solve environmental problems in agricultural production, various optimization methods are used.One of them is a genetic algorithm, which is based on the principles of natural selection and genetic evolution.This method allows you to find optimal solutions under conditions of variable and dynamic factors [7].
The simplex method is also used, which is used to solve linear optimization problems.This method provides interpretability of solutions and is well suited for local areas in agricultural production problems.
The simplex method is an iterative method for solving linear programming (LP) problems.It is based on searching for an optimal solution in the multidimensional space of polyhedron vertices, limited by a set of linear equations and inequalities.
Method steps:  The starting point is entered as a basic feasible solution. Directions for improving the target function are assessed. The reference direction is selected and the reference point is found. The process is repeated until the optimal solution is achieved. The genetic algorithm is inspired by the processes of natural selection and genetics.It is used to find optimal or approximate solutions in spaces where finding all options is a computationally complex task [ 8].Method steps:  Generation of an initial population of solutions. Assessing the fitness of each individual in a population. Selection of individuals using probability proportional to their fitness. The use of genetic operators (crossing, mutation) to create new individuals. Repeat the steps until the stopping criterion is reached.
Application to environmental optimization in the agro-industrial sector:  The simplex method can be used to optimize costs for fertilizers and pesticides while maintaining restrictions on their use.

Results and Discussion
To describe the genetic algorithm in mathematical form, the main elements are defined: Solution space (S): The set of all possible solutions (individuals).In this case, this is the set of possible values of the variables.
Fitness function (f(x)): An evaluation function that measures the " goodness " of each individual.For this problem it is equal to -5x1 -3x2 (cost minimization).
Genetic operators: Crossover : Combining the characteristics of two parents to create offspring .In this case, this could be, for example, mixing the values of the variables x1 and x2.
Mutation : Randomly changing the values of variables to introduce diversity into a population.
Stopping criteria: Conditions under which the algorithm terminates (for example, a fixed number of generations).
Mathematically, a genetic algorithm can be represented as follows:  [2.59, 12.09] gives an objective function (cost) value of 49.22.This means that at these values of the variables the function reaches its minimum value, and this is the optimal solution for your problem.
The genetic algorithm is applicable for optimization in complex, multidimensional solution spaces, which is especially important for problems in the agricultural sector, where there are many variables and restrictions.The simplex method is limited in solving complex, nonlinear problems, which can reduce its effectiveness in agricultural production [8].
The genetic algorithm allows one to find global optima, which is important for agricultural problems with several possible strategies.The simplex method focuses on local optima, which can lead to the omission of global solutions [9].
The genetic algorithm is more resistant to noise, parameter changes and unexpected events, which is important in the agricultural sector where conditions can change.The simplex method can be sensitive to initial conditions and changes, which reduces its stability [10].
The genetic algorithm is easily parallelized , which can lead to a faster search for optimal solutions.The simplex method is generally less suitable for parallel computing, which can be a disadvantage when working with large data sets.
The genetic algorithm is effective in solving complex problems with global optimization, while the simplex method may be preferable in problems with more local structure and interpretable solutions.It is important to adapt the choice of method to the specific requirements and characteristics of the task [11].

Conclusion
Agro-industrial production plays a key role in ensuring food security and meeting the needs of the population.However, the increase in crop and livestock production is accompanied by a number of environmental problems affecting the environment.Environmental protection in the agro-industrial sector is becoming a pressing issue that requires integrated approaches and sustainable solutions.Environmental protection in agricultural production becomes more effective when optimization methods are applied.Genetic algorithm and simplex method provide different tools for solving complex problems of sustainable agricultural production.The choice of method depends on the specific conditions of the problem, their complexity and requirements for optimization results.The study examined two different optimization methods: a genetic algorithm and a simplex method, in relation to problems related to environmental protection in the agro-industrial sector.Each method has its own unique characteristics that may be advantageous in certain contexts.The genetic algorithm, due to its ability to operate in multidimensional spaces and find global optima, is an effective solution for agricultural optimization problems.Its resilience to changing conditions, high parallelism and ability to handle complex scenarios make it preferable in the context of variable and dynamic agricultural production conditions.
Thus, the choice between a genetic algorithm and a simplex method depends on the specific characteristics of the problem, its complexity, requirements for global optimization and the level of interpretability of solutions.The context and characteristics of the problem should be taken into account for more effective application of the optimization method in agro-industrial production.
3-3 mg/kg soil. Mercury ( Hg ) : Typically in the range of 0.1-1 mg/kg soil. Chromium ( Cr ) : Typically in the range of 50-150 mg/kg soil. Nickel ( Ni ) : Typically in the range of 50-200 mg/kg soil.Pesticides:  Dichlorodiphenyltrichloroeth (DDT) : Typically in the range of 0.001-1 mg/kg soil. Hexachlorocyclohexane (HCCH) : Typically in the range of 0.01-2 mg/kg soil. Organophosphates : Varies depending on the specific compound. Petroleum products:  Benzene, toluene, ethylbenzene, xylene : Typically in the range of 0.1-10 mg/kg soil. Polycyclic aromatic hydrocarbons (PAHs) : Typically in the range of 0.1-5 mg/kg soil.Salts:  Lead and cadmium salts : Within the established standards for each metal. Nitrates and nitrites : Usually in the range of 10-50 mg/kg of soil. Phosphates : Varies depending on region and soil use. Metal fluorides : Within established standards for each metal. Polychlorinated biphenyls (PCBs) : Typically in the range of 0.001-1 mg/kg soil. Dioxins and furans : Varies depending on the specific compound.
Objective Function Value (Cost)" are the results that are output after completion of the evolutionary process."Best Candidate" represents the values of the decision variables that produce the best result, and "Objective Function (Cost) Value" represents the actual value of the objective function (cost) for that best candidate.In your case, the best candidate is the initial population of individuals.Main loop: Fitness estimate fi , i= 1,2,... ,N, where N is the population size.Selection: Selecting individuals to cross and create a new population P(t+1).Crossbreeding: The creation of new individuals by crossing parental pairs.