Agricultural planting strategy optimization method based on single-target linear programming and related device

Through the agricultural planting strategy optimization method based on single-objective linear programming, genetic algorithms are used to optimize agricultural planting strategies, the mismatch problem between yield and market demand in agricultural planting is solved, which reduces waste, improves prediction accuracy, and reduces agricultural planting costs.

CN120197757AInactive Publication Date: 2025-06-24SHAANXI UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510270785.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot effectively solve the structural mismatch between yield and market demand in agricultural planting, resulting in unsalable or waste of agricultural products, and the existing agricultural economic model cannot be coupled analysis under the same optimization framework, resulting in the lack of constraint dimensions.

Method used

The agricultural planting strategy optimization method based on single-objective linear programming is adopted. By determining the decision variables and secondary variables of agricultural planting profits, a single-objective linear planning model is constructed, and the solution is used to optimize the agricultural planting strategy, considering the impact of two unsalable sales situations on returns.

Benefits of technology

Under the same optimization framework, two unsalable sales situations are considered, which reduces waste of agricultural planting due to exceeding expected output, improves the prediction accuracy of crop planting, makes agricultural planting strategies closer to the actual market conditions, and reduces agricultural planting costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197757A_ABST
    Figure CN120197757A_ABST
Patent Text Reader

Abstract

The invention discloses an agricultural planting strategy optimization method based on single-target linear programming and a related device, and relates to the field of agricultural planting, and the method comprises the following steps: determining a decision variable and a secondary variable of an agricultural planting profit; a single-target linear programming model is constructed based on the decision variable and the secondary variable, the single-target linear programming model comprises a target function and constraint conditions, and the target function maximizes the agricultural planting income under the condition that the expected sales volume is exceeded. The condition of exceeding the expected sales volume comprises that the unsalable part is completely wasted and the unsalable part is sold according to the price of 50%; and solving the single-target linear programming model by adopting a genetic algorithm to obtain an agricultural planting strategy with the maximum income, thereby realizing agricultural planting strategy optimization. According to the method, the problem of constraint condition deficiency caused by incapability of performing double-scene modeling coupling analysis in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of agricultural planting, and particularly to an optimization method for agricultural planting strategies based on single-objective linear programming and related devices. Background Art

[0002] In the traditional agricultural production system, crop planting decisions mainly rely on farmers' historical experience and fixed production plans. This decision-making mode often ignores the quantitative analysis of the dynamic supply and demand relationship in the market. Therefore, agricultural production often faces the problem of structural mismatch between output and market demand. When the actual output exceeds the market demand, there are usually two loss scenarios for the surplus agricultural products: one is direct abandonment, which not only wastes precious production factors such as seeds, land, and water resources, but also causes unnecessary pressure on the environment; the other is selling at a large discount, which directly leads to a significant decline in farmers' economic benefits.

[0003] Existing technical solutions have significant deficiencies in solving this problem. Traditional statistical methods are unable to cope when dealing with complex optimization problems involving multiple constraints. Existing planting planning models cannot conduct coupled analysis under the same optimization framework when dealing with unsalable scenarios, resulting in the lack of dimensions of constraint conditions. At the same time, existing agricultural economic models often ignore the dynamic correlations of key variables such as price elasticity and inventory costs, and cannot effectively balance the relationships among output, market demand, and economic benefits, leading to a large deviation between the model prediction results and the actual situation. Summary of the Invention

[0004] The purpose of the present invention is to provide an optimization method for agricultural planting strategies based on single-objective linear programming and related devices, so as to solve the problem of the lack of constraint conditions caused by the inability of the existing technology to conduct dual-scenario modeling and coupled analysis, and to reduce the waste caused by output exceeding expectations in the agricultural planting process and improve the prediction accuracy of the planting amounts of various crops.

[0005] To achieve the above object, the present invention adopts the following technical solutions: In the first aspect, an optimization method for agricultural planting strategies based on single-objective linear programming includes the following steps: Determine the decision variables and secondary variables of agricultural planting profit; Based on the decision variables and secondary variables, construct a single-objective linear programming model. The single-objective linear programming model includes an objective function and constraint conditions. The objective function is to maximize the agricultural planting revenue in the case of exceeding the expected sales volume. The cases of exceeding the expected sales volume include: the unsalable part is completely wasted and the unsalable part is sold at 50% of the price; Use a genetic algorithm to solve the single-objective linear programming model to obtain the agricultural planting strategy with the maximum revenue and realize the optimization of the agricultural planting strategy.

[0006] In some embodiments, the decision variables include: The number of mu of the th crop planted on the th plot of land in the th season of the th year, the planting cost of the th crop planted on the th plot of land in the th season of the th year, the yield per mu of the th crop planted on the th plot of land in the th season of the th year, the selling price of the th crop planted on the th plot of land in the th season of the th year, and the expected sales volume of the i th crop planted on the th plot of land in the th season of the Among them, is the land number, and the value range is 1 - 54; is the crop type, and the value range is 1 - 41; is the season, and the value range is 1 - 2; is the year, and the value range is 2024 - 2030.

[0007] In some embodiments, the objective function is the following formula:

[0008]

[0009]

[0010] Among them, is the profit, t is the year, i is the land number, is the crop type, k is the season, is the overstock coefficient, is the selling price of the th crop planted on the th plot of land in the th season of the is the selling price of the th crop planted on the th plot of land in the The number of mu of the is in the season of the th year on the th plot for planting the th crop, is the part not exceeding the expected sales volume,

[0011] In some embodiments, the constraint conditions include: Each crop cannot be continuously replanted in the same plot; All lands must be planted with leguminous crops at least once within three years; Only one crop is planted on each plot at a time; Dry land, terraced fields and hillside fields are planted with food crops once a year; Irrigated land is planted with vegetables twice a year; Ordinary greenhouses are planted with vegetables and edible fungi once a year; Smart greenhouses are planted with vegetables twice a year.

[0012] In some embodiments, the single-objective linear programming model includes:

[0013]

[0014]

[0015]

[0016] Among them, is the profit, t is the year, i is the land number, is the crop type, k is the season, is the unsalable coefficient, is in the season of the th year on the th plot for selling the th crop, is in the season of the th year on the th plot for selling the in the season of the th year on the th plot for planting the th crop, is the part exceeding the expected sales volume, is whether to plant the th year in the th quarter on the i th plot of land the th type of crop, is the area of the th plot of land, is the type of the th plot of land, is the expected sales volume of the th type of crop in the th year, is the th quarter in the th plot of land for planting the th type of crop per mu yield.

[0017] In some embodiments, the steps of solving the single-objective linear programming model by using the genetic algorithm specifically include: Determine that the chromosome is encoded as an integer array, where each chromosome represents the planting arrangement of a crop on different lands, in different years and different seasons; Randomly generate the integer array to form an initial population; Traverse the planting arrangements of each individual in the initial population, calculate the profits of all planting arrangements and accumulate them into the total profit, and use the total profit as the fitness value of the current individual; The initial population is iterated through crossover and mutation, and each population is sorted by the fitness value during the iteration until the final population is obtained after reaching the maximum number of iterations; Select the individual with the highest fitness value from the final population as the agricultural planting strategy with the maximum profit.

[0018] In a second aspect, an agricultural planting strategy optimization system based on single-objective linear programming includes: A planting profit-related factor analysis module for determining decision variables and secondary variables of agricultural planting profit; A single-objective linear programming model construction module for constructing a single-objective linear programming model based on the decision variables and secondary variables, the single-objective linear programming model including an objective function and constraint conditions, the objective function being to maximize agricultural planting revenue in the case of exceeding the expected sales volume, and the case of exceeding the expected sales volume including: the unsold part is completely wasted and the unsold part is sold at 50% of the price; An agricultural planting strategy optimization module for solving the single-objective linear programming model by using the genetic algorithm to obtain the agricultural planting strategy with the maximum profit and realizing the optimization of the agricultural planting strategy.

[0019] In a third aspect, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for optimizing an agricultural planting strategy based on single-objective linear programming are implemented.

[0020] In a fourth aspect, a computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the method for optimizing an agricultural planting strategy based on single-objective linear programming are implemented.

[0021] In a fifth aspect, a computer program product includes a computer program. The computer program, when executed by a processor, implements the steps of the method for optimizing an agricultural planting strategy based on single-objective linear programming.

[0022] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method for optimizing an agricultural planting strategy based on single-objective linear programming. By constructing a single-objective linear programming model and using a genetic algorithm to solve it, a strategy that maximizes agricultural planting benefits under given constraints can be found. The impact of two slow-selling situations on benefits is considered within the same optimization framework, the constraint conditions are more perfect, dual-scenario modeling and coupling analysis can be carried out, waste caused by exceeding the expected yield in the agricultural planting process can be reduced, and the prediction accuracy of the planting amounts of various crops can be improved, so that the finally obtained agricultural planting strategy is closer to the actual market situation, and the problem of high agricultural planting costs caused by waste due to exceeding the expected yield in the agricultural planting process is solved.

[0023] Furthermore, the decision variables include the number of mu of crop planting, planting cost, yield per mu, selling price, and expected sales volume, which can comprehensively reflect the situation of agricultural planting, consider multi-dimensional factors, and through optimization by a single-objective linear programming model, rationally allocate land resources, crop types, and planting time, and improve resource utilization efficiency.

[0024] Furthermore, the constraint conditions fully consider crop rotation, the planting frequency of leguminous crops, land type, and the matching of crop planting seasons, which helps to optimize the agricultural planting strategy, maintain soil fertility, reduce the occurrence of pests and diseases during the implementation of the generated planting strategy, and increase crop diversity at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of the profit per mu of each crop in this embodiment; Figure 2 It is a schematic diagram of the area of different land types in this embodiment; Figure 3 It is a statistical chart of the profit per mu of each crop of the first type in this embodiment; Figure 4 It is a statistical chart of the per - mu profit of each type of the second - category crops in this embodiment; Figure 5 It is a flowchart of the agricultural planting strategy optimization method based on single - objective linear programming provided in this embodiment; Figure 6 It is a schematic diagram of the agricultural planting strategy optimization system based on single - objective linear programming provided in this embodiment. Detailed implementation manners

[0026] To enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings. The content described is an explanation of the present invention rather than a limitation.

[0027] It should be noted that the terms "including" and "having" and any variations thereof in the description and claims of the present invention are intended to cover non - exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, system, product or device.

[0028] A certain rural area can only plant one season of crops every year. The rural area currently has 1201 mu of open - field arable land, which is scattered into 34 plots of different sizes, including 4 types: flat dry land, terraced fields, hillside land, and irrigated land. Flat dry land, terraced fields, and hillside land are suitable for planting one season of food crops every year; irrigated land is suitable for planting one season of rice or two seasons of vegetables every year. The rural area also has 16 ordinary greenhouses and 4 intelligent greenhouses, and the cultivated area of each greenhouse is 0.6 mu. Ordinary greenhouses are suitable for planting one season of vegetables and one season of edible fungi every year, and intelligent greenhouses are suitable for planting two seasons of vegetables every year. Different crops can be co - planted in the same plot (including greenhouses) in each season. According to the growth law of crops, each crop cannot be continuously replanted in the same plot (including greenhouses), otherwise the yield will decrease; because the soil containing leguminous crop rhizobia is beneficial to the growth of other crops, since 2023, it is required that all the land in each plot (including greenhouses) be planted with leguminous crops at least once within three years. At the same time, the planting plan should take into account convenient farming operations and field management. For example: the planting land of each crop in each season should not be too scattered, and the planting area of each crop in a single plot (including greenhouses) should not be too small, etc. Assume that the expected future sales volume, planting cost, per - mu yield, and selling price of various crops remain stable compared with 2023, and the crops planted in each season are sold in that season. If the total output of a certain crop in each season exceeds the corresponding expected sales volume, the excess part cannot be sold normally. Among them, the excess part may have some unsalable situations, resulting in waste; the excess part is sold at a 50% discount of the selling price in 2023.

[0029] The following assumptions need to be followed when implementing the following embodiments: (1) The crop yields in 2023 are the expected sales volumes; (2) Other costs except for planting costs are not considered; (3) The planting plan aims to obtain the maximum profit; (4) Various crops are completely irreplaceable with each other.

[0030] Table 1 below shows the descriptions of the parameters involved in the text.

[0031] Table 1 Parameter Descriptions

[0032] Therefore, this embodiment provides an optimization method for agricultural planting strategies based on single-objective linear programming, including the following steps: S1: Data preprocessing S1.1: Processing of expected sales volume data. According to the above assumption (1), the yields of various crops in 2023 are consistent with the expected sales volumes, and the future expected sales volumes of various crops remain stable relative to 2023. Use the yields of various crops in 2023 to replace the expected sales volumes of various crops from 2024 to 2030.

[0033] Calculate the expected sales volumes of various crops from 2024 to 2030 according to the following formula.

[0034] (1-1) Where is the yield per mu, is the planting area, and the obtained results are shown in Table 2 below.

[0035] Table 2 Expected Sales Volumes of Various Crops from 2024 to 2030

[0036] S1.2: Processing of expected sales price data. The sales price of each crop is an interval segment. Use the contraction value of this interval segment to replace the sales price of this year. The sales prices of various crops remain stable relative to 2023. Use the contraction value of the sales price in 2023 to replace the sales prices of various crops from 2024 to 2030. Calculate the expected sales prices of various crops from 2024 to 2030 according to the following formula.

[0037] (1-2) Where, is the maximum value of the expected sales price, is the minimum value of the expected sales price, and the obtained results are shown in Table 3: Table 3 Expected Sales Prices of Various Crops from 2024 to 2030

[0038] S1.3 Expected profit per mu of output treated The per-mu yield of various crops remains stable compared to 2023. The per-mu yield of each crop in different plot types in 2024 - 2030 is replaced by the per-mu yield of each crop in different plot types in 2023, and then the expected profit per mu of each crop under different plot types is solved according to the following formula.

[0039] (1 - 3) Where is the per-mu yield, is the expected selling price, is the planting cost, and the results are shown in Table 4 as follows: Table 4 Expected profit per mu of each crop

[0040] S1.4 Land type classification: Analyze the irrigated land that can be planted either seasonally or double-seasonally. The profit per mu of each crop is as Figure 1 shown, Figure 1 Among them, the profit per mu of rice is much less than that of other crops. As the only crop planted seasonally in the irrigated land type, it has the least profit per mu. Considering the goal of maximizing revenue in the process of formulating the planting strategy, rice planting is not considered. Therefore, the data can be simply classified into two major categories: seasonal planting and double-season planting. The land types for seasonal planting include flat dry land, terraced fields, and hillside land, and the land types for double-season planting include irrigated land, ordinary greenhouses, and smart greenhouses.

[0041] S1.5 Crop type classification According to whether the crop can be cultivated in the same cultivated land, the crops are divided into five categories, and the specific results are shown in Table 5 below.

[0042] Table 5 Plot types

[0043] Among them, are the crops cultivated in dry land, terraced fields, and hillside land; are the crops cultivated in irrigated land, are the crops cultivated in the first season of irrigated land, the first season of ordinary greenhouses, and the first and second seasons of smart greenhouses; are the crops cultivated in the second season of irrigated land, are the crops cultivated in the second season of ordinary greenhouses.

[0044] S1.6 Data quantization of land types Use to represent the type of the i-th plot, and the specific results are shown in Table 6 below.

[0045] Table 6 Digitalization of plot types

[0046] S2 Data Visualization Analysis S2.1 Analysis of the areas of different types of land The planting areas of different crops directly affect the total production of various agricultural products, and thus affect the final income. Due to the different areas of different land types, the available planting areas of different crops are different. When a crop has not reached market saturation and the profit per mu is certain, the larger the planting area, the higher the final income. In this embodiment, the areas of different types of land are counted, and then the planting areas of different crops are planned. The statistical results are as Figure 2 shown. The areas of different types of land from large to small are: terraced fields, dry upland fields, irrigated fields, hillside fields, ordinary greenhouses, and smart greenhouses. Among them, the areas of hillside fields and irrigated fields are similar. The profit per mu of each crop in different land types is different. To achieve the goal of maximizing the final profit, high-profit crops should be reasonably selected for larger-area planting.

[0047] S2.2 Analysis of the profit per mu of each crop The profit per mu of each crop directly affects the final profit. When a crop has not reached market saturation and the planting area is determined, the greater the profit per mu, the higher the final profit. It can be considered that before the crop with a higher profit per mu reaches the expected sales volume, more crops with a higher profit per mu should be considered for planting. In this embodiment, the land types are divided into two major categories according to the crops, and the profit per mu of each crop is counted.

[0048] (1) Visualization of the statistical results of the profit per mu of each crop in the first category As Figure 3 shown, when comparing different crops under the same land type, the profit per mu of sweet potatoes is the largest, and the profit per mu of soybeans is the smallest. Without considering other constraints, sweet potatoes should be given priority for planting, and soybeans should be considered last. At the same time, when comparing different land types under the same crop, it is shown that the profit per mu of dry upland fields is the largest, followed by terraced fields, and the smallest in hillside fields. Without considering other constraints, dry upland fields should be given priority for planting, followed by terraced fields, and finally hillside fields.

[0049] (2) Visualization of the statistical results of the profit per mu of each crop in the second category As Figure 4As shown in the figure, when comparing different crops under the same type of land, the per-mu profit of cucumbers is the largest, and the per-mu profit of potatoes is the smallest. Without considering other constraint factors, cucumber cultivation should be given priority, and potato cultivation should be considered last. At the same time, when comparing different land types for the same crop, it is shown that the per-mu profit in the second season of the intelligent greenhouse is the largest, followed by the first season of the intelligent greenhouse, then the first season of the ordinary greenhouse, and finally the first season of the irrigated land. Without considering other constraint factors, the order of consideration should be the second season of the intelligent greenhouse, the first season of the intelligent greenhouse, the first season of the ordinary greenhouse, and the first season of the irrigated land.

[0050] S3 As Figure 5 shown, the goal programming model is established. According to assumption (3), the optimal planting plan is determined. With the goal of maximizing the profit, a single-objective linear programming model based on linear goal programming is established to solve for the maximum profit.

[0051] S3.1 Determine the decision variables For the problem of formulating planting strategies, with the sole goal of maximizing profits, the direct factors affecting the final profit are identified as decision variables, and the indirect factors are regarded as secondary variables.

[0052] (1) Determine the decision variables by the literature method According to the literature search, the planting type of crops, the planting area of crops, the planting cost, the per-mu yield, the selling price, and the expected sales volume, i.e., the market saturation, can be determined as the key factors affecting the final profit. The decision variables are determined as shown in Table 7 below.

[0053] Table 7 Decision variables

[0054] Among them, is the land number, and the value range is 1 - 54; is the crop type, and the value range is 1 - 41; is the quarter, and the value range is 1 - 2; is the year, and the value range is 2024 - 2030.

[0055] (2) Specifically analyze and supplement the secondary variables Based on the above content of the crop planting background in a certain rural area, it is determined that the crop land type and the area of each plot are also important factors affecting the final profit. At the same time, for irrigated land, ordinary greenhouses, and intelligent greenhouses, whether to plant and what crops to plant in different quarters are also important influencing factors. Therefore, the additional factors are shown in Table 8 below.

[0056] Table 8 Supplementary variables

[0057] Regarding whether to plant the nd year in the th quarter, plant the th type of crop. Indicates planting, Indicates not planting.

[0058] S3.2 Determine the objective function Assumption (3) stipulates that the planting plan aims to maximize profits. Therefore, the objective function is determined to be maximizing the planting profit. The final profit is calculated as the sum of the comprehensive profits of each plot of land in each quarter of each year. The profit for a single time is calculated based on the basic idea that profit equals sales revenue minus cost.

[0059] First, for the calculation of sales revenue, the basic idea of unit price × quantity can be used. The "quantity" is obtained by multiplying the yield per mu of the crop by the number of mu, and the selling price is used as the "unit price". The two are multiplied to obtain the sales revenue. Since the sales revenue includes the normal sales part within the expected sales volume, that is, the market saturation, and the abnormal sales part exceeding the expected sales volume, the two are calculated separately. Take the smaller value of the "quantity" and the expected sales volume, and multiply it by the selling price to obtain the sales revenue of the normal sales part; take the smaller value of the difference between the "quantity" and the expected sales revenue and 0, and multiply it by the selling price to obtain the sales revenue of the abnormal sales part. In the th quarter of the th year, on the th plot of land, the profit calculation formula for planting the (3 - 1) In addition, for the part that exceeds the expected self - sales volume and is completely unsold and wasted or sold at a 50% discount, after calculating the product of the excess quantity and the selling price, that is, the original selling price of the excess part, multiply it by the unsold coefficient . For the case where the excess part is completely unsold, let the unsold coefficient be 0, and the resulting value can be considered that the excess part is unsold, causing waste and generating no revenue at all; for the case where the excess part is sold at a 50% discount, let the unsold coefficient be 0.5, and the resulting value conforms to the rule of a 50% price cut.

[0060] Finally, the cost, that is, the planting cost on this plot of land, can be solved using the following formula: (3 - 2) Determine the objective function of the linear goal programming model for maximizing profit as follows: (3 - 3) Among them, the part that does not exceed the expected sales volume is , and the part that exceeds the expected sales volume is .

[0061] (3 - 4) (3 - 5) S3.3 Determine the constraint conditions (1) Each crop cannot be continuously replanted in the same plot (including greenhouses), otherwise the yield will decrease. That is, for the land where single-season crops are planted, the crop type in the first year cannot be the same as that in the second year; for the land where double-season crops are planted, the crop type in the first season of the first year cannot be the same as that in the second season of the first year, and the crop type in the second season of the first year cannot be the same as that in the first season of the second year. Translate the above conditions into symbolic language as follows: (3 - 6) , , (3 - 7) (2) All land should be planted with leguminous crops at least once within three years. That is, from the nth year to the n + 2th year, sum up the cases of determining to plant leguminous crops, and the result is greater than 1. Translate the above conditions into symbolic language as follows: (3 - 8) (3 - 9) (3) The planting area of each crop per season should not be too scattered, and the planting area of each crop in a single plot (including greenhouses) should not be too small. Therefore, it is restricted that only one crop is planted in a plot at a time. Translate the above conditions into symbolic language as follows: (3 - 10) (4) Dry flatland, terraced fields and hillside fields are suitable for planting one season of grain crops every year. It can be stipulated that in all years, planting is only carried out in the first season and not in the second season. Translate the above conditions into symbolic language as follows: , (3 - 11) , (3 - 12) (5) Irrigated land is suitable for planting one season of rice or two seasons of vegetables every year. Combining the results of data preprocessing, only two kinds of vegetables are planted in irrigated land. That is, it is determined that planting is carried out in both seasons, and the types of planted crops are all vegetables. Translate the above conditions into symbolic language as follows: (3 - 13) (6)Ordinary greenhouses are suitable for growing one season of vegetables and one season of edible fungi each year. That is, for each season of each year, the planting is determined, and the planting types are respectively and types. Transforming the above conditions into symbolic language is as follows: , (3 - 14) , (3 - 15) (7)Smart greenhouses are suitable for growing two seasons of vegetables each year. That is, for each season of each year, smart greenhouses are planted. Transforming the above conditions into symbolic language is as follows: , (3 - 16) , (3 - 17) S3.4 Establish the goal programming model Based on the above objective function and constraint conditions, establish the goal programming model as follows: (3 - 18) Among them, ,

[0062]

[0063] S4 Solve the goal programming model based on the genetic algorithm, which is a computational model that simulates the biological evolution process of Darwinian genetic selection and natural elimination.

[0064] S4.1 Determine the coding method of chromosomes In this embodiment, the chromosomes use integer coding. A chromosome is an integer array, and each integer represents the area of a kind of crop. The length of the array is the number of lands multiplied by the number of planting years multiplied by the yield per season. Such a coding method makes each chromosome represent the planting arrangement of a kind of crop on different lands, in different years and seasons.

[0065] S4.2 Initialize the population Randomly generate an integer array of gene lengths, specifying the size of the array, which is determined according to the number of plots of land, the number of planting years, and the number of seasons per year. By looping a sufficient number of times, a specified number of integer arrays are generated to form the initial population.

[0066] S4.3 Determine the fitness function In this embodiment, only obtaining the maximum profit is the optimization goal, and the fitness function is confirmed by calculating the maximum profit part of each solution. The specific process is as follows: Traverse each planting arrangement in the optimal planting plan, that is, for each plot of land, each year, and each season. Obtain the crop number of the current planting arrangement, and according to the crop number, obtain the yield per mu, planting cost, and selling price of the crop from the crop information, calculate the profit of the current planting arrangement and accumulate it into the total profit.

[0067] S4.4 Screen excellent individuals The method of screening excellent individuals is based on the evaluation and selection of the fitness function. The specific process is as follows: First, for each individual in the population, that is, the solution, determine whether it meets the constraint conditions of the problem, set the fitness of those that do not meet to negative infinity, and then calculate the individuals that meet the constraint conditions and calculate their fitness, that is, calculate the profit according to the relevant information. The higher the profit, the higher the fitness. Sort the population according to the fitness and perform crossover and mutation operations to pass on better genes to the next generation and guide the population to evolve towards a better state.

[0068] S4.5 Determine the design of genetic operators Through crossover and mutation operations, the genetic algorithm can explore different solutions in the search space, increase the diversity of the population, and thus increase the possibility of finding the optimal solution.

[0069] Crossover operation: Randomly select a cutting point, cut the two parent individuals at this point, and combine the first half of the first parent individual with the second half of the second parent individual to form a new individual.

[0070] Mutation operation: Randomly select a mutation point, randomly generate a new value, and replace the value at this mutation point with the new value to achieve the mutation operation.

[0071] S4.6 Set the relevant parameters of the genetic algorithm Set the population size to 100 to ensure a sufficient population size. The larger the population size, the easier it is to find the optimal solution; set the mutation rate to 0.1. Setting a larger mutation rate can increase the diversity of the population and avoid premature convergence to a local optimal solution; set the maximum number of genetic generations to 100 to ensure that the optimization result converges sufficiently. The above steps are implemented using Python.

[0072] S4.7 Result analysis Observing the data obtained from Report Forms 9 to 22, it meets the preliminary conclusion obtained from data analysis: For the first type of crops, without considering other restrictive factors, they should be preferably planted on flat dry land, followed by considering planting on terraced fields, and finally on hillside land; for the second type of crops, without considering other restrictive factors, they should be considered in the order of the second season of the intelligent greenhouse, the first season of the intelligent greenhouse, the first season of the ordinary greenhouse, and the first season of the irrigated land.

[0073] In the case of overstock and waste, the planting strategies for the maximum benefits of the rural crops from 2024 to 2030 are shown in the following Table 9 to Table 15: Table 9 Crop Planting Plan for 2024

[0074] Table 10 Crop Planting Plan for 2025

[0075] Table 11 Crop Planting Plan for 2026

[0076] Table 12 Crop Planting Plan for 2027

[0077] Table 13 Crop Planting Plan for 2028

[0078] Table 14 Crop Planting Plan for 2029

[0079] Table 15 Crop Planting Plan for 2030

[0080] In the case of selling the excess at a 50% discount of the 2023 selling price, the planting strategies for the maximum benefits of the rural crops from 2024 to 2030 are shown in the following Table 16 to Table 22: Table 16 Crop Planting Plan for 2024

[0081] Table 17 Crop Planting Plan for 2025

[0082] Table 18 Crop Planting Plan for 2026

[0083] Table 19 Crop Planting Plan for 2027

[0084] Table 20 Crop Planting Plan for 2028

[0085] Table 21 Crop Planting Plan for 2029

[0086] Table 22 Crop Planting Plan for 2030

[0087] The annual profits obtained from the two results are approximately four million yuan and twenty-five million yuan respectively. Compared with the annual profit of six million yuan in 2023, considering assumption (1), in the first case where there is an obvious waste situation resulting in a reduction in income, it can be considered that both planting plans are reasonable.

[0088] The optimization method for agricultural planting strategies based on single-objective linear programming provided in this embodiment has the following advantages: (1) Application of the goal programming model: This embodiment proposes a mathematical model based on goal programming, which can comprehensively consider the sales volume, profit of crops, and the limitation of land resources, reduce waste, and maximize the income of farmers.

[0089] (2) Multiple solutions for handling unsalable products: For different sales situations, the single-objective linear programming model proposed in this embodiment considers two unsalable situations: one is that the unsalable part is completely wasted, and the other is that the unsalable part is sold at 50% of the price. This makes the optimization plan more flexible and adaptable.

[0090] (3) Solving the optimization problem by genetic algorithm: The planting plan is optimized by genetic algorithm, considering the interaction of multiple variables, such as land type, crop type, sales price, etc., and can effectively find the optimal planting plan.

[0091] By adopting the linear programming optimization method and simulation calculation in this embodiment, it can effectively reduce the waste phenomenon in crop planting, reduce the impact of uncertain factors on agricultural income, and maximize the economic benefits of farmers. Compared with traditional methods, the present invention has significant advantages in improving resource utilization rate, reducing costs, and optimizing sales forecasts, and is particularly suitable for long-term agricultural production planning between 2024 and 2030.

[0092] As Figure 6 shown, this embodiment also provides an optimization system for agricultural planting strategies based on single-objective linear programming, including The planting profit-related factor analysis module is used to determine the decision variables and secondary variables of agricultural planting profit; The single-objective linear programming model construction module is used to construct a single-objective linear programming model based on the decision variables and secondary variables. The single-objective linear programming model includes an objective function and constraint conditions. The objective function is to maximize the agricultural planting revenue when the sales volume exceeds the expected sales volume. The situation where the sales volume exceeds the expected sales volume includes: the unsold part is completely wasted and the unsold part is sold at 50% of the price; The agricultural planting strategy optimization module is used to solve the single-objective linear programming model by using a genetic algorithm to obtain the agricultural planting strategy with the maximum revenue and realize the optimization of the agricultural planting strategy.

[0093] In the embodiments of the present invention, the division of the modules is illustrative, only a logical function division. In actual implementation, there may be other division methods. In addition, in each embodiment of the present invention, the functional modules can be integrated in a processor, can also exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0094] In this embodiment, a computer device is also provided. The computer device includes a processor and a memory. The memory is used to store a computer program (in this embodiment, the computer program includes a calculation component and an iteration component, which can perform model calculation and model update). The computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), and may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiments of the present invention can be used for the operation of an agricultural planting strategy optimization method based on single-objective linear programming.

[0095] This embodiment also provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device, used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides storage space, and this storage space stores the operating system of the terminal. And, one or more instructions suitable for being loaded and executed by the processor are also stored in this storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the corresponding steps of a method for optimizing agricultural planting strategies based on single-objective linear programming in the above embodiment.

[0096] This embodiment also provides a computer program product. The computer program product includes a computer program that, when executed by the processor, implements the corresponding steps of a method for optimizing agricultural planting strategies based on single-objective linear programming in the above embodiment.

[0097] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0098] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0099] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 or blocks Figure 1 specified in one or more of the processes and / or blocks.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes Figure 1 or blocks Figure 1 specified in one or more of the blocks.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.

Claims

1. An agricultural planting strategy optimization method based on single-objective linear programming, characterized in that: The following steps are involved: Determine the decision variables and secondary variables for agricultural cultivation profits; A single-objective linear programming model is constructed based on the decision variables and the secondary variables, wherein the single-objective linear programming model includes an objective function and constraint conditions, wherein the objective function is to maximize the agricultural planting income when the expected sales volume is exceeded, and the situation of exceeding the expected sales volume includes: the unsaleable part is completely wasted and the unsaleable part is sold at 50% of the price; A genetic algorithm is used to solve the single-objective linear programming model to obtain the agricultural planting strategy with the maximum benefit, thereby realizing the optimization of the agricultural planting strategy.

2. The agricultural planting strategy optimization method based on single-objective linear programming according to claim 1 is characterized in that: The decision variables include: Year Season Planting the first The number of acres of crops planted, Year Season Planting the first The cost of growing crops, Year Season Planting the first The yield of crops per mu and Year Season Planting the first The sales price of crops and Year Expected sales of the crop; The secondary variables include: whether Year Season i Plot planting Crops and the area of ​​the plot; in, is the land number, ranging from 1 to 54; is the crop type, with a value range of 1-41; It is quarter, and the value range is 1-2; It is the year, and the value range is 2024-2030.

3. The agricultural planting strategy optimization method based on single-objective linear programming according to claim 1 is characterized in that: The objective function is as follows: in, is the profit, t is the year, i is the land number, is the crop type, k is the season, is the unsalable coefficient, for Year Season Planting the first The sales price of crops, for Year Season Planting the first The number of acres planted with crops, for Year Season Planting the first The cost of growing crops, For the portion that does not exceed the expected sales volume, The portion of sales that exceeds expected sales volume.

4. The agricultural planting strategy optimization method based on single-objective linear programming according to claim 1 is characterized in that: The constraints include: Each crop cannot be planted continuously in the same plot of land; All land is planted with pulse crops at least once in three years; Each plot of land is planted with only one crop at a time; Flat dry land, terraced fields and hillside land are used to grow food crops once a year; Two crops of vegetables are grown each year on irrigated land; Ordinary greenhouses grow one season of vegetables and one season of edible fungi each year; The smart greenhouse grows two crops of vegetables every year.

5. The agricultural planting strategy optimization method based on single-objective linear programming according to claim 1 is characterized in that: The single-objective linear programming model includes: in, is the profit, t is the year, i is the land number, is the crop type, k is the season, is the unsalable coefficient, for Year Season Planting the first The sales price of crops, for Year Season Planting the first The number of acres planted with crops, for Year Season Planting the first The cost of growing crops, For the portion that does not exceed the expected sales volume, For the portion of sales exceeding the expected amount, Whether in the Year Season i Plot planting Crops, For the The area of ​​the plot, For the The type of plot, for Year Expected sales of the crop, for Year Season Planting the first The per-acre yield of crops.

6. The agricultural planting strategy optimization method based on single-objective linear programming according to claim 1 is characterized in that: The step of solving the single-objective linear programming model using a genetic algorithm specifically includes: Determine the chromosome to be encoded as an integer array, where each chromosome represents the planting arrangement of a crop in different lands, different years and different seasons; Randomly generate the integer array to form an initial population; Traverse the planting arrangement of each individual in the initial population, calculate the profits of all planting arrangements and add them to the total profit, and use the total profit as the fitness value of the current individual; The initial population is iterated through crossover and mutation, and each population is sorted according to the fitness value during the iteration process until a final population is obtained after a maximum number of iterations is reached; The individual with the highest fitness value is selected from the final population as the agricultural planting strategy with the maximum benefit.

7. An agricultural planting strategy optimization system based on single-objective linear programming, characterized in that: include: Planting profit related factor analysis module, used to determine the decision variables and secondary variables of agricultural planting profits; A single-objective linear programming model construction module is used to construct a single-objective linear programming model based on the decision variables and the secondary variables, wherein the single-objective linear programming model includes an objective function and constraints, wherein the objective function is to maximize the agricultural planting income when the expected sales volume is exceeded, and the situation of exceeding the expected sales volume includes: the unsalable part is completely wasted and the unsalable part is sold at 50% of the price; The agricultural planting strategy optimization module is used to solve the single-objective linear programming model using a genetic algorithm to obtain the agricultural planting strategy with the maximum benefit, thereby realizing the optimization of the agricultural planting strategy.

8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable in the processor, wherein the processor implements the steps of an agricultural planting strategy optimization method based on single-objective linear programming as described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of an agricultural planting strategy optimization method based on single-objective linear programming as described in any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of an agricultural planting strategy optimization method based on single-objective linear programming as described in any one of claims 1 to 6 are implemented.