1. Introduction
Population growth in the world naturally causes an increase in food needs, and with the prediction that the world population will reach nine billion people by 2050, agricultural production should be increased by 70% [
1]. Therefore, growing crops becomes very important. However, agricultural practices using traditional methods to meet people’s food consumption needs can have quite inefficient results. Therefore, it becomes essential to manage agricultural activities using different advanced methods. Additionally, environmental protection and sustainability have also become basic needs [
2]. In this regard, smart farming mechanisms using new technologies have become very popular [
3]. It should not be forgotten that not only modern agriculture methods but also sustainable solutions should be proposed. With the creation of efficient solutions to meet identified needs, it may be possible to provide the next generation with a lifestyle at least equal to that of the current generation [
4] and to use existing natural resources efficiently in this direction. Otherwise, we may face not only the problem of hunger but also challenges such as energy and migration crises. In summary, problems such as global climate change, increasing conflicts around the world, migration crises, improper use of existing agricultural lands, decrease in precipitation levels, and incorrect use of water all have made the use of modern agriculture systems mandatory.
Technologies such as remote sensing, the Internet of Things (IoT), intelligent agents, autonomous robots, unmanned aerial vehicles (UAVs) [
5], Internet of Vehicles (IoVs), wireless ad-hoc networks, big data analytics, and deep learning (DL) have shed light on promising visions for a breakthrough in agricultural applications [
6,
7,
8,
9]. Smart farming can be applied to improve crop quality and profit and reduce costs by optimizing various processes such as environmental conditions, growth status, soil status, irrigation water, pest control, fertilizers, weed management, and greenhouse production environments [
10]. For example, questions such as which product should be planted in a given region, how efficient the use of water resources should be, and accurate estimation of the harvest time all can be answered and monitored in smart agriculture. Thus, smart agriculture ensures green technology by eliminating the inefficient and faulty methods of traditional agriculture, and it can also further reduce problems such as leakage and emissions and their impact of climate change [
11].
Since the role of smart systems in sustainable agriculture is increasing day by day, many technological methods have been used and recommended in recent years. Smart farming optimizes complex farming systems by applying new and modern technologies in agriculture. It aims to produce and collect more quality crops with less investment, irrigation, and human labor. In general, plant growth and harvest processes are critical issues in smart farming. Therefore, intelligent mechanism models will be very useful in solving identified problems and achieving specified goals. However, an approach that covers the whole process, not a single or specific goal(s), is important. In this regard, in this study an application model is proposed that covers this process from cultivation to harvesting. This model can be used to grow a variety of crops on any farmland. For this, software and hardware approaches are used together, making it possible to use them in the real world. Previous studies have been focused on certain perspectives and/or reaching a limited number of goals.
The main aim of this study is to be able to solve the problems with green and sustainable agricultural practices from the field to the table, and to ensure that people can access agricultural products, which are their basic needs, without interruption. In addition, it is aimed at reducing product losses, preventing waste, increasing productivity, and even reducing to zero waste due to faulty planting and similar causes at every stage of the food chain. Part of these efforts should be the aim of ensuring the full physical, mental, and social well-being of agricultural workers, by minimizing recently increasing work accidents and occupational diseases of those working in the agricultural sector with preventive and protective measures. All these concerns can be resolved in a sustainable way by providing a single mechanism system from planting to harvesting.
This study focuses on tracking and harvesting crops on large-scale farmlands in three stages. In the first phase (cultivation), planting the crops in the most optimized way is sought by using an algorithmic approach (Swarm Sand Cat Optimization (SCSO) algorithm) during the planting phase. In this way, the location of the crops that need to be planted (without the need for human or manual intervention) is determined in accordance with the specific requirements of any crops. An optimization approach can be a good solution since it is a nondeterministic polynomial-time hardness (NP-Hard) problem to meet this need with analytical and similar solutions. The SCSO algorithm could be a successful solution in determining the correct places of the products in accordance with its working mechanism. In this way, optimized results can be obtained without human intervention, with the lowest error rate and lower operation cost.
In the second stage (control and monitoring), the growing processes of the planted crops are tracked and monitored thanks to IoT devices. With the IoT devices, the status of the planted products is constantly checked, and the results are transferred to the next stage as an input for instant processing. The third phase (harvesting) is the product collection stage. At this stage, a metaheuristic method (Reverse Ant Colony Optimization) is proposed. The results from the third stage are presented as the optimum path for autonomous robots (IoVs) to harvest crops. In this third phase, a new fitness function is also defined. Since the second and third stages are carried out simultaneously, it is ensured that there will be a sustainable model. The Reverse ACO (RACO) is proposed as a new improvement to the ACO algorithm. Thanks to this algorithm, the results from the second stage can consistently and regularly provide the input for the third stage correctly. The performance of the proposed method was evaluated in different scenarios and situations and compared with similar studies in the literature. The following benefits were also obtained with the application developed in this study:
- (1)
The efficient use of resources such as human and natural resources by providing sustainable and smart agriculture. In other words, it allows farmers to constantly monitor crop variability and stress conditions. In addition, the occupational health and safety of the farmers can be increased, the best products can be harvested, and efficient resource consumption and profit increase will be possible.
- (2)
Assistance in gaining maximum profit with minimum consumed energy and time by considering several objectives in the fitness function. As an example, the proposed mechanism generates the optimized routes for each autonomous robot in harvesting crops at the annual harvest.
- (3)
Providing decision-makers with an infrastructure architecture for autonomous agricultural robots.
- (4)
Collecting crops in the required periods with a scheduling mechanism; thus, it prevents early or late harvesting. Meanwhile, it is adaptive to several crop types. In this study, tomatoes were considered as an example case.
- (5)
Maximum profit, maximum quality, efficient use of resources such as human labor and water, the accurate location for planting each crop, finding the best time to harvest, and consuming the least power.
In
Section 2 of this paper, the literature review is discussed. The proposed model and application are explained in
Section 3. In
Section 4, the simulation results are evaluated. The last section of the study includes the conclusions and possible further studies.
2. Literature Review
This study focuses on the most efficient crop-harvesting methods in farmlands (tomato assumed as a case study). In this regard, studies and general perspectives about the new generation of agriculture in the literature are presented. As is known, there are many types of sowing, monitoring, and harvesting in agriculture. Although traditional methods are successful in growing crops, they have many disadvantages.
In traditional agriculture, farmers cannot prepare the soil properly because they only use hoes after burning the bush and clearing the field. In addition, they cannot get fertile results as they can only scratch the earth and mix the ashes into the soil [
12]. The burning method damages the soil, and as a result, erosion is exacerbated as this burnt soil is left bare. Furthermore, roots cannot go deep enough to absorb water and mineral salts from the soil, and thus water (the most important and critical resource) is used inefficiently. The soil can become very poor in a short time due to the usual techniques applied incorrectly and inefficiently, and to solve this problem (i.e., the soil becomes fertile again), the field must be left fallow for two or three years [
13]. Since the farmers cannot stay idle during this period, they move to another field, which is called alternating cultivation. As a result, large-scale lands will not be used, and bountiful crops will not be produced. Mechanism systems blended with new technologies can be the solution to these problems. On the other hand, it is also very important to harvest the crops efficiently, on time, with the maximum amount and quality and least use of energy and resources. However, traditional methods consume resources excessively, the rate of poorer-quality crops is higher, the profit rates are not fully maximized, and most importantly, they cannot offer sustainability [
14]. These problems can be resolved with the transition to modern agriculture. In this regard, the IoT and mobile robots provide great contributions. In the solution to these complex situations, software techniques and methods are needed together with new technologies. According to this, artificial-intelligence-based smart methods are becoming more important day by day. In solving this type of complex problem, learning or heuristic-based solutions may be especially useful—we should not forget that some problems in this area may not have a deterministic solution. Finally, taking into account increasing human population and food demand, these problems will have dire consequences. For the reasons stated, we can conclude that intelligent agriculture is an essential requirement.
The IoT and similar technologies such as wireless sensor networks (WSNs) [
15], which have become popular in recent years, are used to meet the needs in this field. The IoT in agriculture means using sensors and other devices to turn every element and action involved in farming into data [
16]. Scientists believe that the IoT will lead the agriculture sector to agriculture 4.0 and even agriculture 5.0 in the future [
17,
18]. This new philosophy, data-driven agriculture, is also expressed in the literature with several different names: Agriculture 4.0, digital farming, or smart farming [
19]. This smart farming can be combined with the precision agriculture concept in data management, leading to more accurate and efficient results [
20]. In traditional methods, farmers had to go to the farmland and check the condition of their crops, and they would decide based on their experience whether it was time to harvest. New technologies such as the IoT are very useful in solving these problems, and more, to achieve greater efficiency, sustainability, and availability rates. Additionally, in traditional methods, the experienced farmer had a higher success rate, so younger farmers had a lower chance at succeeding. However, thanks to these new technologies, this problem can now be eliminated. On the other hand, savvy farmers can also adapt to new methods. IoT technologies are predicted to play a major role in the generation of large amounts of valuable information in all types of agriculture and the advancement of this sector [
21]. In addition, the IoT is thought to be a potential solution to increasing agricultural productivity by 70% by 2050 [
22]. In [
23], the authors designed an IoT-based system to monitor air and soil parameters and develop mobile and web-based applications. They tried to monitor crop and yield forecasts in real time. In [
24], the authors focused on farm management information systems to automate data acquisition and processing, monitoring, planning, decision-making, documenting, and managing farm operations. For this, they proposed architecture and implemented it in two different regions in Turkey. In another proposed example to monitor various components of the farmland with an IoT-based mechanism, an agro-meteorological system was developed using an Arduino [
25]. Another study based on sensors, IoT, ZigBee, and Arduino focused on rural agriculture [
26]. The authors tried to guide farmers in estimating crop suitability and other relevant factors by using various types of sensors. Another study explored how accurate analysis of agro-meteorological and weather parameters can help farmers improve crop production [
27]. However, their proposed system is not portable, and may only be suitable for small-scale farms. Other IoT-based studies in modern agriculture in recent years have also been explored in [
28,
29,
30].
Along with the IoT, the widespread use of autonomous robots such as UAVs increases productivity in agriculture. Recently, studies related to this subject have accelerated [
31,
32,
33,
34,
35]. One of several studies in the literature is presented in [
36]. The authors used UAVs to detect possible drainage pipes. Often, farmers need to repair or construct drain lines to efficiently remove water from the soil. Therefore, in this study, they wanted to decrease resource consumption and increase productivity in agriculture by focusing on this issue. In [
37], the authors offered a combined application of UAVs and unmanned ground vehicles (UGVs) to monitor and manage crops. The authors proposed a system that can periodically monitor the condition of crops, capture multiple images of them, and determine the state of the crops. In addition to many UAV-based studies and products, recently the concepts of the IoT and autonomous robots have begun to be presented together. In this way, the data detected by the UAVs reaches the place where it needs to be sent instantly, the necessary actions can be taken on this data, and it can quickly provide a decision mechanism to the farmer or other technological devices. For example, in [
33], the authors present a farm-monitoring system using UAV, IoT, and Long-Range Wide Area Network (LoRAWAN) technologies for efficient resource management and data delivery. In this study, they were monitoring water quality.
In general, most of the studies were aimed at increasing efficiency in the field with technological approaches. It is also very important to efficiently analyze and evaluate the data generated from new technologies such as IoT and UAV using recent technologies such as WebGIS [
38]. At the same time, we may sometimes encounter complex situations for a service expected to be provided in smart agriculture. These problems become more difficult to solve as the dimension and number of uncertain parameters increase. Metaheuristic algorithms can be an appropriate mechanism for solving similar problems. Indeed, in recent years in the literature, metaheuristic-based approaches have been proposed for different purposes related to agriculture [
39]. For example, in [
40], three local search metaheuristic algorithms, which were simulated by annealing and Tabu search references, were used to calculate annual crop planning with a new irrigation mechanism. The objective function of this study was to maximize the gross benefits associated with the allocation of crops. The authors claim that the Tabu search method gave the best results in comparisons. In [
41], an evolutionary algorithm was used for a complex strategic land-use problem based on the management of a farming system. This study pursued a multi-purpose strategy that fulfilled spatial constraints in the 50-year planning management of the farm. Although the study is comprehensive, the metaheuristic method used and proposed may not be a very high-performing and efficient solution. In [
42], a bi-objective optimization model was proposed that minimizes cost and maximizes geographic diversity. In the test of the proposed method, a case was considered that showed new types of relationships in the food logistics chain. Although the proposed mechanism is interesting, the number of parameters it deals with is not complex enough. In [
43], the authors introduced a smart-engine-based decision system focusing on the type of crop, time/month of harvest, type of plant required for the crop, type of harvest, and authorized rental budget. According to the results from this system, the best way to rent and share agricultural equipment was provided. The other metaheuristic-based method focused on economic crop planning at the tactical level or agricultural policy planning at the national level [
44]. The supposed crop products could be for home consumption, export (cash crops), or to feed milk cows. The proposed method focused on optimal farm reconstructions that met four objectives (maximize profit and balance of soil structure, and minimize the soil nitrogen and human labor), and a set of stringent constraints. In [
45], the authors tried to optimize the deployment of their sensor nodes to best monitor potato and wheat crops. In this regard, they proposed a Genetic Algorithm-based method. Other studies based on metaheuristic algorithms have been presented in the literature in the last few years [
46,
47,
48].
In summary, many studies have been carried out in the field of smart and sustainable agriculture, which has become a trend in recent years. Some of these studies, along with their characteristics, are summarized in
Table 1. This paper focuses on optimal solutions from cultivation to harvesting benefiting from the IoT, autonomous robots, and a metaheuristic approach in three stages.
3. Materials and Methods
In this study, the technological and algorithmic aspects of sustainable agriculture are discussed. Towards this end, an intelligent and mechanized agricultural application is proposed which includes three phases: (1) cultivation, (2) control and monitoring, (3) harvesting. These stages affect each other like a lifecycle. The results from the first stage are used in the second stage, and the results from the second phase are constantly used as the input of the third stage. The working mechanism of the proposed method is described in
Figure 1 with all its phases.
3.1. Cultivation Phase
As stated before, with the increase in the world population, the need for agricultural and food products is also increasing. Therefore, the importance of smart farming systems and methods has increased. In this context, the first step in the mechanism and a sustainable model is the planting (cultivation) phase. Here, it is very important to place each product in the correct location in order to minimize or remove manpower and manual interventions. The metaheuristic approach is useful because the solution to this problem is a type of NP-Hard problem to be solved systematically. Therefore, the SCSO algorithm was used in the first phase of this study. Due to its nature, this algorithm can provide good performance both locally and globally, as its transitions are balanced in the exploration and exploitation phases, and therefore this new algorithm was used to solve the first problem case in this study.
3.1.1. SCSO Algorithm
The Sand Cat Herding Optimization (SCSO) algorithm is inspired by the sand cat’s foraging and hunting behavior [
50]. In this algorithm, a low-frequency noise detection behavior mechanism is used to find the prey of sand cats. Since these cats can detect low frequencies below 2 kHz, they can find even the furthest prey in the shortest possible time and with very little movement. These cats also have an incredible ability to dig for prey. This algorithm has a successful performance in searching and hunting using these two great features. With an adaptive mechanism, SCSO can be good at solving many problems, as they are balanced in the exploration and exploitation phases. In addition to these features, this algorithm is preferred specifically for this problem, since it uses few parameters and is a simple implementation. The mathematical equations of this algorithm are given below (Equations (1)–(5)):
where ‘
rG’ is a constant inspired by the listening ability of sand cats. It will linearly decrease from two to zero as the iterations progress to approach the prey (solution) it is looking for and not to lose or pass it (not to move away). The “
SM” value is inspired by the hearing characteristics of the sand cats, its value is assumed to be 2. The ‘
r’ demonstrates sensitivity range of each cat. The ‘
r’ is used for operations in exploration or exploitation phases while ‘
rG’ guides the ‘
R’ parameter for transition control in these phases. ’
R’ is the main parameter in controlling the transition between exploration and exploitation phases. If ‘
R’ is lower than one, the sand cats are directed to attack their prey, otherwise, the cats are tasked with finding a new possible solution in the global area. The
‘iterc’ is the current iteration and ‘
itermax’ indicates the maximum iterations. The ‘
t’ is the current time.
Equation (4) is proposed to determine the next move of each cat. The ‘
Posb’ indicates the best position and ‘
Posc’ represents the current position. The ‘
Posrnd’ indicates the random position and ensures that the cats involved can be close to prey. ‘
Posrnd’ is obtained from Equation (5). In addition, SCSO also performs well in convergence behavior. The pseudocode of the relevant algorithm is shown in Algorithm 1.
Algorithm 1. Sand cat swarm optimization algorithm pseudocode. |
Initialize the population |
Calculate the fitness function based on the objective function |
Initialize the r, rG, R |
While (t <= maximum iteration) |
For each search agent |
Get a random angle based on the Roulette Wheel Selection () |
If (abs® <= 1) |
Update the search agent position; Equation (4a) |
Else |
Update the search agent position; Equation (4b) |
End |
End |
t = t++ |
End |
3.1.2. Planting Crops Based on SCSO Algorithm
The SCSO is used for economical product planning and efficient resource consumption. Hereby, crops can be planted in the most optimized places in a mechanized way without human intervention during the cultivation (planting) phase. In this regard, the SCSO algorithm is used instead of an analytical solution to plant each crop with an optimized method. As mentioned earlier, since this action is an NP-Hard problem type, metaheuristic-based approaches can lead to fruitful results. In addition, restrictions and requirements were taken into account so that it can be applied in real farmlands. These criteria are, for example, biodiversity indices based on landscape ecology measures, diversity of land uses, and soil erosion. The criteria to be optimized here will mostly have a positive effect on the farmer’s income from the harvest and the type and amount of employment. In addition, efficient land use will lead to optimum allocation of water resources. An optimized planting stage will also be useful for an autonomous robot to accurately position itself in crop fields to perform precision farming tasks effectively.
In this study, tomato (
Lycopersicon esculentum Mill.) is taken as a case study. In this arrangement, the row spacing can be selected as 80 cm, and the seedling spacing as 40 cm ((3.1 m
2/unit)), 60 cm (2.1 m
2/unit), and 80 cm (1 m
2/unit) in tomato planting. It is recommended to choose 40 cm seedling spacing for pollination, temperature preservation, and to grow more product [
51,
52]. In addition, it is recommended that the soil’s pH level be 6.0–6.5 when planting tomato seeds [
53]. Single-row arrangement and the hanging method are preferred in tomato cultivation [
51,
52]. In line with the reasons and objectives mentioned above, the places of the products relative to each other are determined algorithmically, considering the distance and other requirements. Here, the process will be the planting of the products with the least error rate. The crops planted at the end of this phase were equipped with IoT devices in the next phase. The places where the products should be placed was given to the autonomous robots as a map with this algorithm. They would perform the mechanized planting work (saving manpower and other natural resources). This was the first mission of the autonomous robots. Their second and final task was in collecting (harvesting) items.
3.2. Control and Monitoring Phase
The second phase plans the timely determination of whether the planted crops are grown, their water and similar needs, and the realization of other purposes. At this stage, it is expected that the products will be monitored to increase productivity. This process can be a very costly and error-prone structure when performed by the farmer. However, being able to manage this whole process with technological solutions, and, in this context, offering farmers a user-friendly integrated application increases efficiency in every aspect.
In this phase, IoT devices were used to easily track each product and obtain query or in-demand-based data flow. The features of these devices may vary according to the purpose and expectations in the field. In this study, the tomato case study is focused on as an example. Tomatoes have commercial importance as one of the most-grown vegetables in the world [
51]. Today, tomatoes are grown in open fields and greenhouses. The method of growing tomatoes in the open field is considered one of the traditional methods and we did not consider it. The growing period of tomatoes may be different depending on the parameters of light, water, minerals, and temperature [
53]. In greenhouses, parameters such as temperature, humidity, amount of light, amount of CO
2, and amount of water can be controlled more easily, and therefore tomato cultivation in a greenhouse can be preferred [
52,
54].
For this purpose, KIANI-WSN kit nodes were used as IoT nodes [
55] as shown in
Figure 2. These nodes consist of sensing, communication, processing, and power units. Since the communication unit is equipped with a Wi-Fi card, it also fully meets the need for an IoT. These nodes are generally of two types. One of them is the CC1101 transmitter chip and the other is the nodes equipped with both CC1101 and CC1190 chips. The first node types were used in this study. The CC1101 is a low-cost sub-1GHz transceiver that can be used in very-low-power wireless-based applications [
56]. It also supports packet processing, data buffering, burst transmissions, clear channel evaluation, link quality indication, and wake-on-radio. The CC1101’s main operating parameters and 64-byte send/receive FIFOs can be controlled via the serial peripheral interface (SPI). These nodes are equipped with sensors such as humidity, temperature, and light. The ad-hoc feature of this device provided another advantage because it could transfer the required data to our system even when there was no internet. Thanks to this system, productivity in harvesting increased and resources such as water and manpower were used efficiently.
3.3. Harvesting Phase
The purpose of this phase is to come up with a road map for each autonomous robot. At this stage, the SCSO and similar algorithms may be not very successful in their rationality, as it is our goal to generate paths and find a good route. Therefore, a new method was proposed by utilizing the one of the best metaheuristic algorithms (ACO) for this concept. Based on this path, each robot will begin its task of picking (harvesting) crops in the most efficient manner. In other words, with this route, each robot collects the crops efficiently, making the most profit. Moreover, this goal is achieved in as short a time as possible and with the least power consumption. This new algorithm is proposed to achieve these three intermediate targets (max-profit, min-energy, min-time) together in a balanced way. In summary, the output (goal) of the harvest phase is finding the optimal path for each autonomous robot.
The ACO [
57] algorithm is inspired by the real-life behavior of ants. Although ants are not insects that live in a swarm model, they help and guide each other by using chemical deposits called pheromones, and as a result, they act like a smart colony. In the classical ACO, each ant starts from a point, goes hunting, and returns to its home (start). That is, each ant starts eating from the nest and then returns to the nest. However, in RACO, each ant starts from a point and only tries to reach the prey, and the concept of returning to the nest is not in question in this algorithm. It is worth remembering that this algorithm is not a new ACO variant. This algorithm is inspired by the concept of ACO for solving just this problem and similar problems.
The second main difference between the proposed algorithm and ACO is based on the concept of pheromones. In the classic ACO, in each iteration each ant releases pheromones on each path it prefers, so the pheromone values of the chosen paths are constantly updated. Since the pheromone density is high in the most preferred route, the relevant route is chosen as the best route. Additionally, as the number of iterations increases, some pheromone evaporates from the amount present on each path. This prevents it from facing problems such as local optima. For this, a matrix is defined. However, the concept of pheromones is not fully similar in RACO, and instead, a similar matrix is defined, reflecting the increase in growth rates of the crops planted in each iteration. In addition, when each product is selected by the ant, it defines it as the product that has been collected, and the value of that product in the relevant matrix is decreased. In fact, the matrix defined in RACO shows the growth rates of crops. Items that are not collected increase in value as the iteration goes on (contrary to evaporation), and items that are collected are devalued (a very small number close to zero). In short:
- (1)
In classical ACO, pheromones evaporate as time progresses, in RACO the crops grow as time passes.
- (2)
In classical ACO, the pheromone ratio of the most preferred routes increases, in RACO, the product is collected and its value decreases in the current table of the product, while on the other hand, the value of the profit parameter increases.
Since this model is applied on a continuous field, the same process continues as the harvested crops begin to grow and mature again, and therefore the algorithm works smoothly. This presents a sustainable farming mechanism for all three phases described in our study. The main idea of this proposed algorithm is to model the problem as a search for the best path by constructing a path graph representing the states of the problem. Therefore, it can also be used to solve other problems similar to the product aggregation problem. In the classical ACO algorithm, the ants make the path selections according to Equation (6),
where ‘
k’ represents the number of ants used in the algorithm. The ‘
i’ and ‘
j’ denote the source and destination station, respectively, which indicate the points of each autonomous robot.
is represented as a matrix and shows the instantaneous states of the crops. The
is the heuristic cost between the edges ‘
i’ and ‘
j’. The ‘
α’ and ‘
β’ are related to the importance of trail and heuristic cost. In the proposed RACO, the related mathematical equations are defined as follows (Equations (7)–(12)), based on the problem in this study:
where ‘
SelectedStatus’ shows the drop collected by each ant. The goal here is to get the most profit. ‘
BatteryCapacity’ indicates the maximum power capacity of the autonomous robots, generally related to
Ah and
V. ‘
DeliverCapacityPercentage’ represents the maximum amount of power each robot can use. The ‘
distance’ is the distance between two points in meters. ‘
BatteryConsumed’ is the amount of energy used between both points. In this study, battery capacity is assumed 8
Wh and the maximum battery usage rate is accepted as 90%. The amount of ‘
Power’ obtained here indicates the amount of energy that each robot will use, and this is desired to be minimum. It is worth mentioning that at the end of the algorithm, a route will be assigned for each of the robots. Since the concept of power is meaningful to them, autonomous robot is expressed here, but it actually means ant. The ‘
D’ represents the total number of crops in the field. The ‘
Time’ and ‘
TimeConsumed’ parameters represent the total time used by each ant and the elapsed time between both points, respectively.
where
Ci are coefficients that can be adjusted according to the requirements of the problem. Optimal values for these constants can also be found by a metaheuristic method. In this study, the method in [
58] is used to tune the values of these coefficients. Since these weights (coefficients) are not defined in the classical ACO, they are assumed to be of equal value. The relationship to
Ci may differ depending on the purpose of the problem. For example,
C1 should be bigger than the others if we want the minimum answer, and vice versa if we are looking for the maximum. This proves the flexibility of the relevant cost function. At the end of each iteration, ‘
CostFunction’ is calculated for each ant and the minimum among them is accepted as the best solution.
where
is a coefficient that affects and controls the rate of the crops’ status.
‘CropStatus’ shows the latest status of each crop. ‘
Crops’ indicates the total number of crops in the field. The working mechanism of the proposed algorithm for finding the optimal path for each autonomous robot is shown in
Figure 3. It is worth remembering that the starting and ending points of each ant do not have to be the same. At the end of each iteration the best solution is chosen. When the iterations are over, the best solution is given as a path to the relevant autonomous robot (IoV), and in this way each robot is assigned a task to collect crops in the real field. The pseudocode of the relevant algorithm is shown in Algorithm 2. When complex analysis of the algorithm is performed, it has proven to be O(n
2), which means that it is successful compared to other classical and analytical solutions.
Algorithm 2. Reverse ACO algorithm pseudocode. |
Initialize the population |
Calculate the fitness function based on the objective function |
Initialize the input parameters |
While (t <= maximum iteration) |
For each search agent |
Path election by ants; Equation (6) |
Pheromone (CropStatus) Updates; Equations (12) and (13) |
End |
t = t++ |
End |
Find Best Solution; Equations (10) and (11) |
5. Conclusions
In this study, attention is drawn to the importance of smart and mechanical systems for the efficient use of natural resources such as water and nutrients, which are vital in human life. At the same time, it is not enough to just suggest smart systems or methods, it is also important to develop sustainable approaches. Therefore, we focused on an application that can meet many needs in agriculture, from planting to harvesting. Moreover, the health of the farmers can be protected and their heavy workload on the agricultural lands will be reduced. In addition, accident rates will automatically decrease. Therefore, the occupational health and safety rate can be increased. In addition, crop abundance can be experienced due to the mechanized and sustainable nature of the proposed model, and therefore possible forced migration events will also decrease.
The proposed mechanism consisted of three phases. In the first phase, an SCSO-based approach was presented to assign the cultivation task to the relevant autonomous robots, eliminating the human resource factor. It should be noted that in this study, we did not focus on the robotics field, but only on the development of an algorithmic-based model and the architecture of the simulation environment. In the second phase, we used IoT devices to instantly check the status of the crops planted by robots. The result from this phase was taken as the input for the third phase (harvesting). In the third stage, a new method was proposed, inspired by the working mechanism of the ACO algorithm. This method tries to get the maximum profit from the crops to be collected. In addition, it attempts to generate paths for the harvesting robots in a way that would consume the least power and time. According to the results, our proposed algorithms performed better than other methods. In this study, the tomato field was considered as an example, but the suggested mechanism could be used for different purposes in many agricultural lands.