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.