Optimal Crop Selection Using Gravitational Search Algorithm

For the economic growth of the crop, the optimal utilization of soil is found to be an open area of research. An efficient utilization includes various advantages such as watershed insurance, expanded biodiversity, and reduction of provincial destitution. Generally, soils present synthetic confinements for crop improvement. .erefore, in this paper, a novel diversified crop model is proposed to predict the suitable soil for good production of the crop. .e proposed model utilizes a quantum value-based gravitational search algorithm (GSA) to optimize the best solution. Various features of soil are required to be investigated before crop selection. .ese features are refined further by applying quantum optimization. .e crop selection based upon the soil requirement does not require any additional fertilizers which will reduce the production cost..us, the proposed model can select the optimal crop according to the soil components using the gravitational search algorithm. .erefore, the gravitational search algorithm is applied to the quantum values obtained from the crop and soil dataset. Extensive experiments show that the proposed model achieves an optimal selection of crops.


Introduction
For the better production of crops, an appropriate soil is required that can accomplish the required nutrients for that particular crop [1]. For this purpose, a crop-soil database is essential and an appropriate model should be established, the model through which one can select a particular crop based upon the given soil inputs. In total, there are nine parameters for the properties of soil. Based on these parameters, soils can be distinguished. Some physical properties of soil may include clay, silt, and sand. Some chemical properties of soil may include its pH value and salinity class. Marco elements like potash, nitrogen, and phosphate are also important for the growth of plants. e main aim of this study is to build a crop diversification model for Indian Punjab's farmers. erefore that, they can be skillful in the automatic selection of crops depending on the given soil data using the gravitational search algorithm (GSA) [2,3]. e relation between soil and crop is very stronger. Whenever farmers plan to grow any crop, then firstly, they will see the relation between crop and the soil components. Once the values have been checked, they are put into the system. Afterward, the system will help them by providing suggestions about the suitable order of crops for that particular soil [4,5]. In such a manner, the crops require less input for production and give more yield. rough this process, farmers can save a lot of money. And different types of crops will be grown by farmers in different types of soil.
us, in such a manner, a crop diversification mechanism can be attained [6,7].
In common circumstances for crop improvement, soils present chemical limitations. Chemical soil tests are taken into consideration to provide data related to acidity and supplement levels of each land section [8,9]. pH value describes the presence of acidity and alkalinity in soil [10]. pH levels of soil range between 0 and 14. When the pH value is 7, the soil shows natural behavior, above 7 the soil shows alkaline behavior and below 7 the soil is acidic. For most of the plants, the pH value must range between 5.5 and 7.0. e regular updates on soil chemical attributes demand a dynamic change in the supplements and groundwater archives. erefore, the general condition should be checked according to the requirements of crop [11,12]. us, deciding which crop will best fit concerning chemical attributes is defined as an ill-posed problem [13]. en, agriculturists again want to develop crops to obtain the most ideal return and the least monetary hazard [14].
In short, the farmer has to be very selective in choosing the best soil with minimum fertilizers and other chemicals for one crop. In this way, they will be able to get a good income with less investment [15,16]. e perfect utilization of soil is the foundation of all forms of maintainable land.
ere are several benefits of an ideal utilization of soils like watershed assurance, feasible agrarian generation, a decline of rustic neediness, expanded biodiversity, and security [17,18]. e rest of the paper is organized as follows. Section 2 illustrates the related work. Techniques used for optimization are discussed in section 3. e proposed technique and the related dataset are presented in section 4. e performance analysis and scope are given in section 5. e concluding remarks are present in section 6.

Related Works
In this section, the literature review is done for crop-soil relations using GSA. Some existing works of various authors are discussed and compared with the proposed work.
Han et al. [19] presented a new method known as feature subset selection in machine learning, FSS-MGSA. It is one of the widely accepted search algorithms, which is founded on the law of gravity and mass interactions between the two agents. When domain knowledge is not available, this can be used for better results. is approach can be used over ID3, Naive Bayes, K-Nearest Neighbor, and SVM to evaluate the best solution.
Jiang et al. [4] revealed that the gravitational search algorithm is good for resolving numerous problems of optimization. However, GSA suffers from premature merging when resolving difficult problems. In this paper, an improved gravitational search algorithm (IGSA) was first employed through an operator and then considers memory policies for overcoming the problem.
Sun et al. [2] noted that GSA is one of the prevalent evolutionary computation methods, which has been broadly active in data management. However, the basic GSA demonstrates a good exploration search but weak exploitation search. To promote the exploitation capability of GSA, the authors in [2] have introduced a modified GSA with crossover. In their search process, CROGSA executes the crossover-based search scheme to update the position of each solution.
Rashedi et al. [20] represented that the gravitational search algorithm has been positively functional to several scientific and engineering tenders in the last years. For the GSA and most of its deviations, every agent learns from the agents stored in the same elite group, namely, Kbest. Such type of learning policy is in nature a fully informed learning strategy, where each agent has the closed the same global neighborhood topology structure.
Some other works of Prof. Kumar and his coworkers using the gravitational search algorithm and for different applications can be found, for example, in [21][22][23][24].

e Decision Support System for Agrotechnology Transfer
Model. In numerous nations of the world, farming is an essential monetary action. Incredible quantities of individuals rely upon farming for their occupation.
ere is a constant strain to improve agricultural development because of stunning increments in the human populace. Farming is especially affected by the predominant climate and atmosphere. is requires an efficient evaluation of climatic and soil assets to rework a strong land usage proposal. More than ever, agriculturalists over the world need access to alternatives, for example, management choices of new commercial crops. Regularly, the objective is to get more significant returns from the crops and the possibility of growing a crop for a particular soil. Parallel to this, rotation of crops should be the main target to avoid the degradation of soil. Likewise, while sustaining the yield levels, they want to (a) Substantially improves the income (b) Reduce soil degradation (c) Exploit local market opportunities To fulfill the abovementioned points of poor farmers in the tropics and subtropics, a group having named IBSNAT (International Benchmark Sites Network for Agrotechnology Transfer) started work in this direction in 1982. e purposes defined for the IBSNAT project by its technical advisory committee were to (1) Comprehend ecosystem procedures and components; (2) Incorporate from a comprehension of procedures and instruments, and ability to foresee results; (3) Empower IBSNAT customers to put on the prescient ability to control results. In this regard, IBSNAT was a project on systems analysis and simulation as a way to provide users with options for change. In this project, many research institutions, universities, and researchers spent an enormous amount of time and resources and focused on: (a) Creation of a "decision support system" capable of simulating the risks and outcomes of elective decisions, through multiinstitute and multidisciplinary approaches (b) Definition of the minimum amount of data required for running simulations and assessing outcomes (c) Testing and application of the product to global agricultural problems require site-specific yield simulations e significant result of IBSNAT was a decision support system for agrotechnology transfer (DSSAT) [25].
is recommended system is utilized as a research and educating tool. DSSAT is a group of autonomous programs that operate together, and crop simulation models are at its center [25]. DSSAT [25] has been being used throughout the previous 15 years by scientists. Figure 1 shows that the DSSAT package includes models of 16 different crops with software that encourages the assessment and use of the crop models for various purposes. During the most recent couple of years, it has gotten progressively hard to maintain the DSSAT crop models, partly because of the actuality that there were different sets of computer code for various crops with little attention to software design at the level of crop models themselves. Complete explanation of the DSSAT cropping system model is presented in Figure 2 [25].

e Agricultural Production System Simulator.
is model is developed to provide an accurate prediction of crop production by observing climate, soil, and management factors. One of the most active areas of this model is related to soil, in which soil water, soil nitrogen, soil phosphorus, soil pH, and erosion modules are involved. In the APSIM model, with the help of the soil's pH module, one can represent the acidification of soil and the value of pH changes randomly [26].

InfoCrop Model.
InfoCrop model is a powerful recreation model for the evaluation of crop yield disasters of insects and the ecological effect of agro-biological systems in tropical situations. e issues of agribusiness in numerous tropical nations are getting progressively extreme step by step because of expanding food requests driven by populace development, stagnation in ranch profitability, and mounting yield misfortunes because of different irritations, expanding defenselessness to worldwide natural changes, and the need to diminish the emanation of ozone-depleting substances. Instruments and procedures are expected to help with creating systems that can prompt higher food creation, forestall crop creation misfortunes, and guarantee insignificant ozone harming substance emanations while keeping up soil ripeness. InfoCrop, a conventional powerful crop model, has been created to fulfill the particular necessity [27]. It gives an incorporated evaluation of the impact of climate, assortment, nuisances, soil, and management's practices on crop development and yield, such as on soil nitrogen and natural carbon elements in high-impact just anaerobic conditions and ozone-depleting substance discharges.
e Soi Texture Mater module contains detailed information about various attributes of the soil. e values of various attributes of soil are needed to put layerwise in the model. Soil attributes of every layer contain different values.
is module gives information to the farmers about all available nutrients of the soil at different layers.
is information will be useful for a farmer to plant his/her crop at the proper depth. In this way, a farmer will get a high yield of a crop by sowing at the proper required depth.

Cropping System Simulation Model (CropSyst).
CropSyst (cropping system simulation model) is a userfriendly, conceptually simple but sound multiyear, multicrop, everyday time stage cropping system simulation model created to fill in as an investigative device to examine the impact of atmosphere and soil on cropping system efficiency [28].
e CropSyst recreates the soil water and nitrogen spending plants, crop development and advancement, crop yield, residue production and disintegration, soil disintegration by water, and saltiness. e improvement of the CropSyst began in the mid-1990s, developing to a set-up of projects including a cropping framework test system, a climate generator, the GIS-CropSyst cooperator program, a watershed model, and a few various utility projects. One key component of the CropSyst is the usage of a conventional crop system that empowers the recreation of both annual and multiannual crops and crop rotation utilizing a solitary arrangement of parameters. e reenactments can last a small amount of a year to several years. e model has been assessed in various areas by contrasting model evaluations with information gathered in field tests. e CropSyst has been applied to perform chance and monetary investigations of situations including diverse cropping frameworks, executive's alternatives, and soil and climatic conditions. e CropSyst is a user-friendly model written in C++.

Functionality of CropSyst.
A menu strip is available in this model for various operations. Menu and submenu choices might be chosen with the mouse. Extra capacities shown in the status line at the base of the screen are regularly accessible by squeezing the particular capacity key or key grouping or by determination with the mouse. A few menu choices can be actuated straightforwardly from the console. e menu alternative will show that a key arrangement can be squeezed to enact the choice [29]. Extra tasks that can be initiated from the console might be shown in the status line. e main menu gives the following options: (a) File, (b) Window, (c) Control, (d) Management, (e) Soil, (f ) Crop, and (g) Location.

Soil Module.
e CropSyst simulation model requires only minimal initialization parameters to provide initial soil water, nitrogen, and organic matter profiles. Soil module parameter window is shown in Figure 3.

Simulation Control.
is module handles the simulation documents that contain data, permitting the client to fabricate simulation conditions from an existing area's database, soil yield, and supervision records. e simulation documents likewise contain data concerning the time of simulation and initial values for model factors that require initialization. e simulation documents are made and altered utilizing the recreation control parameter supervisor.
is editor permits the client to join segment parameter records to fabricate the recreation run and to alter the introduction constraints.
e essential components to construct a reproduction control record comprise the time of recreation and particulars of soil area and crop diversification strategies. e part records are chosen by squeezing the filename button and utilizing the file requestor to pick the particular files. e Edit button close to the filename button will permit the as of now the chosen record to be altered. e simulation control parameter window is shown in Figure 4. e agricultural district can be considered as an assortment of individual fields that shift in ecological conditions and management practices. A daily increment in    Mathematical Problems in Engineering 5 population request induces an increase in agricultural creation with accessible assets. Proficient administration of accessible assets to variable climate conditions is fundamental to expand the profitability of farming. Likewise, the focal point of agrarian creation is changing from an amount towards quality and supportability. Arrangement of these new difficulties requires the thought of how various segments cooperate to impact plant development. ese changes power ranchers and agrarian counselors to manage to expand the greater part of data. ey have to break down immense and inconsistently found data assets. e data collection process is lumbering and at times questionable. Frequently, the task to choose, consolidate, and break down the data is demanding. As information technology has opened up new challenges to computerize information and investigation, computer programs that reproduce the crop development or yield of crops under various management systems assist ranchers with settling on specialized choices to deal with their crops better. ese models are broadly applied to gauge the effect of the atmosphere, soil, and agricultural managements on yield, water and nitrogen balance, dry spell adjustment, and other cropping system issues in various areas.

Proposed Optimization Technique
e optimization techniques have the ability to compute complex relationships among soil and plants for better crop diversification. It helps in controlling the maximum beneficial crop design [30]. For simulating the soil-plant systems, a computer-based model with various new mathematical optimization techniques is required. e effective tool for facilitating crop diversification is planners for making sound decisions before each crop season. e main goal of crop diversification is to get numerous crops instead of only one or two [31]. ereafter, a crop is selected in such a way so that it gives maximum production with minimum investment [32].
Optimization techniques are used for taking attention towards the complex issues in asset portion, transportation and coordination's venture choice, arranging, and scheduling.
ese problems are extensively utilized in manufacturing and business sectors [33]. However, there exist similar optimization problems in agricultural systems such as crop selection [7], country-wide crop planning [34], irrigation planning [35], vegetable production [36], and sugarcane transportation [20]. e optimization problems are defined as mathematical programming models to optimize a predefined engineering problem [37]. ese models range from single to multiobjective and from direct to nonstraight forms. e optimization methods [29] used in the study range from conventional methods to computational intelligence (CI) techniques such as genetic/evolutionary algorithms [38,39].
In this paper, we have proposed GSA for optimal crop selection for the particular type of soil. Due to the inherent parallelism, self-organization, adaptation, and self-learning features of the EAs, they have been applied successfully to solve many problems where the classical approaches are either unavailable or generally lead to unsatisfactory results. e reason behind choosing GSA is that it has succeeded to solve many optimization problems in recent years [19,32].

Gravitational Search Algorithm
3.1.1. Brief Description. Galileo was the one who founded the concept of gravitation and further Newton and Albert Einstein also researched a lot in this area [40]. In general, mass is the volume of matter in a given object. ere are three types of masses which are inertial mass, gravitational mass, and passive gravitational mass. Newton was the one who directed that every particle attracts other particles with some amount of force. ese particles are directly proportional to the product of the active mass of that particle and inversely proportional to the square of the distance between both particles. When the force is applied to an object, the resulting acceleration depends on both force and the inertial mass of the object. For the motivation of GSA, gravity and mass concepts are to be used [41,42].
Rashedi was the one who firstly worked for making the gravitational search algorithm (GSA) [20]. In GSA, the agents who perform search work are considered objects with a specific mass where every object in the system relates to other objects by some gravitational force. e agent's position helps in presenting the candidate solution for the problem whereas the mass of the agent is given during an objective function. e movement of all objects is done with the help of the gravitational force in achieving the suboptimal solution [20]. e main idea of GSA is explained in the following steps: (a) It is created by the law of mass and gravity relations. (b) e agents in GSA are the solution [20], and these agents work together with each other through the gravity force. (c) e mass helps in determining the performance of each agent. (d) Agents in the population are called to be objects, and these objects always attract each other. e object with a heavier mass will attract others because of the gravity force. (e) e agents who have low mass will move slowly as compared with agents having greater weight. (f ) e agent with a heavier mass helps in providing the best solution. Figure 5 shows the flowchart of GSA. Firstly, a random population is generated. Afterward, evaluate the fitness of the population. Update the best and worst among the populations. en, calculate M and A for each agent that has been selected. Update the agent's position and velocity. Lastly, if the agent is meeting all requirements, then turn up with the best solution; otherwise, again restart from evaluating the fitness value step. Algorithm 1 demonstrates the working of GSA.

Performance Analysis
e soil's attribute values are used to determine a suitable crop for a particular field. e values of all required soil attributes can be obtained by testing the soil in the soil testing laboratory. After getting the values of the soil's attributes, one will give an input of these soil's attributes to the proposed decision support system for crop diversification (DSSCD) model. Based on the input values, a list of crops in a particular order according to the crop preferences for soil properties will be displayed as shown in the graph (see Figure 6). A farmer can select the best suitable crop from the list for his/her field. In this way, a farmer can go for a crop with the best suitability of soil and which will take less chemical fertilizer. If a farmer belongs to an area where groundwater, as well as canal water, is less than the requirement, then he/she can choose a crop that consumes less water. In this way, crop diversification can be achieved by using this model, which is the need of the hour.
In Figure 6, a relationship between crop and soil's attributes has been shown. e soil's attributes help in finding out a list of crops for a particular type of soil. If the soil is suited for a crop, then definitely less input of chemical fertilizer will be required. On the other hand, if the soil is not well suited for the cultivation of a crop, then definitely more inputs of chemical fertilizers and more efforts will be required to get the best results. As a result, in this case, the cost of production would be higher. e proposed technique used in the DSSCD model helps to detect a list of crops suitable for a particular type of soil to get high production.

Verification and Validation.
Verification is a process of checking the syntax and semantics errors in the final product. At this stage, developers have to make sure that the model is bug-free and should execute properly. It is a static process. e researcher has checked that the proposed decision support system for crop diversification (DSSCD) model is properly framed and bug-free and found very useful for end-users.
Validation is a dynamic process. is process is used to check whether the proposed model is fulfilling the requirements of the customer. Validation is used to authenticate the output of a system. e proposed DSSCD model is validated and meets the final customers' expectations. For the authentication of the proposed DSSCD model, various samples of the soil have been taken from different regions of Indian Punjab as shown in Table 1. Values of the different attributes of soil are entered as input to the proposed model, and the output from this model shows that it meets the final customers' expectations and requirements. erefore, the output of this system is tested in various ways to get the optimal results. For various inputs as shown in Table 1, it is validated that this system gives a list of suitable crops for a given particular type of soil according to crop-soil dataset. Note that in Table 1, S.N. * stands for Sample Number, N * stands for Nitrogen, P * refers to Phosphorus, and K * stands for Potassium. Moreover, the unit of nitrogen, phosphorus, and potassium is kilogram/hectare. Data given in Table 2 of soil sample 1 are used as input to the proposed model to get a list of suitable crops according to the given values of soil's attributes.     8 Mathematical Problems in Engineering In Figure 7, the result is showing the preference of wheat, paddy, and cotton crops compared with other crops for a selected set of properties of soil. On the other hand, corn and peanuts have less possibility to grow in such kinds of soil.
Values for soil sample 1 of various soil's attributes are given as input to the proposed model and are shown in Figure 8. e best fitness of the proposed model of the detected crop is wheat, and the fitness value is approx. 7 as 10 is the highest for the best fit crop. Figure 9 shows the crops suggested by the DSSCD model for sample 1. Table 3 shows the values of soil sample 2. e result is showing the preference of sunflower, cotton, and sugarcane crops compared with the other crops for the selected set of properties of soil. On the other hand, wheat, paddy, and rose have less possibility to grow in such a kind of soil.
Values for soil Sample 2 of various soil attributes are given as input to the model and are shown in Figure 10. e best fit detected crop is sunflower, and its fitness value is approximately 6 as 10 and is the highest for the best fit crop. Subsequent section demonstrates the proposed method in detail. e gravitational search algorithm is applied to the quantum values obtained from the crop and soil dataset.

Crop and Soil
Dataset. For developing a model, the record of numerous crops and different soil data should be stored. e crops are categorized into two main groups, i.e., Kharif and Rabi. To prepare the dataset for crops, the physical properties of soil need to be observed. Table 4 shows the essentials of soil for a particular type of crop. By giving weights to the various parameters of the soil, we will be able to discover the sequence of the crops to be selected for the field. It will further improve its production. For showing in the number system, salinity classes are defined in Table 5.

Variable Cost and Market Price of Various Crops.
e market price and variable cost are the other most important parameters which need to be considered. e cost directly or indirectly depends on the type of soil. If the soil is suitable for the crop, then definitely variable cost will be low.
us, by comparing the market value of all crops and types of soil, one can predict the suitable optimal crop by applying the proposed algorithm.
Average yield (q/acre) (AY), total variable cost (TVC), gross returns (GR), and returns over variable cost (ROVC) where f (1) . . . f (6) are parameters of the soil. ese parameters can be more or less depending upon the farmer's requirement. In the proposed method, six parameters of the soil are considered. e features of a crop for output growth are selected as the objective function, i.e., where t i is the feature attribute of a crop. t1, t2, t3, . . . , t i are described for each crop as follows:    Moderately saline 3 4 Nonsaline 4 Table 6: Comparative enterprise budget of Kharif crops [38].
where lowerbound cropj and upperbound cropj differ from crop to crop and cropj is j th crop designated for reference. e main objective of this research is to enhance fitness. By using this, one can select those crops from their locations that have a maximum value of the objective function. e number of crops depends on the farmers and locality. In this work, 10 crops for soil-crop relation management are taken.

Solution for Crop Planning Framework Based on Crop
Dataset. In Punjab, there are more than 30 crops that can be grown. According to the categories, crops are divided into two categories which are Kharif and Rabi. erefore, according to the season, crops are to be cultivated. According to the given algorithm, the crop selection depends on returns over variable costs. Furthermore, the variable cost depends directly or indirectly on the soil properties. To check the appropriate crop for the field, the first thing is to check the properties of the soil of the given field. is can be possible by checking the soil in the laboratory. Once a farmer will get the soil report, then all those soil parameters will be input into the algorithm. After processing the values of all those given soils' parameters, one will get the crops in a particular sequence according to the production of the crops for the given soil. en, that list will be input to the next step. In this step, the returns over variable costs will be calculated according to the previous years' variable cost and the current market price of the crop. Whatever, the list of crops was in the first step that will be compared with the output of the second step. Now, in the third step, one will be able to get the list of crops which will be according to the soils' properties and returns over the variable costs. Now, the output of the third step will be the list of crops for those soils which are suitable for good production and will give a maximum return according to the given market price and returns over the variable costs. In this way, farmers can easily determine the suitable crop for their fields of production as well as the price point of view by taking help from this GUI based model.

Performance Analysis
e soil parameter values are used to determine a suitable crop. Find the values of all required soil parameters by testing the soil in the laboratory. After getting the values of the soil's parameters, one will give input to the proposed method for comparison. Based on the values, a list of crops in descending order according to the production will be displayed as shown in the graph (see Figure 11). A farmer will select any crop from the first three crops from the list. In this way, a farmer can go for the crop with the best suitability of soil and which will take less water. If a farmer belongs to an area where groundwater, as well as canal water, is less, then he can choose the crop according to that. Crop diversification can be achieved by using this method, which is the need of an hour.
In Figure 11, the relationship between crop and soil parameters is represented. e parameters help in finding out the best suitable soil for that particular crop. If the soil is suited for the crop, then definitely, we will have to pay less. Whereas the soil is not suited for the cultivation of crop, then definitely lots of effort and work is to be done for getting the best results. erefore, in this case, much cost will be needed. Our proposed work helps in presenting the model which will help in detecting the soil which will be best suited for the cultivation of the particular crop.

Scope.
Crop diversification is one of the widely used phenomena. Crop diversification helps in potential risk management with uncertainty, income and employment generation opportunities, ability to reduce diseases, weed and insect build-up, the possibility to increase soil fertility, and among others. In this case, when a farmer is having a choice for selecting the appropriate crop for a specific soil, then the farmer can get the benefits of using such a model. In this way, Punjab's farmers can save groundwater by growing other alternative crops instead of paddy, and other options he can get by using the above mentioned method. Using optimization techniques, one can implement and can provide a good GUI to the final user.

Conclusion
Crop diversification helps farmers for optimal crop selection for a specific soil. It helps farmers to save groundwater by growing alternative crops instead of paddy. e selection of optimal crops can be achieved using various machine learning models. However, the existing crop selection techniques suffer from overfitting and hyperparameter tuning issues. erefore, in this paper, a novel gravitational search algorithm-based optimal crop selection model has been developed. Extensive experiments have been performed to evaluate the effectiveness of the proposed technique. A comparative analysis reveals that the proposed technique is able to achieve remarkable results. erefore, the proposed technique can be used for real-time optimal crop selection systems.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request. Mathematical Problems in Engineering 13