JOURNAL TECH-E VOL. 8 NO. Online Version Available at: https://jurnal. id/index. php/te JOURNAL OF TECH-E | 2581-1916 (ONLINE) | 2598-7585 (PRINTED) | Article Implementation of Sugeno Fuzzy Logic Methods for Predicting Pie Crust Raw Material Stock Fajrul Aulia Yudha1. Raissa Amanda Putri2 State Islamic University of North Sumatera. Computer Science. Nort Sumatera. Indonesia State Islamic University of North Sumatera, information System. Nort Sumatera. Indonesia SUBMISSION TRACK A B S T R A C T Recieved: 07, 30, 2024 Final Revision: 08, 06, 2024 Available Online: 08, 08, 2024 Accurate prediction of raw material stocks is essential for cost management and effective production planning in the food industry. The Sugeno fuzzy logic method is employed to predict the stock levels of pie leather raw This method aims to offer a reliable prediction system that enhances stock management, thereby minimizing the risks associated with overstocking or stock shortages. The performance of the model is evaluated using the average error percentage test, which yielded a result of 3. This indicates an accuracy level of 96. 06%, demonstrating a high degree of The findings suggest that the Sugeno fuzzy logic method is a highly effective tool for predicting raw material requirements in the pie leather production The study underscores the potential of fuzzy logic methods in supply management, ensuring smooth production operations. By implementing this method, manufacturers can achieve better inventory control, leading to more efficient production planning and cost The results validate the application of Sugeno fuzzy logic as a robust approach for inventory prediction, capable of significantly improving the overall management of raw material stocks in the food industry. This research highlights the practical benefits of advanced predictive models in optimizing supply chains, supporting continuous production flow, and enhancing the overall efficiency of production systems. Consequently, the use of fuzzy logic methods can play a critical role in streamlining production processes and maintaining optimal inventory levels, ultimately contributing to the success and sustainability of food manufacturing operations. KEYWORD Predicting System. Sugeno Fuzzy Logic. Raw Material Stock. MAPE CORRESPONDENCE E-mail: fayyudha26@gmail. A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. INTRODUCTION The culinary industry is a highly dynamic and competitive sector. Success in this industry is often determined by the ability of producers to respond to market demand quickly and efficiently . Ae. One critical aspect of food production management is the management of raw material stock . , . Inventory refers to the stock of goods or raw materials provided to support smooth production so that consumer needs can be met . , . Well-implemented inventory management can result in good and timely production performance to maintain the optimal quantity of goods. Inventory requires control to maintain the quality and quantity of these raw materials . , . One way to control raw material inventory is through prediction. The procurement of pie crust raw materials is done in Packages, each consisting of several main components ready for use. Each Package contains a mix of flour, butter, and eggs. This flour mix is a pre-formulated blend, so the user only needs to add butter and eggs according to the instructions to produce the perfect pie crust dough. Using these Packages simplifies the pie-making process, saves time, and ensures consistent taste and texture of the pie crust with every production. With this rapid development, the Medan pie crust production house faces challenges such as sales fluctuations. Having too much stock of pie crust ingredients can lead to financial inefficiencies, such as unproductive expenses, while having too few raw materials can result in inefficient operational costs and lost sales opportunities . Therefore, a prediction process is necessary to achieve the best results or maximize efficiency . From these issues, an appropriate solution is required to address the problem of purchasing pie raw material stocks. In the research titled "Application of the Sugeno Fuzzy Method for Raw Material Inventory Prediction" conducted by Warmansyah & Hilpiah, it was proven that the Sugeno fuzzy logic method can be used efficiently in determining stock purchases and achieved a MAPE value of 38% . Therefore, pie raw material stock predictions can be made using the Sugeno fuzzy logic to determine future pie raw material stock purchases according to needs . The predictions from this research show that applying the Sugeno Fuzzy Logic Method in optimizing the monthly purchase of pie crust raw materials can provide significant benefits for pie By considering various factors such as initial stock quantity, raw material intake, and production, the resulting strategy can minimize the amount of surplus stock and increase the number of sold stocks, thereby maximizing profits. The use of fuzzy logic allows for more dynamic and adaptive evaluations of changes in demand and stock availability, aiding producers in making more accurate and timely decisions . Besides reducing losses due to excess stock, this research also contributes to stock management optimization in business, demonstrating great potential in more efficient and effective raw material stock management, and providing new insights for research and practice in stock management and business decision-making. With fuzzy logic, issues that have unclear values are no longer an obstacle because computers not only understand Boolean logic with definite and clear values . , but also recognize logic with ambiguous or uncertain values. In fuzzy logic, data can be both true and false simultaneously, but the degree of truth or falsity depends on the weight it carries . II. LITERATURES REVIEW In the research titled "Application of Sugeno Fuzzy Logic for Coffee Bean Stock Optimization at Rooster Cafe" conducted by Hafiz & Sriani, it was also proven that the Sugeno fuzzy logic method can be used as a method to determine the production amount using input variables (Initial Stock. Sold Stock. Addition. and output variables in the form of the final stock amount. This study also obtained a MAPE value of 19. 81%, equivalent to an accuracy rate of 80. 19% . The difference between this research and previous research is the utilization of the Sugeno fuzzy logic method to predict pie crust raw material stocks. The main objective of this study is to model a system that can predict pie crust raw material stocks and calculate the accuracy of the Sugeno fuzzy logic method in modeling a system that can predict pie crust raw material stocks. A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. Fuzzy Sugeno Fuzzy Logic is an approach within logic theory that enables the handling of uncertainty and lack of information. , . The concept of fuzzy logic was introduced by Lotfi Zadeh in 1965. Fuzzy logic allows membership values in a set to range between 0 and 1, representing the degree of membership of an element in a set . , . In fuzzy logic, the truth value of a statement ranges from completely true to completely false. With fuzzy set theory, an object can belong to multiple sets with different degrees of membership in each set . , . The Sugeno method is similar to the Mamdani method, but the difference lies in its output. Sugeno fuzzy logic, the output is a constant rather than a fuzzy set. The membership function in the Sugeno fuzzy method is often called a singleton function, which is a membership function that has a value of 1 at one actual value and 0 at other actual values. The defuzzification process in the Sugeno method is more efficient compared to the Mamdani method . , . , . This is because the Sugeno fuzzy method calculates the output function of each rule and produces the output as a weighted average. Meanwhile, the Mamdani method has to calculate the area under the membership function curve of the output variable. The advantage of Sugeno fuzzy logic is that with zero-order, it is often more suitable for various modeling needs. The definition of prediction is the process of estimating or forecasting future needs, in this context, specifically to determine the quantity of raw material stock purchases required. The aim of this prediction is to achieve optimal efficiency in inventory management, thereby avoiding excess or shortage of stock that could affect operational costs and sales opportunities . FRAMEWORK In this famework, the author will undertake several stages to design a model for predicting raw material stocks using Sugeno fuzzy logic. These stages are crucial to ensure the smooth progress and accuracy of the research. Figure 1. Research Framework IV. METHODOLOGY Planning Planning is necessary to design the stages that will be completed in a research study. arrange the steps that will be followed in the research process, planning is an essential phase. Researchers may make sure the study is carried out methodically, successfully, and economically by using this planning. The phrasing of the problem, the variables, and the suitable measurements are determined by researchers. It should be possible to determine addiction levels with the intended results with careful planning. Data Collection The data obtained in this study is time series data, which consists of a series of data collected and recorded at regular intervals . The data was sourced from a production house vendor in Medan A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. and includes initial stock, production, incoming goods, and final stock. This data spans from April 2023 to May 2024 and is presented in Table 2. Needs Analysis In this study, identifying input and output variables is part of the needs analysis. The input variables consist of initial stock, production, and incoming goods, all of which contribute to the amount of goods available at the beginning and during a certain period. The output variable is the final stock, which indicates the amount of goods available after considering all other variables. Fuzzy Sugeno Design This design includes identifying relevant variables, formulating fuzzy rules based on domain knowledge, and setting up fuzzy sets for input and output variables. This design process will form the basis of the raw material stock prediction model. In this research series, fuzzy logic will be implemented through three steps: Fuzzification. Inference, and Defuzzification. Fuzzification This is the first step in a fuzzy logic system where crisp . input values are converted into fuzzy values. It involves mapping input values to the appropriate fuzzy sets using membership This step allows the system to handle uncertain or imprecise data. Inference The inference engine is the heart of the system, which evaluates fuzzy rules based on the fuzzy values of the input variables. Different methods can be used, such as the Mamdani or Sugeno The inference engine combines the fuzzy rules and produces a fuzzy output value. Here is an example of a zero-order Sugeno Fuzzy inference rule: A1 is the first fuzzy set as the antecedent, and k is the constant as the output. In this study, there are 27 possible combinations to form different fuzzy rules. Table 4 below provides a detailed breakdown of the fuzzy rules. Deffuzification This is the final step where the fuzzy output set from the inference process is converted back into a crisp output value. This involves using a defuzzification method, such as the centroid method, to obtain a single precise output from the fuzzy set. This step provides a tangible result from the fuzzy logic system that can be used for decision-making or control purposes. WA is the weighted average value, yu is the degree of membership of the nth rule, and is the nth output value . Fuzzy Testing The Mean Absolute Percentage Error (MAPE) can be used in fuzzy system testing to assess how accurate the predictions made by the fuzzy model are . The average absolute percentage error between the predicted and actual values is determined using the MAPE method . In order to conduct this test, the actual observed data is compared with the forecast results of the fuzzy Oc Where Xi represents the actual value. Fi represents the fuzzy calculation result, and n is the number of data points. MAPE provides a measure of how accurate the model is in making predictions, with a lower MAPE value indicating better model performance. Table 1. MAPE Accuracy Level MAPE Value < 10% 10% - 20% 20% -50% >50% Accuracy Very High High Moderate Low A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. Implementation After the Sugeno fuzzy logic model was tested and proven effective in predicting pie crust raw material stock, this research model can be implemented. This model will serve as a tool for pie crust production vendors in Medan to manage their pie crust raw material inventory efficiently and Implementing this model will bring practical benefits in enhancing efficiency in determining pie crust raw material stock. One tool that can be used to implement this model is MATLAB. MATLAB, short for "MATrix LABoratory," is a programming environment and numerical computing platform that is highly popular in the fields of science, engineering, and industry. Developed by MathWorks. MATLAB offers a variety of features that support data analysis, visualization, modeling, and numerical computations with a user-friendly interface . , . One significant application of MATLAB is in the research of raw material stock prediction using fuzzy DISCUSSION AND RESULT Data Collection Months Table 2. Pie Crust Production Data April 2023 Ae May 2024 Initial Stock Production Incoming Goods Final Stock April 2023 Mei 2023 Juni 2023 Juli 2023 Agustus 2023 September 2023 Oktober 2023 November 2023 Desember 2023 Januari 2024 Februari 2024 Maret 2024 April 2024 Mei 2024 Needs Analysis Input Variable There are 3 input variables: Initial Stock. Production. Incoming Goods. These input variables contain ranges of values that will be used to determine fuzzy sets. Table 3. Input Variable Function Variable Initial Stock Input Production Incoming Goods Fuzzy Set Few Moderate Many Few Moderate Many Few Moderate Many Universe of Discourse A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. Domain - 1. - 1075 - 1. 5 - 1. - . - 940 - 1. - 1. - . - 923 - 1. - 1. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. Output Variable Based on the data obtained, the output variable in this study is AiFinal StockAn. This output variable has 3 fuzzy sets: "few," "moderate," and "many. " Table 3 shows the domain of the Final Stock variable. Table 4. Output Variable Fuction Output Variable Fuzzy Set Domain Final Stock Few Moderate Many . Fuzzy Sugeno Design Initial Stock Variable Based on pie crust production data obtained from a pie production house vendor in Medan for the period from April 2023 to May 2024, it is known that the minimum initial stock amount is 996 packages and the maximum reaches 1153 packages, with an average initial stock of 1038. The universe of discourse for the initial stock variable covers the range from 996 to 1153 packages. [ ] [ ] [ ] Membership functions are used to transform crisp data into fuzzy set data. In this prediction, a triangular membership function is used. This function acts as a curve that maps input data points into membership values, which range from 0 to 1. For the variable "Initial Stock", a triangular membership function can be created based on the domain obtained from the table 2. Figure 2. Membership Function for the Initial Stock Variable. This curve shows how the initial stock values are categorized into three fuzzy sets: Low. Medium, and High. Each membership function curve represents the rising and falling representation of the initial stock values, which are evenly distributed across the universal range from 0 to 1153. Production Variable Based on pie crust production data obtained from a pie production house vendor in Medan for the period from April 2023 to May 2024, it is known that the minimum production amount is 300 packages and the maximum reaches 1579 packages, with an average initial stock of 932. The universe of discourse for the initial stock variable covers the range from 0 to 1579 A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. [ ] [ ] [ ] Membership functions are used to transform crisp data into fuzzy set data. In this prediction, a triangular membership function is used. This function acts as a curve that maps input data points into membership values, which range from 0 to 1. For the variable "Production", a triangular membership function can be created based on the domain obtained from the table 2. Figure 3. Membership Function for the production This curve shows how the initial stock values are categorized into three fuzzy sets: Low. Medium, and High. Each membership function curve represents the rising and falling representation of the production values, which are evenly distributed across the universal range from 0 to 1579. Incoming Goods Variable Based on pie crust production data obtained from a pie production house vendor in Medan for the period from April 2023 to May 2024, it is known that the minimum incoming goods amount is 310 packages and the maximum reaches 1535 packages, with an average initial stock of 1428571 packages. The universe of discourse for the initial stock variable covers the range from 0 to 1535 packages. [ ] [ ] [ ] Membership functions are used to transform crisp data into fuzzy set data. In this prediction, a triangular membership function is used. This function acts as a curve that maps input data points into membership values, which range from 0 to 1. For the variable "Incoming Goods", a triangular membership function can be created based on the domain obtained from Table 2. A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. Figure 4. Membership Function for the incoming goods This curve shows how the initial stock values are categorized into three fuzzy sets: Low. Medium, and High. Each membership function curve represents the rising and falling representation of the production values, which are evenly distributed across the universal range from 0 to 1535. Rules Based on the Determination of Fuzzy Sugeno Rules in predicting pie crust raw materials using fuzzy logic to handle uncertainties in production. Fuzzy logic enables decision-making based on ifthen rules that reflect the relationships between input variables such as Initial Stock. Production. Incoming Goods, and the output variable, namely final stock. Each rule has a membership function and an implication function to map the input to the output. There are 27 possibilities to form different fuzzy rules. Initial Stock . Few Few Few Few Few Few Few Few Few Moderate Moderate Moderate Moderate Moderate Moderate Moderate Moderate Moderate Many Many Many Many Many Many Many Many Many Table 5. Fuzzy Rules Input Incoming Goods . Production . Few Few Few Moderate Few Many Moderate Few Moderate Moderate Moderate Many Many Few Many Moderate Many Many Few Few Few Moderate Few Many Moderate Few Moderate Moderate Moderate Many Many Few Many Moderate Many Many Few Few Few Moderate Few Many Moderate Few Moderate Moderate Moderate Many Many Few Many Moderate Many Many Output Final Stock Few Moderate Many Few Few Moderate Few Few Moderate Moderate Moderate Many Few Moderate Many Few Moderate Many Moderate Moderate Many Moderate Moderate Many Few Many Many Data Representation In this chapter, the researcher will proceed to explain the calculations of the Sugeno fuzzy logic for one particular month, namely October, with the aim of understanding how this method can be applied in relevant data analysis. Table 6. Data Representation For The Month Of October Month Initial Stock Produksi Barang Masuk A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. Stok Akhir FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. (Package. (Package. (Package. (Package. October Initial Stock (X1 = 1. Membership fiction used: [ ] What is the value of Thus: [ ] when the Initial Stock is 1058 packages? Production (X2 = 1. Membership function used: [ ] What is the value of Thus: [ ] [ ] when the production is 1579 packages? Incoming Goods (X3 = 1. Membership function used: [ ] What is the value of Thus: when the incoming goods is 1535 packages? Based on the calculations in the fuzzification process, the values obtained are: Initial Stock (X1 = ) : AAFew = dan AAModerate = Productoin (X2 = ) : AAModerate = 0 dan AAMany = 1 Incoming goods (X3 = ) : AAModerate = 0 dan AAMany = 1 Thus, out of 27 fuzzy rules, 8 rules are satisfied. Table 7. Rules for the month of October Initial Stock . Incoming Goods . Production . Few Moderate Moderate Few Moderate Many Few Many Moderate Few Many Many Moderate Moderate Moderate Moderate Moderate Many Moderate Many Moderate Moderate Many Many Rules Final Stock Few Moderate Few Moderate Moderate Many Moderate Many To determine the -predicate value, linguistic variables are combined using the AND operator. Next, the MIN . value is taken from each rule resulting from the fuzzification process. A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. The predicates used are those that are not equal to 0. Thus, there are 2 predicates, rules 9 and The predicate table is as follows: Table 8. Alpha Predicates for the Month of October Rules alpha predikat After determining the alpha-predicate values and their corresponding zn values, the Weight Average (WA) formula will be used to calculate the result: = 1136,2152 Packages The Calculation Results After obtaining the results from the manual calculation, the same calculation method was applied for the next month to obtain the raw material stock for pie crust over 14 months, presented as follows in the table 8: Table 9. The Calculation Result Month Initial Stok Production Incoming Goods Apr-23 May-23 Jun-23 Jul-23 Aug-23 Sep-23 Oct-23 Nov-23 Dec-23 Jan-24 Feb-24 Mar-24 Apr-24 May-24 Initial Stock (Actua. Final Stock (Fuzzy Sugen. Fuzzy Testing (Calculation Of MAPE) Based on the calculation results presented in Table 8. MAPE values were computed using Formula 12 to evaluate the accuracy of the Sugeno fuzzy logic model in predicting pie crust raw material stock. This involved comparing the actual final stock variable (Actual Dat. with the final stock variable (Fuzzy Sugen. The following is the MAPE calculation results presented in Table 9. Table 10. The Calculating of MAPE Month Apr-23 May-23 Jun-23 Actual (X. Fuzzy Sugeno (F. Xi-Fi A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. |Xi-F. Xi-Fi/Xi 0,00990099 0,011627907 0,098005204 FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. Jul-23 Aug-23 Sep-23 Oct-23 Nov-23 Dec-23 Jan-24 Feb-24 Mar-24 Apr-24 May-24 Total : 0,056751468 0,003898635 0,007561437 0,124260355 0,02060844 0,055045872 0,007490637 0,080550098 0,054216867 0,013645224 0,008645533 0,552208667 Based on the results obtained, the MAPE value obtained is 3. 94%, with an accuracy of 96. categorizing it as "Very High" according to Table 4. Implementation To implement this model. MATLAB was used as the programming platform. Using MATLAB, this research can effectively test and validate the Sugeno fuzzy model, as well as perform sensitivity analysis to understand the impact of each input variable on the prediction results. This research shows that the Sugeno fuzzy logic method can predict the final stock with a higher level of accuracy compared to conventional methods. These results confirm the superiority of the Sugeno fuzzy method in providing more accurate and reliable predictions, which is crucial for better decision-making in the pie crust sales business. This research has limitations as it only uses data from a single vendor over a specific period, so the results may not reflect broader variations in different contexts. In this study, only a few variables were considered: initial stock, production, goods received, and final stock. VI. CONCLUSION After conducting the implementation in this research, the author concludes several points from the obtained results. This study demonstrates that the Sugeno fuzzy logic method can provide more accurate final stock predictions compared to conventional methods. From the average percentage error testing conducted, a result of 3. 944% was obtained with an accuracy rate of 96. 06%, indicating a high level of accuracy. This shows the effectiveness of the method used in handling data variability and uncertainty, and gives confidence that this model can be relied upon for practical applications in stock management, especially in the pie crust sales A THE AUTHORS. PUBLISHED BY Buddhi Dharma University DOI: 10. 31253/te. FAJRUL AULIA YUDHA / JOURNAL TECH-E VOL. NO. REFERENCES