Data-Driven Geofencing Design for Point-Of-Interest Notiﬁers Utilizing Genetic Algorithm

: This study proposes a method for generating geofences driven by GPS trajectory data to realize scalable point-of-interest (POI) notiﬁers, encouraging walking tourists to discover new local spots. The case study revealed that manual geofence settings degrade the location relevance and user coverage— key objectives of POI notiﬁers —and hinder the scalability and reliability of services. The formalization presented computationally equips geofence designers with practical solutions through two implementations based on prior GPS trajectory logs: (1) a multiobjective genetic algo-rithm that suggests cost-eﬀective geofences by providing trade - oﬀ visualizations and (2) a user cov-erage-penalized genetic algorithm that determines an optimal geofence based on the designers’ expectations. The feasibility and stability of the proposed implementations were tested in areas with varying tourist ﬂow patterns. A comparative survey among manual settings, settings incorporating a reliability simulation, and data-driv en settings demonstrates signiﬁcant performance improvements for geofence services.


Introduction
This study addresses the topic of geo-notifications (also referred to as location-based messages or location-dependent messages in [1]), which enhance tourists' mobile experiences in a city.With the development of GPS-enabled devices, a variety of location-based services (LBSs) such as pedestrian navigation, local searches, and driving assistance have emerged [2].These services not only meet user demands based on pull services-where users actively request information-but also utilize push services to proactively deliver relevant information to users based on predefined criteria or events by sensing and recognizing users' context in real time.To advance such proactive LBSs, many businesses apply geofencing technology to their service designs.Geofences are virtual boundaries that represent the vicinity of points of interest (POIs) or define arbitrary spatial areas.Geofencing monitors user locations, detects their entry and exit from geofences, and provides corresponding services.This concept is utilized in various fields, for example, not only for human mobility, such as healthcare monitoring [3], dockless shared bikes [4], and task reminders [5], but also for unmanned aircraft systems [6] and animal protection [7].Regional marketing also recognizes the value of location-aware tourist experiences [8,9].Geo-notifications can leverage the effectiveness of geofencing technology to send messages about product offers [10], coupons [11], and customer surveys [1] at appropriate times.
Due to the application programming interfaces developed for Android by Google LLC (Mountain View, CA, USA) [12] and for iOS by Apple Inc. (Cupertino, CA, USA) [13], application developers and service designers can easily implement geofence applications.Nevertheless, constructing geofence applications encounters many difficulties in computation, management, and design.The trade-off between geofence reliability and energy efficiency can be critical for stable computations of geofence services.Determining whether a point lies within a geofence has been a significant focus in research, particularly for introducing numerous polygonal low-cost geofences.Novel algorithms based on the quad-tree data structure [14], hybrid hashing scheme [15], trajectory partitioning [16], and the triangle weight characterization with adjacency in three-dimensional environments [17] have been utilized in these studies.In addition, infrastructure and frameworks are crucial for effective management.To allow service providers to manage their geofence applications continuously, prior research has proposed establishing a marketplace for geofence services with various purposes [18] and editors for the interactive creation of geofences [19].Existing research on geofence designs, specifically, the configuration methods for their parameters, aims to ensure appropriate detection of the tourist context.Garg et al. estimated relationships between user location and affinity for products using a dataset that included e-commerce application logs and their locations, which they used for geofence settings [10].Garzon et al. investigated the general problems of geofence settings from technical perspectives and proposed a method for calculating a reliability score [20].Nevertheless, the exploration of this research area has been limited in terms of the diversity of user experiences.In addition, methods for computational determination of optimal geofences have not yet been established, which is a critical discussion for scalable geofence services.This study focuses on a type of geo-notifications in walking tours, which is as a typical scenario of geofence services in [18], and it aims to overcome the design problems.
The main contributions of this study are summarized as follows: (1) it formalizes the optimal conditions for POI notifiers, a type of geo-notification in tourism, based on their design problems; (2) it demonstrates that practical geofence parameters can be generated by using GPS trajectory data; and (3) it shows that data-driven geofences can be effective in terms of both stability and usability compared to conventional manual and simulationbased settings.Section 2 provides a detailed background on POI notifiers and outlines the problem definitions addressed in this research.Section 3 describes the computational methodology, i.e., the automatic geofence determinations, to resolve these problems, which includes a conceptual overview of geofence determination, formalization of objective functions, and algorithm implementations.The implementation design introduces two different approaches, utilizing multiobjective and penalized genetic algorithms.Using a synthetic GPS trajectory dataset, Section 4 examines the abilities of converging solutions in the proposed implementation in areas with varying tourist flow patterns.Furthermore, Section 5 presents a comparative survey among fully manual settings, settings with a reliability simulation, and data-driven settings to verify the geofence performance.This study extends our previous work at the 31st International Conference on Advances in Geographic Information Systems (ACM SIGSPATIAL 2023) [21], providing new discussion on an approach using a multiobjective genetic algorithm (refer to Section 3.3.1 for details) and experimental analysis in Sections 4 and 5.

Problem Definition of Geofencing Design
This section defines geofencing design by first describing the actual development of POI notifiers in Section 2.1.Through our case study and subsequent application developments, we explore the requirements for geofence determinations from both technical and service quality perspectives.

Background: POI Notifiers as a Local Search Service for Tourists
The POI notifier is a widely used example of geofence services in tourism [18].Selfguided walking tours provide participants the freedom to explore the city, discover new spots, and experience the local nature and culture.A POI notifier supports this activity for tourists.While users are near POIs or strolling by them, it notifies them of their presence, ensuring that they do not miss out on the spots that tour designers would recommend them to visit.
To elucidate the role and use case of POI notifiers, this study introduces a mobile application developed by the authors, named DJWalkers, illustrated in Figure 1.Users need only press the play button before initiating their walking tours.During these walks, DJWalkers continuously tracks the location and monitors entry into two types of triggers for playing audio: nearby-geofence (red circle) and staying-geofence (blue circle).Initially, a user might enter a nearby-geofence associated with a specific POI, such as an Asian restaurant and historical monument, without realizing it.DJWalkers then automatically plays an audio prompt, such as "A new POI is near you.Do not miss it!"In addition, it provides brief information about the reason for visiting and the activities available there.If motivated by the audio, and the user decides to visit the POI, a staying-geofence that covers the area of the POI might subsequently detect their presence.During the user's stay at the location or while viewing the monument, DJWalkers offers audio content detailing the site's historical significance and untold stories.In essence, nearby-geofences serve as "encouragers" or "promoters," while staying-geofences act as "educators" or "docents."This study addresses the former type of geofence and explores its design challenges.

Design Problems of POI Notifiers
This subsection details the design problems from various perspectives.Creating effective geofence services requires proficient IT experts who understand the technical constraints related to geofence settings and domain experts familiar with tourists' movements within target regions.However, this may not always be feasible for businesses.The technical perspectives in Section 2.2.1 provide general insights into geofence design, supporting the necessity of a data-driven automation approach.The service quality perspectives in Section 2.2.2 are closely related to usability and define the unique guidelines for POI notifiers.This subsection leads to the formalization of objectives in Section 3.2.

Technical Perspectives
Domain experts often find it challenging to account for the technical limitations of geofence services [22].For example, GPS accuracy is a critical factor in LBSs.In general, GPS-enabled devices record location data that include random noise due to surrounding obstacles and atmospheric effects.Being indoors can significantly reduce accuracy, potentially causing the degradation of LBSs.In addition, the sampling rate, which determines how frequently it is checked whether a user is inside or outside geofences, is also a delicate parameter that can affect the reliability of geofences [23].Overlooking these features can lead to inappropriate activations and deactivations, regardless of their appropriateness from service quality perspectives.
To enrich the user experiences of walking tourism over time, POI notifiers are expected to implement more POIs and corresponding geofences.This necessitates a discussion on the scalability issues of geofence services.Especially when many geofences are set in a small area, they may overlap and trigger multiple events simultaneously, leading to undesired operations of the application.Furthermore, setting a large number of practical geofences while considering both technical and service quality can be labor-intensive.This could prolong the geofence setup process, posing a significant challenge to scalability.

Service Quality Perspectives
Figure 2 presents a case study on geofence designs for POI notifiers.To ensure timely notifications, geofence designers analyze pedestrian areas to determine optimal locations for geofence placement.
One person set a larger geofence, covering a more extensive area (Case 1 in Figure 2).This method effectively captures more people.In general, setting an overly large geofence can result in providing information about a place far from the user's current position.This may lead to tourists' inability to identify the location of the POI or reluctance to visit.Such a situation can cause frustration and confusion.Therefore, the distance between the POI and the position at which users receive notifications is related to the relevance of the information.This study refers to this inappropriate situation as a problem of poor location relevance in POI notifiers.
Another person estimates tourist flows using their heuristics and places a geofence of an appropriate size to capture those who pass through specific paths (Case 2 in Figure 2).This approach maintains relatively short for all users.However, it cannot guarantee high user coverage.This method may be easily influenced by designers' misunderstandings and the dynamics in the target areas.POI notifiers should employ geofences to capture as many pedestrians as possible to promote POIs effectively.Considering environmental factors, geofencing should aim to maximize the number of users covered.
Based on the previous discussion, a trade-off appears to exist between location relevance and user coverage.This study treats this trade-off as an optimization problem, aiming to determine a geofence that is not dominated by other potential solutions.
Figure 2. Case study on geofence settings for POI notifiers.In Case 1, using a larger geofence is straightforward and effective for covering more pedestrians but can lead to poor location relevance of notifications about the POI.In contrast, Case 2 estimates tourist flows and precisely covers the footpath to achieve high location relevance.However, if the flow predictions are inaccurate, this approach may significantly reduce user coverage, thereby missing critical interactions.

Methodology: Automatic Geofence Determination Utilizing Genetic Algorithm
To address the problems discussed in Section 2.2, this section introduces a methodology for automatic geofence determination.This study proposes using GPS trajectory data to determine circular geofence parameters, specifically, a center position and radius, within a defined space.Two objective functions are introduced: (i) location relevance and (ii) user coverage.The determination process can effectively be implemented using genetic algorithms.

Concept Set for Geofencing Optimization
To define the directions of our determination approach, Section 3.1 introduces three fundamental concepts: (1) Trigger event separation-for practical services, geofence designs must ensure the delivery of a single notification within parameter constraints or handle spatially unrelated processes for event selections.Section 3.1.1provides a framework for consistent geofencing operations and declares the scope of our geofencing optimization.(2) Flexible circular geofence-given the potential for future scaling of POI notifiers and the feasibility of optimization, a simple and effective geofence representation is crucial.Section 3.1.2involves defining geofence variables for optimization.
(3) GPS trajectory data-driven determination-to consider technical and behavioral patterns, prior tracking data of user movements can serve as a feasible solution for geofence services to autonomously improve.Section 3.1.3illustrates the data inputs in our proposed methods.

Trigger Event Separation
The strategy of trigger event separation clearly separates the computations of geofence services into a spatial trigger module and an event selection module.First, the spatial trigger module should allow for the detection of multiple geofences and a user's spatial context, for example, entry, exit, and dwell, simultaneously.After that, the event selection module involves determining a single event to deliver to users based on the results of the spatial trigger module.For example, the application selects preferable notifications for users by employing collaborative filtering techniques, which analyze the transactions and preferences of users to identify patterns and suggest content that appeals to similar users [24].In other words, the spatial trigger module accepts overlaps of geofences, and the event selection module solves overlapping problems (refer to Section 2.2.1 for background).This study focuses only on the spatial triggers and attempts to optimize geofence parameters without spatial constraints arising from the positions of neighboring POIs.This concept allows POI notifiers to set many POIs even in small regions, which accelerates the scalability of POI notifiers.

Flexible Circular Geofence
Our determination process represents circular geofences (CGFs), which are defined by a center point and radius.While some applications introduce polygon-shaped geofences with ray-casting methods [25], CGFs offer more scalable and straightforward implementations because they can determine whether a user is inside or outside the area, and they can do so simply by calculating the distance between the center point and the user's location.Many POI-based geofence services adopt fixed CGFs that share the same center point as POIs.Thereby, domain experts can set geofences based on user proximity to POIs.However, the intuitive nature and simplicity of fixed CGFs cannot adapt to the environment around POIs and cause inappropriate activation and inactivation [26].For example, the case in which rivers or trees surround a target POI forces designers to set unnecessarily large fixed CGFs to avoid covering areas that users cannot enter.In this paper, automatic optimization applies advanced geofences-that is, flexible CGFs, which are not constrained by the positions of POIs.It hypothesizes that applying flexible CGFs would achieve more desirable and optimal settings for POI notifiers.

GPS Trajectory Data-Driven Determination
This study aims to introduce a data-driven approach to optimize POI notifiers.As geofence services are basically utilized in GPS-enabled devices, collecting GPS trajectory data via networks can be a feasible way as a part of the lifecycle of POI notifiers.The optimization process incorporates the GPS datastore into the calculation of evaluation values.Because GPS tracking data reflect not only recent trends of user movements but also GPS errors depending on surrounding environments [27], this approach has the potential to capture the technical and behavioral patterns of GPS datasets and overcome the problems, as shown in Section 2.2.1.Therefore, our determination process requires a GPS dataset as the data input.A high enough number of trajectories with higher sampling rates (i.e., 1-16 s intervals) in target cities is needed for the dataset.
The experimental analyses in this study have introduced a synthetic GPS dataset for comprehensive technical surveys.Ideally, service designers are expected to collect the actual GPS tracking data from their application users.Alternately, some research has utilized open-source GPS datasets reflecting actual human mobility, such as GeoLife [28] and Singapore taxis [29].In contrast, the use of synthetic GPS trajectories can establish controllable and large-scale benchmarks [14,30].
Our simulation settings involve scanning three areas, each within a circle centered on the corresponding POIs and with a radius of 75 m.The simulation utilized road network data from OpenStreetMap [31] to generate synthetic trajectories (refer to Appendix A for details).As the areas display distinct patterns of GPS tracking, setting the scanning range   , one of the hyperparameters of the proposed genetic algorithms, to 75 m is effective in evaluating our methods while considering the dynamics of human mobility.

Formalization of Objective Functions
As discussed in Section 2.2.2, location relevance and user coverage influence the service quality of POI notifiers.Section 3.2 converts these requirements into two evaluation functions, enabling computational determinations.Initially, following the defined optimization scope outlined in Section 3.1.1,these functions are dedicated only to spatial calculations.The parameters for geofences within these functions include a variable center position and radius, based on the flexible CGF model described in Section 3.1.2.Furthermore, the calculation of user coverage incorporates historical GPS log data, supporting the implementation of a data-driven optimization approach, as discussed in Section 3.1.3.The conceptual diagrams illustrating each objective are shown in Figure 4.

Location Relevance
The distance to the destination and its information relevance can be proportional.Notifications about unnecessarily far places from current user locations should be avoided.This requires minimizing the distances from the boundaries of geofences to POIs.
Let (, .) be the Euclidean distance from the location of a POI defined as  to the center position of the CGF denoted as ..Furthermore, . stands for the radius of the CGF.Consequently, location relevance can be articulated as an average distance from the boundary of the geofence to a target POI.Given the computational cost and the need for scalability, the location relevance is defined simply by calculating the average of the largest distance (, .) + . and the shortest distance |(, .) − .|.This paper attempts to minimize this value.

𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑(𝑝𝑝𝑝𝑝𝑑𝑑, 𝑐𝑐𝑐𝑐𝑐𝑐. 𝑥𝑥𝑥𝑥)
When considering the evaluation using this objective, the effects of arbitrary POI positioning can be crucial.Typically, service designers can be free to set the position of a POI as the reference point for intended spots.The consistency of output geofence parameters seems not to be guaranteed due to this arbitrariness.Nonetheless, our approach aims to minimize the distance between POIs and notification points, which inherently suggests that POIs should be positioned at points where users are most likely to arrive.This alignment ensures that desirable notifications can be accomplished.

User Coverage
To avoid setting geofences in places where few users cross or cannot enter due to walls and rivers, the number of users who receive notifications about the spot should be maximized.
Within a dataset of trajectories denoted by  = { 1 ,  2 , … ,   }, each trajectory   consists of a set of GPS point data represented as   = �  1 ,   2 , … ,    � .Let    = �  ,    ,    � depict a GPS point data; then, the user number can be defined as follows:

Implementation of Data-Driven Geofencing Design
To explore implementation methods of our data-driven geofencing design for service designers, this section presents two different optimization approaches: (1) Multiobjective genetic algorithm-Section 3.3.2treats the two criteria as independent objective functions and attempts to optimize them equally.
(2) User coverage-penalized genetic algorithm-Section 3.3.3minimizes the location relevance value while treating user coverage as a soft constraint.
These approaches provide different methods for decision-making in geofence service developments.Section 3.3.1 illustrates the general workflow from data input by a service designer to geofence determination for the two proposals.

Workflow of Geofence Design
Figure 5 depicts the workflow for our data-driven geofence design, with data flow illustrated using red symbols for working data.This process assumes that a GPS trajectory dataset  was constructed by different systems, such as tourist tracking data accumulated on a server via mobile applications.Initially, service designers input the position of a POI, , corresponding to the target geofence to be optimized.The scanning range   is also an input parameter defining the scanning space for our optimization.The general workflow can be divided into three phases: (i) preprocessing, (ii) geofence determination, and (iii) service quality check.
In the preprocessing phase, the (, ,   ) extracts a subtrajectory dataset,   , which exists within the scanning range.The scanning range is defined as the circle region ( − .) 2 + ( − .) 2 ≤   2 .In the geofence determination phases, genetic algorithms are applied to the subtrajectory dataset   , which is detailed in Sections 3.3.2and 3.3.3.As a result, the best geofence solution   is obtained.Service designers confirm the parameters based on the utility for their services and update the geofence settings   .This process is repeated for the number of geofences to be set.In this study, genetic algorithms were implemented using the hyperparameters listed in Table 1 and partially with DEAP, a Python library [32].
Table 1.Hyperparameters for our genetic algorithms used in all experiments described in this paper.These parameters have been determined to be optimal based on our preliminary experiments.Note that the minimum user coverage rate   is not constant in this study and is not included in the table.Note: in addition to specific parameters for the genetic algorithm, penalty coefficient  was introduced for the user coverage-penalized genetic algorithm.

Multiobjective Genetic Algorithm
The multiobjective genetic algorithm approach simply treated two formalizations as independent objective functions and attempted to optimize them equally.Consequently, a Pareto front is visualized for geofence designers, illustrating the trade-offs between the objective functions.In the next step, designers need to select a preferred solution from multiple geofence candidates (Optimal Individual Selection described in Figure 5).
The implementation of the multiobjective genetic algorithm employs the Non-dominated Sorting Genetic Algorithm II (NSGA-II) that is well known for its effectiveness in handling multiobjective optimization problems [33].In the context of this study, it helped in simultaneously optimizing both location relevance and user coverage objectives.The  in Figure 5 illustrates the flow of the proposed optimization method using NSGA-II.Following this, NSGA-II is executed to determine a Pareto front for the desired geofence parameters.The basic flow is similar to a single-objective genetic algorithm, as applied for the second approach in Section 3.3.3;however, it is unique in its selection methods-non-dominated sorting and crowding distance calculation.First, the process begins by generating a set of candidate CGFs, called a population in the first generation.As for an individual geofence  = (, , ), the center point is converted from two uniform random numbers defining a polar coordinate, and the radius is also determined by a uniform random number set to be within the scanning range (refer to Algorithm 1).Second, the evaluation of every value of  is conducted by the two following objective functions  1 () and  2 () based on Section 3.2 for each individual.Each of them is normalized by the scanning range value   and the number of users in a GPS subtrajectory dataset   .
According to these indicators, NSGA-II executes non-dominated sorting.It categorizes the solutions into different domination levels.The first level comprises solutions that are not dominated by any other solution; the second front includes solutions only dominated by those in the first front.To ensure diversity among the solutions, the crowding distance was computed in each front at the same time.The crowding distance represents the density of solutions surrounding a particular solution in the objective space.Based on these metrics, a new population is selected for the next generation.After that, a two-point crossover refers to the combination of different individuals into a new one.Mutation forces individuals to change their parameters with a certain probability.This set of processes is repeated for a predefined number of generations.Finally, the population of the final generation describes the Pareto front of the objective space.The parameters for the genetic algorithm are detailed in Table 1.All experiments described in this study were conducted using these parameters.

User Coverage-Penalized Genetic Algorithm
While the first approach in Section 3.3.2allows designers to select the preferred solution from the trade-offs, the second approach in this subsection offers an optimal solution by converting the objectives into a single-objective function.To maintain the diversity of the genetic algorithm, user coverage-penalized optimization, the minimization of the location relevance value while treating user coverage as a soft constraint, is considered.This approach requires a hyperparameter, that is, the minimum user coverage rate   .The output geofence is expected to satisfy the number of users covered for the scanning range.
The  in Figure 5 illustrates the flow of the proposed optimization method using a genetic algorithm.The basic process is the same as NSGA-II given in Section 3.3.2-create,evaluate, select, take crossover, mutate, and repeat them a predefined number of generations.Finally, the fittest individual of the final generation is the best output and the answer, which is a corresponding flexible CGF of the POI within the predefined scanning range   .Populations in each generation were created by Algorithm 1.Then, the evaluation for individuals was redesigned for single-objective optimization.The fitness function is depicted by the sum of two terms-a location relevance function, (), and a penalty function for the user coverage, ().

𝑀𝑀𝑑𝑑𝐶𝐶𝑑𝑑𝑀𝑀𝑑𝑑𝑀𝑀𝐶𝐶 𝐹𝐹(𝑑𝑑) = 𝑐𝑐(𝑑𝑑) + 𝑐𝑐(𝑑𝑑)
(5) As stated in Section 3.2.1, the average distance from the boundary of the geofence to the target POI was introduced for the fitness evaluation.Let (, .) be the Euclidean distance from the location of a POI to the center position of the individual and . be the radius of the individual; it can be given as Equation (6).
The penalty function () contributes to user coverage problems by adding a measure of violation of   .Let  be the penalty coefficient and () be the user coverage rate with respect to a subtrajectory dataset   ; then, preserving the function () is given as follows: At first,   was regarded as a constraint condition to be met, that is,  = ∞.Excluding geofences that fall below the anticipated number of users from the candidates for solutions leads to the optimization method strictly following developers' intentions.However, a higher c  reduces the diversity of populations in the genetic algorithm because fewer individuals can satisfy the constraints, resulting in significant time for convergence of the answer.In this study,  is set as a finite number, and it replaced the optimization problem with an unconstrained problem by the variable penalty.Since the proposed method solves minimization problems, an individual with a lower value is fitter and superior to others.According to the results of evaluation, offspring for the next generation are formed via tournament selection, a two-point crossover, and mutation to keep the diversity of populations and explore a wider range of the search space.The tournament selection involves randomly picking up subsets of individuals, and then the fittest individuals in each subset are preserved.A two-point crossover refers to the combination of different individuals into a new one.Mutation forces individuals to change their parameters with a certain probability.The parameters for the genetic algorithm are detailed in Table 1.All experiments described in this study were conducted using these parameters.

Technical Analysis of Geofence Determination Methods
This section evaluates the selection and convergence of solutions to verify the feasibility of each proposed method.Section 4.1 presents the visualization results of the Pareto fronts and discusses the decision-making process for determining optimal geofence parameters.Section 4.2 investigates the statistical deviation in the fittest values under different settings of the minimum user coverage rate and assesses the consistency of the output solutions.The genetic algorithms used in this analysis are executed with parameters detailed in Table 1.The dataset employed is described in Section 3.1.3,and target POIs and the scanning range (equal to 75 m) are consistent with the specifications.

Visualization of the Pareto Front in Multiobjective Genetic Algorithm
The selection of geofence parameters by the multiobjective genetic algorithm, as introduced in Section 3.  In contrast to the single-objective genetic algorithm discussed in Section 3.3.2,selecting an optimal solution from the Pareto front necessitates a more complex decision-making process.First, integrating specific domain knowledge about the physical environment surrounding the POIs-such as terrain, entry points, and potential obstacles-along with operational considerations like the estimated duration of guide content in audio tour applications can facilitate decision-making.Additionally, deriving a reasonably balanced solution from the Pareto front offers a viable approach to optimizing outcomes.For example, areas with simple clusters, such as POI (A) and (B) in Figure 6, exhibited clearer elbows on their curves.The elbow represents a transition point where the rate of variability changes drastically and is utilized for estimating the number of clusters in point pattern analysis [34].The elbow points can be identified at  2 ≈ 1.0 for POI (A),  2 ≈ 0.7 for POI (B), and  2 ≈ 0.6 for POI (C).To maintain a reasonable balance between the objectives, these points may be considered optimal and cost-effective choices.Covering more tourists may lead to a larger degradation of the location relevance, as indicated by the Pareto fronts.

Stability of Solution Output in User Coverage-Penalized Genetic Algorithm
This subsection examines the stability of the optimization algorithm by analyzing the deviation of the fittest value from the mean after 30 executions of the geofence determination.For POI (A), (B), and (C), the algorithm utilized 150 trajectories that detected entries within each scanning range.The penalty coefficient,  = 2000, indicates that the penalty function adds an equivalent of 20 m of average distance as a penalty for every 1.0% violation of the user coverage rate limitation.If a high value is set, the user coverage rate of a geofence individual output by this method is strictly limited to the minimum required coverage rate   .
Figure 7 presents the results with different minimum user coverages for POI (A), (B), and (C).First, a result of geofence parameters tends to be unstable when stricter limitations of the user coverage rate are set.This feature was seen in the case of POI (B) and (C).Second, when the randomness of the point pattern is lower, the optimal geofence individual has the possibility of output in a more stable way.The areas of POI (B) and (C) have this tendency, especially with   ≥ 0.7.As the point patterns are highly related to the solution space, complex distribution may lead the population to the local optimal solution.Hence, finding appropriate genetic algorithm parameters regarding the probabilities of crossover and mutation becomes challenging for exploration in such areas.This figure shows the results of the deviation of the fittest value from the mean after 30 trials for each POI at different minimum user coverage rates, suggesting that (1) higher minimum user coverage rates lead to more unstable results and (2) more random point patterns also yield unstable results.In this study, the Fisher's F-test was employed to assess the equality of variances across multiple group pairs.The F-test compares the variances between each pair of groups, and under the null hypothesis, it assumes that the variances within each pair are equal (**:  < 0.01).

Comparative Analysis of Geofencing Performance Improvement
This section evaluates the impact of the proposed data-driven geofence determination on enhancing the service quality of POI notifiers.Specifically, this study conducts a comparative analysis of actual location relevance and user coverage, as measured by test data, between the proposed data-driven method and conventional geofence parameter settings.As described in Section 2.2, geofences established through fully manual processes are straightforward but often encounter issues due to overly large radii.This scenario provides a baseline for comparison to assess improvements offered by alternative parameter settings.Prior research has highlighted that a deep understanding of human mobility patterns and reliability assessments significantly aid service designers in configuring more effective geofences.While these insights are valid, this section argues that the data-driven approach addresses the limitations associated with manual and semi-manual parameter settings and optimizes geofence parameters for superior service quality in terms of the metrices.

Outline of Experiment
The following five types of geofences were set by different methods: GF-BASE (Geofence as a baseline), GF-NDE (Geofence designed by Non-Domain Expert), GF-DE (Geofence designed by Domain Expert), GF-SIM (Geofence with the reliability score calculated by Simulation), GF-AUTO (Geofence generated by the user coverage-penalized genetic algorithm).GF-BASE refers to the straightforward setting of geofences, namely fixed CGFs with a 75 m radius.The three target areas are shown in Section 3.1.3-ArtsTheater (the area of POI (A)), Kogetsu Lake (the area of POI (B)), and Yojiro-Inari Shrine (the area of POI (C)).To obtain data for GF-NDE, GF-DE, and GF-SIM, a user survey was conducted with ten subjects divided into two groups.All participants specialized in computer science and understood the concept of geofencing and the problems of GF-BASE.Initially, each person in both groups sets a geofence without any hints, using the geofence editor, which utilizes OpenStreetMap as its base map, creating a GF-NDE.Subsequently, subjects in Group 1 could refer to heatmaps representing pedestrian flows around the areas and update their settings (GF-DE), investigating the influence of knowing tourists' movements on the improvement of geofence settings.Subjects in Group 2 refer to the Geofence Index every time they input geofence parameters.The Geofence Index is the reliability score, primarily calculated by the average proportion between the predefined sampling rate and the road-network-based estimated duration of passing through input geofences [20].This methodology was implemented, and the effects of the reliability score on geofence designs were compared from the service quality perspectives.In addition to these manual and semi-manual methods, GF-AUTO, generated by the proposed method, was prepared with different numbers of trajectories in the training data.Each type of geofence was evaluated using 200 trajectories generated by the simulator described in Section 3.1.3.The geofences created by five different methods were evaluated using two metrics:

•
Actual user coverage-this counts the number of users who have been detected entering the geofence at least once.Even if a user crosses the geofence boundary, there may be instances in which the application does not detect it due to the sampling rate or GPS errors.

•
Actual average POI-notification distance-the location relevance in Section 3.2.1 simply calculates the longest and shortest distances between the geofence boundary and the POI to save computational costs.Meanwhile, this scans the actual reference point of each trajectory that enters the geofence for the first time and calculates the distances from these points to the POI.
These are calculated from the test data of the GPS trajectories.To clearly interpret differences in the results along these axes, values were normalized based on the results of GF-BASE.

Results and Discussion
Figure 8 shows the results of the evaluations.Groups 1 and 2 were separately plotted for three areas.For any target POI, the user coverage rates of GF-AUTO resulted in high values (approximately 1.0).According to the Pareto front outlined in Section 4.1, the average POI-notification distances were likely the most optimal values within the solution spaces.However, additional data appear to be needed for appropriate geofence settings, especially in areas where pedestrian flows are randomly scattered.For example, in the area of POI (C) for Group 2, GF-AUTO with limited training data could underperform compared to manual settings.Few notable differences were found in the results between the groups.The post-user study questionnaires suggested that even base maps enable geofence designers to approximate suitable geofences based on the width and shape of sidewalks.However, a deep understanding of pedestrian flows and reliability simulations may lead designers to set larger geofences than necessary.In some cases of the area of POI (B), the average POInotification distances for GF-DE or GF-SIM increased compared to GF-NDE.Furthermore, design methods using actual data help prevent the establishment of inappropriate geofences based on preconceptions.In the area of POI (C) for Group 2, four out of five cases covered no pedestrians.Even if footpaths are visible near the POI, walking tourists do not always use them.
Overall, GF-AUTO contributes to geofence optimization based on two objectives.In areas where designers can identify a simple cluster, such as the area of POI (A), GF-AUTO offers an effective tool for optimizing average distances.In areas with complex point patterns, such as the areas of POI (B) and (C), GF-AUTO consistently ensures the high performance of geofences.For each type of geofence, the actual user coverage rate and the average POI-notification distance were evaluated using a test dataset (200 trajectories).Values were normalized based on the results from GF-BASE.The figure consists of six plots arranged in two rows and three columns: the upper row displays the changes in geofence performance set by five subjects in Group 1, and the lower row shows changes set by five subjects in Group 2. Each column corresponds to one of the three POIs.

Conclusions
This study has explored computational methods for generating geofence parameters, enabling scalable and adaptable POI notifiers.The case study on geofence designs revealed a formalization strategy for maximizing location relevance and user coverage.To implement the automatic system of geofence determination, a multiobjective optimization approach and a user coverage-penalized optimization approach were examined using synthetic GPS trajectories that simulate actual movements in Senshu Park, Akita City, Japan.The former approach provides geofence designers with multiple options based on the trade-offs between the objectives, while the latter suggests a single solution based on the minimum user coverage rate requirements.Both approaches offer feasible ways to identify the optimal solutions automatically.Furthermore, the results of this comparative study show that the accumulation of tourists' GPS trajectory data can help to identify better geofence parameters than those achieved through manual and semi-manual settings.This implies that a data-driven approach can overcome technical constraints, such as tracking errors and sampling rates, while considering the dynamic changes in the environment.
Future research is needed to extend the necessity of geofence optimization to diverse geofence services.As this study highlights, different geofencing roles, such as nearbygeofence and staying-geofence in Section 2.1, may require distinct optimization approaches.In addition, refining the optimization methods for POI notifiers to account for a wider array of geographic and human mobility factors is advisable.The candidates for geofence parameters presented by the Pareto front in Section 4.1 may imply unexplored axes of evaluation that could enhance geofence effectiveness.While many practitioners recognize the applicability of geofencing, the optimal configuration of such systems, particularly in the context of dynamic environmental conditions, remains an underexplored area in location-based services research.The data-driven approaches in this study underscore the potential for addressing these complexities, encouraging further empirical and theoretical work.
To further capitalize on the findings from this study, it is imperative to delve deeper into the interaction between geofence performance and notification delivery efficiency in real-world scenarios.Future research should focus on integrating diverse human behavioral patterns.Establishing a comprehensive theoretical framework that elucidates the relationship between geofence parameters and user interaction could substantially advance the sophistication of geofence services.By pursuing these avenues, research can build upon the current study's groundwork to develop geofence technologies that more precisely reflect and respond to the complexities of human mobility and urban dynamics.

Figure 1 .
Figure 1.Two types of geofences implemented by DJWalkers, a geofence-based mobile application developed by the authors: (1) nearby-geofences (red circle), which encourage users to visit undiscovered POIs, and (2) staying-geofences (blue circle), which provide users who arrive at POIs with historical background information.In this study, POI notifiers are identified as the proactive service triggered by nearby-geofences.
Figure 3 illustrates the positions of the target POIs: (A) Arts Theater, (B) Kogetsu Lake, and (C) Yojiro-Inari Shrine, along with the density maps of each scanning space.In the area of POI (A), a single main road is clearly visible on the bottom-right side of the figure.The area of POI (B) depicts slightly complex clusters, primarily scattered from the bottom to top-left side.Finally, interpreting the density structure in the area of POI (C) is the most challenging, as it appears to present multiple clusters around the POI.

Figure 3 .
Figure 3.The simulation field is set in Senshu Park, located in the center of Akita City, Japan.The park features a walking trail surrounded by beautiful nature.Synthetic trajectory data points (blue), target POIs (x-mark), and scanning spaces with a 75 m radius (red circle) displayed in the figure are based on the EPSG:6691 coordinate system.This study selected three areas with different point patterns for GPS tracking: (A) Arts Theater, (B) Kogetsu Lake, and (C) Yojiro-Inari Shrine.The density values in heatmaps are normalized, ranging from 0.0 for the minimum value to 1.0 for the maximum

Figure 4 .
Figure 4. Conceptual diagrams of proposed objectives: left, location relevance, and right, user coverage.Gray circles represent nonoptimal geofences; the objectives can guide them to desirable geofences, that is, red circles.

Figure 5 .
Figure 5.The workflow and data flow for the automatic geofence design process, from data input by a service designer to geofence determination, are illustrated in the diagram.The external entity is highlighted in blue.The workflow consists of three main phases: preprocessing (green), geofence determination (orange), and service quality check (pink).Working data are illustrated using red symbols.The processes of the genetic algorithms (Approaches 1 and 2) are detailed in Sections 3.3.2and 3.3.3.

Algorithm 1 :
Creating Individual Geofence Candidates [Input] : a target point of interest   : the scanning range [Output] : geofence individual // determine the center point  = ( 0    )  = ( 0  2)  = . +  * ()  = . +  * () // determine the radius   =   −   = ( 0    )   = [, , ] 3.1, aims to maximize the user coverage and minimize the average POI-notification distance simultaneously.The Pareto fronts, depicted as red lines in Figure 6, demonstrate the trade-off relationships between these objectives for POI (A), (B), and (C).It is considered that the point pattern influences the shape of each Pareto front.Each POI case successfully suggested several viable candidates for geofence parameters.

Figure 6 .
Figure 6.Pareto fronts in three target areas.The trade-offs between user coverage and the approximated average POI-notification distance can be observed in the lines connecting the output red points.Individuals with a normalized average distance exceeding 1.0 in the final population were excluded from the figures because they do not satisfy the solution spaces.

Figure 7 .
Figure 7.This figure shows the results of the deviation of the fittest value from the mean after 30 trials for each POI at different minimum user coverage rates, suggesting that (1) higher minimum user coverage rates lead to more unstable results and (2) more random point patterns also yield unstable results.In this study, the Fisher's F-test was employed to assess the equality of variances

Figure 8 .
Figure8.Results of our survey.For each type of geofence, the actual user coverage rate and the average POI-notification distance were evaluated using a test dataset (200 trajectories).Values were normalized based on the results from GF-BASE.The figure consists of six plots arranged in two rows and three columns: the upper row displays the changes in geofence performance set by five subjects in Group 1, and the lower row shows changes set by five subjects in Group 2. Each column corresponds to one of the three POIs.