Best Products with TOPSIS Method and Sales Forecasting with Weighted Moving Average

Received 2020-07-11 Revised 2020-08-03 Accepted 2020-09-17 In a company engaged in the sale and purchase of products can not be separated from the calculation of profit or loss that is the main factor for the company's progress. However, in certain companies such as minimarkets and convenience stores, it is not easy to record company profits and losses. This of course requires a system that can help companies in determining sales strategies or at least a picture of sales in the future. Things that can be done to help these problems is to create a system that forecast sales or forecasting. One method that can be used to make sales forecasts is the wighted moving average method. However, due to the large number of products sold in minimarkets with different values, of course there must be other methods that can filter products so that forecasting can be more effective. One way to handle this is to use a product ranking system with the Techinique for Order Preference by Similarity to Ideal Solution (TOPSIS) method. The topsis method was chosen because the calculation is very detailed and structured, so that it can maximize the ranking value. By combining sales forecasts and product ranking is expected to create a system that can help companies in determining sales strategies in the future. Later this system is combined with the point of sale system to get accurate sales results. This system is designed using PHP and Javascript programming languages, then the database is stored in MySQL. Keyword:


I. INTRODUCTION
The information technology in our country currently shows rapid advance, either in terms of hardware or software. As a result, there are many competitors in the sales business that may utilize technology and system development. Thereby, it requires human resources who are able to deal with these situation. Rapid advances in IT have made technology a force in various fields inera [1].
Warung Halal 99 as one of the business engaged in basic needs sales, often experience difficulties in the process of turnover calculation and sales strategies implementation, since so far, it uses manual method. Futhermore, the absence of a system that can help improve the sales process adds up the problem [A]. One solution to cope with, is that to help improve the quality of sales strategies by applying the best product selection decision support system method or ranking the best product and forecasting the sales. Decision support system is one method can be used in determining the best product [2]. Meanwhile sales forecasting can help business or companies in making the right decision for sales strategies based on existing data [3]. Topsis method can be used to rank the best product based on alternative values available or also called multi-attribute decision making [4]. Topsis method will make it easier to see and determine which product IS with the best quality and can help companies in doing proper product stock management [5]. Topsis method is applied as a solution for the best product selection. It is equipped with a sales forecasting system. Sales forecasting can help companies in planning sales in the upcoming period [6].

II. RESEARCH METHODS
A. TOPSIS TOPSIS (technique for order preference by similarity to an ideal solution) method is presented in Chen and Hwang (1992), with reference to Hwang and Yoon (1981). The basic principle is that the chosen alternative should have the shortest distance from the ideal solution and the farthest distance from the negative-ideal solution.To produce a good value in a decision support system using the topsis method, it is necessary to provide several criteria as a benchmark for calculating this ranking. Than the value is processed and a preference value is obtained which shows the sequence of data from the best [7] [8] [9].
The topsis method allows an accurate decision calculation if the criteria presented really support the data, in a case example, each criterion is given a value according to its role in the data. Then each value from that criterion is calculated with the value generated by each data. Resulting in a positive ideal solution A + and a negative ideal solution A-which can be determined based on a normalized weight ranking.
The TOPSIS procedure consists of the following steps: a) Determine a normalized decision matrix b) Calculates a weighted normalized decision matrix c) Calculates a positive ideal solution matrix and a negative ideal solution matrix d) Calculate the distance between the values of each alternative with a positive ideal solution matrix and a negative ideal solution matrix e) Calculates the preference value for each alternative f) Rank the preference order. The positive ideal solution A + and the negative ideal solution A-can be determined based on the normalized weight rating (yij) as : With i=1,2,...,m; and j = 1,2,...,n. Weighted Moving Average a result of moving average which has a value and weight, the value of this weight can be anything according to the length of the period specified with the provisions of the weight value for the latest price is greater than the weight value for the previous price [10]. The formula used in the forecasting system with the Weighted Moving Average (WMA) method is as follows [11]: Information: Dt: actual data for the period t Weight: the weight given for each month This method is most widely used in sales forecasting systems. In forecasting, this method requires a comparison value that is the error value and the value of Mean Squred Error (MSE). The MSE value is used as a benchmark for forecasting accuracy, the lower the MSE value, the more accurate the forecast value.
Measurement of Forecasting Error To calculate the error (error) is usually used mean absolute deviation (MAD), mean squared error (MSE) and mean absolute percentage error (MAPE).
MSE (mean squared error) is not scale-free. If your data are in dollars, then the MSE is in squared dollars. Often you will want to compare forecast accuracy across a number of time series having different units. In this case, MSE makes no sense. MAE (mean absolute error) is also scaledependent and so cannot be used for comparisons across series of different units. The MAD (mean absolute deviation) is just another name for the MAE. The MAPE (mean absolute percentage error) is not scale-dependent and is often useful for forecast evaluation. However, it has a number of limitations. For example:  If the data contain zeros, the MAPE can be infinite as it will involve division by zero. If the data contain very small numbers, the MAPE can be huge.  The MAPE assumes that percentages make sense; that is, that the zero on the scale of the data is meaningful. When forecasting widgets, this is ok. But when forecasting temperatures in degrees Celsius or Fahrenheit it makes no sense. The zero on these temperature scales is relatively arbitrary, and so percentages are meaningless. It is possible to have a percentage version of MSE, the Mean Squared Percentage Error, but this isn't used very often.
The MASE (mean absolute scaled error) was intended to avoid these problems [12].

III. METHOD
The methods used in this paper are sales process analysis method and system development method. The analysis method consists of calculating the best product selection by decision support or best product ranking using the topsis method and forecasting using the weight moving average method. Analysis and system design are done through a structured approach with Data Flow Diagrams also software development using the Prototyping Method and Entity Relationship diagram to illustrate the relationship for the running system. Descriptive research model with a qualitative approach and data collection techniques are done by interviewing and collecting secondary data which is sales data, also literature studies and survey on the current system. Inventory at the start of the accounting period is called beginning inventory and cost of producing the goods sold during the accounting period called cost of goods sold (COGS) [13]. Using decision support system for selecting the best product is a one of the ways to rank or sort the best products based on quality and predetermined criteria. Also, forecasting is the art and science of estimating future events. This can be done by taking historical data and using it for future, with the form of a mathematical model [13].
The ranking method used is the topsis method, as topsis supports multi-criteria calculations which facilitate the ordering of the best products based on quality. Forecasting method used is a weighted moving average. The weighted moving average method uses the last period N data as 119 historical data to make forecast, however, each period has different weight. Higher weights are usually given to the period that is similar to the predicted period. The software engineering method used is prototyping, by modeling the data using entity relationship diagrams, and to illustrate the model for functional data using flowmaps, context diagrams, and flowcharts. Computer programs are made using the phpcodeigniter 3 application program, MySQL for database, and Windows 8 for operating system. In addition to support programming language, javascript, HTML, CSS are used. Photosop and correl draw are used for interface design. Researchers intend to build a system that can help sorting the best products based on predetermined criteria and predicting the number of goods sold in the next sales period in Warung Halal 99 minimarket to improve its service to consumers. The first goal is to produce a list of the best products that has been calculated using topsis method. The second goal is to create a system for forecasting sales using historical sales data with the weighted moving average method to produce estimated inventory value available to sale for the next period.

IV. RESULTS AND DISCUSSION
After analyzing and designing the system, it was continued by creating the program codes in order to get the best-selling product ranking system and accurate sales forecasting. The figure above shows the display of criteria used in the process of calculating the best product ranking using topsis method, within 5 criteria including the total products sold, the percentage of profit per product, the selling price of the product, the total stock in the warehouse (ease of getting stock) and the percentage of total profit. Of the 5 criteria, there are 2 types of attributes i.e. cost and benefit. Cost is a condition where the less value obtained, the better the product is considered. Whereas the benefit is when the higher the value, the better product quality will be. The data above is an example of product data obtained from Warung Halal 99. The data was processed and sorted according to the highest quality products calculated using the topsis method with 5 predetermined criteria. The criteria above were taken based on direct observations at Warung Halal 99 and by looking at its sales report book in 2019. Subsequently, the criteria were valued range 1 to 5.
Next, the data was processed and assessed based on predetermined criteria. This valuation is called alternative value, alternative value is given based on data that has been obtained with the respective rules each. For example, the criteria with code C01:  If the number sold in a year is more than 40, then it is given a value of 5  If the number sold in a year is 31 to 40 then it is given a value of 4  If the number sold in a year is 21 to 30, then it is given a value of 3  If the number sold in a year from 11 to 20 is given a value of 2  If the number sold in a year is 1 to 10, then it is given a value of 1  If there are no sales in a year, the value is 0.
For the C02 criteria that is by using the percentage of profit per product where:  If the profit reaches 40% then the value is 5  If the profit is 31% to 40% then the value is 4  If the profit is 21% to 30% then the value is 3  If the profit is 11% to 20% then the value is 2  If the profit is 1% to 10% then the value is 1  And if the profit is 0% or less, the value is 0 This was also applied to the criteria of C03, C04 and C05, where each of which has its own calculation rules. The following is a table of 10 products sales in Warung Halal in 2019. After obtaining an alternative value, then the value normalization calculation process was carried out. Normalization is the process of grouping data attributes form simple entities, no redundant, flexible, and adaptable, so that data created is ensured in good quality. In normalization process, each value must be squared with each matrix element based on table 4. For example, product with code A01 in column C01 is 5, then the square value is 25. Furthermore, the normalization value will be calculated which results in a weighted normalization value.

Rij Wi Yij
  (9) With i=1,2,3, … m And j=1,2,3, … n Where the weighted value is obtained from the product of the normalization value multiplied by the criterion value. The following is an example of the calculation: After getting the weighted normalization value, then the ideal solution matrix was calculated. The ideal Sulusi matrix was obtained based on weighted normalization and attribute criteria (cost or benefit). The positive ideal solution was choosen from the maximum value of weighted normalization with following prerequisites: if the attribute is benefit criteria and the minimum cost is taken. Instead, the positive ideal solution chose the minimum value of weighted normalization, if the attribute is benefit criteria and the maximum cost is taken.
The positive ideal solution (A +) is calculated based on: From the values above, we obtain the final total value of product ranking. To find the total and ranking, we must find the range of positive and negative solutions obtained from the processing of tables 7 and 8. The technique was by quantifying the square of the difference between each element of the weighted normalization matrix with the ideal solution matrix, then added up each alternative, and afterwards, found the square root. The formula is as follows: After ranking the best products and getting reports on the order of products from the best to the worst, the next system can further do sales forecasting. Sales forecasting was done using the Weigted Moving Average method (WMA). After calculating the data above, thereafter, MAD and MSE were calculated. Yet, before getting the value, we must find the error value first by using the original valuewma.
To calculate errors, mean absolute deviation, mean squared error and mean absolute percentage error are usually used. The mean absolute error is the average absolute value of the forecast error (regardless of the positive and negative signs or After calculating the process, the sales forecast from January to December 2020 is obtained as shown in following table. In the table above, it can be seen that the smaller the MSE value, the more likely the forecast results will be. Conversely, if the greater the MSE value, then the possibility of forecasting accuracy will be less. From the table above, the lowest MSE is in July with a value of 0.11. This means that in July, forecasting results are getting closer to reality. And forecasting in August get the largest MSE results with a value of 56.25.

IV. CONCLUSION
Ranking a product using the TOPSIS method successfully proven to produce the best-selling product sequences with predetermined criteria. By using this method, ranking or decision of the most saleable product decision can obtain a valid preference value and can be used as a means of decision support for making product purchase transactions in the next period.
In addition to ranking, the system is also supported by sales forecasting using the WMA method. Calculation of forecasting for the future period is based on previous quarterly data calculations and can also be done based on the selection of the desired periods.
The ranking system and sales product forecast, is expected to help Warung Halal 99 in determining priority products to buy and restock so that no more overwhelming stocks in the warehouse occur which could potentially harm the business.