An Iterative Three-Stage Neighborhood Search for Solving Precedence Constrained Agricultural Land Investment Problem

| ABSTRACT The use of neighborhood search techniques to address a practical issue faced by agricultural investors is examined in this study. The problem is named as agricultural land investment problem with precedence constraints and it has an essential impact on agriculture issues. The tackled problem can be viewed as a variant of the well-known classical 0-1 knapsack problem where precedence constraints are imposed on pairs of items. Precedence constraints take into account a precedence relation between items. This paper first simulates the considered problem as precedence constraints knapsack problem and presents a mathematical representation model. Then, an iterative three-stage neighborhood search method is proposed for optimizing the problem. The proposed method consists of three stages. First stage applies a greedy procedure in order to construct a feasible solution. Second stage applies local search procedures in order to enhance the quality of the solutions at hand. Third and last, in order to broaden the search space, a random neighborhood destruction approach is introduced. Finally, the effectiveness of the suggested approach is assessed and contrasted with the outcomes obtained by greedy and local search techniques. The presented method is competitive and efficient since it produces excellent solutions in a reasonable amount of time.


Introduction
Numerous real-world scenarios can be represented as combinatorial optimization problems to be solved. One of these situations belongs to agriculture, where a large amount of agricultural land needs to be invested. The problem is that numerous plant varieties can be grown with little money and time. The price of raising each plant varies. However, every one of them is making a profit. In addition, according to some farmers' needs, precedence constraints are imposed, i.e., several chains of plants must be considered (Nancel-Penard, et al., 2022). However, the objective is to maximize the profit of land investment with the consideration of precedence constraints (Aslan, et al., 2023). This problem is a variant of the agricultural land investment problem (ALIP) presented by Saleh (Saleh, 2018) with the variant, where precedence constraints have been presented and imposed on pairs of items. Precedence is constrained considering a precedence relation between items, i.e., some items must precede others (Samphaiboon & Yamada, 2000). The tackled problem is named the precedence constraints agricultural land investment problem (PCALIP). This paper investigates using neighbourhood search techniques to optimize the considered problem. As is obvious, the PCALIP is an NP-hard problem. The precedence constraints knapsack problem (abbreviated PCKP) is a well-known combinatorial optimization problem that can be used to simulate the PCALIP in order to streamline the treatment of the issue. In fact, numerous real-world scenarios can be recreated as members of the KP family in a range of fields, including the computer sciences. (Kellerer, et al., 2014). The PCALIP is characterized by a knapsack of capacity ; a set of items, and a set of precedence relationships imposed on items, where ⊆ × . A precedence relationship ( , ) ∈ exists if item can be selected and placed in the knapsack only if item is in the knapsack. Each item ∈ is represented by a nonnegative weight and a profit . The PCALIP is the problem of maximizing the total profit of products that can fit in the knapsack and whose combined weight does not go above the knapsack's carrying capacity while also satisfying the order of precedence. In order to tackle and optimize the considered problem, it is simulated as an optimization problem, known as the precedence-constrained knapsack problem (Boland, et al., 2012). Therefore, the mathematical representation of PCALIP can be written as follows: Where , ∀ ∈ , is equal to 1 if the i-th item is placed in the knapsack (i.e., selected in the solution); and 0 otherwise. Equation (1) is the objective function, where the goal is to maximize the total profit. Equation (2) represent the knapsack constraint with capacity c, which imposes that the total weight must not exceed the knapsack capacity. Equation (3) represents the precedence constraints which ensure the precedence relationships. Equation (4) represents the integral constraints (i.e., the item is selected when " = 1" or excluded from the solution when " = 0"). In order to avoid trivial cases, it is assumed that: the input data , , , ∀ ∈ , are positive integers, and ∑ > ∈ (Hifi et al., 2015).
From the mathematical representation of the PCALIP, we can observe that the solution domain of a 0-1 knapsack problem can be characterized by Equation (2) and Equation (4). By adding, Equation (3), the problem is changed and becomes another variant of the classical 0-1 knapsack problem, known as the precedence-constrained knapsack problem. In other words, the PCALIP reduces to the classical knapsack problem when the precedence constraint is omitted, i.e., = ∅ (Boland et al., 2012).
This paper is organized as follows. Section two reviews some related works. Section three introduces a random neighborhood search approach for optimizing the PCALIP. Section four evaluates the performance of the proposed method and analyzes the obtained results. Finally, section five summarizes the contents of the paper.

Related Works:
PCALIP is an NP-hard combinatorial optimization problem. As illustrated in the previous section, it is simulated (in this paper), as the Precedence Constrained Knapsack Problem (abbreviated to PCKP). Therefore, the solution procedures dedicated to solving PCKP are also suitable for optimizing the PCALIP (Kellerer et al., 2013).
The literature does, however, include solution strategies that are either accurate or approximatively. Boland et al. in (Boland, et al., 2012) presented an exact method based on clique inequalities for determining facets of the PCKP polyhedron. Significant reductions in branch-and-bound nodes and overall solution time were achieved by adding these inequalities at the root node. Samphaiboon and Yamada (Samphaiboon & Yamada, 2000) present exact and approximate methods. They present dynamic programming algorithms as well as preprocessing methods to solve PCKP. Dynamic programming can solve small PCKPs instances to optimality, while using the preprocessing method, they solved the problem with up to 2000 items in a few minutes. You and Yamada (You & Yamada, 2007) present a pegging approach based on Lagrangian relaxation followed by a pegging test. This approach is an exact method where the size of the original problem is reduced to be solved within a few minutes. Maiti et al., in (Maiti et al., 2021) presented a specific breakpoint algorithm which can search appropriate breakpoints of parametric maximum flow-related problems. The algorithm is used to solve lagrangian relaxed PCKP as well as linear programming relaxed PCKP in mine pushback design. Then, the topo sort is used to produce feasible solutions.
This paper proposes an iterative three-stages neighborhood search for optimizing the PCALIP. The first stage serves to construct a feasible solution. The second stage applies local search procedures to enhance the current soltion. Third stage serves to diversify the search space by using a random neighborhood-destroying strategy.
3. An iterative three-stage resolution search Neighborhood search methods have already proven their efficiency in developing efficient algorithms to approximate large-scale combinatorial optimization problems (Aarts & Lenstra, 2018). In this paper, a collection of such techniques have been used to optimize the PCALIP.
This section presents the main steps of the proposed solution procedure, which can be viewed as an iterative three-stage neighbourhood search. The first stage uses a greedy method to construct a feasible solution. Such a stage construct a solution by solving 0-1 knapsack problem with the precedence constraints. The second stage applies local search in order to improve the solution at hand. Such a stage can be viewed as an intensification stage because it tries to enhance the solutions by applying an exchange technique, where some items are removed to add others. Third stage applies a random destroying strategy by removing and degrading a rather large percentage of items from the current soltuion. This stage can be viewed as a diversification stage in order to diversify the search process. The above three stages are iteratived until satisfying a stopping condition.

First stage of constructing a feasible solution
This section demonstrates how to identify a PCALIP solution that is viable. Indeed, the first stage's main purpose is to construct a fast solution. For this reason, a greedy procedure is the most suitable choice among heuristics solution procedures. Greedy solution procedures can construct a quick fix that is implemented piece by piece and prioritizes an immediate improvement above consequences (Hifi, et al., 2015). In general, this type of neighborhood search technique does not ensure the optimality of the solutions, but it is very fast for determining feasible solutions (Ausiello, et al. 2012).
Algorithm 1 illustrates the first stage of the proposed solution procedure for solving PCALIP, where a greedy method is considered. This algorithm is used mainly for two aims: (i) to determine a starting solution, and (ii) to complete a destroyed solution obtained from stage 3 (as explained later in section 3.3). In both cases, it yields a fast feasible solution for PCALIP.
The major steps of the proposed greedy strategy are illustrated in Algorithm 1, in which a workable solution is pieced together successively. It starts by initialization the problem .
Step 3 defines a decision variable , this variable determines whether the − is selected or not in the solution. This means that, if = 1, the − is placed in the knapsack, while if = 0, the corresponding item is not selected in the solution, i.e., doesn't placed in the knapsack. Steps 4-11 represent the main loop of the procedure. In this loop, each − is selected in a sequential manner under the following condition: if it is free, i.e., = 0. Steps 6-7 ensure that, before putting any item in the knapsack, all its precedence must be selected in the solution, i.e., their = 1. Otherwise, stop and try other − . In all cases, before selecting any item in the solution, the knapsack constraint is checked (see step 5). , a feasible solution obtained from Algorithm 1 Output: * an enhanced solution 1: Let i be the total number of items 2: let ′ be a reduced problem 3: let = 5% of (i.e., remove 5% of items from the current solution) 4: While ≥ 0 5: Remove from 6: Remove all the successors of 7: Update the reduce problem ′ 8: = − 1 9: End While 10: While ≥ 0 11: If = 0 && the knapsack constraint is not violated 12: Add the precedencies of in ′ 13: Add in ′ 14: Update ′ 15: End If 16: = + 1 17: End While 18: Return * Algorithm 2 illustrates the main steps of the proposed local search method. The algorithm starts with a solution obtained from Algorithm 1 and tries to enhance it. Steps 4-17 illustrate the main loops in the algorithm. The main idea is that remove randomly 5% of items from the solution obtained from Algorithm 1 (see steps [4][5][6][7][8][9], then try to add other items considering the knapsack and precedence constraints (see steps [10][11][12][13][14][15][16][17]. This process continues for all not selected items (i.e., = 0).

Third stage: a random destroying strategy to diversify the solution space
This section shows how the search process can be diversified in order to escape from a series of local optimum solutions. For this, a random destroying strategy is proposed as a diversification procedure. This strategy tries to randomly explore the subsolution spaces to find the best local solution (Hifi et al., 2014). Update the destroyed solution 6: = − 1 7: End While Return Algorithm 3 shows the main steps of the proposed diversification strategy. The algorithm starts with the solution obtained from stage 2 and tries to diversify the search process by applying a random destroying procedure. Steps 2-7 show the main steps in this algorithm. The idea is that, destroy the current solution obtained from stage two by removing % of its items (see steps [3][4][5]. The destroyed solution ( ) then goes back to algorithm 1 to be completed and provide another feasible solution. This process is iterated until satisfying a stopping condition.

Overall Algorithm
This section illustrates the overall algorithm proposed in this work: an iterated three-stage neighborhood search for Solving PCALIP.
Algorithm 4 presents the main steps of the overall algorithm. Steps 1-6 show the main loop, where the three stages are iterated until the stopping condition is satisfied. Herein, the stopping condition considered is the number of iterations.
Algorithm 4: an iterative three-stage neighbourhood search Input : , an instance of the problem Output: * , the best local solution obtained 1: While stopping criteria is not satisfied 2: Apply Algorithm 1 to determine a feasible solution 3: Apply Algorithm 2 to enhance the solution solution 4: Apply Algorithm 3 to diversify the search process 5: Update * the best solution found 6: End While Return *

Computational Results
This section investigates the effectiveness of the proposed Iterative three-stage Resolution Search (abbreviated to IRSPC) on an instance consisting of 1000 items with 55 pairs of precedence relations, which has been generated randomly by using a special program. The algorithm IRSPC was coded in C++ on a computer with Pentium Core i5 CPU at 2.5 GHz.
First step in the computational results investigates the performance of a greedy procedure for solving the PCALIP (Algorithm 1). Recall that, (see Section 3.1), the purpose of this algorithm is to produce a fast, feasible solution. This has been achieved as illustrated in Table 1. The algorithm yields an objective value equal to 226362 within 0.015 second. Second step in the computational results evaluates the effectiveness of the local search procedure, illustrated in Algorithm 2, to enhance the solution at hand. In fact, the proposed algorithm works as an intensification procedure to enhance the solution within a short time, by removing 5% of items from it and adding others. This has been achieved as shown in Table 2, where the objective value has been enhanced from 226362 to 271224 within 0.047s. Third step in the computational results investigates the performance of the random destroying strategy, presented in Algorithm 3. In this algorithm, % of items are removed randomly from the solution obtained from Algorithm 2, in order to degrade it and escape to other sub-solution space. This degradation diversifies the search process and drives the solution procedure to explore a series of solution sub-spaces randomly, trying to escape from a series of local optimum solutions. The destroyed solution is then reconstructed again by using Algorithm 1 and 2. The IRSPC is iterated until satisfying the stopping condition. Herein, the stopping condition is the number of iterations (see Algorithm 4). However, in order to evaluate the performance of IRSPC two criteria have been considered: (i) the %; percentage of the removed items, (ii) the total number of iterations. Table 3 illustrates the performance of IRSPC when the number of iterations is fixed to 200 iterations, while, is ranged according to the following, = 10%, 20%, 30%, and 40%.  Table 3 shows the objective values and the solution times reached by the IRSPC. One can observe that, the best solution can be obtained with = 20%. Moreover, the solution time increases with the increase of . So, for the next step of the computational results, the is fixed to 20%, while the number of iterations is ranged as follows: 100, 200, 300, and 400 iterations.  Table 4 illustrates the performance of IRSPC when is fixed to 20% and the number of iterations is varied. As it is clear that, the quality of solutions increased with the increasing of iterations, meanwhile the required solution times are increased. For 400 iterations, the algorithm yields the best solutions within 31 seconds. In fact, the quality of solutions has priority. Therefore, the algorithm was tuned to 400 iterations for the next step of the computational results. Table 5 shows the performance of IRSPC compared with the greedy algorithm (Algorithm 1), and the local search procedure (Algorithm 2).  Table 5, one can observe that the performance of IRSPC for solving the considered problem is better than the greedy (Algorithm 1) and the local search (Algorithm 2). IRSPC produces a high-quality solution of 346432, while the greedy and the local search produce 226362 and 271224 respectively. Although, the required solution time for IRSPC is much more than those needed by both algorithms. The IRSPC required about 31 seconds to produce its output, while the other algorithms yield their outputs in 0.015, and 0.047 seconds respectively.

Conclusions:
This paper proposes a heuristic approach for solving a real-life situation with precedence constraints in the agricultural land investment problem. This work's contribution is that the tackled problem has been simulated as a combinatorial optimization problem known as PCKP. Second, a mathematical representation model was proposed to represent the problem. Third and last, an iterative three-stage neighborhood search heuristic is proposed for solving the considered problem. The proposed solution method consists of three stages. First stage yields a feasible solution by using a greedy procedure. The greedy algorithm yields a fast solution of moderate quality. Second stage improves the solution at hand by using a local search method. The local search solution procedure improves the solution at hand but falls in a local optimum solution. The third and last stage diversifies the solution search space using a random neighborhood search technique. This technique proved its efficiency in escaping from a series of local optimum solutions. The three stages were iterated, searching for the best local solution. The computational results show the proposed heuristic algorithm's effectiveness for producing high-quality solutions in an acceptable running time.
Funding: This research received no external funding.