DESIGNING A COMMERCIAL LOCATION-BASED SYSTEM TO SERVE CUSTOMERS BASED ON GIS

: Finding the desired products and achieving them at the lowest possible cost has always been one of the concerns of in-person buyers. Finding stores containing the desired products is one of the most important services that can be provided to this part of the buyer community. It provided that the costs are minimal, as well as determining the order of visiting the stores and guiding the buyer by routing between store and buyer positions. Transportation is also one of the most important applications of spatial information systems in the field of optimal management of facilities. In this study, routing was performed by Algorithm A*, which was slightly different from the Dijkstra algorithm in terms of accuracy, but in terms of response time, recorded an average reduction of 70%.


INTRODUCTION
Online shopping in the world is becoming more economical and convenient than before and allows consumers to compare prices, quality, and services of goods.In this way, customer satisfaction has increased and they often prefer to do their shopping online.In many cases, even buyers choose their goods in stores and then buy them from the internet because it will be more economical.In some parts of the world, such as the United States, online sales have surpassed face-to-face sales, and this has led suppliers to consider online supply in addition to the physical supply of their goods and services (Mousavi and Behzadi, 2019a;Poorazizi et al., 2008).The internet market is one of the best and most effective models of online stores and online businesses in the world and also Iran, which connects a group of suppliers, sellers, and buyers of the target community (Hamoudzadeh and Behzadi, 2020).Today, this type of business and store model has found many fans, because it does not seek to eliminate intermediaries, but seeks to increase the profits of suppliers and consumers.So far, various types of research have been done in this regard.For example, Khizabadi and Alesheikh addressed this issue in an article entitled Evaluating and Feasibility Study of Web-GIS Implementation in Iran.For this purpose, at first, a comparison was made between open source and closed source software in this field, then the best option for running and implementing a Web-GIS system was specified for the use of open source software and languages (Alesheikh et al., 2002).Alesheikh et al. (Mohammadi et al., 2010) discussed the technology of web-based spatial information systems in terms of architecture, web maps, and its common software, then the stages of Web development-GIS country roads are also given (Jabbari and Behzadi, 2019;Mohammadi et al., 2010).Tavakolizadeh (2006) has also tried to address the constant problem of tourism planning, namely finding the best and shortest route to reach places of interest by presenting a model (Asli et al., 2019;Behzadi and Alesheikh, 2008a).
The main purpose of this research is to design a web-based system that can meet the needs of those people who are still shopping in person but at the same time want to reduce costs (total fuel costs and prices).

STUDY AREA
The city of Tehran is located in the north of Iran.The city is located in the southern foothills of the Alborz mountain range.
Tehran is located at a distance of 51 degrees and 2 minutes east to 51 degrees and 36 minutes east, with an approximate length of 50 km and a latitude of 35 degrees and 34 minutes north to 35 degrees and 50 minutes north with an approximate width of 30 km.The scope of studies in this research is shown in Figure 2 (Behzadi and Hamoudzadeh, 2021;Behzadi and Memarimoghadan, 2019;Jafarian and Behzadi, 2020).

SYSTEM ARCHITECTURE
The architecture that was considered for the implementation of the system is a layered architecture.Many things are important in the architecture of an application, including scalability and system performance (Behzadi and Alesheikh, 2014a).Depending on the importance of each of these, the type of architecture is selected and specified.Layered architecture is one of the things that can increase the maneuverability to apply these three layers.In addition to improving system performance, it can also cause scalability and program development in the future.This architecture is shown in Figure 1.User Interface: The user interface is the space in which humanmachine interaction takes place.The user interface is the visual and tactile part of a tool that the user deals directly with it.To design and implement the user interface of the system, the following items were used:  Apache and webserver to create a virtual server  HTML and CSS for page design  jQuery and JavaScript for greater user interaction with the system  Leaflet for loading maps and other spatial and descriptive information onto the web page  PHP programming language for database communication  OpenStreetMap maps for display layer (base map) The implemented display layer is shown in Figure 3. Allocation Algorithm: To do the allocation processing, the product list is sent to the processing unit.Before processing begins, the list of products is first stored in an array, so that each element in this array represents one of the products in the list, then to allocate selected stores, the algorithm is applied to this array (Behzadi, 2020;Behzadi and Jalilzadeh, 2020;Mousavi and Behzadi, 2019b).It can be said that its implementation steps are as follows: 1. Identify the stores that have the first product.Then specify the total fuel consumption costs of each store to the user's position plus the price of the product in that store and add stores with the cost of each of them to an array called stores.2. The total cost is measured for the next product, with the difference that at the end, the store with the lowest cost is selected and sent to the next section.3. Repeat the second step if there is a product in the list 4. Select the element from the array of stores that has the lowest cost as the final answer 5. End of the algorithm

ALGORITHM A*
One of the problems with the Dijkstra algorithm was that to find the shortest path, it checked all the vertices in all directions and after this long process, reached the top of the destination (Behzadi and Alesheikh, 2008b;Behzadi and Alesheikh, 2014b;Behzadi et al., 2008;Behzadi and Kolbadinejad, 2019).To solve this problem, algorithm A* was proposed.Algorithm A* is a routing algorithm used to navigate and find the path in a graph (Behzadi and Alesheikh, 2014b).Due to the high performance and accuracy of this algorithm, it is widely used (Westfeld, 2001).Peter E. Hart, Niels Nelson, and Bertram Raphael were the first to describe it in 1968 (Moschovakis, 2001;Shahmoradi and Behzadi, 2020).This algorithm is a generalization of the Dijkstra algorithm that achieves better search performance using meta-innovative methods.

TABU SEARCH ALGORITHM
Tabu Search algorithm is a meta-heuristic optimization algorithm that was first introduced in 1986 by Glover.In 1997, the first book devoted entirely to tabu Searching was published by Glover and Laguna (Alinaghian et al., 2021;Mahjoobi and Behzadi, 2022).This algorithm behaves almost like local search algorithms.To prevent loops and sequences in the solutions, and find global optimal solutions, it uses a concept called the tabu list (Ghasempoor and Behzadi, 2021;Hou et al., 2020;Norouzi and Behzadi, 2021).To reach the optimal solution, the tabu Search algorithm starts from an initial answer.Then the algorithm selects the best neighbour among the neighbours of the current solution.If this solution is not in the tabu list, the algorithm moves to the neighbouring answer.When the found answer is in the tabu list, the algorithm checks a criterion called memory structures.In the memory structures, if the neighbour's solution is better than the best solution so far, the algorithm moves to it, even if that solution is in the forbidden list.After the algorithm moves to the neighbour solution, the forbidden list is updated.This means that the move made in the previous step, which moved toward the neighbour according to it, is placed in the forbidden list to prevent the algorithm from returning to that solution and creating a loop.In fact, the forbidden list is a tool in the tabu Search algorithm that prevents the algorithm from being in the local optimum (Chatrsimab et al., 2021;Chatrsimab et al., 2020;Ghashghaie and Behzadi, 2019).After placing the previous move in the banned list, some of the previously banned moves are removed from the list and the list is updated (Soufi et al., 2018).The length of time that moves are banned is determined by a parameter called banned time.Moving from the current solution to the neighbouring solution continues until the end condition of the algorithm is met.Different termination conditions can be considered for the algorithm, for example, the limit of the number of moves to the solution can be a termination condition (Brown and Affum, 2002;SHIRAVAND et al., 2020).The flowchart of the tabu search algorithm is shown in Figure 4.

IMPLEMENTATION
After the user registers his requests in the system, the products are first sent to the store allocation algorithm, then after selecting the selected stores, to find one of the shortest cycles, the processing result is sent to the genetic algorithm.Then, to navigate between the stores and the user's position, the result of the genetic algorithm processing is sent to the A* algorithm.Finally, to draw the final path and determine the position of the stores and the user on the map, the processing result is sent to Leaflet. .The final result of this section can be seen in Figure 5a.If the user clicks on the indicator of each store, the product to be purchased from that store will be displayed along with its price, as well as the order of visiting the stores for the convenience of the user as much as possible.Each store is registered (Figure 5-b).In this research, an interface between buyers and sellers was created using the web-based location information system.Using this interface, service providers can be connected to service receivers.Therefore, sellers can provide their own product to buyers.By using the web-based spatial information system, a basic location system was created, which is used to optimize the routing problem by using spatial analysis.In this research, users purchase product, allocate packages, and transfer packages using the analyses implemented in the webbased spatial information system.In this system, users initially use privacy and location filtering to minimize the output of the system for display.Then, according to the location of the user, they reach a limited number of options from among many.Then he buys the option he wants and the package is registered for sending.In the next step, the courier will see the request.By using the multi-objective optimization method the packet allocation is done with the condition that the distance from the location is minimal.By using this optimization, the courier packages are identified and ready for transmission.By identifying the packages for delivery by the courier, each package is divided into two parts: buyer and seller.The selection order of the nodes is determined by using assignment to the tabu search method and comprehensive search.The fixed points are specified in order, then the transfer from the origin is done using the created routing.The rout finding is performed using azimuth.According to the connection of the edges, the condition of communication is created.This routing is done using tabu search algorithm, recursive algorithm and analytical functions on the network of edges.In this research, spatial data and information related to the connection of the edges and the azimuth of the central points are used to find the optimal edges.The result is the reduction of the volume of operations in the processing time and the reduction of the processing time.The use of pre-processed data and classification of the database reduces the volume of operations during processing.

CONCLUSION
Finding the desired product or products and achieving it at the lowest possible cost has always been one of the concerns of inperson buyers.One of the most important services that can be provided to this part of the buyer community is finding a store or stores that contain the desired products, provided that the costs are minimal.In this research, the main goal has been to design and implement a base location system that can meet the needs and requests of the buyers in the community.On the other hand, to reduce the initial costs of setting up such a system, open source programming programs and languages should be used.For this purpose, a system was designed and implemented so that the user can receive the appropriate output by specifying the desired products and entering them into the processing cycle.The result will be in such a way that in addition to identifying the stores containing the desired products, the order and how to visit the selected stores will also affect the order in a way that ultimately leads to a reduction in total costs (product costs and costs Fuel consumption).

Figure 2 .
Figure 2. Map of the study area (Tehran)

Figure 4 .Figure 5 .
Figure 4.The flowchart of the tabu search algorithm