Development of an ANFIS Model for the Optimization of a Queuing System in Warehouses

Queuing systems (QS) represent everyday life in all business and economic systems. On the one hand, and there is a tendency for their time and cost optimization, but on the other hand, they have not been sufficiently explored. This especially applies to logistics systems, where a large number of transportation and storage units appear. Therefore, the aim of this paper is to develop an ANFIS (Adaptive neuro-fuzzy inference system) model in a warehouse system with two servers for defining QS optimization parameters. The research was conducted in a company for the manufacturing of brown paper located in the territory of Bosnia and Herzegovina, which represents a significant share of the total export production of the country. In this paper, the optimization criterion is the time spent in the system, which is important both from the aspect of all customers of the system, and from that of the owner of the company. The time criterion directly affects the efficiency of the system, but also the overall costs that this system causes. The developed ANFIS model was compared with a mathematical model through a sensitivity analysis. The mathematical model showed outstanding results, which justifies its development and application.


Introduction
In the daily performance of various activities and processes, logistics, as an integral and indispensable part of every business system, plays a very important role.It is necessary to rationalize the activities and processes that can significantly affect a competitive position of a company.A warehouse, as an individual logistics subsystem, together with transportation, represent the biggest causes of logistics costs, and there is a constant search for potential places of savings in these subsystems.Long ago, a warehouse was just a place used to separate surplus products, while its function today is completely different.Compared to the former static function, today's warehouses represent a dynamic system in which the movement of goods is dominant.Therefore, in this paper, the emphasis is on the storage system of Natron-Hayat company, which is one of the largest companies in Bosnia and Herzegovina; this is sufficiently proved by the fact that it is one of the top five exporters of Bosnia and Herzegovina [1].The current storage system of the company is decentralized, whereby each manufacturing facility has its own warehouse.Under such circumstances, there is the accumulation of demands for loading goods into vehicles and queuing, which again causes certain costs.In order to be successful in conditions of great competition, one of the most important segments is to satisfy the needs of customers, which is an integral part of a supply chain.Thus, it is necessary, according to Stević et al. [2], to optimize from the perspective of all participants in the complete supply chain.Today, customers pay more attention to the time they spend queuing; this time affects their decision about whether they will use the service again.This paper considers and analyzes the storage system of Natron-Hayat, a working group-warehouse paper machine (PM4), where arrivals of transportation means, queues, and service time depend on a number of factors.Throughout the research carried out in this paper, data on the arrivals of transportation means, which are registered at the weighing scale for loading in the PM4 warehouse, and the loading time for each vehicle, have been collected.Taking into account the capacities of all manufacturing machines in the company, the calculation of the basic parameters of the queuing system was conducted only for the PM4 warehouse, while the warehouses of the other manufacturing facilities were not taken into consideration at the moment.The PM4 storage system was into consideration, since it is a manufacturing machine with the largest capacity in the company; the company's operations largely depends on its work, as can be seen in more detail in [3].
This paper has several goals.The first is to determine the state of the queuing systems of the company i.e., warehouse paper machine (PM4), which is the object of the research, by observing the system on a monthly basis.The second goal relates to the calculation of the system's indicators by using a mathematical model.The third and most important goal of this research, which also represents a research contribution, is the development of an ANFIS model with three input variables: the inter-arrival time of trucks, the cumulative arrival time, and the service time (transloading-manipulative operations).The developed model provides meaningful information to all participants in the complete queuing system about the time in the system and the possibilities of its deviation, which can play an important role in planning and modeling the most important processes and business activities.
The proposed ANFIS model implies the union of all the advantages that the two artificial intelligence areas possess; the most important is the possibility of adaptation or learning from the example, and an approximate reasoning.Previous works provide an insight into the use of ANFIS in the field of traffic and transport, but in this paper, it is used in combination with the principles of queuing theory.Also, queuing theory is mainly based on analytical optimization models whose resolution can be complex.Numerous studies show the low sensitivity of ANFIS to inaccurate and incomplete input data, and its good ability to model non-linear dependencies, which is a characteristic of queuing systems.
In addition to introductory considerations where the basic reasons for the research are presented, the work is structured in five other sections.The second section provides a review of the literature referring to queuing systems and their optimization in different areas, as well as the application of ANFIS.Also, this section provides a literature review referring to multi-criteria decision-making methods (MCDM).The third section presents the methods in which a complete research algorithm is shown, by recognizing a need to perform it to the final goal.In addition, the basic settings of the QS and ANFIS models have been given.The fourth section provides a case study which consists of data collection and creation, and training of the model.Also, in this section the statistical inference of the distributions of input flow into the system and service time was determined.The fifth section contains the results and discussion.The sixth section provides a sensitivity analysis related to the QS mathematical model.The paper ends with conclusions in which the directions for future research are given.

Literature Review
This section is divided into three parts.The first is related to the application of the queuing systems theory and associated models in traffic and transportation.The second is oriented towards ANFIS models in this specific field, while the third refers to the overview of the application of multi-criteria analysis methods in traffic and transport.

Models of Queuing System Theory in Traffic And Transportation
Queues can occur wherever there is a need for the service of a large number of customers and the number of servers is limited.We encounter such situations in our lives every day, and taking into account that traffic and transportation affect the lives of every individual, queuing systems theory has a significant potential for application in this field.Every day, the number of transportation means is increasing on the streets, while the existing infrastructure, i.e., roads, does not undergo such a rapid expansion; consequently, traffic jams, waiting times on roads, travel time, costs increase, etc.In addition to these negative phenomena, from the ecological aspect, environmental pollution is also increasing.In order to optimize traffic flows, according to Guerrouahane et al. [4] and Raheja [5], exponential distribution of the inter-arrival time/general distribution of the service time/number of servers/system capacity systems are used for modeling.In [6], it is stated that highway flows are modeled as exponential distribution of the inter-arrival time/general distribution of the service time/one server, when there is no congestion, and as general distribution of the inter-arrival time/general distribution of the service time/number of servers in cases of congestion.The study [7] describes several different models for a traffic flow analysis, including exponential distribution of the inter-arrival time/exponential distribution of the service time/one server, in addition to those previously mentioned.Although queuing system theory is mainly used to model traffic flow on highways, intersections in large cities are bottlenecks, and can be modeled as exponential distributions of the inter-arrival time/exponential distribution of the service time/one server systems [8][9][10].No matter which model is used, they all include a certain mathematical apparatus, i.e., mathematical models that are selected based on the system functioning (input flow, service flow).Therefore, not all are equally adequate for a particular system.Another example of applying the queuing system theory in traffic and transportation relates to the routing of transportation means in real-time.According to Chen [11], two strategies are given: FCFS (First Come First Served) and Median Repositioning, where the second one shows better results.The modeling of queues is also applicable to supply chains, where each sub-process is a queuing system.It is particularly important to optimize green supply chains by reducing fuel consumption, transportation time, and waiting time [12,13].Warehouses can also be modeled using queuing theory.Some of the requirements that are imposed on optimization are shorter time of the implementation of operations, work with larger number of units of goods, the provision of the required quality of service, minimum costs.In addition, the application of queuing systems theory can be used to determine the size and capacity of a warehouse, and therefore, the necessary equipment within it [14,15].Since the automation of warehouses is a trend nowadays, the AS/RS system (Automated Storage and Retrieval System) sets complex synchronization requirements that are resolved by queuing theory [16].

ANFIS Models in Traffic And Transportation
Intelligent transportation systems involve the application of various technologies, including artificial neural networks and fuzzy logic, i.e., neuro-fuzzy systems.Some of the basic objectives are to increase passenger safety, optimize routes, optimize the choice of means of transportation, reduce travel time, reduce costs, reduce traffic jams, waiting, etc.Using ANFIS models, a prediction of traffic flows in intelligent transportation systems can be performed.According to Bao-ping and Zeng-Qiang [17], the prediction model consists of 104 parameters that are adjusted during a training process.In order to increase safety, in research [18], ANFIS is used to assess the impact of intelligent transportation system technologies-such as video surveillance and drowsiness warnings-on the number of fatalities due to traffic accidents.Similarly, in [19], critical points on a road in rural areas are identified on the basis of collected data on traffic accidents.Traffic control at intersections with traffic lights can also be carried out using ANFIS models [20,21].This involves reading out external data on the current state of the intersection, and forwarding them to the model that processes them and reacts in accordance with the learned rules [22].From an ecological point of view, it is possible to estimate the noise level, as indicated in [23].Traffic flow density, vehicle speed, and the noise level of horns can be taken as input independent variables.The selection of an optimum transportation route using the ANFIS model, based on the criteria specified by the dispatcher, is considered in [24], while [25] deals with a choice of an optimum mode of transportation.Warehousing is an important part of the entire supply chain.It can be said that the efficiency of a warehouse affects the overall efficiency of the chain, and therefore, requires intelligent optimization solutions.[26] deals with determining the number of forklifts in a warehouse which are required for loading goods using an ANFIS model, based on a given number of pallets and time available.Another example of the implementation of expert knowledge in an ANFIS model for using forklifts is presented in [27].

Methods of Multi-Criteria Decision-Making in Traffic And Transportation
Multi-criteria decision-making can be used as an adequate tool for making valid decisions.In [28], the EMDS (Ecosystem Management Decision Support System) and SADfLOR (Web-Based Forest and Natural Resources Decision Support System) imply the integration of multiple approaches to determine optimal bundles of ecosystem services.In traffic and transport, the role of MCDM (Multi-Criteria Decision Making) is of paramount importance.For the determination of optimal locations, spatial information obtained by the GIS (Geographic Information System) is often used with multi-criteria decision making [29].Karczmarczyk et al. [30] represents the application of the novel method, COMET (Characteristic Objects Method) to determine the best model of the electric car for sustainable city transport with respect to increasing pollution in cities.The same method was used in [31] for the selection of the best scenarios for the transport of dangerous goods.With the aforementioned COMET method, the theory of the fuzzy sets for the modeling of imprecise data is used.The supply chain involves a large number of participants, and with the correct choice of suppliers, at the initial stage, good conditions for optimizing the entire process are created.Stevic et al. [2] developed a new approach: Rough EDAS (Evaluation based on Distance from Average Solution), Rough COPRAS (Complex Proportional Assessment) and Rough MULTIMOORA (Multi-Objective Optimization by Ratio Analysis Plus the Full Multiplicative Form) to solve the problem of correct choice of suppliers.In [32], a model of dynamic or temporal choice of a supplier is proposed using multi-criteria decision making.The observed neuro-fuzzy system, ANFIS, finds its application in the field of decision-making on the basis of several criteria.Khalili-Damghani et al. [33] divides the process of selecting suppliers in two phases, the first of which involves the application of ANFIS to determine the overall usefulness of the supplier based on expert knowledge.According to Torquaybade [34], in the supply chain optimization, ANFIS has the role of assessing the performance of each of the Pull Control Policies based on the input variables.A multi-criteria approach was also applied in [35] for the identification of priority black spots in order to increase the safety in traffic.The applicability in the field of traffic engineering of the MCDM methods is also confirmed in paper [36], where it is used for the evaluation and selection of roundabouts in an urban area.

Methods
The first step of the research is data collection, i.e., the values of selected variables that will be used first for statistical analyses, and then for the creation and training of the model based on fuzzy logic and artificial neural networks.The basic method used for the realization of the research is modeling.In addition, a statistical method is used, as well as theoretical analysis explaining basic concepts and principles of queuing systems and the ANFIS model.Used software packages, such as MATLAB, Minitab, and EasyFit, make the application of these methods much easier.
Figure 1 shows the proposed model in the study.It consists of a total of three phases and 11 steps.The first phase includes four steps: the first relates to the recognition of the need to conduct research that will help both customers (transportation companies) and the company's management increase the efficiency of their business.The second step is the formation of a team and the distribution of tasks, as well as counseling with staff at a tactical level on how to interact with the system, i.e. collect data, which is the third step of this phase.In the final step of the first phase, the sorting of data collected, and their processing, are performed.The second phase consists of three steps.The first two relate to determining the distribution of the input flow and the flow of service, respectively, while the third involves the formation of a mathematical model in the Minitab software for the calculation of the basic parameters of the system.The third phase includes the development of the ANFIS model, discussion of the obtained results, and a comparison with a mathematical model.

Basic Principles of Queuing Systems Theory
Today, queuing theory has a very wide range of applications in many branches of human activity where customers come into a system, by some mathematical distribution, due to a particular service, and in the case of occupied servers, form one or more queues.Upon the completion of service, where its time also corresponds to some distribution, the customer leaves the system.Such examples can be seen daily in traffic, logistics systems, banks, post offices, in telecommunications traffic, at a gas station, etc. Naturally, situations that are more complex are possible when a customer passes throughout a network of interconnected queuing systems.The task of queuing systems theory is to explain and model the behavior of such systems using a mathematical apparatus.In addition to other methods, it is widely applicable to operational research [37].Modeling a queuing system enables the analysis and optimization of its performance.
As the basic features of the queuing systems model, the following can be identified: the input process, service mechanism, and queue discipline [38].According to Maragatha and Srinivasan [39], every model can be described using the following features:

•
The distribution of inter-arrival time; this most often corresponds to a Poisson, exponential or general distribution.Arrivals can be individual or in groups [40].

•
The number of servers can be one or more.

•
The length of queue can be precisely defined or infinite.In case of arrival when the queue capacity is maximally filled, the costumer is denied, which is known as 'balking'.

•
System capacity implies the maximum number of customers in the system, being served or in the queue.System disciplines: • FIFO (First in, First out)-in the order of arrival, • LIFO (Last in, First out)-a customer that comes last will be served first,

•
Random Service-customers are served in random order,

Basic Principles of Queuing Systems Theory
Today, queuing theory has a very wide range of applications in many branches of human activity where customers come into a system, by some mathematical distribution, due to a particular service, and in the case of occupied servers, form one or more queues.Upon the completion of service, where its time also corresponds to some distribution, the customer leaves the system.Such examples can be seen daily in traffic, logistics systems, banks, post offices, in telecommunications traffic, at a gas station, etc. Naturally, situations that are more complex are possible when a customer passes throughout a network of interconnected queuing systems.The task of queuing systems theory is to explain and model the behavior of such systems using a mathematical apparatus.In addition to other methods, it is widely applicable to operational research [37].Modeling a queuing system enables the analysis and optimization of its performance.
As the basic features of the queuing systems model, the following can be identified: the input process, service mechanism, and queue discipline [38].According to Maragatha and Srinivasan [39], every model can be described using the following features:

•
The distribution of inter-arrival time; this most often corresponds to a Poisson, exponential or general distribution.Arrivals can be individual or in groups [40].

•
The number of servers can be one or more.

•
The length of queue can be precisely defined or infinite.In case of arrival when the queue capacity is maximally filled, the costumer is denied, which is known as 'balking'.

•
System capacity implies the maximum number of customers in the system, being served or in the queue.
System disciplines: • FIFO (First in, First out)-in the order of arrival, • LIFO (Last in, First out)-a customer that comes last will be served first,

•
Random Service-customers are served in random order,

•
Round Robin-a customer gets a time slot within which he/she will be served.If the service is not completed, the customer returns to the beginning of the queue,

•
Priority Disciplines-the order of customer service is determined according to the priority that each one receives [37].
The Kendall notation uses these six features to describe the queuing system: D-queuing discipline [40].Unless stated, it is assumed that it is the FIFO [41].
The most common and simplest queuing systems are of M/M/m type.

Adaptive Neuro-Fuzzy Inference Model
Unlike biological neural networks, artificial neural networks represent an attempt to model the human brain through modern computing.They consist of a number of process elements, or artificial neurons, which are analogous to the brain, in which the basic elements are nerve cells.Artificial neurons, as well as nerve cells, are characterized by parallel work in the processing of various types of information [42].Their basic feature is the ability to learn, which means that it is necessary to first train the network to efficiently perform tasks such as recognizing shapes, images, speech, function approximation, prediction, optimization, data clustering, processing inaccurate and incomplete data, etc. Accordingly, the basic task of an artificial neural network is to combine different inputs, and to process and forward signals to one or more outputs.There are various types of artificial neural networks depending on the number of neurons, i.e., layers, network training methods, the way to transmit signals throughout the network, etc.
Fuzzy technologies allow the computer to work with uncertainties, thereby achieving a similarity with the human way of thinking.Fuzzy logic is an extension of classical logic in which variables can have only two values: correct (1) and incorrect (0).In this way, variables can occupy any real value between 0 and 1. Fuzzy sets are basic elements for presenting and processing unclear things and uncertainties in fuzzy logic, and they are mathematically presented by membership functions.The inference system in fuzzy logic implies defined membership functions of individual variables and inference rules, which connect input variables with an inference; they are called IF-THEN rules.
The systems that integrate the principles of artificial neural networks and fuzzy logic are called neuro-fuzzy systems.They use a learning ability of artificial neural networks based on training data in order to adapt the forms of membership fuzzy functions and inference fuzzy rules.In this way, in one system, the advantages of logical inference and learning are combined.One of the most commonly used neuro-fuzzy systems is ANFIS (Adaptive Neuro-Fuzzy Inference System).ANFIS is a multilayer neural network that, based on data (input-output vector) for training, provides a certain value of an output variable for certain inputs.An important feature is that ANFIS can effectively model nonlinear connections of inputs and outputs [43].ANFIS training is based on the application of an algorithm of error propagation backward, either alone or in combination with the method of least squared error, i.e., hybrid algorithm [44].ANFIS uses the Takagi-Sugeno method of inference, and a typical fuzzy rule, assuming two inputs (x and y) and a logical AND operation, can be written as follows: IF x is A AND y is B, THEN z = f(x,y) A and B denote fuzzy sets of input variables x and y, while z is an output function.
The ANFIS structure consists of five layers, as shown in Figure 2. The nodes of the first layer define fuzzy sets, i.e., membership fuzzy functions corresponding to input variables.This layer is often called a fuzzification layer, because it determines the membership degree of the value of a variable to a particular fuzzy set [45].The nodes of this layer are adaptive, which means that their parameters are adjusted during a training period [44].The first-layer nodes that represent the membership functions of the input variable X can be defined as µ A j (x), where j (j = 1 ,..., 2) denotes the number of membership functions [46].
(operation AND).The ith neuron has the output of the form:   =    () ×    ().The output of the second layer is equal to the minimum value of the two inputs [47].
The third layer normalizes the values obtained at the output of the nodes of the second hidden layer.In the case shown in Figure 2, with two nodes in the second layer, the normalized value at the output of the ith node of the third hidden layer has the following mathematical form: (1) Each node of the fourth layer is an adaptive node with the function it completes, which can be written as follows [48]: (2) where pi, qi and ri are inference parameters.The fifth layer calculates the output as a sum of all input signals: . ( The set of fuzzy inference rules that apply to the structure given in Figure 2 consists of two rules: The ANFIS structure with two inputs. The second-layer nodes are fixed and perform an operation of multiplying the input signals (operation AND).The ith neuron has the output of the form: The output of the second layer is equal to the minimum value of the two inputs [47].
The third layer normalizes the values obtained at the output of the nodes of the second hidden layer.In the case shown in Figure 2, with two nodes in the second layer, the normalized value at the output of the ith node of the third hidden layer has the following mathematical form: Each node of the fourth layer is an adaptive node with the function it completes, which can be written as follows [48]: where p i , q i and r i are inference parameters.The fifth layer calculates the output as a sum of all input signals: The set of fuzzy inference rules that apply to the structure given in Figure 2 consists of two rules: ANFIS is most often trained with a hybrid algorithm.It requires two passes through the network in each epoch.In the forward pass, a method of least squares is used to modify the parameters of the linear functions of rule inferences (layer 4) [34].When going backward, the parameters of fuzzy membership functions of input variables (layer 1) are modified by the algorithm of error back-propagation.

Case Study
Figure 3 shows the basic processes of the QS at Natron-Hayat for the PM4 storage system.The road freight transportation means of different companies represent customers of the system.They enter the system with a certain intensity.Upon entering the company's property, they form a queue depending on the current service intensity.There are a total of two transloading fronts (servers) where forklifts are engaged in the loading of goods.The queue formed and servers represent the service system, while loaded vehicles are serviced customers.ANFIS is most often trained with a hybrid algorithm.It requires two passes through the network in each epoch.In the forward pass, a method of least squares is used to modify the parameters of the linear functions of rule inferences (layer 4) [34].When going backward, the parameters of fuzzy membership functions of input variables (layer 1) are modified by the algorithm of error backpropagation.

Case Study
Figure 3 shows the basic processes of the QS at Natron-Hayat for the PM4 storage system.The road freight transportation means of different companies represent customers of the system.They enter the system with a certain intensity.Upon entering the company's property, they form a queue depending on the current service intensity.There are a total of two transloading fronts (servers) where forklifts are engaged in the loading of goods.The queue formed and servers represent the service system, while loaded vehicles are serviced customers.

Data Collection
In order to model the queuing system of the PM4 working group of Natron-Hayat, it was necessary to collect data on the basic features of the system.The values of the following variables were monitored: The first three listed variables represent the input variables of the ANFIS model that predicts the time spent in the system.Therefore, it is clear that time represents the output variable, taking into account the well-known fact that the time in queuing systems is one of the most important criteria for optimizing and modeling them.
The data collection period lasted 11 working days in two shifts of 8 h, based on which a monthly report was received for 22 working days, which means a total of 352 h.A total of 237 trucks entered

Data Collection
In order to model the queuing system of the PM4 working group of Natron-Hayat, it was necessary to collect data on the basic features of the system.The values of the following variables were monitored: The first three listed variables represent the input variables of the ANFIS model that predicts the time spent in the system.Therefore, it is clear that time represents the output variable, taking into account the well-known fact that the time in queuing systems is one of the most important criteria for optimizing and modeling them.
The data collection period lasted 11 working days in two shifts of 8 h, based on which a monthly report was received for 22 working days, which means a total of 352 h.A total of 237 trucks entered the system.Out of the total set of data, the values of the seventh day of monitoring are excluded, after 2 p.m. to the end of working hours.The reason is the emergence of unusual and extremely high values of time spent in the system during the arrival of trucks at the end of the first and the beginning of the second shift.Such values adversely affect the performance of the ANFIS model.Figure 4 graphically shows the time spent in the system and the cumulative arrival time for each truck, as well as the given deviations occurring from the arrivals of the 65th to the 76th truck.
Information 2018, 9, x FOR PEER REVIEW 9 of 21 the system.Out of the total set of data, the values of the seventh day of monitoring are excluded, after 2 p.m. to the end of working hours.The reason is the emergence of unusual and extremely high values of time spent in the system during the arrival of trucks at the end of the first and the beginning of the second shift.Such values adversely affect the performance of the ANFIS model.Figure 4 graphically shows the time spent in the system and the cumulative arrival time for each truck, as well as the given deviations occurring from the arrivals of the 65th to the 76th truck.In addition to the extreme deviations, the values of variables for the 122nd truck that entered the system due to the extreme value of the service time of 240 min were neglected.The time of its arrival in the system is in the 8th hour on the last day of data collection, so that period was also omitted.The final set of data, which is statistically analyzed and used to create the ANFIS model, is reduced to the time of 352 h, during which 224 trucks entered the system.
The examination of the input flow, i.e. the arrivals of trucks in the system, is essential for determining the distribution of the probabilities of inter-arrival time and the distribution of probabilities of the arrival of certain number of trucks at a given interval.Table 1 gives frequencies related to the number of trucks that arrived in a period of one hour.The biggest frequency is 214, when no truck entered the system during one hour.For a larger number of trucks that arrived in one hour, frequencies of hours were reduced, so in the end, the largest number of trucks that arrived during one hour was five, and with a frequency of two.Based on Table 1, a statistical procedure is used to determine the distribution of the input flow.The EasyFit software provides graphical and tabular results for the procedure to determine the best fitting of data with a particular distribution.Figure 5   In addition to the extreme deviations, the values of variables for the 122nd truck that entered the system due to the extreme value of the service time of 240 min were neglected.The time of its arrival in the system is in the 8th hour on the last day of data collection, so that period was also omitted.The final set of data, which is statistically analyzed and used to create the ANFIS model, is reduced to the time of 352 h, during which 224 trucks entered the system.
The examination of the input flow, i.e. the arrivals of trucks in the system, is essential for determining the distribution of the probabilities of inter-arrival time and the distribution of probabilities of the arrival of certain number of trucks at a given interval.Table 1 gives frequencies related to the number of trucks that arrived in a period of one hour.The biggest frequency is 214, when no truck entered the system during one hour.For a larger number of trucks that arrived in one hour, frequencies of hours were reduced, so in the end, the largest number of trucks that arrived during one hour was five, and with a frequency of two.
Based on Table 1, a statistical procedure is used to determine the distribution of the input flow.The EasyFit software provides graphical and tabular results for the procedure to determine the best fitting of data with a particular distribution.Figure 5 shows the Poisson distribution that best fits the input flow.The distribution parameter is λ = 0.6747, which represents the arrival intensity of the number of trucks within one hour.input flow.The distribution parameter is λ = 0.6747, which represents the arrival intensity of the number of trucks within one hour.Table 2 gives an overview of the completed statistics of the Anderson Darling (AD) test for determining data fitting to a particular distribution.The Poisson distribution is ranked as the best in the Anderson Darling test with the statistic of 88.26.A total of 8 distributions are given, but it is possible to determine the fitting only for Poisson, Geometric, and D. Uniform.In order to determine the distribution of service time, it is necessary to divide the data into classes.Taking into account that the maximum value of service time is 95 min, and the minimum is 15 min, a division into 8 classes per 11 min of duration is performed.Table 3 shows the number of trucks that is served within a certain interval (class).The largest number of trucks is served within the class with the limits between 26 and 36 min, while no truck is served from 70 to 80 min.Table 2 gives an overview of the completed statistics of the Anderson Darling (AD) test for determining data fitting to a particular distribution.The Poisson distribution is ranked as the best in the Anderson Darling test with the statistic of 88.26.A total of 8 distributions are given, but it is possible to determine the fitting for Poisson, Geometric, and D. Uniform.In order to determine the distribution of service time, it is necessary to divide the data into classes.Taking into account that the maximum value of service time is 95 min, and the minimum is 15 min, a division into 8 classes per 11 min of duration is performed.Table 3 shows the number of trucks that is served within a certain interval (class).The largest number of trucks is served within the class with the limits between 26 and 36 min, while no truck is served from 70 to 80 min.Figure 6 shows the Levy distribution curve that best fits the service time frequencies presented in Table 3.The probability density function of the shown distribution can be expressed as follows: where the parameters, in this specific case, are σ = 32.634 and γ = 0.The average service time is 38.62 min, which means that the service intensity is µ = Figure 6 shows the Levy distribution curve that best fits the service time frequencies presented in Table 3.The probability density function of the shown distribution can be expressed as follows: (4) where the parameters, in this specific case, are and .The average service time is 38.62 min, which means that the service intensity is trucks/hour.Table 4 presents the values of ranges and the statistics of the Anderson Darling test for testing the fitting of service times to certain distributions.Results are given for 8 distributions, and Levy is ranked as first, with a statistic of 1.5611.Table 4 presents the values of ranges and the statistics of the Anderson Darling test for testing the fitting of service times to certain distributions.Results are given for 8 distributions, and Levy is ranked as first, with a statistic of 1.5611.As mentioned, we used the software Easyfit to obtain the statistical distributions.This software supports Kolmogorov-Smirnov (KS) and AD tests.We used the AD test, because it is better, and according to Engmann and Cousineau [49], it has two extra advantages over the KS test.First, it is especially sensitive to differences at the tails of distributions.Second, there is evidence that the AD test is more capable of detecting very small differences, even between large sample sizes.This is one of its main advantages in the field of engineering.Also, the KS test is less able to detect changes in asymmetry, requiring almost twice as many data compared to the AD test.Finally, this test, according to Stephens [50], is a good all-purpose test.The AD test is also used in [51,52].

Creation and Training of the Model
Creation, training and testing of the ANFIS model is performed in the MATLAB software package, which, thanks to the graphical user interface of the ANFIS editor, allows easy manipulation of the model's parameters and variables.As a result, a large number of graphic displays of parameters and performance are obtained.
The total set of data on the inter-arrival time, cumulative arrival time, service time, and the time spent in the system for each truck that enters the system, is divided into three parts:

•
Training data, consisting of 73.21% or 164 input-output vectors, providing the so-called "Learning with a teacher", where the outputs from the network are known in advance for appropriate inputs.

•
Checking data, which is primarily aimed at preventing the occurrence of training data overfitting.The ANFIS model monitors the value of the checking error in each training epoch and retains learned parameters at its minimum value.Checking data consists of 13.39% or 30 input-output vectors.

•
Testing data enables us to perform an evaluation of the abilities of the ANFIS model to perform a prediction of the time spent in the system as accurately as possible.The outputs of the ANFIS model are compared with known values, and the goal is to select a model that makes a minimum error.As well as checking data, testing data consists of 13.39% of the total set of data.
The process, from creation to model testing, can be summarized by the algorithmic steps given in Figure 7.
Fatigue Life (3P) 4.4674 8 As mentioned, we used the software Easyfit to obtain the statistical distributions.This software supports Kolmogorov-Smirnov (KS) and AD tests.We used the AD test, because it is better, and according to Engmann and Cousineau [49], it has two extra advantages over the KS test.First, it is especially sensitive to differences at the tails of distributions.Second, there is evidence that the AD test is more capable of detecting very small differences, even between large sample sizes.This is one of its main advantages in the field of engineering.Also, the KS test is less able to detect changes in asymmetry, requiring almost twice as many data compared to the AD test.Finally, this test, according to Stephens [50], is a good all-purpose test.The AD test is also used in [51,52].

Creation and Training of the Model
Creation, training and testing of the ANFIS model is performed in the MATLAB software package, which, thanks to the graphical user interface of the ANFIS editor, allows easy manipulation of the model's parameters and variables.As a result, a large number of graphic displays of parameters and performance are obtained.
The total set of data on the inter-arrival time, cumulative arrival time, service time, and the time spent in the system for each truck that enters the system, is divided into three parts:

•
Training data, consisting of 73.21% or 164 input-output vectors, providing the so-called "Learning with a teacher", where the outputs from the network are known in advance for appropriate inputs.

•
Checking data, which is primarily aimed at preventing the occurrence of training data overfitting.The ANFIS model monitors the value of the checking error in each training epoch and retains learned parameters at its minimum value.Checking data consists of 13.39% or 30 input-output vectors.

•
Testing data enables us to perform an evaluation of the abilities of the ANFIS model to perform a prediction of the time spent in the system as accurately as possible.The outputs of the ANFIS model are compared with known values, and the goal is to select a model that makes a minimum error.As well as checking data, testing data consists of 13.39% of the total set of data.
The process, from creation to model testing, can be summarized by the algorithmic steps given in Figure 7.

Results and discussion
The ANFIS model performance is estimated based on an average testing error, which in fact is an average square error-RMSE (Root Mean Square Error), and is calculated as: Information 2018, 9, 240 13 of 20 where N is a number of testing vectors, n(k) is expected (measured) value, and n(k) is the value obtained by the model.Table 5 gives an overview of RMSE values depending on the shape and number of fuzzy membership functions for each of the three input variables for the constant shape of the output function.The values of the average testing error for different ANFIS models in the case of a linear shape of the output function are given in Table 6.The model training was carried out in 1000 epochs.With a larger number of membership functions, the average testing error increases, so that a maximum of three are considered here.Table 5 gives an overview of RMSE values depending on the shape and number of the membership fuzzy functions for each of the three input variables for the constant shape of the output function.By comparing the values in Tables 5 and 6, it is concluded that the linear output model gives drastically higher error values than the constant output shape.The least average testing error from Table 6 is 25.42 min, and from Table 5, 13.67 min.Therefore, a model with a lower error is selected from Table 5, which has two fuzzy membership functions for each input variable.The functions are in the shape of dsig, and represent the difference of two sigmoid functions, which can be written as follows: Since it relates to the difference, the dsig function has four parameters: a 1 , a 2 , c 1 , and c 2 .The values of the prediction of time spent in the system, based on the input values of checking data of the selected model, are given in Table 7. (6) Since it relates to the difference, the dsig function has four parameters: 1, 2, c1, and c2. Figure 8 shows the certain membership functions for the first input variable-inter-arrival time.The learned parameters of the first function marked by red color in Figure 8   The values of the prediction of time spent in the system, based on the input values of checking data of the selected model, are given in Table 7.In addition to the tabular overview, the accuracy of the prediction can also be shown graphically, as in Figure 9. Red asterisks denote the outputs of the ANFIS model, while blue points denote measured checking data.The RMSE for such a set of data is 22.06.Although while testing the model it showed the least error of 13.67 over the testing data, the set of checking data is different from it, and that is the reason why, in this case, the RMSE has the given value.
In addition to the tabular overview, the accuracy of the prediction can also be shown graphically, as in Figure 9. Red asterisks denote the outputs of the ANFIS model, while blue points denote measured checking data.The RMSE for such a set of data is 22.06.Although while testing the model it showed the least error of 13.67 over the testing data, the set of checking data is different from it, and that is the reason why, in this case, the RMSE has the given value.The structure of the selected model is shown in Figure 10, where the number of nodes in each layer of the neural network can be seen.It is obvious that in all fuzzy inference rules, of which there are 8 (the number of nodes in the third layer), the logical operator (AND) figures.The structure of the selected model is shown in Figure 10, where the number of nodes in each layer of the neural network can be seen.It is obvious that in all fuzzy inference rules, of which there are 8 (the number of nodes in the third layer), the logical operator (AND) figures.
In addition to the tabular overview, the accuracy of the prediction can also be shown graphically, as in Figure 9. Red asterisks denote the outputs of the ANFIS model, while blue points denote measured checking data.The RMSE for such a set of data is 22.06.Although while testing the model it showed the least error of 13.67 over the testing data, the set of checking data is different from it, and that is the reason why, in this case, the RMSE has the given value.The structure of the selected model is shown in Figure 10, where the number of nodes in each layer of the neural network can be seen.It is obvious that in all fuzzy inference rules, of which there are 8 (the number of nodes in the third layer), the logical operator (AND) figures.Figure 11 shows the surface of dependence, i.e. a portable function of the selected model.Taking into account that there are three input variables, the dependence of the output from the input is given for all three combinations.It is evident that the time spent in the system has a greater value in reducing inter-arrival times and the cumulative arrival time of trucks.Regarding the influence of the service time on the observed output, it is concluded that the time spent in the system increases with the increase of the specified variable and the decrease in inter-arrival times.An increase in the value of the output variable is also caused by an increase in the service time and simultaneous reduction in the cumulative arrival time.
for all three combinations.It is evident that the time spent in the system has a greater value in reducing inter-arrival times and the cumulative arrival time of trucks.Regarding the influence of the service time on the observed output, it is concluded that the time spent in the system increases with the increase of the specified variable and the decrease in inter-arrival times.An increase in the value of the output variable is also caused by an increase in the service time and simultaneous reduction in the cumulative arrival time.

Sensitivity Analysis
In order to validate the developed ANFIS model, it was compared with a mathematical model developed by regression analysis of training data.A polynomial mathematical model with the highest correlation index R 2 = 15.58 was selected.The model is of the second degree and has the following form: = 61.52 − 0.094    + 0.683   − 7.834 * 10 −5   2 Table 8 gives an overview of the measured values of the time spent in the system and predicted values determined by the mathematical model and ANFIS for the same input data set.The RMSE value, in the case of the mathematical model, is 22.96, which means that the ANFIS model shows better performance.

Sensitivity Analysis
In order to validate the developed ANFIS model, it was compared with a mathematical model developed by regression analysis of training data.A polynomial mathematical model with the highest correlation index R 2 = 15.58 was selected.The model is of the second degree and has the following form: Table 8 gives an overview of the measured values of the time spent in the system and predicted values determined by the mathematical model and ANFIS for the same input data set.The RMSE value, in the case of the mathematical model, is 22.96, which means that the ANFIS model shows better performance.
Figure 12 gives a graphic display of the values shown in Table 8.The red squares represent the real or measured values of the time spent in the system.Blue rhombuses represent the predicted values obtained by the mathematical model of second degree, which is given by the expression (7).Predicted values obtained by the ANFIS model are marked with green triangles.The figure provides a visual performance analysis of the two models compared to the real values of the time spent in the system.

Conclusion
In this paper, a study on the modeling of a queuing system in a logistics company for the manufacturing of brown paper was conducted.An ANFIS model for modeling a time component of the system was developed as a criterion for optimization.The contributions of this research can be described in the following ways.The proposed neuro-fuzzy model extends the theoretical framework of knowledge in the field of QS.The QS problem is considered by a new methodology, and thus, a

Conclusion
In this paper, a study on the modeling of a queuing system in a logistics company for the manufacturing of brown paper was conducted.An ANFIS model for modeling a time component of the system was developed as a criterion for optimization.The contributions of this research can be described in the following ways.The proposed neuro-fuzzy model extends the theoretical framework of knowledge in the field of QS.The QS problem is considered by a new methodology, and thus, a basis for further theoretical and practical upgrading is formed.In addition, the presented model emphasizes the unique practical parameters (the inter-arrival time of trucks, the cumulative time of arrival since an initial time, the service time), which, in former MSS models, have not been considered as unified, despite being of importance for this logistics company and its customers.
The proposed neuro-fuzzy model has four main advantages over other methods.First, in comparison with classical QS, it has an adaptability feature, which is reflected in its ability to adjust a fuzzy rule base.Fuzzy rules are very important for managing queuing systems, especially for a descriptive approach that prefers intuitive, heuristic searches of solutions in a queuing system process.This flexibility allows us to overcome the limitations of conventional QS models that perform a prediction of the flow throughout statistical consideration of parameters without intuitiveness.Second, the neuro-fuzzy model is effective under conditions of uncertainty, and can provide support to decision-makers when there is uncertainty in logistics processes.Third, it can be implemented as a computer system that supports a dynamic decision-making process in the QS.And fourth, the proposed model allows relatively fast and objective estimates to be made of serving the vehicles in a transportation company, under conditions of a changing environment.The continuation of this research may also include the optimization of other, smaller queuing systems for the decentralized storage system of this company.

Figure 1 .
Figure 1.Diagram of the research flow.

Figure 2 .
Figure 2. The ANFIS structure with two inputs.

Figure 3 .
Figure 3.The basic process of the queuing system for the PM4 warehouse4.1.Data collection.

•
the inter-arrival time of trucks, • the cumulative arrival time since an initial time (for each day), • the service time (transloading-manipulative operations) and • the time in the system.

Figure 3 .
Figure 3.The basic process of the queuing system for the PM4 warehouse4.1.Data collection.

•
the inter-arrival time of trucks, • the cumulative arrival time since an initial time (for each day), • the service time (transloading-manipulative operations) and • the time in the system.

Figure 4 .
Figure 4. Time in the system and cumulative arrival time for 237 trucks.

Figure 4 .
Figure 4. Time in the system and cumulative arrival time for 237 trucks.

Figure 5 .
Figure 5. Poisson distribution of the input flow.

Figure 5 .
Figure 5. Poisson distribution of the input flow.

Figure 6 .
Figure 6.Distribution of the service time.

Figure 6 .
Figure 6.Distribution of the service time.

Figure 7 .
Figure 7. Steps of the process from creation to testing of the ANFIS model.Figure 7. Steps of the process from creation to testing of the ANFIS model.

Figure 7 .
Figure 7. Steps of the process from creation to testing of the ANFIS model.Figure 7. Steps of the process from creation to testing of the ANFIS model.
Figure 8 shows the certain membership functions for the first input variable-inter-arrival time.The learned parameters of the first function marked by red color in Figure 8 are 0.0578, −172, 0.0572, 174.

Figure 8 .
Figure 8. Fuzzy functions of membership for the input variable of inter-arrival time.

Figure 8 .
Figure 8. Fuzzy functions of membership for the input variable of inter-arrival time.

Figure 9 .
Figure 9. Deviations of the ANFIS model output from the measured testing data.

Figure 9 .
Figure 9. Deviations of the ANFIS model output from the measured testing data.

Figure 9 .
Figure 9. Deviations of the ANFIS model output from the measured testing data.

Figure 10 .
Figure 10.The structure of the selected ANFIS model.

Figure 11 .
Figure 11.The surface of the dependence of the time spent in the system from: (a) inter-arrival time and arrival time; (b) inter-arrival time and service time; (c) arrival time and service time.

Figure 11 .
Figure 11.The surface of the dependence of the time spent in the system from: (a) inter-arrival time and arrival time; (b) inter-arrival time and service time; (c) arrival time and service time.

Figure 12 .
Figure 12.Values obtained by the mathematical and ANFIS model and the actual measured ones.

Figure 12 .
Figure 12.Values obtained by the mathematical and ANFIS model and the actual measured ones.

Table 1 .
Frequencies of the input flow for a period of one hour.
shows the Poisson distribution that best fits the

Table 1 .
Frequencies of the input flow for a period of one hour.

Table 2 .
The results of statistical tests for determining the fitting of the input flow to a certain distribution.

Table 3 .
Frequencies of the service time.

Table 2 .
The results of statistical tests for determining the fitting of the input flow to a certain distribution.

Table 3 .
Frequencies of the service time.

Table 4 .
Results of statistical tests for determining the fitting of service times to a certain distribution.

Table 4 .
Results of statistical tests for determining the fitting of service times to a certain distribution.

Table 5 .
The values of average testing errors of different ANFIS models with constant output.

Table 6 .
The values of average testing errors of different ANFIS models with linear output.

Table 7 .
The values of the prediction of the time spent in the system and checking data.

Table 7 .
The values of the prediction of the time spent in the system and checking data.

Table 8 .
Measured values of time in the system and predicted values determined by the mathematical and ANFIS model.