SAFEA application design on determining the optimal order quantity of chicken eggs based on fuzzy logic

Received Jan 13, 2021 Revised Sep 2, 2021 Accepted Sep 18, 2021 The availability of stock in the chicken egg supply chain is influenced by the ability of egg Agents to determine the optimal orders to suppliers. The optimal number of orders is very important to manage for the Bogor City Egg Agent Indonesia because the stock capacity reaches 340 crates. The optimal number of orders for eggs at the Egg Agent is influenced by input variables, namely final stock (crate), selling price (crate), and consumer demand (crate) so that the inventory is under control. The three input variables have fuzzy values that must be processed using fuzzy logic to get the optimal number of orders to suppliers so that the egg stock in the warehouse is well maintained. The optimal order model for eggs in the smart application for egg agent (SAFEA) was developed using a fuzzy logic approach with the triangular and trapezoidal membership function. Based on the optimal order model in the SAFEA application, the optimal order to the supplier is 100-104 crates per day.


INTRODUCTION
Smart application for egg agent (SAFEA) is an application that egg agents can use to identify the optimal number of ordered chicken eggs to maintain stock availability, so there is no stock accumulation in the warehouse. The supply chain of chicken eggs has a problem imbalance between supply and demand, which causes the stock of eggs to increase, resulting in the stock of eggs often rotting because not sold. Therefore, we need a decision tool for making the optimal number of egg orders in the form of a smart application to determine the optimal number of orders so that the stock in the warehouse is well maintained. Shou et al. [1] has suggested the complexity of the product, actor position, and the actor size are influence supply management. The amount of stock and the selling price of chicken eggs are variables that influence optimal consumer purchasing decisions [2]. Supplier management can affect costs, inventory, and product production costs [3].
The optimal number of suppliers is a solution to maintain a balance of supply and demand in supply chain activities. The method used to determine the optimal order is the economic order quantity (EOQ) method. [4], [5] have suggested that the EOQ method is used by considering the conditions of deterministic market demand. The EOQ is used to develop an optimal inventory model to reduce costs and maximize orders [6]. The EOQ method can balance supply and demand to maximize the companies procurement function, but the order trend is flat every period [7]. The SAFEA application can determine orders according to fluctuating actual conditions. Godichaud and Amodeo [8] has suggested that the EOQ method can reduce logistics revers based on costs because it can identify the number of requests to maintain inventory. Determining the optimal order in the SAFEA application pays attention to costs and stock conditions, selling prices, and demand so that the amount of stock becomes ideal. Still, in the supply chain activities of chicken eggs, the input variables, namely the final stock (crate), total demand (crate), and selling price (crate), have a crisp value so that it requires a fuzzy logic approach to explain the value.
The current fluctuation in the price of chicken eggs causes egg agents to be unable to determine the optimal number of orders to suppliers to increase ordering costs, and the warehouse accumulates. Selling price and demand can obtain maximum profit, so the company needs to develop a model to identify the maximum profit based on these two variables [9]- [12] have suggested that the fuzzy logic model is a decision making system and optimization model that provides solutions to complexity parameter input. Fuzzy logic models can be used to identify costs incurred for production so that the selling price of the product becomes more optimal so that consumer demand increases [13]. In addition, Fuzzy Logic functions for system tracking accuracy, control, and software security management, and induction machine [14]- [26] have suggested that in addition, it can be helpful to put an object in focus and select and classify an object module. Fuzzy logic can provide recommendations for measurement results that refer to membership and the truth value [27].
Fuzzy logic has been used to determine the ideal conditions for the effectiveness of the production machine so that the production process is well maintained [28]. Fuzzy logic can identify the state of uncertainty in the number of requests so that retailers can produce products that are acceptable to consumers [29]. Optimal order development using fuzzy logic can identify the number of orders according to consumer demand, so egg quality is maintained in the warehouse [30]. has suggested that fuzzy logic can identify each variable's value with a crisp value. Variables that affect the optimal order and have a crisp value are the final stock (crate), total demand (crate), and selling price (crate), so it is necessary to use a fuzzy logic approach to identify the fuzzy value of these variables. Optimal order quantity management can reduce inventory to reduce storage costs, and the product distribution process runs optimally [31]. The designed fuzzy logic can increase the effectiveness of the chicken egg supply chain and reduce costs. Qin et al. [32] has suggested that fuzzy logic can be used in managing supply activities to eliminate waste and can help make decisions regarding the management of raw material supply. The product distribution process can also control the ideal stock condition based on optimal orders. Uncertainty in the number of requests can cause product stock outs in the warehouse, so a fuzzy approach is needed to keep stock conditions stable [33]. Management of big data and information related to supply and demand at retail and manufacture have to manage using technology so that the transaction process that occurs can run quickly and accurately [34]. This optimal order fuzzy model uses supply and demand information but to manage the system upstream.
The optimal ordering model in the SAFEA application can identify data and carry out data processing learning processes based on daily transaction models. This model will continue to study every transaction data that occurs so that the number of orders to suppliers will be optimal. Several recent studies [35]- [37] have suggested that machine learning is needed to get a simple and more accessible method by downloading experiment simulation data packages and creating intelligent decision making [38]- [42] have suggested that machine learning proves the ability of computer algorithms to improve performance over time, handle data more efficiently, select relevant features and power system reliability. Machine learning can improve performance by modeling the transients in the switches, one of which is the agricultural sector [43], [44]. In the future, this machine learning will open up a learning tool industry that promises to solve problems and analyse data than Artificial Intelligence [45]. Based on the balance of supply and demand for chicken eggs, the researcher developed the SAFEA application in which there is a model for determining the optimal number of orders. This application is the first application used by egg agents to identify the optimal number of chicken eggs for suppliers in real time using a fuzzy logic approach. The supply and demand of egg agents are well maintained. Fuzzy logic can identify linguistic variables into variables that have rational numbers for multi-criteria decision making [46]. The optimal number of orders can increase profits to determine product requests to increase profits [47].

RESEARCH METHOD
The development of the optimal order model in the SAFEA using a fuzzy logic approach. Pourjavad and Shahin [48] has suggested that the development of this fuzzy model uses the Mamdani fuzzy inferences system, where the input will be processed using an inference engine to produce specific results in the defuzzification process of the Crips variable owned. The stages in developing the optimal order fuzzy model in the SAFEA application are:

Fuzzy membership function
Fuzzy logic can determine the optimal number of orders based on input and output variables. The input variable is obtained from the actual condition of the egg agent in determining the number of orders which is then developed into a fuzzy system. The inference system used in developing this model is:  Triangular membership function Rajesh [49] has suggested that the triangular membership function used when there is one peak value of the degree of freedom of the parameter, namely 1, in the input and output variables. The parameter values of each variable in this membership set will be adjusted to the condition of the egg agent in managing the transaction process every day. Based on the graph of the membership set above, it can be determined the value of the membership set value μF (a, b, c): Trapezoidal membership function Rezaei and Ortt [50] has suggested that the trapezoidal membership function used when there is more than one maximum value of degrees of freedom, namely 1. This membership set is used because there are variables that affect the optimal order having several parameters with a maximum value of membership degree. Based on this membership set graph, the membership set value μF (a, b1, b2, c):

Fuzzy rule base
Fuzzy rule base in managing fuzzy Input variables using the "IF THAN ELSE" principle to determine the value of the selected fuzzy operator. The selected fuzzy rules base will be used to calculate the optimal order value during the defuzzification process. The Fuzzy rule base is Ri: If X1 is A1i and X2 is A2i, an Xm is Ami Then Y is Bi; i=1; 2;…n with the operator used is "and" so that the selected operator value is the minimum value [51], [52].

Defuzzification
The defuzzification process uses the center of area (COA) method. This method uses the moment value and the width area in the output variable based on the selected fuzzy operator. The formulation of the COA method is:

Waterfall SDLC method
The software process model represents the software process from a particular perspective and partial system information that more flexible [53]. The process of making this software is known as the system development life cycle (SDLC) with the creation four phases of a structured software product [54]. SDLC organization refers to secure a software [55]. The waterfall model used for controlling and protecting a sequential development model applied to government projects, small businesses, to thousands of large companies such as medical sector [56], [57]. The work on this model is divided into 6 phases, namely sensing, signal processing, feature extraction, pattern processing, situation assesment, decision making [58] as well as the addition, namely without planned iteration to keep development cost, duration, and resulting product quality [59] adding more approach to develope a software [60].

RESULTS AND DISCUSSION
Development of SAFEA uses a fuzzy logic approach to determine optimal orders to suppliers. This optimal order model was developed based on the variables that affect the supply and demand of egg agents. The stages of determining the optimal order in the SAFEA application can be seen in the following Figure 1. Variables that influence the development of this model are the final stock of eggs, egg demand, and the selling price of the crate. These three variables will be developed in the form of a membership set based on the actual condition of the egg agent transaction. The development of fuzzy logic on the optimal ordering menu for eggs to suppliers has several stages and uses the Matlab application to create a fuzzy set model. The

Optimal order membership function
The membership set is built based on actual conditions in the field. The input variables used in the SAFEA application are the selling price, consumer demand, and stock availability at the egg agent. The membership function graph used can be seen in the following Figure 2. The output membership set of this fuzzy model is the optimal number of orders from the egg agent to the supplier based on the condition of the amount of stock, the selling price of eggs, and the demand for eggs.
The graph of the set of variable memberships that affect the optimal number of orders can be seen in Figure 2. Figure 2(a) show the graph of final egg stock membership set uses a combination of triangular and trapezoidal membership functions with the highest parameter value limit is 300 crates. The graph of the egg demand membership set uses 4 parameters. Figure 2 The value of the degree of membership that occurs in the three variables that affect the optimal order will then be processed through a defuzzification optimal order. The defuzzification process will be carried out on the optimal order membership set to get the optimal egg order fuzzy value. The optimal order number membership set uses 4 parameters: low, medium, high, and very high. The optimal order fuzzy membership set can be seen in the following Figure 3. The model verification process is carried out by entering the final stock value of 90 crates, and then the end stock membership degree value is µend_Stock (a,b,c) = 0,33. These results show that the final stock condition is in the medium parameter, namely 90 crates, so the degree of membership used to determine the fuzzy operator is 0.33. The Membership Function for the end stock is as: Based on the number of requests for 150 crates, the value of the request membership degree is µdemand (a, b, c) = 0,5. These results show that the demand egg condition is in the medium parameter, namely 150 crates, so the degree of membership used to determine the fuzzy operator is 0,5. The set of membership requests is: Based on the selling price of Rp. 340,000, the value of the demand membership degree is µSelling_Price (a, b, c) = 0,75. These results show that the selling price condition is in the medium parameter, namely Rp 340.000, so the degree of membership used to determine the fuzzy operator is 0,75. The selling price membership set is:  Figure 3. Optimal order membership function

Fuzzy rule base
The next step is to determine the possible fuzzy rule base based on the membership set of input variables and output variables. The rule is based on the "and" operator, and the operator's value is "minimum", then there are 144 possibilities that occur. The simulation of the fuzzy rule base using the rule editor in the Matlab application can be seen in the following Figure 4.

Optimal order defuzzyfication
Defuzzification of the optimal ordering of chicken eggs using the COA method by comparing the resulting moment with the area of the optimal ordering output variable. The total moment obtained in the optimal order simulation is 3525.37. Moment based on the results of the optimal order fuzzy membership set is: Based on the COA method, the optimal order value is 100 Crate by comparing the moment and the area. The verification of optimal order defuzzification using Matlab software showed the same results, namely 100 crates. Optimal order defuzzification of eggs using matlab software can be seen in the following Figure 5.

Application of the optimal order fuzzy model in the SAFEA application
Based on the verification of the optimal ordering fuzzy model above, this model will be the basis for developing the optimal order model for the SAFEA application based on the egg agents transaction process and stock conditions. The optimal order model in the SAFEA application will be developed using a database of the variables that affect the egg agent business process. Entity relationship diagram (ERD) optimal order can be seen in the following Figure 6. The three fuzzy input variables will be inputted in real time in the SAFEA application by the user on the crate transaction menu and daily recap. The selling price and the number of requests (Crate quantity) inputted by the operator on the daily crate transaction menu become automatically input into the optimal order menu. SAFEA application egg crate interface can be seen in the following Figure 7. namely at the end of the egg crate stock field. Egg crate stock will be recapping automatically in the daily recap menu on the SAFEA application. SAFEA application trancation daily recap interfacecan be seen in the following Figure 8.
Based on the fuzzy optimal order in Figure 10, the evaluation results with simulation testing related to the final stock comparison between regular orders and fuzzy orders for the last 1 month show that fuzzy orders impact safety stock maintained according to the demand that occurs. On the other hand, regular orders (existing) fluctuate, resulting in a significant buildup of stock in the warehouse every day. In addition, the impact that occurs with the maximum net profit obtained by the egg agent reaches 2 million per day.

CONCLUSION
The development of the optimal ordering model in the SAFEA application uses a fuzzy logic approach with input variables, namely demand (crate), selling price (crate), and final stock (crate) so that it can provide information on the optimal number of orders in real time. Based on the results of transactions using the SAFEA application, the optimum number of orders to suppliers is 100 crates to 104 crates. The stock is always maintained every period of the day, and the eggs do not rot. Future research development can focus on evaluating aspects of the supply process to find alternative egg supply strategies.