Two-Stage Production Planning Under Stochastic Demand: Case Study of Fertilizer Manufacturing

: Agriculture is a key facilitator of economic prosperity and nourishes the huge global population. To achieve sustainable agriculture, several factors should be considered, such as increasing nutrient and water efficiency and/or improving soil health and quality. Using fertilizer is one of the fastest and easiest ways to improve the quality of nutrients inland and increase the effec-tiveness of crop yields. Fertilizer supplies most of the necessary nutrients for plants, and it is estimated that at least 30%–50% of crop yields is attributable to commercial fertilizer nutrient inputs. Fertilizer is always a major concern in achieving sustainable and efficient agriculture. Applying reasonable and cus-tomized fertilizers will require a significant increase in the number of formulae, involving increasing costs and the accurate forecasting of the right time to apply the suitable formulae. An alternative solution is given by two-stage production planning under stochastic demand, which divides a planning schedule into two stages. The primary stage has non-existing demand information, the inputs of which are the proportion of raw materials needed for producing fertilizer products, the cost for purchasing pays attention to maximizing total profit based on information from customer demand, as well as being informed regarding concerns about system cost at Stage 2.


Introduction
For over 40 years, the blending of solid granular materials in appropriate proportions with the purpose of producing a wide range of compound fertilizers has been well applied to fertilizer manufacturing. This process, technically called fertilizer blending (bulk blending), is one in which nutrients in a blend are mixed together physically. The three most important components needed to produce fertilizer are nitrogen (N), phosphorus (P), and potassium (K). In addition, filler material, which is added for chemical stabilization purposes and to prevent excessive fertilizer spreading causing soil "burning," is needed. For example, the NPK formula "15-30-10" means that every 100 kilograms of this fertilizer contains 15 kg of nitrogen, 30 kg of phosphorus, and 10 kg of potassium, with 45 kg of filler.
Making an early production plan plays an important role in decreasing costs, procuring lower material costs, and meeting customer demands and requires lower bound quantities from governments with limited production capacity. Fig. 1 shows the manufacturing planning period for the processes detailed in this paper. In the first period, Stage 1, the material purchasing price is cheap, and there is more time for manufacturing to produce products. However, the information on demand is unknown. After a certain time passes, Stage 2 begins, which is closer to the selling time, so there is more information on product demand, but the material price is more expensive than that in Stage 1. Stage 1 creates an opportunity to gain a lower cost for material and more time for producing products, but if the total quantity of purchasing material and product produced exceeded future demand, increased inventory cost will be incurred. The proposed solution, a two-stage stochastic process, uses the integer linear programming model in which the number of inputs and their quantity are treated as decision variables, and the demand is unclear information in the beginning. It is difficult to match the final demand of customers and a high inventory or holding cost is created because of excessive inventory created when demand was overestimated. However, underestimating demand leads to shortfalls and penalty costs. In this research, the assigning of products for the production model is based on the percentage of components as developed based on the previous work of Benhamou et al. [1]. This approach has been upgraded by taking the profit from each product into account. The main objective of this paper is, for fertilizer manufacturing, to determine a solution for the best amount of purchased material due to the different price ranges in each stage, the total quantity of one-time ordering, the total products that will be produced by each blending machine, and the setting level for each machine.

Literature Review
Customer demand at the beginning is normally difficult to predict. Multiple optimization models have been developed over time to solve the production planning problem under changing demands [2][3][4][5][6][7][8][9][10][11]. Gupta et al. [12] suggest that demand is one of the main sources of unpredictability in any supply chain. If a supply chain fails to recognize demand fluctuations and incorporate them into planning processes, it will suffer low customer satisfaction or excessively high inventory level [13]. Uncertain demand can be modelled using probability distribution [14][15][16][17][18]. Gao et al. [19] approach the changing-demand planning problem with a stochastic dynamic programming model that allows delay-in-payment contracts. Huang et al. [20] propose a joint sourcing strategy framework to deal with random demand surges. The objective of the proposed framework is to minimize long-term cost while maintaining a certain target service level. Peidro et al. [21] approach a supply-chain planning problem under uncertain demand with a fuzzy mathematical programming model approach.
Weskamp et al. [22] suggest that unknown variables command attention, and propose a twostage method. At the primary stage, the focus is on decision variables for establishing production without full information, which holds for all scenarios because restructuring this activity is costly due to the high fixed cost. In the second stage, the random probability of events exists, so then the number of materials for producing products is considered the decision variable used to minimize the total cost for manufacturing, inventory, and penalty. According to Benhamou et al. [1], a varying type of fertilizer exists to meet with customer demand. The increase in the number of fertilizer formulae leads to an increase in inventory, transportation, and production. They thus propose the reverse blending method, in which inputs are existing materials where most of the fertilizer formulas are shared like N, P, and K. Their objective is to maximize mass customization and minimize the total quantity of inputs. Emirhüseyinoglu et al. [23] put forward that precipitation is a major uncertain factor that affects nutrient loss. They predicted nutrient reduction under stochastic precipitation rates.
Swaminathan et al. [24] present a stochastic programming model used to investigate the optimal configuration of semi-finished products and inventory levels for a multi-period planning horizon for one manufacturer. The determination of optimal differentiation points is additionally studied by Hsu et al. [25], who suggest a dynamic programming model for multiple products and unsure demand. However, their research does not consider more complex cost types, such as trans-shipment costs, and focuses only on design decisions. Liu et al. [26] introduced a twostage mathematical optimization model to the supply-chain problem under uncertain demand. In the first stage, the production quantity of each facility of the manufacturing network and the production quantity to be transported between the network facilities are calculated. After the uncertain demand is realized and observed, the inventory size and flow of product shipped to customers are calculated in the second stage. The proposed model was implemented to solve a planning problem for a light-emitting-diode manufacturing company to demonstrate the model's feasibility. Shi et al. [27] approach the production planning problem of a multi-product closedloop system with uncertain demand and return with a mathematical programming model. The proposed model was applied to a real-world case study to illustrate its feasibility.
In this paper, the supply-chain planning problem under volatile demand is approached with a two-stage mathematical model with constraints on changing material price. The objectives of the proposed model are to minimize material overstock and maximize profit.

Mathematical Model
An appropriate production plan in two time periods is advanced in this paper. The outcome of the model will advise the user regarding the quantity that should be ordered at Stages 1 and 2 for each material and which blending machine is used at which level.

Assumptions
The mathematical model was developed based on the following assumptions.
The price of buying raw materials and ordering costs in Stage 1 is always cheaper than purchasing in Stage 2.
The length of the planning schedule in Stage 1 is 3 months, and that in Stage 2 is 5 months based on the company's experience.
All blending machines have the same properties of all setting levels. • The higher the setting level, the better the output and the higher the cost.

Annotations
The annotations of the model are defined as follows:

Parameters
The parameters of the model are defined as follows:

Auxiliary Variables
The auxiliary variables of the model are defined as follows:

Optimization Model 3.3.1 Model's Objectives
The mathematical model has two objectives: • Objective 1: Minimize total cost:

Model's Constrains
The constrains of the mathematical model are given below: Constraint (1)-(2) shows that the purchased material at each time ordering is either zero or one at the one price range.
If V 1 mrj or V 2 mrje = 1 then material m was purchased at price range r in the ordering time j at stage 1 or stage 2. Constraint (3)-(8) states that each price range has its own lower bound and upper bound for the total quantity of one-time purchasing. At every ordering time belongs to price range r, the total number of purchasing must beyond lower bound and upper bound.
Range for purchasing material m at price range r Constraint (9) focuses on total quantity purchasing material in both stages which must be smaller than the maximum usage of them in all scenarios du to prevent the unnecessary redundant.
Constraint (10)-(11) presents the number of needed material m for producing product p at stage 1 or stage 2 must be smaller than the total available of material m at that stage.
With ∀m = 1 . . . M, e = 1 . . . E Constraint (12)- (13) ensures that at stage 1 and stage 2 the total time producing of all products on blending machine b must be smaller than the number of available hours of that blending machine.
Constraint (14)-(15) guarantee during production time at each stage, every blending machine will fix at only one setting level due to the high cost of changeover: Constraint (16) defines the total income is the min of total producing product and demand from customers. If products were produced less than the demand, income will be from the total product selling. Otherwise, products were produced more than the needed, total income will come from the total demand.

Results
The quantity of materials that should be purchased in Stage 1 is proposed in Tab. 7. The detailed Stage 1 production plan is presented in Tab. 8.
In this paper, only the results corresponding to Scenario 1, which has the highest probability of occurrence, are presented. Tabs. 9 and 10 describe the optimal Scenario 1 production plan.    Decision makers can use the results to make optimal procurement decisions. The case studied thus demonstrates the feasibility and applicability of the proposed model to real-world problems.

Conclusions
In this paper, a blending method and mathematical linear integer model approach are presented that comprise a decision-support tool for identifying the optimal purchased raw material and allocating the appropriate capacity for manufacturing purposes in each stage of the entire planning period for a fertilizer manufacturing planning problem. The proposed two-stage stochastic mixed-integer program was formulated to quantify total cost and managerial decision support regarding setting the levels of machines, production, and inventory. While previous research on blending fertilizer only focuses on maximizing the production of products, attention was not paid to the material or production costs. In the present study, the decision was made based on all of the costs that will affect profit. The proposed model can be improved in future research by considering other complications in the planning process such as adding output-dependent cost and price, or applying the model with rolling planning horizons.