Joint Ordering and Selling Policy for Storable Agricultural Products in Contract Farming

With the farming mode widely promoted in many countries around the world, agricultural enterprises need to face risks from both supply and sales at the same time. Especially for storable agricultural products, it is also necessary to consider the potential profits and losses brought about by the sales of multi-period. -is paper establishes a joint ordering and selling decision model under multiperiod random supply and demand. -e model takes the maximum expected profit of agricultural enterprises as the goal, considers the constraints of production capacity and the risk preference coefficient of shortage, and makes decisions on the order and sales quantity in each cycle. -e feasibility of the model was verified by taking China Yunnan Pu’er tea as a specific example. Finally, through numerical examples, the influence of important parameters on the joint ordering and selling strategy is as follows: order cost is the main factor affecting the order quantity. When the order cost increases to a certain level, the solving algorithmwill make a decision that would rather be out of stock than to order.With the increase in selling price, inventory holding cost, and shortage cost, there will be an increasing trend of the sales quantity allocated to this period. Compared with other parameters, selling price and inventory holding cost have a more remarkable impact on sales quantity. In addition, enterprises can increase their expected profits of storable agricultural products by controlling the inventory holding cost, appropriately reducing the risk preference coefficient, and increasing the level of the selling price.


Introduction
To solve the conflicts between individual farmers and huge markets, contract farming has been widely promoted in many countries. Contract farming means that farmers and enterprises or intermediary organizations sign a contract with a legal effect that determines the rights and obligations of both parties before the production process. is type of agricultural cooperative business form requires the farmers to organize production according to the contract and the enterprises or intermediary organizations to acquire products produced by farmers following the contract. In China, the primary participants in agricultural planting are mostly self-employed farmers.
ey can obtain more economic benefits through stable sales channels provided by contract farming. Huge market development space and strong promotion from the government are also the driving force of this mode. Because of individual agriculture mode occupying a dominant position, China's contract farming industry is still in the initial stage of development [1]. However, contract farming has huge development potential in China and is worth studying under the trend of large-scale industrial production and farmers' professional cooperatives.
According to the storage performance in physiological characteristics, agricultural products can be roughly divided into fresh agricultural products and storable agricultural products. Storable agricultural products generally have longer storage periods and lower storage requirements, such as grain, cotton, soybeans, coffee beans, ginseng, rubber, tea, and herbal medicines, many of which have high unit product value or huge circulation. ese products can be sold for a long period without processing or after simple processing. Because of their huge market share, the industry of such products is an important part of supporting the rural economy. In 2020, which was severely affected by the COVID-19 pandemic, the Chinese export volume of some storable agricultural products with nutritional or medicinal value has increased significantly, which decreased the economic losses of agricultural enterprises caused by the epidemic [2]. Excellent storage performance makes storable agricultural products suitable for the mode of contract farming. Based on the above discussions, this paper chooses storable agricultural products as the research objects. To research these products under contract farming, it is necessary to clarify their characteristics. e supply and demand uncertainty are the common characteristics of storable agricultural products and even all agricultural products. On the one hand, the factors that affected the yield of agricultural production are complicated. Controllable factors, including capital, labor, land input, and planting technology, affect the overall scale of agricultural production. Uncontrollable factors included weather, season, and natural disasters, which cause output fluctuation.
ese elements together influence the uncertainty in supply [3]. On the other hand, the demand uncertainty of storable agricultural products is mainly reflected in the uncertain factors during the demand accumulation process. Unlike industrial production that can start the machine at any time, the planting cycle of agricultural products is long and fixed. Orders accumulate during the planting period and sharply increase in the product harvest season. ese orders will not be processed until the agricultural products are harvested. e total demand of the whole sales cycle is difficult to accurately predict. However, compared with fresh agricultural products, storable agricultural products have the inventory to meet uncertain demand, which greatly reduces the probability of shortages.
Another characteristic of storable agricultural products is the randomness of price changes. We divide storable agricultural products into two types according to this nature. One is a product whose value decreases slowly during the storage period, such as grain and cotton. e price change of this product fluctuates randomly during long-term sales, and this change is most obvious when similar new products are harvested. e other category is products whose value will increase by the storage process, such as tea and ginseng. Different from other agricultural products that exhibit price fluctuations related to the harvest season, storable agricultural products with large value-added space are easy to become the target of investors' price speculation, which leads to price instability. In addition, the price fluctuations of storable agricultural products are related to the market capacity of the products and depend on the circulation volume of the market, and they are similar to general products. e characteristics and risks mentioned above bring complex challenges to suppliers and distributors of storable agricultural products. e main problem faced by the management is how to predetermine the production scale and reserve inventory for each sales cycle. Ordering too much in advance may bring about a large inventory backlog and costs. e shortage of predetermined amounts may also lead to the loss of sales opportunities and lack of stock. Too large an inventory volume may result in the loss of opportunity to sell products at high prices. e insufficient inventory volume may cause excessive inventory costs and the risk of low-price selling.
Many scholars conducted research on the problems in the production, sales, and inventory of storable agricultural products mentioned above. Katagiri et al. studied the ordering decision problem of simultaneously ordering perishable and storable products under uncertain demand and solved the optimal order quantities using Kuhn-Tucker conditions [4]. Li and Hou proposed a two-stage supply chain model composed of manufacturers and retailers for storable products, both of which determine yield and manage inventory by demand forecasting, to improve the overall performance of the supply chain [5]. Deng and Yano studied the multiperiod pricing decision problem of storable agricultural products affected by seasonal demand. e yield constraints were considered in the model, and the optimal price changes and dynamic price strategies were also studied [6]. Shi et al. established a random and dynamic inventory model of storable agricultural products with exogenous supply and prices. Farmers' cooperatives use this model to determine the best sales and inventory strategies and obtain the maximum expected profit [7].
Because of the characteristics of fixed order time, uncertain output, and uncertain demand, the newsboy model under random supply can be used for research on storable agricultural products. Merzifonluoglu and Feng simultaneously considered the supplier's fixed contract cost and production capacity constraints, designed a branch and bound algorithm based on Karush-Kuhn-Tucker conditions (KKT) conditions, and solved the optimal order quantities and supplier selection decisions [8]. Okyay et al. studied the single-period newsboy model of products with a correlational relationship between market demand and supply. Under three random supply situations, they solved the optimal order quantities under the condition that supply and demand are not necessarily independent of each other [9]. Zhen established two kinds of multiperiod models under the uncertainty of demand, which are used to make the scheme of tactical berth allocation [10]. Wen et al. studied the optimal initial inventory and multiperiod inventory allocation strategy for storable products whose inventory cannot be replenished. ey considered the autoregressive process of price and fluctuations in demand and used the Markov decision process to solve the model [11].
Storable agricultural products also have the characteristics of production, storage, and sales decision for a multiperiod. e multiperiod model that meets the above characteristics can be used to solve the decision-making problem of this product. Matsuyama established a multiperiod newsboy model considering the stock-up and out-of-stock and studied the ordering strategy in these two situations [12]. Farahvash and Altiok introduced the auction theory and constructed a multiperiod newsboy model using stochastic dynamic programming to solve the optimal inventory level [13]. Mardaneh and Caccetta proposed a multiperiod dynamic pricing and production planning model for multispecies storable agricultural products based on the newsboy model to solve the optimal production volume and optimal pricing strategy [14]. Zhen et al. proposed a mixed-integer programming model to integrate the berth template and the yard template planning and a heuristic algorithm for solving the problem in largescale realistic environments [15]. Based on previous research, they further studied the multiperiod yard template planning in container terminals and daily berth planning problems [16,17]. Kim et al. applied the multiperiod newsboy model to perishable products with a short shelf life to optimize the total logistics cost and proposed an effective method to optimize inventory holding, handling, and delivery costs [18]. Zhen built a container handling and storage berth allocation model based on the mixed-integer programming method. is model met the uncertainty of port transit demand and improved operational efficiency [19]. Deng et al. established a newsboy model for two suppliers, taking into account the randomness of product demand and aiming at buyers with a risk-averse attitude. Based on Copulas theory, this paper proposed an effective algorithm to optimize orders [20]. e above-mentioned kinds of literature studied the multiperiod newsboy model under different element combinations, which included periods, backgrounds, demand and supply situations, and solving methods. However, most studies only considered the strategic decision of order quantities and rarely introduced inventory decisions or other variables. Decision objectives most focused on singleperiod and double-period issues, and hypotheses rarely considered the uncertainty of supply, demand, and price fluctuation together.
erefore, according to the characteristics of storable agricultural products, this paper establishes an optimized joint decision model for multiperiod production and sales based on the newsboy model framework. Based on the above three uncertainty dimensions, the objective of this model is simultaneously determining the optimal order and sales quantities of all periods. We also introduce the sequential quadratic programming algorithm (SQP) to solve the proposed model, which is always used to solve the quadratic linear optimization problem. Moreover, this article uses a kind of Chinese storable agricultural product called Pu'er tea to verify the effectiveness of the model by analyzing the impact of price, cost, and risk preference on the order and sales quantities in each period. e remainder of this paper is organized as follows: in Section 2, the descriptions and assumptions of the problems, followed by the ordering-selling joint decision model and the sequential quadratic programming algorithm for model solving are introduced. Section 3 is the analysis of numerical examples, which take Pu'er tea as the research object. We conduct a series of parameter analyses on order and sales decisions under different variables. Finally, section 4 summarizes the major conclusions of this research and gives several suggestions for further research.

Problem Description and Assumptions.
In this part, we introduce the basic problem description and assumptions.
is paper studies an agricultural enterprise engaged in contract farming. It means that this enterprise signs agricultural contracts with farmers before production. e contracts define the purchase price, quality level, and quantities. e farmers plant and harvest crops, and the agricultural enterprises provide technical support. During the product harvest season, the enterprise acquires agricultural products following the contracts. Since storable agricultural products can be stored and sold for a multiperiod, enterprises choose different ordering and selling strategies based on price fluctuations. e decisions faced by the enterprise in each sales period with time are shown in Figure 1. At the beginning of each period, it is necessary to allocate the sales quantities of the products ordered in the last period. en, at the end of this period, decision-makers decide the order quantities of the next period. ese two periods are relatively short compared to the whole sales period, and we assume that these two decisions are completed instantaneously. At the same time, decision-makers need to face two types of risks: supply uncertainty caused by product characteristics and demand uncertainty beause of market size changes. erefore, to reduce shortage cost, excessive inventory holding cost, and order cost caused by unmet demand and excessive inventory, it is necessary to make more reasonable ordering and selling decisions to achieve the optimal profit of the system. Because of the differences in the market rules of different types of storable agricultural products, this paper puts forward assumptions before constructing the model, which are as follows: (1) is model considers the multiperiod order and sales of only one type of storable agricultural product in each solving process. (2) e market demand for storable agricultural products in each period is uncertain, which is defined by random variables. Moreover, the market demand for agricultural products in each period is different and mutually independent. (3) e supply of farmers in each period is uncertain, which is described as the supply rate. e final supply of agricultural products is equal to the total order quantity multiplied by the supply rate. (4) e unit order cost, inventory holding cost, shortage cost, and sales price in each period are known and determined by practical or hypothetical data.

Multiperiod Order and Sales Decision Model.
In this part, we introduce the model-building process. We consider a type of storable agricultural product A. ere are a total of N selling periods for this product. Decision-makers make order decisions at the end of the sales period and calculate the sales volume of the current period. Moreover, the supply volume ordered in the last period arrives instantaneously at the beginning of the current sales period. e order quantity in period i is q i , and the unit order cost is c i . Suppliers provide products according to the order quantity q i , which depends on the supply rate u i . We assume that u i is an independent random variable with probability density function h(u i ), distribution function H(u i ), Scientific Programming expectation μ i , and variance σ i . Hence, the practical product quantity of period i obtained by ordering is q i u i . ese products purchased in period i will circulate to the market immediately after arrival, and the sales quantity in period j is x ij . p ij denotes the unit sales price. h ij denotes the unit inventory holding cost. s ij denotes the unit shortage cost. Assumption (4) shows that the values of these parameters will change according to the order period of the product and the sales period in which it is located.
Finally, we denote w ij as the market demand of period j for the products ordered in period i, and its probability density function, distribution function, expectation, and variance are, respectively, g(w ij ), G(w ij ), w ij , θ ij . According to the above parameter settings, the calculation functions for profit and cost are as follows: Let P denote the total expected profit of products for all sales periods. en, At the end of each sale period, the inventory holding cost of the remaining products needs to be calculated. Denoting C h as the total expected inventory holding cost of products for all sales periods, we have, Similarly, at the end of the sales period, if the inventory does not meet the demand of this period, there will be a shortage cost for unmet needs. Let C s denote the total expected shortage cost of demands for all sales periods. We have, In addition, C c denotes the total expected order cost for all sales periods. It is worth noting that C c is related to the order quantity q i rather than the practical product quantity obtained through ordering. Hencce, we have the following: Upon integrating the above formulas, we obtain the total objective function for solving the net profit, which is as follows: Since different decision-makers have different acceptance levels of shortage risk, this paper introduces the risk preference coefficient α (0 < α < 1). Generally, the low value of α indicates that the decision-maker can accept more shortage risk, and high value of α explains that the enterprise is more inclined to have sufficient inventory for avoiding shortage. erefore, this paper has the functions about α, which are as follows: For all i, j ∈ N, Function (6) indicates the probability that sales quantity for each subsequent period does not exceed the order quantity in the current period cannot be lower than α. Function (7) indicates the probability that the sales quantity does not exceed the order quantity in the current period cannot be lower than α. Obviously, function (6) contains the condition of function (7). To determine the random variable u i in function (6), we assume that it obeys normal distribution. en, function (6) can be rewritten as follows: After deduction and simplification, we have the following: Similarly, considering the limitation of supply capacity, we denote M i as the maximum quantity that the supplier can provide in period i. en, we have the following constraints: e model of the optimal solution in this paper is a complex multiperiod model with nonlinear constraint optimization problems, which has many decision variables and complex forms. Its concavity and convexity cannot be judged by the Hessian Matrix, and the optimal solution cannot be obtained by conventional mathematical methods. erefore, we use the SQP algorithm to acquire the optimal solution. SQP is a solving algorithm for problems with quadratic objective functions and linear inequality constraints. It can solve the optimal order and sales quantity of the model in this paper. e specific flow chart of the SQP algorithm is shown in Figure 2.
e detailed iterative process of the SQP algorithm is as follows [21]: (1) Define the values of initial iteration point X 0 and the convergence precision ε. Let H 0 � I (I denotes the unit matrix) and k � 0 (k denotes the number of iteration). (2) Utilize the Taylor formula to simplify the original objective function to the quadratic programming relation at the point X k . Simultaneously, simplify the constraints into linear functions. Convert the original question into the question about the variable S (S � X − X k ). (3) Solve the simplified quadratic programming problem and let S k � S * (S * denotes the locally optimal solution obtained from this solution). (4) Perform a constraint one-dimensional search on the objective function of the original problem in direction S k and get the next iteration point X k+1 from this solution. (5) If X k+1 meets the accuracy standard of the convergence precision, the calculation will terminate, and the solving algorithm will output the optimal solution X * � X k+1 . Otherwise, proceed to step (6). (6) Modified second derivative matrix is H k+1 , and let k � k + 1. Back to step (2) and continue iterating.
Based on the above algorithm process, it is necessary to set the number of iterations. e iterative process cannot stop until the iterative point X k+1 meets the requirements. e setting of the maximum number of iterations is particularly important. erefore, this paper sets the maximum number of iterations to 1000, which can satisfy the solving of the optimal solution of a certain period range.

e Pu'er Tea.
In this section, we use a numerical example to analyze the effect of using this decision model of this paper. We select a storable agricultural product called Pu'er tea as the research object. Pu'er tea is a kind of storable agricultural product made from a characteristic Camellia sinensis species in Yunnan, China. It is generally divided into three series: raw tea, aging tea, and ripe tea [22]. Raw tea can be drunk directly after fixation and sunning, and the raw tea material can be made into aging tea and ripe tea through microbial fermentation. On the one hand, like other teas, Pu'er tea has physiological characters and nutritive value, such as antioxidation, antivirus, anticancer, and hypoglycaemic. On the other hand, the quality of Pu'er tea will be improved during the long term of storage. Its collection value has made it favored by investors. is product has the advantages of storable and large value-added space. However, the market sales of this product have the risk of erratic prices, random supply, and demand.
We also collect the data on the yields and export prices of Pu'er tea from 2015 to 2020 to introduce some basic market situation of this product. Figure 3 exhibits that the total annual yields of Pu'er tea in China have been showing relatively stable growth. Its main production area is still mainly in Yunnan Province of China, however, the supply situation for different areas is still complicated. e average export price of Pu'er tea in China fluctuates irregularly every year. Especially in 2020, because of its nutritional value and government policies in the context of the COVID-19 pandemic, the average export price has increased by 98.94% compared to 2019.

Parameter Settings and Computation Results.
We assume that a certain amount of Pu'er tea products will be sold in three cycles (N � 3). en, the specific total objective function can be shown as follows: Scientific Programming 5 S.T.
Products can be ordered in all periods but need to be sold out at the end of the third period. e value of the risk preference coefficient we set is 0.99 (α � 0.99). e solving target is to find the optimal order quantity and sales quantity of every period to maximize the net profit. Set the input parameters as shown in Table 1.
One point that needs to be explained about the above parameters is that i represents the ordering period of products and j represents the selling period of products. We use the MATLAB nonlinear optimization toolbox to solve the complicated model. According to the parameter settings of the above numerical examples, the optimal order quantity and sales quantity are calculated. e results are shown in Table 2.
e explanation of the solution result is as follows: the order quantities of the three periods are, respectively, 7000, 6400, and 3900. Products ordered in the first period are all allocated to the third sales period. Products ordered in the second period are allocated to the second and third sales periods. Moreover, the third period is the last period that the ordered products must be sold in this period. e total expected profit is 2398064. After our analysis, we believe that this result is caused by the dissimilarities of parameters. e prices of the products ordered in the first period that we set will gradually increase in the next two periods and reach a maximum value of 300 in the third period. To maximize the sales profit, the solving algorithm chooses to sell all the products in the third period, with the highest unit sales price, even if it caused shortages and storage costs of the first period. e difference between prices and costs makes the net profit still the highest. On the contrary, the price of the products ordered in the second period only increased slightly in the third period. Taking into account the shortage cost and storage cost of the last two periods, the final result of the solving algorithm allocates more sales to the second period. In addition, the products ordered in the third period   need to be sold in time. To study the optimal order and sales quantity changes of storable agricultural products under contract farming, we conduct a numerical analysis of the price and cost parameters related to the price fluctuations or the uncertainty of supply and demand. We selected several parameters that were significantly affected. e purpose is to find the variation laws of these parameters and provide some suggestions for enterprises that participate in the sale of storable agricultural products and contract farming.

Impact of Selling Price on Order and Sales Quantity.
In this part, we research the changes in order and sales quantity of the products purchased in the first period with the increase in selling price. We suppose that while keeping the other parameters of products ordered in period 1 unchanged, the value of selling price in period 1 is increased from 200 to 300, and the effects of the selling price on order and sales quantity are shown in Table 3. We also observed the situation that the selling price of the second period is increased from 220 to 320 or the selling price of the third period is increased from 300 to 400 under the previous assumption. e calculation results are also shown in Table 3. en, we have the following observation results: firstly, as the selling price increases, the corresponding optimal sales quantities and expected total profit gradually increase, and the optimal order quantities remain constant regardless of the sales price. Moreover, when the sales quantity changes with the selling price, there are maximum and minimum values. e sales quantity is continuously changing in the interval between these two values. In this numerical example, when the selling price is less than the value point 240 in period 1 or 2, the solving algorithm will not allocate sales quantity to this period. e minimum value point of the first period or the second period is within the interval between 240 and 260. When the selling price reaches the value point 300 in period 3, the solving algorithm allocates all sales quantities to this period. e maximum value point of the third period is less than 300. Outside this interval, sales quantity will remain unchanged. Finally, under the same selling price in the change interval, the distribution of sales quantity to different periods is different. It is related to the setting values of other parameters, especially the difference in the selling prices of other periods.

Impact of Order Cost on Order and Sales Quantity.
In this part, we research the changes in order and sales quantity of products with the increase of the order cost. We suppose that while keeping other parameters unchanged, the value of the unit order cost in period 1 is increased from 40 to 320, and the effects of the order cost on the order and sales quantity are shown in Table 4. We also observe the situation that the order cost of the second period is increased from 36 to 276 or the order cost of the third period is increased from 38 to 278 under the previous assumption. e calculation results are also shown in Table 4. en, we have the following observation results: Firstly, with the increase of the unit order cost, the corresponding optimal order quantity and sales quantity drop sharply. When the cost increases to a certain extent, the order quantity drops to 0, and the solving algorithm would rather choose to be out of stock than to order products. Moreover, there is a change interval for the influence of order cost on optimal order quantity and sales quantity. Before reaching the interval, the order quantities or sales quantities of the three periods made by the solving algorithm will not change. When the change interval is reached, the order quantity or sales quantity under the solving algorithm will drop sharply. Until the order cost exceeds the interval, these values will drop to 0. In addition, for different periods, the interval ranges are also different.

Impact of Inventory Holding Cost on Order and Sales
Quantity. In this part, we research the changes in order and sales quantity of the products with the increasing unit inventory holding cost. We suppose that while keeping the other parameters of products ordered in period 1 unchanged, the unit inventory holding cost of sales period 1 is increased from 10 to 210 or its value of sales period 2 is increased from 11 to 211. e changes in order and sales quantities are shown in Table 5. e change curve of sales quantities that is affected by the increase of h 12 is shown in Figure 4. en, we have the following observation results: firstly, as the unit inventory holding cost increases, the optimal sales quantity of this period will also increase. It will affect the optimal sales quantities of other periods and reduce their values. In addition, the optimal order quantities remain unchanged regardless of the change of inventory holding cost. Moreover, there is a change interval for the influence of unit inventory holding cost on sales quantity. Before reaching the change interval, the sales quantity will not change under the solving algorithm. e change interval can be divided into two parts. In the first half part, the unit inventory holding cost of this period is less than that of other periods. e solving algorithm is more inclined to store the product until later sales. In the latter half part, the unit inventory holding cost is much higher than in other periods, and the solving algorithm is more inclined to sell the products in this period. It is worth noting that the absolute value changes of the slope in the first half part is higher than that of the latter half part. Finally, as the unit inventory holding cost increases, the total expected profit will gradually decrease, and the variation trend is changing too.
is variation trend will gradually slow down, and it is also related to the division of change parts.

Impact of Inventory Holding Cost on Order and Sales
Quantity. In this part, we research the changes in order and sales quantity of the products with the increasing unit inventory shortage cost. We suppose that while keeping other parameters unchanged, the unit shortage cost of products ordered in period 1 sold in period 2 increased from 48 to 98, and the effects of the selling price on order and sales quantity are shown in Table 6. We also observe the situation that the shortage cost of products ordered in period 2 sold in period 2 is increased from 40 to 90 under the previous assumption. e calculation results are also shown in Table 6. en, we have the following observation results: firstly, as the unit shortage cost increases, the optimal order quantities are not affected by it, and the optimal sales quantities will slightly change. Moreover, if the unit shortage cost of this period increases, the order quantity allocated to this period will increase, and the order quantity of other periods will decrease accordingly. We did not find a significant change interval or extreme value.

Impact of Inventory Holding Cost on Order and Sales
Quantity. Finally, we research the changes in order and sales quantity of the products with the decreasing of risk preference coefficient. Since this parameter has a huge impact on the investment decision behavior of an enterprise, we also observe the impact on the total expected profit. We suppose that while keeping other parameters unchanged, the risk preference coefficient is decreased from 0.99 to 0.5. e final calculation results are shown in Table 7.
en, the observation results we have are as follows: firstly, as the risk preference coefficient decreases, the differential value between the order quantity and the total sales quantities allocated to each period gradually decreases. In other words, enterprises' attitudes toward shortage risk have become more radical. e decision-maker is unwilling to keep more inventory for later sales periods, and the shortage risks in the later periods have also increased. Moreover, it can be seen that as the value of the risk preference coefficient  decreases, the total expected profit of product sales becomes higher. It demonstrates that the more the market environment risks, the more opportunities to get a higher expected profit. Because of the existence of random variables in the decision function, the variance of the actual total profit will continue to increase as the risk increases. It also means that the range of actual profit becomes larger as the risk preference coefficient increases.

Conclusions
is paper proposes a joint optimization model for the multiperiod order and sales quantities of storable agricultural products, with the target of obtaining the optimal total net profit, and it solves the model by the SQP algorithm. en, we set up the numerical examples with a type of storable agricultural product named Pu'er tea as the research object, and we used MATLAB to solve the model. Finally, we conducted a parameter analysis for the solution results.
From the analysis of the parameters, the subsequent conclusions are drawn. Firstly, the optimal order quantity is not affected by the sales price and the unit shortage cost, however, it is affected by the unit order cost and inventory holding cost. Order cost is the main factor affecting the order quantity. e optimal sales quantity is affected by the unit selling price, order cost, shortage cost, and inventory holding cost. Compared with other parameters, selling price and inventory holding cost have a more remarkable impact on sales quantity. Moreover, when the optimal order quantity is affected by the unit order cost and the unit inventory holding cost, there is an obvious changing interval. Within the changing interval, the order quantity will keep changing. Outside the interval, the order quantity reaches the maximum value or the minimum value, and it will no longer change. e above conclusions about the changing interval are also available when the unit sales price, unit order cost, and unit inventory holding cost affect the allocation of the optimal sales quantity in each period. In addition, the solving algorithm will make a decision that would rather be out of stock than to order when the order cost increases to a certain level.
irdly, the expected profit is affected by the unit selling price, unit inventory holding cost, and risk preference coefficient. When it is affected by these parameters, the variation trend is also related to the changing interval.
For enterprises, we have some suggestions for them when dealing in storable agricultural products under contract farming. Firstly, the suppliers and enterprises can better adjust the order quantity and storage capacity in the contract agricultural model to ensure that the cooperative parties obtain the optimal profit of the system. erefore, contract farming is worth promoting, and the model proposed in this paper can be used for the optimal decision, especially in China, where individual farmers occupy the main position of agricultural production. Moreover, the risk preference coefficient is very important for enterprises participating in contract farming. Enterprises should choose an appropriate value to balance the relationship of shortage risk and inventory cost. It depends on the current stage of enterprise development. e expected optimal total net profit does not necessarily mean the optimal decision. Furthermore, it is a valuable sales strategy for companies to maintain the stocks of storable agricultural products to sell them in the later periods with higher sales prices. To ensure sufficient supply, enterprises must sign more attractive contracts to obtain supplies from more individual farmers. Finally, to obtain a better optimal total net profit, enterprises can consider looking for the inflection intervals for the parameters they can control, such as sales prices. We can keep them at an appropriate value to obtain more stable and better profits using agricultural contracts. We suggest that enterprises make longer-term decisions to allocate the storable agricultural products to the more suitable sales periods with more net profits.
Like other studies, this article has some limitations. Firstly, the uncertainty function of supply and demand is relatively simple. e supply function can be replaced by the production function that considers more deterministic factors to make the theoretical model closer to actual agricultural production in future research. Moreover, in this study, the price is introduced as an input variable. In the actual agricultural product market, there is a correlation between price and demand. In future research, the demand formula should be modified to a price-oriented function. In addition, the model can be improved by replacing some elements with more specific random functions and considering the dynamic changes of the inventory in each period so that the optimal solution can be directly calculated from the functions.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.