Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 2, 2024 338 Development and Solution of a Multi-Stage Planning Model Based on a Greedy Optimization Algorithm Under Multiple Constraints Haiyang Tang1, * 1 College of Water Resources and Architectural Engineering, Northwest Agriculture and Forestry University, Yangling, China *Corresponding author Abstract: This paper presents a comprehensive approach to establishing a multi-stage planning model under complex, multi- constraint conditions. The model is designed to optimize decision-making over a seven-year period, with the primary goal of maximizing overall fitness. At each stage, specific conditions from the previous period are analyzed to inform and guide production decisions for the next stage. Recognizing the diverse origins and characteristics of various products, we conduct a secondary categorization to address these differences effectively. Additionally, we incorporate overproduction penalties under two distinct scenarios to reflect realistic production challenges and constraints. To solve the intricate mathematical model, we employ a greedy algorithm. The application of this algorithm demonstrates its capability to handle the model’s complexity, producing solutions that maintain high fitness levels across all stages. The results confirm that the greedy algorithm not only efficiently solves the model but also adapts well to the dynamic conditions of each stage, ensuring optimal decision-making throughout the entire planning period. Keywords: Multi-stage planning model, multi-constraint condition, greedy algorithm. 1. Introduction In complex systems where multiple constraints influence decision-making, developing an effective planning model is crucial for optimizing long-term outcomes. This paper focuses on constructing a multi-stage planning model that adapts to varying conditions across a seven-year timeline. The model’s objective is to maximize fitness by making informed production decisions based on the results of previous stages. Md. Mohibul Islam and Masahiro Arakawa [1] introduced a novel scenario-based stochastic rolling multi-stage logistics model aimed at minimizing logistics expenses. This model is structured in two distinct phases. Initially, a multi-criteria swarm decision framework is established to identify reliable suppliers. Subsequently, these chosen suppliers are integrated with other stakeholders to form a logistics model based on rolling plans that incorporate various risk scenarios. Alejandra Tabares et al. [2] developed a new mathematical model addressing the expansion planning of multilevel distribution networks with a focus on reliability. They devised innovative algebraic expressions for standard reliability metrics, specifically those related to the expected failure to supply energy. Yu Shi et al. [3] introduced a novel approach to calculate the radius of equivalent diffusion and seepage holes using NMR T2 spectra. Additionally, the impact of equivalent pore radius and pressure on conductivity across different diffusion mechanisms is further quantified through a multi-mechanism gas outflow model, which tracks the dynamic changes in the equivalent diffusion and seepage pore radii. Jorge Delgado et al. [4] proposed an approximation algorithm for the MSCP, which enhances empirical performance in quality and execution time compared to Greedy-SetCover, while maintaining the best approximation ratio for the problem. Xiaoqing Wang et al. [5] presented an improved iterative greedy (IIG) algorithm. Initially, a push- forward insertion heuristic (PFIH) strategy is employed to generate high-quality initial solutions. This is followed by a greedy-based insertion strategy in the destruction- construction phase to enhance the algorithm’s exploratory capacity. Our approach involves a detailed categorization of products, acknowledging their diverse origins and associated constraints. We introduce overproduction penalties to reflect realistic production challenges and ensure the model’s applicability to real-world scenarios. By applying a greedy algorithm, we aim to efficiently solve the model and assess its effectiveness in optimizing the decision-making process. 2. Planning Solutions for Food Crops 2.1. Planning modeling The objective function of this planning problem maximize revenue, i.e., sales minus costs are maximized. Let be the number of terminated acres of the ith crop on the jth planted cropland, and be whether the ith crop is planted on the jth planted cropland or not, where 1 means yes and 0 means no; and the annual production of the ith crop: (1) Where is the acre yield of crop i on cropland j. Let be the cultivation cost of crop i on cropland j, be the selling unit price of crop i, be the pre-sale volume of crop i, and be the sales volume of crop i. = ∙ , the cultivation cost: (2) 339 Then the objective function: (3) The following are the constraints for this planning problem: 1) The crop produces less grain per season than the expected sales volume, then: (4) 2) The area under crop cultivation is less than the area under cultivation of arable land, i.e.: (5) where is the maximum acreage of cropland j. 3) Based on 23 years of crop cultivation, it is assumed that the number of acres of flat dry land is not less than 35 acres, the number of acres of terraced land is not less than 20 acres, and the number of acres of hillside section is not less than 13 acres, that is: ≤ 35, = 1,2, ⋯ ,6≤ 20, = 7,8, ⋯ ,20≤ 13, = 21,23, ⋯ ,26 (6) 4) For ease of management, crop cultivation should not be spread too thinly, but the advantages offered by joint cropping should be taken into account, and a constraint is therefore imposed on a maximum of three crops on a piece of arable land, namely: (7) 5) Each crop cannot be re-cropped on the same plot, i.e. a crop cannot be grown on the same cropland for two consecutive years. Indicator variables were constructed: ( ) = 0, 1, (8) Constructing Indicator Variables: ( ) = 0, 1, (9) The two indicator variables are related as follows: ( + 1) = 0 ( ) = 1( + 1) = 1 ( ) = 0 (10) Under this constraint, the above objective function and needs to be modified: (11) (12) (13) The constraints also need to be changed: (14) (15) 6) Each cropland is planted with a legume crop at least once every three years after 2023. Set the numbering of the five legumes to i=1,2,3,4,5 and construct the indicator variables: ( ) = 0, 1, (16) Construct the indicator variable: 340 ( ) = 1 2, 0, (17) Here we take t=2025,2026, ,2030. The two indicator variables are related as follows: ( ) + ( + 1) = ( + 2) (18) Here t=2023,2024, ,2028. The decision variable ( ) can affect the decision variable , then there is: = 0 ( ) = 1 21 ( ) = 0 = 1,2,3,4 ,5,6, = 1,2, ⋯ ,26 (19) In summary, the optimal planting planning model for 2024 for food crops in excess of some stagnation and wastage is as follows: (20) (21) Planning beyond 2025 is modeled as: (22) (23) 341 2.2. Planning Solution for Excess Sold at 50% Price Reduction of 2023 Sales Price (1) Modeling the objective If the sales are considered to be sold at a reduced price: = ∙ + [ ( ) − ] (24) Then the sales of crop i in year t: ( ) = ( ) ∙ + [0, ( ) − ] (25) Compared to case 1, the reduced price sale case has fewer constraints II, then the optimal planning model for grain crops in 2024 is: (26) (27) The optimal planning model for grain crops in 2025 and beyond is: (28) (29) 342 2.3. Vegetable, Rice, and Edible Mushroom Crop Planning Solution Problems Planning solutions for more than partially stagnant, wasteful sales Establishment of target model Since it is not the same aspect as the above food crops, the arable land and crop labeling is redefined, and the watered land D1 is positioned j=1, rice is positioned i=1, and other arable land and crops are represented in turn, as shown in Table 1. Table 1. Codes for different arable land and crops Cultivated land/crops coding Watered land D1-D7 j=1,2,…8 Ordinary greenhouse E1-E6 j=9,10,…,24 Smart greenhouse F1-F4 j=25,26,27,28 Rice i=1 Cowpeas, snap beans, kidney beans (legume vegetables) i=2,3,4 Potato, tomato, ... celery (non-legume vegetables) i=5,6,…,19 Chinese cabbage, white radish, red radish i=20,21,22 Yucca mushrooms, shiitake mushrooms, shiitake mushrooms, morel mushrooms i=23,24,25,26 For this part of the planning, similar to the food crop planning, the introduction of the new parameters k=1,2, denoting in which seasons, is: (30) (31) Objective function: (32) The constraints are also similar to the grain-based planning problem described above: 1) The crop produces less grain per season than it is expected to sell, then: (33) 2) The area under crop cultivation is less than the area under cultivation of arable land, viz: (34) 3) Assuming that each crop has an area of not less than 0.3 acres in each cultivated field: ≤ 6, = 1,2, ⋯ ,6≤ 0.3, = 7,8, ⋯ ,20≤ 0.3, = 21,23, ⋯ ,26, = 1,2 (35) 4) Crops should not be spread too thinly, i.e.. (36) 5) There are time and regional constraints for different crops, mainly in the following categories (1) Cabbage, white radish and red radish can only be grown in the second season on watered land Then there are: = = 0, = 20,21,22, = 1,2, ⋯ ,28= 0, = 20,21,22, = 9,10, ⋯ ,28= + , = 20,21,22, = 9,10, ⋯ ,28 (37) And: = = 0, = 20,21,22, = 1,2, ⋯ ,28= 0, = 20,21,22, = 9,10, ⋯ ,28= + , = 20,21,22, = 9,10, ⋯ ,28 (38) (2) Leguminous and non-leguminous vegetables can be grown only in one season in a watered field, one season in an ordinary greenhouse, and one season in a smart greenhouse, viz: 343 ⎩⎪⎪⎪ ⎨⎪⎪ ⎪⎧ = = 0, = 2,3 4 5 6 ⋯ 19 = 1,2, ⋯ ,8= 0, = 2,3 4 5 6 ⋯ 19 = 1,2, ⋯ ,8= + , = 2,3 4 5 6 ⋯ 19 = 1,2, ⋯ ,8= = 0, = 2,3 4 5 6 ⋯ 19 = 9 10, ⋯ ,24= 0, = 2,3 4 5 6 ⋯ 19 = 9 10, ⋯ ,24= 2,3 4 5 6 ⋯ 19 = 9 10 ⋯ ⋯ ,24 (39) (3) Edible mushrooms can be grown only in the second season in ordinary greenhouses, viz: ⎩⎪⎪⎪ ⎨⎪ ⎪⎪⎧ = = 0, = 23 24 25 26 = 1,2, ⋯ ,28= 0, = 23 24 25 26 = 1 2, ⋯ ,28= + , = 23 24 25 26 = 1 2 ⋯ ,28= = 0, = 23 24 25 26 = 1 2 ⋯ ,28= 0, = 23 24 25 26 = 1 2 ⋯ ,28= + , = 23 24 25 26 = 1 2 ⋯ ,28 (40) (4) Rice can be regarded as a two-season crop grown only on irrigated land and whether rice is grown uniformly in both seasons or not, viz: ⎩⎪⎨ ⎪⎧ = = 0, = 1 = 2,3, ⋯ ,28, = 1,2= 0, = 1, = 2,3, ⋯ ,28, − 1,2= + , = 1, = 2,3, ⋯ ,28, = 1,2 1 + 2 = 0 2 = 1, = 1 (41) 6) Crops cannot be planted in heavy crops and are constructed on the basis of planning for food crops, when constraints need to take into account the effects of the first and second seasons: ( ) = 0, 1, (42) ( ) = 0, 1, (43) At this point t=1,2,...15, means 2024, 2025,...2030 The relationship between the two variables is: ( + 1) = 0 ( ) + ( ) = 1 2( + 1) = 1 ( ) + ( ) = 0 (44) With the addition of this constraint, the above objective function and constraints need to be modified and are not displayed here. 7) Each cropland is planted with a legume crop at least once every three years after 2023. Shape as in constraint six and construct the variables: ( ) = 0, 1, (45) Where t=2023,2024,...2030. ( ) = 1 2, 0, (46) Where t=2025,2026,...2030. The relationship between the two is as follows: ( ) + ( ) + ( + 1) + ( + 1) = ( + 2) (47) ( ) can affect the decision variable , then there are: ( ) = 0 ( ) ≥ 11 ( ) = 0 = 1,2,3, = 1,2, ⋯ ,28, = 1,2, = 2025,2026, ⋯ 2030 (48) In summary, the optimal planting planning model for 2024 for vegetable, edible fungi, and rice crops in excess of some of the stagnation and resulting waste is as follows: (49) 344 (50) Planning beyond 2025 is modeled as: (51) (52) 2.4. Analysis of Results The above model function was solved to obtain the optimal planting planning scheme under two scenarios of over portion of stagnant sales, resulting in wastage and over portion of price reduction by 50% of the unit price of sales in 2023, and for further comparisons, the total profitability of the two scenarios was compared as shown in Table 2. 345 Table 2. Profitability in case of waste due to overselling Period Food profitability Vegetable profitability Edible Mushroom Profitability 2024 Q1 452875.1 247394.5 0 2024 Q2 5349.349 1051877 211950 2025 Q1 1201588 621152 0 2025 Q2 2503.345 503527.4 126000 2026 Q1 450951.1 232551.9 0 2026 Q2 2601.576 1073068 211950 2027 Q1 452875.1 247394.5 0 2027 Q2 5349.349 1051877 211950 2028 Q1 1201588 621152 0 2028 Q2 2503.345 503527.4 126000 2029 Q1 450951.1 232551.9 0 2029 Q2 2601.576 1073068 211950 2030 Q1 452875.1 247394.5 0 2030 Q2 5349.349 1051877 211950 3. Conclusion This study presents a robust multi-stage planning model designed to navigate complex, constraint-laden environments. By employing a greedy algorithm, we effectively solve the model, achieving high fitness levels across all stages. The results validate the model’s ability to make adaptive production decisions that respond to previous outcomes, demonstrating its potential for practical application in various industries. Future work could explore the integration of additional algorithms to further enhance solution quality and adaptability. References [1] Md. M. Islam and M. Arakawa, “Development of an integrated scenario-based stochastic rolling-planning multistage logistics model considering various risks”, Heliyon, 2023, vol. 9, pe22289 [2] A. Tabares, G. Muñoz-Delgado, J. F. Franco, J. M. Arroyo, and J. Contreras, “Multistage reliability-based expansion planning of ac distribution networks using a mixed-integer linear programming model”, International Journal of Electrical Power & Energy Systems, 2022, vol. 138, p107916 [3] Y. Shi, B. Lin, T. Liu, T. Liu, X. Zhang, and W. Yang, “Study on the influence of stress constraint conditions on multi-scale gas emission characteristics in in-situ coal”, Energy, 2024, vol. 290, p130160 [4] J. Delgado, H. Ferrada, and C. A. Navarro, “A succinct and approximate greedy algorithm for the Minimum Set Cover Problem”, Journal of Computational Science, 2024, vol. 81, p102378 [5] X. Wang, P. Duan, L. Meng, and K. Yang, “An Improved Iterated Greedy Algorithm for Solving Rescue Robot Path Planning Problem with Limited Survival Time”, Computers, Materials and Continua, 2024, vol. 80, p931-947