Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 13, No. 2, 2024 326 Research on Optimal Crop Planting Strategy Based on Mixed-Integer Programming Changcai Guo1, *, Jiachen Zhang1 and Yi Lan2 1School of Intelligent Manufacturing, Chengdu Jincheng College, Chengdu, China 2School of Finance and Accounting, Chengdu Jincheng College, Chengdu, China *Corresponding author Abstract: This study aims to explore the optimal crop planting strategy from 2024 to 2030 based on the Mixed-Integer Programming (MIP) method. Through systematic organization and in-depth analysis of rural crop cultivation and related statistical data collected in 2023, it was found that different types of crop planting plots have no significant impact on sales prices but do affect planting costs and yield per acre. The study also considered the impact of irrigated and greenhouse planting areas, as well as planting seasons on sales, costs, and yield. By establishing a crop planting profit maximization model and introducing 0-1 variables to record the planting strategy for the next 7 years, we used MATLAB software and the CPLEX solver to solve this single-objective mixed integer programming model. The analysis of the model results indicates that crops exceeding the expected sales volume should be discounted in the current quarter in a timely manner to maximize overall revenue. Keywords: Crop Planting Strategy, Mixed-Integer Programming, Sales Strategy, Cost-Benefit Analysis. 1. Introduction With the growth of the global population and the finiteness of resources, optimizing crop planting strategies is crucial for enhancing agricultural production efficiency and sustainability [1, 2]. This paper aims to study and develop an optimal crop planting strategy to maximize planting profits from 2024 to 2030 using the Mixed-Integer Programming (MIP) method [3]. By conducting an in-depth analysis of crop yield, cost, and sales data from 2023, we explore the impact of different planting plots, seasonal factors, and planting patterns on the economic performance of crops [4]. This study not only provides agricultural decision-makers with a scientific tool to guide future planting decisions but also has significant implications for understanding and predicting the impact of crop planting patterns on the agricultural economy. 2. Data Exploration Due to the complexity of the rural crop cultivation and related statistical data we collected in 2023, and the relative stability of crop-related characteristics in the future compared to 2023, it is necessary to systematically organize and conduct an in-depth analysis of this information first. Based on the relevant statistical data from 2023, we have created a bar chart of crop yields, which shows that wheat has the highest yield per acre, followed by millet, soybeans, corn, green beans, and other crops. This indicates that these crops have high yields and also sell in larger quantities. To further explore the impact of crop planting plot types on sales prices and production costs, we selected crops planted in plots F, D, and E in the same quarter according to the statistical data, and summarized the sales prices, planting costs, and yield per acre of these crops in the first quarter. After a detailed comparative analysis, we found that the sales prices of all crops remain constant across different planting plots, while the planting costs and yields per acre in plots E and F are higher than those in plot D. From this, we can infer that the type of crop planting plot has no significant impact on sales prices. Through the comparison of plots D, E and F in Fig. 1, it is found that the unit price of sales of different crops under the planting of three plot types is at the same level, which also confirms that different plot types do not affect the unit price of sales. Figure 1. Unit prices of different crops sold in the first quarter of Plots D, E and F in 2023 327 To analyze irrigated and greenhouse planting areas, we considered both types together. Unlike regular plots, irrigated and greenhouse areas often plant two crop types per plot in the first quarter, with each crop covering half the area. This distribution supports efficient field management. To assess the impact of planting seasons on sales, costs, and yield, we selected crops that could be grown in both the first and second quarters on designated F fields, gathering data on unit price, yield per acre, and planting costs for each quarter. Our analysis shows that first-quarter crops generally have lower prices and costs, but higher yields per acre compared to the second quarter. This suggests that seasonal factors affect crop prices and costs, with first-quarter yields and planting costs being more favorable than those in the second quarter, leading to higher unit prices in the latter. In order to fully explore the relationship between the sales unit price, per mu yield and planting cost of two-season crops, the following three dimensions are separately compared and analyzed: (1) Cost analysis of the comparison between two crops In the case of the same plot type, the planting cost of the same crop in the first and second quarters is analyzed, and the comparison results are shown in Fig. 2, where planting cost _1 represents the first quarter and planting cost _2 represents the second quarter. It can be observed that the planting cost in the first quarter is generally lower than that in the second quarter. This indicates that the planting cost will be affected by different seasons. Figure 2. Comparison of planting costs of two crops in 2023 (2) Research on the yield of two crops in comparison In the same plots, the yield per mu of the same crop in the first quarter and the second quarter is different, the yield per mu in the first quarter is slightly higher than the second quarter, indicating that the yield per mu is related to the season. (3) Research on the sales unit price of the comparison between two crops Similarly, according to the comparison of the unit sales price of two crops in 2023, the unit sales price of the same crop in the first quarter is lower than that in the second quarter, further indicating that the unit sales price will be affected by the quarter. 3. Crop Planting Profit Maximization Model Since there can be no repeat cropping between adjacent plantable seasons, it is necessary to record it first and then establish constraints in order to avoid this phenomenon in the next planting. These characteristics of the future of each crop remain stable, so we calculate 95% of the actual production in 2023 as expected sales based on the relevant literature and actual situation [5]. Our research objective is to achieve the optimal crop planting strategy from 2024 to 2030 under the constraints of planting in each plot. At the same time, in order to record the planting strategy in the next 7 years, we introduced 0-1 variables to determine whether the crop should be planted in a certain season in the same place. Finally, MATLAB software was used to solve the established single-objective mixed integer programming model with CPLEX solver [6]. 3.1. Decision variables Suppose that 𝑆 represents the actual area of each plot, 𝑖 represents the crop type, 𝑗 represents the planting plot (including greenhouses), t represents the season, and k represents the year. π‘Œ indicates whether the 𝑖 kind of crop is planted in plot j and whether it is planted in the t season of the k year (1 indicates planting and 0 indicates no planting); 𝑋 is the planting area of the i kind of crop in plot j and the t quarter of the k year (unit/mu); 𝐢 is the planting cost of the i kind of crop in plot j and the t season of the k year (unit/mu). 𝑃 is the unit price (unit/jin) of the i crop in the t season of the k year, and 𝑄 is the per mu yield of the i crop in the j plot in the t quarter of the k year. 328 3.2. Establishment of objective function Maximum benefit equals revenue minus cost: π‘€π‘Žπ‘₯ 𝑧 π‘–π‘›π‘π‘œπ‘šπ‘’ π‘π‘œπ‘ π‘‘ (1) For income: π‘–π‘›π‘π‘œπ‘šπ‘’ 0.95 βˆ‘ βˆ‘ βˆ‘ 𝑃 βˆ‘ 𝑄 𝑋 (2) For the cost: π‘π‘œπ‘  𝑑 βˆ‘ βˆ‘ βˆ‘ βˆ‘ 𝐢 𝑋 (3) Maximum benefit: π‘€π‘Žπ‘₯ 𝑧 0.95 βˆ‘ βˆ‘ βˆ‘ 𝑃 βˆ‘ 𝑄 𝑋 βˆ‘ βˆ‘ βˆ‘ βˆ‘ 𝐢 𝑋 (4) 3.3. Constraint conditions In order to facilitate the management of crops, each crop can not be too dispersed: βˆ‘ π‘Œ ∈ 1,2 (5) The planting area of all crops in each field should be less than or equal to the actual area of each field. βˆ‘ 𝑋 𝑆 (6) 𝑆 represents the actual area of each plot, i represents the crop type, j represents the planting plot (including greenhouses), t represents the season, k represents the year, 𝑋 is the planting area of the i crop in the j plot, the k year and the t quarter (unit/mu). Flat drylands, terraced fields and hillsides grow only one crop per field. 𝑑 1οΌŒπ‘— ∈ 𝐴 , 𝐴 , … , 𝐡 , 𝐡 , … , 𝐢 , 𝐢 𝑑 2οΌŒπ‘’π‘™π‘ π‘’ (7) Where t represents the season, j represents the planting plot (including greenhouses), 𝐴 , 𝐴 , … , 𝐡 , 𝐡 , … , 𝐢 , 𝐢 represents flat dry land, terraced land, hillside land three kinds of plots. If the season is less than or equal to 1(there is a possibility of no planting), it means that the crop is in one of these three plots, and otherwise it is in the other plots. Flat drylands, terraces and hillsides can only grow food crops (except rice). 𝑋 0οΌŒπ‘— ∈ 𝐴 , 𝐴 , … , 𝐡 , 𝐡 , … , 𝐢 , 𝐢 𝑖 ∈ 1,2, … ,15 𝑋 0οΌŒπ‘’π‘™π‘ π‘’ (8) 𝑋 refers to the planting area of the i crop in the j plot and the t quarter of the k year (unit/mu). When the planting area is greater than 0, it indicates that the crop is planted in one of the first three types of plots and belongs to a food crop (non-rice). If it is not a food crop (non-rice), it will not be grown. Irrigated fields grow single-season rice or two-season vegetables. 𝑑 1οΌŒπ‘– 16 𝑑 2οΌŒπ‘’π‘™π‘ π‘’ 𝑗 ∈ 𝐷 , 𝐷 , … , 𝐷 (9) 𝐷 , 𝐷 , … , 𝐷 represents the plot where the irrigated land is located. If t is less than or equal to 1, it means that if crops can only be rice (or no planting), otherwise, two seasons of vegetables can be planted or no planting. Type and area of irrigated land and common greenhouses planted in the first and second seasons. 𝑋 0οΌŒπ‘— ∈ 𝐷 , 𝐷 , … , 𝐸 , 𝐸 οΌŒπ‘‘ 1 𝑋 0οΌŒπ‘— ∈ 𝐹 , 𝐹 , 𝐹 , 𝐹 𝑋 0οΌŒπ‘’π‘™π‘ π‘’ 𝑖 ∈ 17, … ,34 (10) Under the conditions between vegetables (cabbage, white radish, carrot), when the planting area 𝑋 is greater than 0 and in the first quarter, it indicates that the planted crops are planted in irrigated land or ordinary greenhouses, if only 𝑋 is greater than 0, the crops are planted in smart greenhouses, under other types of plots, 𝑋 t is equal to 0. Crop types and plots planted in the second season of irrigated land. π‘Œ 1οΌŒπ‘— ∈ 𝐷 , … , 𝐷 οΌŒπ‘‘ 2 π‘Œ 0οΌŒπ‘’π‘™π‘ π‘’ 𝑖 ∈ 35,36,37 (11) When the crop is one of Chinese cabbage, white radish, and carrot, π‘Œ is equal to 1 and is in the second quarter, it means that the crop is planted in the irrigated plot, and otherwise, it is not planted. Ordinary greenhouses only grow edible fungi in the second season. 𝑋 0οΌŒπ‘— ∈ 𝐸 , … , 𝐸 οΌŒπ‘‘ 2 𝑋 0οΌŒπ‘’π‘™π‘ π‘’ 𝑖 ∈ 38,39,40,41 (12) When the crop is in one of the edible fungi, if it is in the second quarter, the planting area is greater than 0, indicating that the crop is planted in the ordinary greenhouse, otherwise, it is not planted. Each crop in the same piece of land (including greenhouses) can not be planted continuously. π‘Œ π‘Œ 1οΌŒπ‘‘ 1 π‘Œ π‘Œ 1οΌŒπ‘’π‘™π‘ π‘’ (13) The value of π‘Œ can be 0 or 1. If only one season is planted in a year, the sum of the k year and k+1 year must be less than or equal to 1. If two seasons can be planted in a year, the planting situation of the first quarter and the second quarter is less than or equal to 1. Since soil containing the rhizobacteria of legume crops is conducive to the growth of other crops, every field (including greenhouses) should be planted with legume crops at least once in three years. βˆ‘ π‘Œ 1 𝑖 ∈ 1,2,3,4,5,17,18,19 (14) In the case of legumes, if n equals 0, 1, 2, there is at least one planting in three years. 329 The planting area of each crop in a single plot (including greenhouses) should not be too small. 𝑋 𝑆 𝑑 ∈ 1,2 (15) When in the first or second quarter or when no crops are planted, the planting area 𝑋 should be greater than or equal to half of the actual area of each plot. 4. Model Solution and Result Analysis In order to deal with the unsalable part of each crop that exceeds its expected sales volume or sell at a 50% discount based on the 2023 sales price, the optimal planting plan for the next seven years under the two sales strategies was calculated and compared. According to the preparation before the establishment of the model, the income per mu of land in 2023 can be calculated. It can be concluded that ordinary greenhouses have the highest yield income per mu, followed by ordinary greenhouses - white mushroom, wisdom greenhouses - cucumber, ordinary greenhouses - cucumber, etc., so you can consider a variety of elm mushroom crops in the second quarter of ordinary greenhouses. 4.1. Overstock disposal Through MATLAB, the crop planting situation from 2024 to 2030 can be obtained as shown in Fig. 3, where 0 represents no planting and 1 represents planting. Figure 3. Planting situation in 2024 Using the planting strategy for each of the next seven years, we can calculate the annual income under the sales scenario 1 (unit: yuan) as shown in Table 1. Table 1. Sales revenue for 2024-2030 (Overstock disposal) Year Sales Income 2024 4354516.431818182 2025 3730271.078671328 2026 4470174.795454547 2027 4348808.005244754 2028 3951247.409090909 2029 4466974.795454546 2030 4343968.005244754 According to the planting situation from 2024 to 2030, the annual profit can be calculated. The total profit situation of seven years is shown in Fig. 4. It can be seen from observation that the overall profit fluctuates, with the lowest value of 3730271.07 yuan in 2025 and the highest value of 4470174.79 yuan in 2026. 330 Figure 4. Seven-year profit returns (Overstock disposal) 4.2. Discount sales Based on the optimization model established before, its objective function is modified, and the rest remains unchanged. According to the modified model, the optimal planting strategy of crops in the next 7 years can be obtained by solving it with MATLAB software. Objective function: π‘–π‘›π‘π‘œπ‘šπ‘’β€² 0.05 0.5 0.95 βˆ‘ βˆ‘ βˆ‘ 𝑃 βˆ‘ 𝑄 𝑋 (16) π‘€π‘Žπ‘₯𝑧 0.05 0.5 0.95 βˆ‘ βˆ‘ βˆ‘ 𝑃 βˆ‘ 𝑄 𝑋 βˆ‘ βˆ‘ βˆ‘ βˆ‘ 𝐢 𝑋 (17) The earnings for each of the next seven years are shown in Table 2. Table 2. Sales revenue for 2024-2030 (Discount sales) Year Sales Income 2024 10111215.0524476 2025 6654154.88636364 2026 9914028.15297203 2027 8759192.37062937 2028 6690514.41433566 2029 9768703.15297202 2030 8937942.37062937 The revenue situation from 2024 to 2030 is drawn as a line chart, as shown in Fig 5. The fluctuation of this line chart is roughly the same as that in Case 1, but the total revenue is much higher than that in case 1, indicating that the sales strategy in case 2 is far better than that in case 1. Figure 5. Seven-year profit returns (Discount sales) 331 To sum up: products that exceed the expected sales volume should be timely discounted in the current quarter to maximize the overall revenue. 5. Conclusion This study successfully evaluated the crop planting strategies for the period from 2024 to 2030 using a mixed- integer programming model, aiming to maximize planting profits. The results indicate that with proper planning of planting areas and seasons, agricultural economic benefits can be effectively enhanced. Although the model has shown a certain level of effectiveness in its current form, there is still room for improvement. Future research could consider incorporating more variables, such as climate change, market price fluctuations, and soil degradation, to enhance the model's adaptability and robustness. Additionally, the optimization algorithms and the choice of solver are key to improving the quality and efficiency of solutions. With continuous iteration and refinement, the model is expected to provide more precise decision support for agricultural planting management. References [1] Zhang Y, Swaminathan J M. Improved crop productivity through optimized planting schedules[J]. Manufacturing & Service Operations Management, 2020, 22(6): 1165-1180. [2] Guo X X, Li K L, Liu Y Z, et al. Toward the economic- environmental sustainability of smallholder farming systems through judicious management strategies and optimized planting structures[J]. Renewable and Sustainable Energy Reviews, 2022, 165: 112619. [3] Wolsey L A. Mixed integer programming[J]. Wiley Encyclopedia of Computer Science and Engineering, 2007: 1- 10. [4] Achterberg T, Wunderling R. Mixed integer programming: Analyzing 12 years of progress[M]//Facets of combinatorial optimization: Festschrift for martin grΓΆtschel. Berlin, Heidelberg: Springer Berlin Heidelberg, 2013: 449-481. [5] Hu M, Liu Y, Wang W. Socially beneficial rationality: The value of strategic farmers, social entrepreneurs, and for-profit firms in crop planting decisions[J]. Management Science, 2019, 65(8): 3654-3672. [6] Anand R, Aggarwal D, Kumar V. A comparative analysis of optimization solvers[J]. Journal of Statistics and Management Systems, 2017, 20(4): 623-635.