A Multiobjective Variable Neighborhood Strategy Adaptive Search to Optimize the Dynamic EMS Location—Allocation Problem

: An aging society increases the demand for emergency services, such as EMS. The more often EMS is needed by patients, the more medical staff are needed. During the COVID-19 pandemic, the lack of medical staff became a critical issue. This research aims to combine the allocation of trained volunteers to substitute for medical staff and solve the EMS relocation problem. The objective of the proposed research is to (1) minimize the costs of the system and (2) maximize the number of people covered by the EMS within a predeﬁned time. A multiobjective variable neighborhood strategy adaptive search (M-VaNSAS) has been developed to solve the problem. From the computational results, it can be seen that the proposed method obtained a better solution than that of current practice and the genetic algorithm by 32.06% and 13.43%, respectively.


Motivation
The International Social Security Association (ISSA) reports that the proportion of the population over 64 years old will increase from 16% to 26% by 2050. The aging of the world's population is accelerating. The larger size of the aging population confirms the development of the world's healthcare system; however, it also requires reformulating various public policies such as health, housing, social services, and pension systems. Elderly people prefer to remain in their own homes rather than moving into retirement care facilities; thus, older people inhabit homes that are randomly spread throughout a city. When an emergency service is needed due to a health problem of an elderly person, the When an emergency service is needed due to a health problem of an elderly person, the emergency medical service (EMS) needs to arrive at the target location within a predefined time in order to, potentially, save the life of the patient. The traveling time of the EMS to the patient depends on (1) the distance from the EMS's location to the patient's location and (2) the current traffic situation (CTS) of the route used by the EMS. Sometimes, even when the EMS is located close to the patient's location, the traveling time is high due to current traffic conditions. This paper presents a methodology to solve the EMS's location problem (EMS-LP), and the current traffic situation is considered. A multiobjective variable neighborhood strategy adaptive search (M-VaNSAS) is used to solve the EMS-LP, while the IOT is used to track the CTS. The IOT sends the CTS to the central processing unit (CPU); then, the M-VaNSAS uses these data to calculate the correct location of the EMS. A correct location of the EMS is defined as enabling the EMS to arrive at the patient's location within a predefined time. The predefined time is divided into two categories: (1) promised service time (PST: R2); (2) excellent service time (EST: R1). R1 is set to 8 min, and R2 is set to 20 min. As the number of elderly people is growing, the number of required EMSs is also increasing. EMS cars/trucks (hardware) are not difficult to find or buy for use in the healthcare system; however, the number of emergency medical technicians (EMTs), who need to be on standby with the EMS, is always limited. In Thailand, trained volunteers (TVs) are used as substitutes for experienced EMTs. Different TVs have different experience levels and different costs. The experience of the EMT affects the chances of the survival of the patient in severe cases. An EMS needs enough experienced staff in order to guarantee the service quality of all EMSs in the system; thus, the assignment of the right TV to an EMS offers the full capability of the EMS to rescue patients before sending them to the hospital. In this study, the assignment of TVs to work with the EMS is integrated into the model; therefore, the EMS has full capacity and the lowest assignment cost. In this article, we present a combination of the EMS relocation problem and the TV assignment problem (EMS-LP-TVS) in order to maximize the following objectives: (1) minimize the total costs of the system; (2) maximize the number of people who can be covered within the R1 time. The framework of the proposed problem is shown in Figure  1.  information from this IOT device is sent via LoRa over the internet to the server; then, the server sends information back to the EMS and TV via a mobile application. In this step, the staff assignment and EMS relocation algorithm are used.

Related Works
The EMS location/relocation (EMS-L/R) problem is to locate/relocate the EMS whenever the traffic situation or patient demand is changed. The EMS-L/R has been solved statically [1][2][3] and dynamically [4]. Static planning deals with a single period; Zidi et al. [5] presented a mathematical model based on the vehicle routing problem to represent the EMS location problem and solved it by a hybrid simulated annealing algorithm and tabu search (SA-TS). The demand and traveling time were collected from historical data. When the result was obtained, it was used until the new demand and traveling time were obtained (the next planning period). Bélanger et al. [6] presented a combination of EMS static location planning with an EMS dispatching strategy to reach the patient within the specified time, while Mouhcine et al. [7] included road accident history in the model to create an optimal route for the EMS.
Researchers focus more on dynamic planning, where the location/relocation is determined through multiple period planning. Multiple period planning is needed due to the changing demand of the EMS and the fact that the traveling time from the current location to the patient may change during the time of the day or the day of the week. Schmid and Doerner [8] presented a mixed integer program to represent a multiperiod EMS location problem in which the current traffic situation was integrated into the model. The average speed of the traffic along a street, which varied depending on the time of day, was collected. These data were used to calculate the optimal location of the EMS, which varied throughout the day, and the result showed that the dynamic relocation strategies had better performance than the static ones. Rajagopalan et al. [9] presented a comprehensive simulation model to minimize the number of ambulances used to service the varying patient demand. This research also focused on multiple period planning in which the demand of the patients and traveling time of the EMS varied throughout the planning time. EMS demand varies with time, such as on a working day, when people are in office locations, while on the weekend, people may stay home or be in shopping areas; thus, the location of the population varies throughout time.
The traveling time of the EMS is affected by the current traffic situation of the city's streets. Most research has used historical data, which were collected manually or electronically from the electronic devices. These electronic devices include speedometers, radar, and range finders. While these devices have been widely used by the police and researchers, they have not been used in the real-time relocation problem.
The critical issue mentioned during the COVID-19 pandemic [10] was healthcare system management, particularly the resource allocation problem. Ma et al. [11] proposed a dynamic programming model to study bed allocation in hospitals for different patient types during the pandemic. Yuk-Chiu Yip [12] presented guidelines for healthcare resource allocation based on an ethical analysis. Biswas et al. [13] revealed the composition of the COVID-19 exposure-measurement framework, which can help with vaccine prioritization and resource allocation. Kim et al. [14] showed that a vaccine with lower resource requirements (wider reach) can significantly contribute to reducing the infection rate of the population and revealed that the tradeoffs between efficacy and reach are critical for resource allocation decisions between different vaccine types for improving health outcomes. From the mentioned research, we can see that during the pandemic, resource availability was the critical issue to manage. Human resources in the healthcare system are one of the most critical parts that cannot be boosted in a very short time to cover a difficult period, such as the COVID-19 pandemic. Chen et al. [15] studied the problem by integrating medical staff allocation and the staff scheduling problem in uncertain environments using a two-stage algorithm based on goal programming to determine the smallest possible number of medical staff required and to create the best schedule for them. Vieira et al. [16] Computation 2022, 10, 103 4 of 24 proposed a stochastic mixed-integer linear programming model that optimized the allocation of radiation therapy technologists to multiple operations in radiotherapy over a set of scenarios of patient inflow. The goal was to maximize the (expected) number of patients completing pretreatment within the waiting time target. An EMS requires a high number of medical staff since every minute the patient has to wait for medical treatment dramatically reduces their chance of survival. In Thailand, the EMS stands by at the location from which it can reach patients within the predefined time. However, a large city such as Ubon Ratchathani, Thailand, with more than 1.5 million inhabitants, needs a high number of EMSs. Each EMS vehicle needs at least two staff, one driver, and one medical staff member who can provide first aid to the patients. During the pandemic, medical staff needed to remain on standby at hospitals; therefore, they could not be on standby with the EMS at the EMS locations. Here, a medically trained volunteer (TV) could be used as a substitute for professional medical staff [17][18][19]. The TV has different experience, which results in different pay. Therefore, the right assignment of a TV to an EMS will generate a suitable cost for the city and the service quality of the EMS. In this research, the experiences of a TV will be collected and assigned to a specified EMS. All EMSs must have a minimum service quality, which is controlled by the minimum total experience level of the TV with the responsibility for a specified EMS.
The EMS-LP-TVS is the first time that staff allocation and EMS relocation problems have been integrated. Previously, the EMS relocation problem has been integrated with other NP-hard problems, such as the dispatching problem [6] and the vehicle routing problem [7,[20][21][22][23]. The methodology used to solve the EMS and location/relocation problem has included set covering and its extension [24,25], tabu search [4], linear programming [26], variable neighborhood search (VNS) [8,27], hybridization of simulated annealing algorithm and tabu search [5,28], particle swarm optimization [29], and ant colony optimization [7].
The algorithm used in this research is the variable neighborhood strategies adaptive search (VaNSAS), which was first proposed by Pitakaso et al. [30], who used VaNSAS to solve the location routing problem. VaNSAS comprises four steps: (1) generate an initial set of tracks (solution); (2) perform the track touring process; (3) update the heuristics information; (4) repeat steps 2 and 3 until termination. The basic concept of VaNSAS is that the quality of the current solution improves by using many types of heuristics. The heuristics include metaheuristics, simple heuristics, or the well-known local search procedure. Generally, three to four heuristics are designed for use in VaNSAS. The track can be used to select the heuristics in black box optimization. A suitable improvement procedure (IP) is selected with different probabilities. The probability of selecting the IP is iteratively updated depending on the average solution quality of tracks that previously used that IP. VaNSAS has been successfully used to solve various problems, such as the location routing problem, assembly line balancing problem [31], and scheduling and routing problems [32].

Contribution
This study aims to find the procedure to assign the TVs to the EMSs and locate the EMSs at the right place, so that an EMS can reach the patient before the PST. The objectives of the proposed procedure are to (1) minimize the total costs of the system (traveling cost and TV assignment cost) and (2) maximize the number of people covered within R1. The multiobjective EMS location model has been developed to solve this problem. The objectives' function is evaluated using (1) the weighted sum method and (2) Pareto front analysis. The contribution of our research is as follows.

1.
The assignment of the trained medical volunteer (TV) is first integrated into the EMS location problem. Due to the limitation of medical staff during a pandemic, a shortage of medical staff occurs; hence, a TV is used as a substitute for the medical staff; however, the levels of TVs' experience are different. If the TV's assignment is not suitable, it can affect the ability of the EMS to rescue the patients, which is the main concern of this article. The IOT is used to collect the real average speed of a car along a particular road obtained from speed checkpoints. The IOT's device submits this information to the EMS center, the data are analyzed, and real-time location information is sent to the EMS. This can help the EMS to reach the patients within the PST.

3.
A new black box (improvement box) selection formula is first presented to improve the search performance of the original VaNSAS. A multiobjective variable neighborhood strategy adaptive Search (M-VaNSAS) is presented in this paper, and it is evaluated in comparison to existing well-known metaheuristics.
This paper is organized as follows. Section 2 discusses the related work and background to this study. Section 3 presents the proposed method, which is a modified differential evolution algorithm, while Sections 4 and 5 present the computational results and conclusions, respectively.

Mathematical Model Formulation
In this section, the mathematical model is developed for the proposed problem (EMS-LP-TVS).

Objective Functions
Equation (1) shows the objective functions of the proposed problem, which is composed of two objectives: (1) Z 1 is used to find the minimum total cost of operating the EMS, i, plus the traveling cost from i to j, and the assignment cost of the TVs to the EMS, and (2) Z 2 is used to reveal the maximum number of people who are served within the R 1 time. The first term of the first objective is the total distance used to travel from the location of EMS to the community multiplied by the traveling cost per kilometer. The result of multiplying is the total traveling cost that can occur in the system. The second term of the first objective operating cost of the EMS, when the TV is assigned to the EMS, will incur a cost and the summation of all assigned TV costs if it is the total operating cost of all EMSs. The second objective has one term which is the total population that are covered within R 1 time by at least two EMSs (R 1 -CoV). The cost term is calculated by multiplying the size of the population of a community i at time t by one minus the community sign or number (0 or 1). If the community sign is 1, it means that the community is not covered within R 1 by at least two EMSs, although we will obtain the total size of the population that are covered by at least one EMS within R 1 time.
Equations (2) and (3) are used to define the traveling time from EMS i to j. Equation (4) shows whether community i can be reached by R 1 or R 2 . Equations (2)-(4) have to be used together in order to form the value of U ijt, which is the decision variable that informs the system about what is the traveling time from community j to EMS i at time t, and it forces the decision variable N ijt to be zero or one. Equations (5) and (6) ensure that an EMS does not serve more patients than its capacity. Equation (5) controls the number of people that a particular EMS needs to service, which has to be less than its limitation, and Equation (6) is used to control the total number of communities that needs to be less than the EMS's limitation. Equation (7) determines that a single community must be covered by at least two EMSs. Equations (8)-(10) are used to control the assignment of EMTs; i must have at least 1 experienced EMT, and the total experience of an EMS must be above the minimum requirement.

The Proposed Method
In our research, we propose the multiobjective variable neighborhood strategy adaptive search (M-VaNSAS). M-VaNSAS comprises four steps: (1) generate a set of initial tracks (solution); (2) perform the track touring process by using black box operators (improvement box: IB); (3) update the heuristics information; (4) repeat steps (2) and (3) until termination. How we used M-VaNSAS to solve the proposed problem is explained below.

Generate the Initial Tracks
In this section, the NT (number of tracks) was randomly generated. Table 1 represents four tracks. Each track had a dimension of 1 × D, where D represents the number of available EMSs. As shown in Table 1, D was set to 5. The initial WP used in this paper was a real number, which was uniformly randomly generated between 0 and 1 using Equation (11).
where Y ij1 is the value in track i, position j, at iteration 1. j is defined as the number of available EMSs, and i is the predefined number of tracks. Another two sets of tracks were also randomly generated in the first iteration, the set of best tracks (BT) and random tracks (RT).
where B ijt is the set of the best solution collected from the best solution found, from iterations one to iteration t; R ijt was randomly selected using the formula. The first B ijt and R ijt , which had to appear in the first iteration, were randomly generated using Equations (12) and (13), respectively. Equation (14) was used to update Y ijt . The value of Y ij in iteration t + 1 was equal to the value of Y ij in iteration t, which used a selected IB operator. Table 1 shows an example of the four randomly generated tracks.  Table 1 shows the value of the track elements. Track 1 comprised five elements, which had values of 0.77, 0.07, 0.82, 0.14, and 0.44, respectively. They represent the value of the elements used to decode the proposed problem's solution. The decoding method is explained in the following section.

The Decoding Method
The decoding method was used to decode the values of the elements representing the solution to the proposed problem. The decoding method used in this article comprises three steps: (1) assign communities to an available EMS (at least two EMSs must attend to a community within a predefined time: R 1 = 12 min, R 2 = 20 min); (2) sort the value of the elements from lowest to highest (list A); (3) assign the unused EMSs to the first position of list A; (4) reassign communities to the remaining EMSs; and (5) repeat steps (3) and (4) until a feasible solution is found during the assignment. The decoding method procedure is described in the following steps. Table 2 shows the distance between the candidate location, the EMS, and the community (V) where the patients live. Step 1: Assign the community to an available EMS. The results of Step 1 are shown in Table 3.
Communities 1 to 9 have the following numbers of inhabitants at time t: 100, 120, 220, 130, 150, 100, 140, 130, and 159 people, respectively, while the EMSs 1 to 5 have the capacities of 900, 800, 1000, 900, and 800, respectively. The limitation of the number of communities that an ambulance can cover is seven. The results of the first assignment are shown in Table 3. Step 2: Sort the elements of value from lowest to highest. The sorting of track 1 is shown in Table 4.  Table 4, the original track of track 1 value in element 1, 2, 3, 4, and 5 is 0.77, 0.07, 0.82, 0.14, and 0.77, respectively. The element will be sorted according to its value in elements in ascending order; thus, the new element sequence after the sorting is 2, 4, 5, 1, and 3, which have values in elements of 0.07, 0.14, 0.77, 0.77, and 0.82, respectively. The element sequence will be used in the next step of the proposed decoding method.
Step 3, Step 4, and Step 5 are performed simultaneously. The final result is shown in Table 5. As seen in Table 5, EMS numbers 2 and 5 were unused, and the communities attended to by these two EMSs were assigned to other available EMSs. In relocating an EMS to the community, the following conditions must be considered: (1) the number of patients attended to by the EMS must be under the EMS's capacity and (2) it must also be under the maximum number of communities the EMS can cover. In the next step, after we have obtained the used and unused EMSs, we will assign the TVs to the used EMSs. The methodology to assign the TVs to the used EMSs can be explained stepwise as follows.

Trained Volunteer Assignment Procedure
Step 1: Divide the TVs into two groups, which are experienced (E l ≥ 1) and inexperienced (E l < 1) TVs according to their predefined labor cost.
Step 2: For each group, sort the value of C l in ascending order to obtain the lists of experienced TVs (List 1) and inexperienced TVs (List 2).
Step 3: Assign the first TV in List 1 to the first used EMS, and assign the second TV from the top of List 2; if the total experience level does not reach M, assign the second TV from the next position in List 2.
Step 4: Repeat Step 3 until all used EMSs are fully assigned to TVs. An example result of TV assignments is shown in Table 6. From Table 6, there are nine TVs (1 to 9), who have an experience level of 0.8, 1.3, 1.3, 0.7, 0.9, 1.4, 0.5, 1.6, and 0.7, respectively. The cost of the nine TVs is 250, 360, 320, 260, 280, 390, 400, 420, and 400, respectively. The expected experience level of a TV is 2.0. Therefore, EMS 1 is served by TVs number 3 and number 1, EMS number 3 is served by TVs number 6 and number 4, and EMS number 5 is served by TVs number 2 and number 5.

Perform Track Touring Process
The tracks iteratively tour the black box. The black box features solution improvement methods that are not limited to a local search. The black box (improvement box: IB) can include metaheuristics, heuristics, and simple local search. In our research, four black boxes were designed to use the following methods: random-transit (RT), best-transit (BT), inter-transit (IT), and scaling factor (SF). We used a roulette wheel selection for the track to select the preferred black box. The selection of the black box is controlled by Equation (14).
Computation 2022, 10, 103 10 of 24 where P bt is the probability of selecting the black box in iteration t; N bt−1 is the total number of tracks that selected a black box in the previous iterations; A bt−1 is the average objective value of all tracks that selected black box b in all previous iterations; A best t−1 is the global best solution found before iteration t; I bt−1 is a reward value, which increases by 1 if a black box finds the optimal solution in the last iteration but is set to 0 otherwise; B is the total number of black boxes; F is the scaling factor (F = 0.5); and K is the parameter factor (K = 1). Equation (14) is the formula that each track will select the preferred black box in each iteration. It is constructed based on four terms that can guide the solution to a good searching area. These terms are (1) number of times that the tracks have selected that black box in the previous iterations; (2) the average solution value of the tracks that have selected that black box; (3) if that black box contains the current best solutions; (4) how far the average solution of tracks that select that black box is from the solution of the best black box. We can see that, if the black box generates a good solution in previous iterations, it will increase the probability of selecting that black box in the current iteration.
The black box is operated using Formulas (15)- (18). Let us define the set of tracks in a single iteration. Assume that B is the number of tracks comprised in one iteration. Set A as the set of tracks that selected black box b, and set Z as the set of tracks that were not selected to operate in black box b, while the number of tracks in A plus Z is equal to B. We denote n as the track that was randomly chosen from the sets of track Z, and track i is the track that was chosen from the sets of track A.

Random-transit
Scaling factor (SF) are the sets of tracks that gave the global best solution and best solution obtained from black box b, respectively. R ij is the random number of track i in position j.
Generally, the local search or local improvement of the metaheuristic is to increase two types of search capability: (1) diversification or exploration search; (2) intensification search. The exploration search behavior is designed to let the current solution escape from the local optimal solution and the intensification search will let the current solution search intensively for the current search space. Equations (15)-(18) fail in these two categories. Equations (15) and (18) are designed to increase the diversification or exploration capability, while Equations (16) and (17) are used to increase the intensification search. In Equation (16), the current solution is guided by the current best solution to the good searching space, while in Equation (17), the current solution is guided by the neighbor's solution of it.
The sub-iteration update position of Y ijq+1 was executed using Equation (19). q was the sub-iteration of black box b, which was the predefined parameter. C was the predefined parameter and was set to 0.7 [25]. The evaluation of the solution that was iteratively searched used Equation (20).
where f it is the objective function of track i at iteration t, and f iq is the objective function of track i at sub-iteration q. The objective used for Equation (20) derives from Equation (21), where w 1 is the random weight for objective 1, w 2 = (1 − w 1 ), and w 1 = U(0, 1). f 1 iq and f 2 iq are the objectives of objective Z 1 and Z 2 , respectively.
The Pareto front was used to retain the nondominated solution. We denote f 1 (y r ) and f 2 (y r ) as the objective functions of objective 1 and 2 of track r, respectively. Let R represent a set of feasible solutions, denote y = (y 1 ,y 2 , . . . ,y i ), which is the set of decision vectors, and f v (y)=( f 1 (y), f 2 (y),.., f V (y)) is the set of objective functions of vector y. y will dominate y' if and only if f v (y) ≤ f v (y') for all v = 1,2,3, . . . ,V.
The promising solution from the Pareto front is analyzed using TOPSIS. The technique for order of preference by similarity to ideal solution (TOPSIS) is used to reveal the promising set of parameters. TOPSIS was first presented by Hwang and Yoon [33]. TOPSIS begins by constructing a normal decision matrix, which will transform various attributes' dimensions into a non-dimensional attribute by using Equations (22)-(28).
where x lv is the value of the objective function of point l objective v, l is the number of points in the Pareto front, V* is a set of positive objectives functions, and V' is a set of negative objective functions. w v is the predefined parameter, which is the weight of each objective function. U* (U * = U * 1 , U * 2 , . . . , U * n ) and U' (U = U 1 , U 2 , . . . , U n ) are the positive and negative ideal solutions, respectively. S * l and S l are the separation measures for each alternative from both the positive and negative ideal solutions, respectively, which will be used to calculate the relative closeness to the ideal solution (C * l ). The set of parameters that has a value of C * l closest to 1 will be selected as the promising solution.

Update the Probability of the Black Box (IB)
In this step, some of the heuristic information used in Equation (14) should be updated, and the variables to be updated are shown in Table 7. Table 7. List of variables that need to be iteratively updated.

Variables
Update Procedure

N bt
Total number of tracks that select black box b from iteration 1 to iteration t A bt A bt = N bt T bt . when T bt is total cost generated from all tracks that select black box b (iteration 1 to iteration t) As seen in Algorithm 1, M-VaNSAS will start by generating a set of initial solutions, known as the initial set of tracks. Then, this set of tracks will improve their solution quality by performing the improvement procedure using the black box. The black box will be used as a tool to improve the solution quality of the current set of tracks. There are four black box methods: RT, BT, IT, and SF. The tracks will iteratively search for the new solution. The maximum iteration of the searching of the tracks is the predefined variables, and it will be used as the stopping criterion for the proposed algorithm.

Comparison Methods
In this study, we compared the proposed methods using a genetic algorithm. A genetic algorithm (GA) is a nature-inspired metaheuristic that consists of four steps: (1) generate an initial solution; (2) perform a mutation procedure; (3) perform a crossover procedure; (4) perform a selection procedure. We modified the GA proposed by [34] for our problem. The selection process of GA was modified using Equation (21). Figure 2 shows the system architecture design, smart radar speed, which combines a battery power supply with solar cells, and was installed on a road to measure the speed of a car on that road. The Smart Radar Speed was connected to the LoRa network, which measures the speed of a car, obtains the coordinates from the GPS, and sends those data to the server to record the data in the database. Then, for every predefined planning period (t), the server calculates the average speed on each road to optimize the relocation of the ambulance. The server sends the updated information on the relocation of the ambulance to each ambulance via the EMS application for driving. The design concept of this system consists of three main parts: smart radar speed, the EMS application, and the server system.

1.
The smart radar speed consists of six components: an ESP32 LoRa, a GPS module, a Doppler radar module, an LM2596 module, a power panel, and an LED matrix. The Doppler radar module, GPS module, and LED matrix were connected to a printed circuit board; the core of the board is an ESP32 LoRa microcontroller, which has a 32-bit CPU operating at 160 MHz, with 16 MB of ROM and 512 KB of RAM, and the integrated LoRaWAN communication in the 920-925 MHz band [35]. The circuit board used the power from a 12 V lithium−ion rechargeable battery with a solar cell. The LM2596 module was used to generate 5 V of power for the circuit board. Furthermore, the LED matrix displays the car speed obtained from the Doppler radar module.

2.
The EMS application, shown in Figure 3, runs on the Android platform. The EMS application needs to connect to 4G, with authentication via a login; then, the application obtains the data from the server's database and displays them on the screen of the application. A Google Maps API displays the current location and journey of the ambulance on the application. Furthermore, the EMS application provides navigation when the system notifies the ambulance to relocate. 3.
The server system performs the average speed calculation for each road and the lowest cost of the ambulance rerouting using an optimization algorithm; then, the server relays the ambulance relocation information to the EMS application. In conclusion, the methodology to solve the proposed problem (EMS-LP-TVS), which is the combination of the EMS location problem and the trained medical volunteer (TV), is as follows.
(1) Assign the TV to the EMS using M-VaNSAS algorithm.
(2) Use current traffic condition to locate the EMS in the relevant location using M-VaNSAS algorithm. The proposed method was used as a tool for simulation and testing is reported in Section 4.

Computational Results and Framework
In this section, we divide the computational result into two parts: (1) the simulation result of the VaNSAS compared with GA using the randomly generated datasets; (2) the case study results compared with the current method.

Compare the Proposed Method (M-VaNSAS) with the Results from the Optimization Software (Lingo v.16) and the Genetic Algorithm
The proposed method was coded using Python and evaluated with a PC Intel ® Core ™ i5-2467M CPU 1.6 GHz, produced in USA. The testing of the performance of M-VaNSAS was on 14 randomly generated datasets compared with the existing heuristics. The details of the tests are shown in Table 8. The details of the random parameters used to generate the tests are shown in Table 9. In the first experiment, we used the GA and M-VaNSAS to solve the proposed problem for all 14 test instances. The GA and M-VaNSAS were used to collect the Pareto front; then, TOPSIS, with varying weights of w 1 and w 2 , was used to evaluate the difference between both heuristics. The stopping criteria of GA and M-VaNSAS were set to 45 min for all test instances. Each instance was executed five times, and the best solution was used as representative of the method. Table 10 shows the computational results using various values of w 1 and w 2 (TOPSIS).      From Table 10, we can see that, on average, M-VaNSAS provided a better solution than that of GA. M-VaNSAS produced a 9.80% lower cost than that of GA and 13.49% more people were covered within the R 1 time by the ambulance. Using the data obtained from Table 10, graphs plotted to show the effects of using different weights of w 1 are presented in Figures 4 and 5. The best objective for objective one (minimize total cost) is when we used M-VaNSAS with w 1 = 0.7 and w 2 = 0.3, while the best objective for the second objective (maximum population coverage) is when we used M-VaNSAS and set w 1 = 0.3 and w 2 = 0.7. On average, GA generated a worse solution than that of M-VaNSAS, at 14.25%. The relative difference (%diff) is calculated using Equation (29).
where S C is the candidate solution and S B is the best solution among all candidate solutions.  From Figures 4 and 5, we can see that when the weight of w 1 increased, the total cost of the system was lower, as w 1 is the weight that focuses on reducing the total cost. In all w 1 values, M-VaNSAS generated a lower cost than that of the GA. By contrast, when the weight of w 1 increased, the Cov-R 1 decreased, because an increase in w 1 implies a decrease in the value of w 2 , which is the weight of increasing the Cov-R 1 objectives.
The average ratio of the Pareto-optimal solution (ARP) was used to compare the performance of GA and M-VaNSAS in obtaining a good result for the proposed problem. Let N 1 ,N 2 , . . . N k be the number of iterations used in experiment k. n 1 , n 2 , . . . , n k are the number of Pareto-optimal solutions found in the kth experiment, and K is the total number of experiments. Therefore, the ARP is calculated using Equation (30).
The results of the ARP are shown in Table 11. From the computational results shown in Table 11, we see that M-VaNSAS found 12.68% more Pareto points than the GA; thus, we can conclude that M-VaNSAS is better than the GA in finding more solutions. Figures 6 and 7 compare the Pareto fronts of the M-VaNSAS and GA.  From Figures 6 and 7, we can see that the Pareto front of the GA had more gaps between the Pareto points than that of M-VaNSAS. From the data that we collected, GA found 1680 Pareto points during 1500 iterations, while M-VaNSAS found 2014 points using the same number of iterations. The ARP of the GA was 16.42% less than that of M-VaNSAS, which means the chances of GA having a larger gap between each Pareto point were higher, as shown in Figures 6 and 7.
The next experiment examined the effectiveness of the proposed method when we simplified the objective function of the proposed problem to see the cost expenditure per person. The objective function shown in Equation (1) was simplified to Equation (31). The solution was compared with the result obtained from Lingo V.16 within 480 h and the GA using 45 min of computational time. The results are shown in Table 12, and the statistical test using the Wilcoxon signed-rank test is shown in Table 13.  Table 13. p-value of the statistical test using Wilcoxon signed-rank test of data given in Table 11.

GA M-VaNSAS
Lingo v.16 0.00096 0.00096 GA 0.00096 From Tables 12 and 13, we can see that M-VaNSAS obtained the best result among all three methods. It significantly improved the solution obtained from the best result found by Lingo using 480 h by 44.15% and improved the solution quality of Lingo by 19.69%. Figure 8 shows the progressive plot of the best solutions found during 1100 iterations of the GA and M-VaNSAS. From Figure 8, we can see that M-VaNSAS found a new solution during the search 132 times, while GA found a new best solution 101 times, which means that M-VaNSAS had a higher ability to find a good solution during the search; the average difference between the new best solution and the current best solution was 3.19%, while GA had an average difference of 1.87%. This implies that M-VaNSAS surpassed the local optimum more than the GA. The next experiment we performed examined the efficiency of using a different black box or improvement box. In this experiment, Equation (31) was used as the objective function for all M-VaNSAS. The stopping criterion was the computational time, which was set to 45 min. All the proposed M-VaNSAS approaches were used to solve all 14 random test instances. Details of the subalgorithm of M-VaNSAS are shown in Table 14. Table 14. Details of the subalgorithm of M-VaNSAS.

IB Types
Random-Transit (RT) Best-Transit (BT) Inter-Transit (IT) Scaling Factor (SF) The checklist shown in Table 14 contains the improvement boxes used in the M-VaNSAS for each subalgorithm. The results of all the proposed M-VaNSAS approaches are shown in Table 15. The average cost used in different numbers of improvement boxes is shown in Figure 9. From Table 15 and Figure 9, we can conclude that using 1 IB generated the highest cost, while using 4 IB generated the best solution among all the methods. M-VaNSAS-13, which used all the improvement boxes (four) in M-VaNSAS, obtained the best solution of all the methods. It obtained a lower cost than using 3, 2, and 1 IB by 33.76%, 27.21%, and 17.04%, respectively, with the same computational time. In sum, the use of a higher number of improvement boxes provided a better solution. In using the different relative results of the subalgorithms with the best subalgorithm, we found that 1, 2, and 3 IB exceeded the cost of 4 IB by 51.06%, 37.44%, and 20.54%, respectively.

Case Study Results Compared with the Current Method
The designed application and the M-VaNSAS were implemented in a real case study, the EMS service of Muang Ubon Ratchathani City, which has 217,396 people, 155 communities, and 35 EMS vans. M-VaNSAS was used for 30 days, and the results of the average arrival time at the patients, maximum and minimum arrival time at the patients, minimum total cost incurred during the 30 days, and the total distances covered by all EMSs were recorded. The results are shown in Table 15. GA was used for 30 days using the same real data obtained from the implementation of M-VaNSAS. The results of M-VaNSAS and GA were compared with current practice, which the city government uses to manage the EMS. The results are shown in Table 16. From the computational results, we can see that using the proposed method generated a 40.52% faster arrival time at the patients, which can increase the chances of patient survival. The maximum arrival time decreased from 31.72 min to 16.95 min, or 46.56%, while the minimum arrival time at the patients decreased from 8.10 to 5.04 min, or 37.77%. Finally, the total cost and total distance traveled were reduced by 32.06% and 29.97%, respectively. Comparing the GA and M-VaNSAS, M-VaNSAS generated a 13.43% lower cost than that of the GA and recorded 16.76% less total distance than that of the GA. An example of the locations of the EMSs during the day (a) and at night (b) is shown in Figure 10.

Conclusions and Future Outlook
We proposed a methodology to dynamically and optimally locate EMSs in order to reach the patients on time. An IOT was installed to calculate the current traveling time from point to point and connect this information with the designed EMS relocation algorithm. Trained volunteers were assigned to the used EMSs in order to obtain the lowest assignment cost of the whole system while maintaining the service level. The M-VaNSAS was proposed to solve the problem, and the effectiveness was compared with the well-known genetic algorithm (GA).
Four black boxes were used to improve the initially constructed methods. These black boxes were random-transit (RT), best-transit (BT), inter-transit (IT), and scaling factor (SF). The new black box selection formula was modified to obtain a better solution. The link between Pareto analysis and the VaNSAS was first discussed in this paper to achieve combinatorial optimization. The computational result showed that the M-VaNSAS improved the solution quality of the GA by up to 19.69%. The case study results showed that M-VaNSAS obtained 28.56% and 15.03% lower cost than that of the current procedure and GA, respectively.
The proposed methods outperformed the current practice and the genetic algorithm for the following reasons.
(1) The service time (average time to reach the patients) was reduced because of the application and IOT system designed and used in this study. Real-time traffic reporting to the central computer was used to reroute the ambulance; therefore, the EMS could reach patients more quickly. (2) The total cost and distance to service the patients were reduced due to the effectiveness of the designed algorithm (M-VaNSAS). (3) The service level of the patients was increased, as the number of people covered within seven minutes increased with M-VaNSAS; this could reduce the number of severe cases.
For future work, we know that patient demand for EMS is not always predictable, and it occurs stochastically in the real word. Therefore, stochastic demand management will be a focus in future research. Moreover, the integration of the EMS dispatching strategy should also be present in order to obtain a good plan for the EMS location and dispatching strategy.