Design of a Computer-Aided Location Expert System Based on a Mathematical Approach

: This article discusses how to calculate the location of a point on a surface using a mathematical approach on two levels. The ﬁrst level uses the traditional calculation procedure via Cooper’s iterative method through a spreadsheet editor and a classic result display map. The second level uses the author-created computer-aided location expert system on the principle of calculation using Cooper’s iterative method with the direct graphical display of results. The problem is related to designing a practical computer location expert system, which is based on a new idea of using the resolution of a computer map as an image to calculate location. The calculated results are validated by comparing them with each other, and the deﬁned accuracy for a particular example was achieved at the 32nd iteration with the position optima DC[ x (32) ; y (32) ] = [288.8;82.7], with identical results. The location solution in the case study to the deﬁned accuracy was achieved at the 6th iteration with the position optima DC[ x ( 6 ); y ( 6 )] = [274;220]. The calculations show that the expert system created achieves the required parameters and is a handy tool for determining the location of a point on a surface.


Introduction
Finding savings and reducing costs in various areas is an important aspect that can provide companies and businesses with a permanent presence in the market and a competitive advantage. Savings related to the efficient location of warehouses, businesses, operations, etc., can significantly reduce the overall cost of operating the system. For this reason, the solution of the location problem and the creation of an expert system is highly topical and very important, giving the possibility of solving the location to ordinary users without the need for highly specialised knowledge.
Location is of strategic and economic importance. Therefore, a decision about where to build a distribution or supply warehouse, logistics centre, or production plant is crucial and strategic. Decisions on this matter are strategic, long-term and fundamentally affect the distribution site's functioning and economics. Unnecessarily extended distribution routes require more time, more fuel, more servicing and more costs. Incorrect decisions lead to increased costs based on the particular implementation of distribution [1].
As part of this paper, we look at the computer-aided location (CAL) system design, which uses a traditional approach to the location using Cooper's iterative method. The problem is related to creating an effective computer location expert system built on a new idea of using computer map resolution for location calculation purposes. The results obtained through the calculation of the created expert system are compared with those calculated following the conventional procedure. This research and the paper in question highlight the possibilities available for solving the problem of location using mathematics and computing.
If we establish a business, or if we want to extend the operations of an existing firm into other regions or increase the effectiveness of existing shops, it is important to make the and, when necessary, consider inter-connections among the criteria. Solving the problem of location using multicriteria decision-making is also an important area both in science and in practice [17][18][19][20][21][22][23]. According to Chou et al. [24], the location decision has drawn increasing attention from academic and business communities in the past two decades. It has been well recognised that the selection of a facility's location has critical strategic implications because a location decision will typically involve a long-term commitment of resources.
Another approach that can be used in solving the location, and which is also used for creating an expert location system, is the mathematical/geometric approach. The historical development of the perception of location shows the overall importance of location solutions for companies, enterprises and society in the past and today. The importance of solving the problem of location with the occurrence of new local or global crises is significantly increasing. Thus, it is crucial to create an expert system that helps determine the location under freely definable conditions and constraints.

Literature Review
Researchers have been dealing with defining a universal procedure for determining the optimal location for a long time. This issue has had and will continue to play an important role in science, research and practice. Since there are a number of different factors that affect the solution of the optimum location, the solution procedure may be different. The reasons have always been the same: minimising the required costs while maximising the activity's efficiency. We have stated the points of view of various authors on location earlier. In the following sections, we will focus on analysing the works of authors who deal with the solution of the location from a practical point of view.
Production companies on the market are forced to optimise their production processes and increase their productivity. One of the factors influencing the services associated with ensuring efficient production, according to many authors, is the location of maintenance [25][26][27][28]. According to Malec et al. [29], the proper location of facilities for maintenance activities is of critical importance for uninterrupted operation.
The correct location of warehouses, the number of different warehouses located within the company and chain (input warehouses, warehouses for material and raw materials, warehouses for work in progress, warehouses for finished products, shipping warehouses), and the quantity of raw materials and various products stored in them are all significant from the functional point of view of the activities of manufacturing companies [30][31][32][33]. According to Ehsanifar et al. [34], to effectively manage large industrial companies, decision-making regarding the location of distribution warehouses is significant. Locating distribution warehouses is a multicriteria problem in which several quantitative and qualitative criteria influence the decision-making process.
Another critical question is manufacturing location, which plays an important role in production resources and supply chain management. The solution of such location problems must consider both the needs and requirements of suppliers and the needs and requirements of production itself, as well as the needs and requirements of customers [35][36][37][38]. According to Theyel and Hofmann [39], the manufacturing location is operationally and strategically crucial for multinational companies. The spatial dispersion of manufacturing is determined by firm-specific and external factors, both of which are subject to constant change.
The mathematical procedure for calculating the coordinates of the optimal location of the position of a warehouse, for production, a company, a machine or a facility, requires some knowledge of the issue. With multiple elements entering the calculation, it is virtually impossible to solve it without some computing. One option for efficient computation is to use a spreadsheet editor. This method requires theoretical knowledge of the location solution procedure and practical experience working with a spreadsheet editor. The second way is to create a location program as an expert system. For the system user, this is the easiest way to solve the location of objects without theoretical knowledge. According to Todorov and Stoinov [40], expert systems are among the leading research domains of artificial intelligence. They are applications developed to solve complex problems in a particular area, at the level of extraordinary human intelligence and expertise.
From the perspective of the creator of an expert system, it is necessary to have both pieces of knowledge, of the location and the calculation procedure, and to understand some programming language in which such a system could be created. The issue of expert systems is not new. However, it is developing in different directions and very quickly. At present, we encounter expert systems at virtually every step. What are expert systems anyway?
Simply put, expert systems are algorithms or procedures that provide solutions at the level of a human expert. Expert systems are oriented towards different areas. They can be problem-oriented, problem-independent, programmatically open, or programmatically closed [41][42][43][44][45][46][47][48]. According to Shokouhyar et al. [49], the primary goal of expert systems is to implement the knowledge acquisition process by converting knowledge to wisdom.
In terms of their structure, expert systems consist of a knowledge base, a database, a communication interface, user support and an inference mechanism. Each of the defined parts of expert systems has its structure. Hsu et al. [50] use heuristic rules as a basis for their proposed expert system. The authors state that the expert system can identify the location of a fault very efficiently. Therefore, it can serve as a valuable tool to help distribution system dispatchers determine the areas of defects. According to Kim et al. [51], heuristics is the core of an expert system for designing distribution systems. The authors Tang, Shi and Wang use the Bayesian network technique [52] as their basis of knowledge for creating the expert system. Other authors Bachár and Makyšová [53] use the Expert Choice Program, an expert system, to solve a multicriteria evaluation task using their database. Warszawski and Peled [54] point to the possibilities of designing an expert system for the planning and implementation of construction projects.
The creation, development and design of various systems, expert systems and programs that solve defined problems requires their verification on practical tasks. Many authors in their articles prove their theoretical statements and laboratory research results on specific application tasks [11,[55][56][57][58][59]. According to Alizadeh et al. [60], the experimental results reveal some practical insights confirming the importance of response decisions in an uncertain environment. Additionally, within the given article, the research results are verified by application to a case study.
Finding out whether the defined assumptions, experiences, and solutions from research and development, which are implemented in the created expert system, are functional and reliable, is justified as the main goal when creating a trustworthy system. Many developed systems are narrowly specialised and applicable only for a given area, or just in individual cases [61][62][63][64][65]. Verifying the correctness of these systems is all the more complicated. In general, the practical use of created expert systems in solving specific tasks allows creators to identify errors and shortcomings and realise their elimination or correction. Some errors may occur only after solving many tasks, depending on the parameters of the investigated systems. It follows that the use (that is, the testing and demonstration of problem-solving in practice) has its important place in the creation and development of systems for practical and educational purposes [66][67][68][69][70].
From the literature analysis in question, it can be stated that the question of location and creating expert systems to solve it are justified and important.

Materials and Methods
The issue of mathematical procedures for calculating optimal location has been evolving for several decades. One of the first scientific, mathematical approaches to solving a location was created by Cooper [71]. The approach of creating expert systems for solving location issues based on mathematical methodology is young. The main developments was recorded mainly in the period from the beginning of the 21st century. Our mathematical model for solving optimal location uses criteria such as the quantity of transported material, Mathematics 2021, 9, 1052 5 of 25 the price per unit of transported quantity of material, and the distance between two points as a solution of a right-angled triangle.
Mathematical methods aim to calculate the optimal location within the region for operations management, a distribution centre or a warehouse. The costs of a connection between the calculated centre and existing sites are as low as possible. The basis of the technique is to minimise the chosen cost criterion, which is most commonly used for assessment.

Problem Description
This paper deals with the optimal position of a point on a surface using a mathematical approach, which is used for the design of an expert location system. In general, the problem can be characterised as finding the point of optimality in an area that is represented by a specific map of the distribution region with its suppliers and customers. Within a particular region, it is necessary to define a point for the solution of efficient supply and distribution. When the supply and distribution are realised, the costs are the lowest. We assume that supply and distribution are realised under the same conditions and with statistically defined quantities of transported goods at their unit prices. The aim is to determine the optimal location of the point for the implementation of supply and distribution. In general terms, the problem is characterised in Figure 1.

Mathematical Formulation
The solution makes the following assumptions: each point entering the calculation has fixed distribution costs, which are formed by the product of the transported quantity of material and the unit price for the transport of the material; -there is one common distribution centre for each point; -the distribution centre is responsible for carrying out supply and distribution; -the optimisation function depends on the transported quantity of material, the unit price per material, the distance between the point of receipt of the material and the point of dispatch.
The model sets, parameters, decision variables, and intermediate variables used throughout the paper are listed as follows: Indices: I: Index for customers, i = 1, 2, 3, . . . I P: Index for iterations, potential distribution centre locations, p = 1, 2, 3, . . . P Parameters: M i : Transported material quantity between customers and distribution centre (pcs) C i : Cost of transport of a material unit between customers and distribution centre (EUR) d ip : The distance from customer i to potential distribution centre p (km) x i : The value of the x coordinate of the customer i y i : The value of the y coordinate of the customer i ε: The value of the calculation accuracy Variables: H p : The value of the optimal distance of the potential distribution centre in the direction of the x-axis, the value of the partial derivative of the iteration p A p : The value of the partial derivative of the iteration p R p : The value of the optimum distance of the possible potential distribution centre in the direction of the y-axis, the value of the partial derivative of the iteration p B p : The value of the partial derivative of the iteration p x (p) : The value of the x coordinate of the potential distribution centre of the iteration p y (p) : The value of the y coordinate of the potential distribution centre of the iteration p ∆X p : The value of the sum of lengths of the x-axis from a distribution centre of the iteration p ∆Y p : The value of the sum of lengths of the y-axis from a distribution centre of the iteration p Using the described assumptions and definitions. The problem can be modelled as the following formulation: The steps of the calculation procedure for creating an expert system can be divided into the parts of obtaining and preparing the necessary data, preparing the location modelling area, implementing data and setting calculations, the realisation of location calculations, and displaying the obtained results on the modelling area and in numerical expression ( Figure 1).
The necessary data for calculating the optimum location must be obtained from the analysis of the investigated system, e.g., the statistics quantity of the transported material and the price per unit of transported quantity of material. Data that define the coordinates of the points for entering into the calculation, such as the coordinates of customers, must be obtained from the prepared location modelling area, e.g., the map. Using the map on which the points are marked, the origin of the coordinate system is defined, the xand y-axes are labelled, and we measure the coordinates of individual points ( Figure 2). The created location modelling surface serves as a means of obtaining input data and visually displaying the solution of the location of a point on the surface. The realisation of a mathematical calculation of the optimal location of a point on a surface is follows. The distances between the potential location and individual customers are inserted into the defined objective function after the distance d ip .
In this approach, the distances between locations and distribution centres are replaced by a direct connection, which may be calculated as the diagonal of a right-angled triangle ( Figure 3).
Individual distances between a distribution centre and places (2) can be calculated as follows: The distance expressed above is applied to the objective function of location optimality (3).
As it is necessary to obtain the optimal coordinates for the location of a distribution centre, it must hold that the derivative of the objective function by x is equal to 0, and that the derivative of the objective function by y is equal to 0 (4): An iterative calculation follows the value of the partial derivative (5), which gives us a value for the optimum distance in the x-axis direction.   In this approach, the distances between locations and distribution centres are replaced by a direct connection, which may be calculated as the diagonal of a right-angled triangle ( Figure 3). Individual distances between a distribution centre and places (2) can be calculated as follows: The distance expressed above is applied to the objective function of location optimality (3). = As it is necessary to obtain the optimal coordinates for the location of a distribution centre, it must hold that the derivative of the objective function by x is equal to 0, and that the derivative of the objective function by y is equal to 0 (4): In this approach, the distances between locations and distribution centres are replaced by a direct connection, which may be calculated as the diagonal of a right-angled triangle ( Figure 3). Individual distances between a distribution centre and places (2) can be calculated as follows: The distance expressed above is applied to the objective function of location optimality (3).
As it is necessary to obtain the optimal coordinates for the location of a distribution centre, it must hold that the derivative of the objective function by x is equal to 0, and that the derivative of the objective function by y is equal to 0 (4): The calculation of the new coordinate x (p) of a distribution centre is denoted as: denotes the value of the sum of customers lengths of the x-axis from the potential distribution centre of the iteration p. The new value for the optimum coordinate x of the distribution centre (7) is calculated as the difference from the old value x (p-1) and the distance ∆X p from the distribution centre, The calculation of the coordinate y (p) progresses in the same way. An iterative calculation follows the value of the partial derivative (8), which gives us a value for how far is optimum on the y-axis.
The calculation of a new coordinate y (p) of a distribution centre.
denotes the sum of distances on the y-axis from a distribution centre.
The new value for the optimum coordinate y of the distribution centre (10) is calculated as the difference from the old value y (p−1) and the distance ∆Y p from the distribution centre, During the iterative calculation, the last calculated coordinates of the optimal point are always used. The calculation procedure is based on the utopian point method. The utopian point method means that during the calculation of the x coordinate, y is considered to be optimal, and subsequently, during the calculation of the y coordinate, x is considered to be optimal.
Two approaches can define initial values of the coordinates x (0) and y (0) of the optimal point. The first approach is the calculation of the initial coordinate values, which lead to the need for fewer iterations. The second approach involves directly specified initial values, e.g., x (0) = 0, y (0) = 0 => DC[x (0) ;y (0) ] = [0;0]. The initial values (11) according the first approach can be calculated as: The iterative calculation ends when the chosen accuracy of calculation ε is achieved, (12)- (15). The calculation ends when accuracy is achieved by some of the possibilities [72]: • based on the y-axis, • based on the xand y-axes simultaneously, • based on the objective function change z, • based on the change in the movement of the calculated coordinates-the calculation ends when the values of the calculated coordinates of two successive iterations do not change, e.g., the values of calculated coordinates are identical.

Results and Discussion
The previous chapters described how to calculate the location in a specific area of a point representing a business, warehouse, or some object in general. As part of the new solution to the problem, we compare the results of solving the same task with a traditional approach and using our created expert system based on the author's idea to use map resolution as the basis for input data in the calculation of location.

Location using Direct Distance, Cooper's Iteration Method, Traditional Approach
The classic procedure of location calculating depends on the map, the skill of the solver, and the classic tools for calculation. The result of the calculation is the coordinates of the optimal location on the surface. The calculated results must be marked on the map. In this traditional way, it is possible to obtain an accurate view and information about the location of a point on the surface. Such a procedure is demanding on the skills and knowledge of the solver. We have will demonstrate this traditional approach using a specific location task, which we will solve with a mathematical approach using Cooper's iteration method. The data input into the calculation of the distribution centre's location (DC[x (opt) ;y (opt) ]) between Berlin, Krakow, Prague and Warsaw are shown in Table 1, and the map with which we work is shown in Figure 4. The first approximation of the optimal coordinates [x (opt) ;y (opt) ] of the searched distribution centre involves the calculation of the coordinate x (1) , using the following Formulae (16)- (18): Similarly, the value of coordinate y (1) is calculated using formulae R 1 and B 1 . Instead of x (0) , the value of the coordinate x (1) is now used in the calculation (19)-(21).
After the first iteration, the first calculated coordinates are [x (1) ;y (1) ] = [170.1;46.1]. Now, a decision follows as to whether the calculated coordinates are of the required accuracy. The accuracy of the x-axis and y-axis is: the condition of the accuracy requirement for finishing the calculation "IS NOT" fulfilled, so the calculation continues to the next iteration. knowledge of the solver. We have will demonstrate this traditional approach using a specific location task, which we will solve with a mathematical approach using Cooper's iteration method. The data input into the calculation of the distribution centre's location (DC[x (opt) ;y (opt) ]) between Berlin, Krakow, Prague and Warsaw are shown in Table 1, and the map with which we work is shown in Figure 4.  The first approximation of the optimal coordinates [x (opt) ;y (opt) ] of the searched distribution centre involves the calculation of the coordinate x (1) , using the following formulae (16)-(18): The calculation of the coordinate x (2) follows, and for that, the already calculated values [x (1) ;y (1) ] are used. This iterative calculation continues until the required accuracy is reached, and the final values of [x;y] are the coordinates sought for the distribution centre. For this case, the results are as follows (Table 2). Table 2. Iteration procedure for calculating the optimal position of the distribution centre.  (32) ;y (32) ] The calculated coordinates [x (32) ;y (32) (30) ;y (30) ] −0.00017 0.01704 −0.01016 0.00000 0.01704 0.00024 288.8 82.7 [x (31) ;y (31) ] −0.00013 0.01704 −0.00773 0.00000 0.01704 0.00019 288.8 82.7 [x (32) ;y (32) ] The calculated coordinates [x (32) ;y (32) ] = [288.8;82.7] (Figure 5) are the optimum place for the distribution centre, and the condition of calculation accuracy is fulfilled.  Suppose we connect the opposite peaks of the trapezoid. In that case, we find that the calculated coordinates of the distribution centre's location lie precisely at the intersection of the diagonals ( Figure 6). The calculation shows that the optimal location is the position in the area around Wroclaw. Suppose we connect the opposite peaks of the trapezoid. In that case, we find that the calculated coordinates of the distribution centre's location lie precisely at the intersection of the diagonals ( Figure 6). The calculation shows that the optimal location is the position in the area around Wroclaw.

Location Using Computer-Aided Location Expert System
The calculation procedure described above is not simple from the point of view of the ordinary user. Many companies need to calculate the optimal location of the point on a surface to ensure effective supply or distribution. For this reason, it makes sense to create an expert system that calculates optimal coordinates based on input data.
Since measuring map distances on the computer is impractical, the author has invented a new system. The author uses the image resolution to obtain the primary data for the location calculation.
Each computer image is characterised by its resolution, i.e., the number of pixels per row and column. Thus, in calculating the coordinates for the location of a point in an area, the base unit is not millimetres but pixel points (Figure 7).

Location Using Computer-Aided Location Expert System
The calculation procedure described above is not simple from the point of view of the ordinary user. Many companies need to calculate the optimal location of the point on a surface to ensure effective supply or distribution. For this reason, it makes sense to create an expert system that calculates optimal coordinates based on input data.
Since measuring map distances on the computer is impractical, the author has invented a new system. The author uses the image resolution to obtain the primary data for the location calculation.
Each computer image is characterised by its resolution, i.e., the number of pixels per row and column. Thus, in calculating the coordinates for the location of a point in an area, the base unit is not millimetres but pixel points (Figure 7). an expert system that calculates optimal coordinates based on input data.
Since measuring map distances on the computer is impractical, the author has invented a new system. The author uses the image resolution to obtain the primary data for the location calculation.
Each computer image is characterised by its resolution, i.e., the number of pixels per row and column. Thus, in calculating the coordinates for the location of a point in an area, the base unit is not millimetres but pixel points (Figure 7). Standard programming languages such as Delphi, Lazarus, C++, and others have commands that can provide information about the resolution of the image on the monitor, the mouse cursor position on the desktop, etc. This is the method for getting the necessary data, and the rest is a matter of coding. The information obtained is the primary input data for calculating the optimal location of a point in an area on the computer.
As the CAL expert system's creator, the author of the article opted for a project based on the free Pascal/Lazarus programming language. The expert system created can also Standard programming languages such as Delphi, Lazarus, C++, and others have commands that can provide information about the resolution of the image on the monitor, the mouse cursor position on the desktop, etc. This is the method for getting the necessary data, and the rest is a matter of coding. The information obtained is the primary input data for calculating the optimal location of a point in an area on the computer.
As the CAL expert system's creator, the author of the article opted for a project based on the free Pascal/Lazarus programming language. The expert system created can also work with image mode, which we use to compare with the results obtained by the procedure in the example in the previous chapter. Via the item "Open file", it is possible to insert the map (image type jpg., wmf) into the expert system. Clicking the mouse on the position of a point enters the location calculation, and the system records the coordinate of the point as the position of the mouse arrow in the figure (Figure 8). By simply moving the mouse around the image and clicking, it is possible to quickly collect the necessary data for calculating the location.  Before calculating the location in the expert system, it is necessary to set the required calculation parameters, such as calculation accuracy and the initial coordinates of the optima sought (Figure 9). Before calculating the location in the expert system, it is necessary to set the required calculation parameters, such as calculation accuracy and the initial coordinates of the optima sought (Figure 9).
Calculating the location of a point in an area based on defined input parameters uses the principle of iterations, as shown in the previous chapter. The calculation takes place only after the required accuracy has been defined. In this case, given the map's resolution, the required accuracy of the calculation was achieved on the 37th iteration. The system plots the result of the calculated optimal position DC[x (37) ;y (37) ] = [1310.4;446.0] directly onto the entered map (Figure 10), which also visually identifies the optimal position. At the given coordinates is the sought optima of the point location on the surface. The result corresponds to the position of the mouse cursor at a given resolution in the figure. When we compare the results between the traditional location solution approach and an approach that uses the image resolution as the input point location parameters for calculation, we find that the optima's resulting positions are identical. From this, it can be concluded that to calculate the location of a point in an area, as an expert location system, image resolution as the input data source is more practical and as effective as the traditional calculation procedure. Before calculating the location in the expert system, it is necessary to set the required calculation parameters, such as calculation accuracy and the initial coordinates of the optima sought (Figure 9). Calculating the location of a point in an area based on defined input parameters uses the principle of iterations, as shown in the previous chapter. The calculation takes place only after the required accuracy has been defined. In this case, given the map's resolution, the required accuracy of the calculation was achieved on the 37th iteration. The system plots the result of the calculated optimal position DC[x (37) ;y (37) ] = [1310.4;446.0] directly onto the entered map (Figure 10), which also visually identifies the optimal position. At the given coordinates is the sought optima of the point location on the surface. The result corresponds to the position of the mouse cursor at a given resolution in the figure. When we compare the results between the traditional location solution approach and an approach that uses the image resolution as the input point location parameters for calculation, we find that the optima's resulting positions are identical. From this, it can be concluded that to calculate the location of a point in an area, as an expert location system, image resolution as the input data source is more practical and as effective as the traditional calculation procedure. In the previous parts, we have shown that by calculating the optimal point, the position of the point in an area, it is possible to use dimensional units other than length for the mathematical calculation. Graphically, it has been proven that the location is identical to that derived via the traditional solution procedure, despite different values for the dimensions. The question that remains unanswered is whether the quality and calculation procedure of the expert system created for identical input values are the same as in the traditional approach using a spreadsheet.
The results of the location solution using an expert system are compared with the results of the location solution of the traditional procedure. The values (Table 1) from the previous example are used to compare the quality of the calculation of the traditional procedure and the expert system. The data form the input values for the location calculation in the created computer-aided location expert system (Figure 11). In the previous parts, we have shown that by calculating the optimal point, the position of the point in an area, it is possible to use dimensional units other than length for the mathematical calculation. Graphically, it has been proven that the location is identical to that derived via the traditional solution procedure, despite different values for the dimensions. The question that remains unanswered is whether the quality and calculation procedure of the expert system created for identical input values are the same as in the traditional approach using a spreadsheet.
The results of the location solution using an expert system are compared with the results of the location solution of the traditional procedure. The values (Table 1) from the previous example are used to compare the quality of the calculation of the traditional procedure and the expert system. The data form the input values for the location calculation in the created computer-aided location expert system ( Figure 11). mathematical calculation. Graphically, it has been proven that the location is identical to that derived via the traditional solution procedure, despite different values for the dimensions. The question that remains unanswered is whether the quality and calculation procedure of the expert system created for identical input values are the same as in the traditional approach using a spreadsheet.
The results of the location solution using an expert system are compared with the results of the location solution of the traditional procedure. The values (Table 1) from the previous example are used to compare the quality of the calculation of the traditional procedure and the expert system. The data form the input values for the location calculation in the created computer-aided location expert system ( Figure 11).  The graphical display of the results and the iteration calculation procedure ( Figure 12) prove that the computer-aided location expert system created gives the same results as those achieved using the traditional approach in a spreadsheet editor ( Table 2). The results of the conventional procedure of calculating the location point on the surface and the results of the created expert system for the solution of the location point on the surface are identical. The calculated optimum of the distribution centre coordinates is on the position DC[x (32) ;y (32) ] = [288. 8;82.7]. The calculation reached the optimum with the required accuracy for the 32nd iteration. By comparing the results, it can be concluded that the expert system created achieves the necessary quality and accuracy for calculating the location of the point in the area. The graphical display of the results and the iteration calculation procedure ( Figure  12) prove that the computer-aided location expert system created gives the same results as those achieved using the traditional approach in a spreadsheet editor ( Table 2). The results of the conventional procedure of calculating the location point on the surface and the results of the created expert system for the solution of the location point on the surface are identical. The calculated optimum of the distribution centre coordinates is on the position DC[x (32) ;y (32) ] = [288. 8;82.7]. The calculation reached the optimum with the required accuracy for the 32nd iteration. By comparing the results, it can be concluded that the expert system created achieves the necessary quality and accuracy for calculating the location of the point in the area.

Location, Proof of Optimality
The calculation results obtained by the classical procedure and the expert system are identical. It is necessary to prove that the calculated values of the location of the point on the surface are optimal for the given case. We prove the optimality by comparing the calculated values of the objective function for each iteration and different variants of the initial position of the potential distribution centre. Suppose the calculated coordinates are optimum for a given system. In that case, the values of the optimum calculated coordinates when starting the calculation from different starting points should always be the same. To determine the accuracy of the calculated values of the optimum and its proof, we used five random starting points with coordinates DC1[x (0) ;y

Location, Proof of Optimality
The calculation results obtained by the classical procedure and the expert system are identical. It is necessary to prove that the calculated values of the location of the point on the surface are optimal for the given case. We prove the optimality by comparing the calculated values of the objective function for each iteration and different variants of the initial position of the potential distribution centre. Suppose the calculated coordinates are optimum for a given system. In that case, the values of the optimum calculated coordinates when starting the calculation from different starting points should always be the same. To  Table 3. Table 3. Iteration procedure and value of the objective functions for calculating the optimal position of the distribution centre for different variants. The calculated results show that with different initial values of the optimum point on the surface DC[x (0) ;y (0) ], the iterative calculation places the resulting optimum at the same location, with the coordinate value DC[x (32) ;y (32) ] = [288. 8;82.7]. It is possible to use any number of different starting points, and the resulting optimum is always at the same coordinates. It follows that the calculated values of coordinates are optimal for this case.
The routing of the calculated optimal coordinates in the individual iterations of the calculations from different starting points is shown in Figure 13. By overlapping the unique curves of the iteration calculation procedure, we find that the resulting optimum is at the same point ( Figure 13).

Location Using Computer-Aided Location Expert System, Case Study
Due to the expansion of the company GAMA, Inc. Secovce in the region of eastern Slovakia, and the shortening of supply and distribution routes, it is necessary to propose a location for a new warehouse that will form the centre within the distribution network. Agricultural crops are distributed for GAMA, Inc. Secovce by a transport company that should transport the products physically to the designated place within a particular time.
As the input raw material for processing is grown seasonally, storing the input raw material for most of the year is necessary. The selection of warehouses, their positions, and the storage cost greatly influence its final price.

Location Using Computer-Aided Location Expert System, Case Study
Due to the expansion of the company GAMA, Inc. Secovce in the region of eastern Slovakia, and the shortening of supply and distribution routes, it is necessary to propose a location for a new warehouse that will form the centre within the distribution network.
Agricultural crops are distributed for GAMA, Inc. Secovce by a transport company that should transport the products physically to the designated place within a particular time.
As the input raw material for processing is grown seasonally, storing the input raw material for most of the year is necessary. The selection of warehouses, their positions, and the storage cost greatly influence its final price.
The computer-aided location expert system working on the principle of Cooper's iteration method was used to solve the location of the company distribution centre. The map of the region showing the places of supply was inserted into the expert system. Coordinates were defined for each place of supply by clicking with the mouse on their position on the map ( Figure 14, Table 4). This variation of the calculation considers the capacities of the current places of supply in the distribution system. It does not view them as having equivalent status, i.e., the greater the warehouse capacity, the more important it is within the system. Statistics of the company GAMA are used to define the relevant quantities of stored crops and the price, which also considers transport costs (Table 4) to each place of supply. The defined places' parameters, incorporating the amount of raw material and unit prices, are also inserted into the expert system. Before calculating the location in the expert system, it is necessary to set the required calculation parameters, such as calculation accuracy and the initial coordinates of the optima sought ( Figure 15).   This variation of the calculation considers the capacities of the current places of supply in the distribution system. It does not view them as having equivalent status, i.e., the greater the warehouse capacity, the more important it is within the system. Statistics of the company GAMA are used to define the relevant quantities of stored crops and the price, which also considers transport costs (Table 4) to each place of supply. The defined places' parameters, incorporating the amount of raw material and unit prices, are also inserted into the expert system. Before calculating the location in the expert system, it is necessary to set the required calculation parameters, such as calculation accuracy and the initial coordinates of the optima sought ( Figure 15). The largest storage capacity is in the silo located in Secovce. Therefore, this is the most critical point in the system, which is confirmed by calculating the location (Figure 16).

Location, Case Study Proof of Optimality
We prove the optimality by comparing the calculated values of the objective function for each iteration and different variants of the initial position of the potential distribution centre. It is the same procedure as in the example. Suppose the calculated coordinates are optimum for a given case study system. In that case, the values of the optimally calculated coordinates when starting the calculation from different starting points should always be The largest storage capacity is in the silo located in Secovce. Therefore, this is the most critical point in the system, which is confirmed by calculating the location (Figure 16). The largest storage capacity is in the silo located in Secovce. Therefore, this is the most critical point in the system, which is confirmed by calculating the location (Figure 16).

Location, Case Study Proof of Optimality
We prove the optimality by comparing the calculated values of the objective function for each iteration and different variants of the initial position of the potential distribution centre. It is the same procedure as in the example. Suppose the calculated coordinates are optimum for a given case study system. In that case, the values of the optimally calculated

Location, Case Study Proof of Optimality
We prove the optimality by comparing the calculated values of the objective function for each iteration and different variants of the initial position of the potential distribution centre. It is the same procedure as in the example. Suppose the calculated coordinates are optimum for a given case study system. In that case, the values of the optimally calculated coordinates when starting the calculation from different starting points should always be the same. To determine the accuracy of the calculated values of the optimum and its proof, we used five random starting points with coordinates DC 1 [x (0) ;y  Table 5. The calculated results show that with different initial values of the optimum point on the surface DC[x (0) ;y (0) ], the iterative calculation directs the resulting optimum to the same location point with the coordinate value DC[x (6) ;y (6) ] = [274;220]. It is possible to use any number of different starting points, and the resulting optimum is always at the same coordinate. It follows that the calculated values of coordinates are optimal for this case study.
Graphical display of results of the objective function values calculating iterations from five different starting points of the potential distribution centre is shown in Figure 17. By overlapping the unique curves of the iteration calculation procedure, we find that the resulting optimum is at the same point ( Figure 17).
The calculation takes place only after the required accuracy has been defined. In this case, the required accuracy of the calculation was achieved at the sixth iteration. The system plots the result of the calculated optimal position DC[x (6) ;y (6) ] = [274;220] directly onto the entered surface ( Figure 16), which also visually identifies the optima position.
The solution results show that with the current location of places of supply in eastern Slovakia and the current storage quantities, the site at Secovce is correct for a distribution centre. If the capacity requirements for customer storage increase, it will be necessary to build another central large-capacity warehouse located around the Presov site.
It is interesting to compare the results of some selected mathematical methods, their accuracy, and the variation in the calculated coordinates in terms of further research focussing on a point's location on a surface. This research idea will be approached in another paper.

Conclusions
In this paper, the calculation of the location of a point in an area is performed, i.e., calculating optimal point positions for creating a company, a warehouse, a machine, a process, etc. Two approaches for obtaining results are also shown and compared, and a demonstration of the use of the expert system in solving the case study in practice is also shown. The first is a traditional calculation procedure using a spreadsheet editor. The second involves a calculation procedure using the computer-aided location expert system. Both calculation approaches use the process implemented by Cooper's iterative location method. The calculated results are validated by comparing them with each other, and the defined level of accuracy for a particular example was achieved at the 32nd iteration with optima of DC position at DC[x (32) ;y (32) ] = [288.8;82.7], with identical results. Proof of optimality for a given case is realised by substituting the calculated values into the objective function at five different variants of the beginning of the iterative calculation. For each case, the resulting values for the optimal location of a point on the surface were identical. The expert system was used in solving dozens of location tasks for practice. This article

Conclusions
In this paper, the calculation of the location of a point in an area is performed, i.e., calculating optimal point positions for creating a company, a warehouse, a machine, a process, etc. Two approaches for obtaining results are also shown and compared, and a demonstration of the use of the expert system in solving the case study in practice is also shown. The first is a traditional calculation procedure using a spreadsheet editor. The second involves a calculation procedure using the computer-aided location expert system. Both calculation approaches use the process implemented by Cooper's iterative location method. The calculated results are validated by comparing them with each other, and the defined level of accuracy for a particular example was achieved at the 32nd iteration with optima of DC position at DC[x (32) ;y (32) ] = [288.8;82.7], with identical results. Proof of optimality for a given case is realised by substituting the calculated values into the objective function at five different variants of the beginning of the iterative calculation. For each case, the resulting values for the optimal location of a point on the surface were identical. The expert system was used in solving dozens of location tasks for practice. This article presents a specific case study that solves the location of the warehouse under defined conditions in a particular region. The solution of the location of the warehouse in the case study to the expressed accuracy was achieved in the sixth iteration, with the position optima at DC[x (6) ;y (6) ] = [274;220]. Proof of optimality for a specific case study was performed in the same way as in the comparative example.
The calculation results show that the expert system created achieves the required parameters and is a fully developed tool for determining the location of a point in an area.
Based on the above, it can be concluded that the traditional method of calculation using a spreadsheet editor requires considerable knowledge of the subject, and also knowledge and skills working with a spreadsheet editor. In creating an expert system, knowledge and skill related to the subject matter and some programming languages are needed. From the user's point of view, it is more advantageous to use a ready-made expert system, where knowledge of the required parameters is needed.