Queuing simulation method and device, machine readable storage medium and electronic equipment
By generating and classifying tourists, determining service counters and status, and considering environmental impacts, this method solves the problem of ignoring tourists traveling in groups in existing queuing simulation methods, thus improving the rationality and adaptability of the simulation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-27
AI Technical Summary
Existing queuing simulation methods are inadequate in handling dynamics and complexity, especially neglecting the impact of tourists traveling in groups, resulting in inadequate queuing simulation.
By generating new tourists and classifying them into independent tourists and tourist groups, configuring corresponding parameters, determining service counters for each tourist and group, considering tourist status and location, selecting service counters based on comprehensive cost factors, updating tourist patience values and locations, simulating environmental impacts, and improving the simulation's rationality.
It enables the differentiation between independent tourists and tourist groups in queuing simulations, taking into account the impact of traveling in groups, thereby improving the rationality and flexibility of the simulation and adapting to the personalized needs of different scenarios.
Smart Images

Figure CN121747233A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer simulation, and more particularly, to a queuing simulation method and device, a machine readable storage medium and an electronic device. BACKGROUND
[0002] In large activities or park scenarios, queuing is very common, such as amusement facilities in scenic spots, in front of exhibition booths, etc. Reasonable queuing management is of great significance to improve the experience of tourists and optimize resource allocation. By simulating the queuing process, the queuing situation under different conditions can be predicted in advance to provide a basis for management decisions.
[0003] The existing queuing simulation method has certain deficiencies in handling dynamics and complexity. For example, the influence of tourists traveling together is ignored.
[0004] Therefore, how to improve the rationality of the queuing simulation method has become a technical problem to be solved in the field. SUMMARY
[0005] Therefore, the present application provides a queuing simulation method and device, a machine readable storage medium and an electronic device to improve the rationality of the queuing simulation method.
[0006] In a first aspect, the present application provides a queuing simulation method, which includes: for each simulation time, performing the following: generating new tourists arriving at the simulation time; dividing the generated new tourists into new independent tourists and new tourist groups according to the group tourist proportion corresponding to the simulation time, and configuring new tourist parameters for each generated new tourist, wherein the new tourist parameters include an identifier, a state and a position; for each new independent tourist, determining the corresponding service counter; for each new tourist group, determining the corresponding service counter; determining the state of the tourists and the service counter at the simulation time.
[0007] Optionally, for each new independent tourist, determining the corresponding service counter includes: for each service counter, determining the first comprehensive cost of the new independent tourist selecting the service counter based on the first distance between the new independent tourist and the service counter and the first estimated waiting time of the new independent tourist at the service counter; determining the corresponding service counter of the new independent tourist based on the corresponding first comprehensive cost of each service counter in all service counters.
[0008] Optionally, for each new tourist group, determining the corresponding service counter includes: determining the corresponding service counter based on the decision maker of the new tourist group.
[0009] Optionally, for each new tourist group, based on the decision maker of the new tourist group, determining a corresponding service counter, comprising: for each service counter, based on the second distance between the decision maker of the new tourist group and the service counter, and the second expected waiting time of the decision maker of the new tourist group at the service counter, determining a second comprehensive cost of the decision maker of the new tourist group choosing the service counter; and based on the second comprehensive cost of each service counter, determining the corresponding service counter of the new tourist group.
[0010] Optionally, determining the state of the tourists and the service counters at the simulation time, comprising: for a current state of an independent tourist being walking, determining the state and position of the independent tourist at the simulation time; for a current state of an independent tourist being waiting, updating the patience value of the independent tourist, and determining the state of the independent tourist at the simulation time; for a current state of a tourist group being walking, determining the state and position of the tourists in the tourist group at the simulation time; for a current state of a tourist group being waiting, updating the group patience value of the tourist group, and determining the state of the tourists in the tourist group at the simulation time; for each service counter, performing the following: in the case that the current state of the service counter is busy and the service time of the service counter exceeds the service efficiency, determining the state of the tourist currently served by the service counter at the simulation time as leaving, clearing the service time of the service counter, if there is a tourist in the queue of the service counter, determining the state of the tourist at the head of the queue at the simulation time as being served, starting to count the service time of the service counter, and determining the state of the service counter at the simulation time as busy, and if there is no tourist in the queue of the service counter, determining the state of the service counter at the simulation time as idle; in the case that the current state of the service counter is busy and the service time of the service counter does not exceed the service efficiency, increasing the service time of the service counter by one time step; in the case that the current state of the service counter is idle, if there is a tourist in the queue of the service counter, determining the state of the tourist at the head of the queue at the simulation time as being served, starting to count the service time of the service counter, and determining the state of the service counter at the simulation time as busy, and if there is no tourist in the queue of the service counter, determining the state of the service counter at the simulation time as idle.
[0011] Optionally, for the independent tourist in the walking state, determining the state and the position of the independent tourist at the simulation moment comprises: determining a first displacement of the independent tourist according to a first tail position of a service counter corresponding to the independent tourist; updating the position of the independent tourist according to the first displacement; judging whether the independent tourist has arrived at the first tail position; in the case that the independent tourist has arrived at the first tail position, determining the state of the independent tourist at the simulation moment as waiting; in the case that the independent tourist has not arrived at the first tail position, determining the state of the independent tourist at the simulation moment as walking.
[0012] Optionally, for the independent tourist in the waiting state, determining the state of the independent tourist at the simulation moment comprises: judging whether the updated patience value is greater than 0; in the case that the updated patience value is greater than 0, determining the state of the independent tourist at the simulation moment as waiting; in the case that the updated patience value is not greater than 0, determining the state of the independent tourist at the simulation moment as leaving.
[0013] Optionally, for the independent tourist in the waiting state, the decay speed of the patience value of the independent tourist with time is determined based on the following parameters: temperature, humidity, noise, crowd density and current queue length.
[0014] Optionally, the decay speed of the patience value of the independent tourist with time is determined based on the following formula: , wherein, represents the patience value of the independent tourist; represents a basic decay rate; represents a queue pressure coefficient; represents a current queue length; represents an environmental influence factor; represents an individual comprehensive environmental sensitivity coefficient of the independent tourist; represents a temperature coefficient; represents a humidity coefficient; represents a noise coefficient; represents a density coefficient; represents the decay speed of the patience value of the independent tourist with time; represents temperature; represents humidity; represents noise; represents crowd density.
[0015] Optionally, for the current state of the decision maker being a walking tourist group, determining the state and position of the tourists in the tourist group at the simulation moment comprises: determining a second displacement of the tourist group according to the current position of the decision maker of the tourist group and the second tail position of the service counter corresponding to the tourist group; updating the position of the tourists in the tourist group according to the second displacement; judging whether the tourist group has reached the second tail position; in the case that the tourist group has reached the second tail position, determining the state of the tourists in the tourist group at the simulation moment as waiting; in the case that the tourist group has not reached the second tail position, determining the state of the tourists in the tourist group at the simulation moment as walking.
[0016] Optionally, for the current state of the decision maker being a waiting tourist group, determining the state of the tourists in the tourist group at the simulation moment comprises: judging whether the updated group patience value is greater than 0; in the case that the updated group patience value is greater than 0, determining the state of the tourists in the tourist group at the simulation moment as waiting; in the case that the updated group patience value is not greater than 0, determining the state of the tourists in the tourist group at the simulation moment as leaving.
[0017] Optionally, for the current state of the decision maker being a waiting tourist group, the decay speed of the group patience value of the tourist group over time is determined based on the following parameters: the decay speed of the patience value of the tourists in the tourist group over time, an environmental influence factor.
[0018] Optionally, the decay speed of the group patience value of the tourist group over time is determined based on the following formula: wherein, represents the decay speed of the group patience value of a tourist group over time; represents the basic decay speed of the group patience value of a tourist group over time; represents the total number of tourists in a tourist group ; represents the environmental influence factor of a tourist in a tourist group ; represents the basic decay rate; represents the queue pressure coefficient; represents a current queue length; represents an average environmental impact factor of a group of tourists represents an acceleration decay factor; represents a panic effect factor; represents a personal patience value of a tourist
[0019] In a second aspect, the present application also provides a queuing simulation device, comprising: a processing module, configured to, for each simulation time, perform the following: generating new tourists arriving at the simulation time; dividing the generated new tourists into new independent tourists and new groups of tourists according to a group tourist ratio corresponding to the simulation time, and configuring each generated new tourist with new tourist parameters, wherein the new tourist parameters comprise an identifier, a state and a location; determining a corresponding service counter for each new independent tourist; determining a corresponding service counter for each group of new tourists; and determining the state of the tourists and the service counters at the simulation time.
[0020] Optionally, the determining of the corresponding service counter for each new independent tourist comprises: for each service counter, determining a first comprehensive cost of the new independent tourist selecting the service counter based on a first distance between the new independent tourist and the service counter and a first estimated waiting time of the new independent tourist at the service counter; and determining the corresponding service counter of the new independent tourist based on the corresponding first comprehensive cost of each service counter among all service counters.
[0021] Optionally, the determining of the corresponding service counter for each group of new tourists comprises: determining the corresponding service counter based on a decision maker of the new group of tourists.
[0022] Optionally, the determining of the corresponding service counter for each group of new tourists based on the decision maker of the new group of tourists comprises: for each service counter, determining a second comprehensive cost of the decision maker of the new group of tourists selecting the service counter based on a second distance between the decision maker of the new group of tourists and the service counter and a second estimated waiting time of the decision maker of the new group of tourists at the service counter; and determining the corresponding service counter of the new group of tourists based on the corresponding second comprehensive cost of each service counter among all service counters.
[0023] Optionally, the determining the state of the visitor and the service counter at the simulation moment comprises: for the current state of the independent visitor being walking, determining the state and the position of the independent visitor at the simulation moment; for the current state of the independent visitor being waiting, updating the patience value of the independent visitor, and determining the state of the independent visitor at the simulation moment; for the current state of the decision maker being the walking visitor group, determining the state and the position of the visitor in the visitor group at the simulation moment; for the current state of the decision maker being the waiting visitor group, updating the group patience value of the visitor group, and determining the state of the visitor in the visitor group at the simulation moment; for each service counter, performing the following: in the case that the current state of the service counter is busy and the service time of the service counter exceeds the service efficiency, determining the state of the visitor currently served by the service counter at the simulation moment as leaving, clearing the service time of the service counter, determining the state of the visitor at the head of the queue at the simulation moment as being served if there is a visitor in the queue of the service counter, starting timing the service time of the service counter, and determining the state of the service counter at the simulation moment as busy, determining the state of the service counter at the simulation moment as idle if there is no visitor in the queue of the service counter; in the case that the current state of the service counter is busy and the service time of the service counter does not exceed the service efficiency, increasing the service time of the service counter by one time step; in the case that the current state of the service counter is idle, determining the state of the visitor at the head of the queue at the simulation moment as being served if there is a visitor in the queue of the service counter, starting timing the service time of the service counter, and determining the state of the service counter at the simulation moment as busy, determining the state of the service counter at the simulation moment as idle if there is no visitor in the queue of the service counter.
[0024] Optionally, for the current state of the independent visitor being walking, the determining the state and the position of the independent visitor at the simulation moment comprises: determining a first displacement of the independent visitor according to the first tail position of the service counter corresponding to the independent visitor; updating the position of the independent visitor according to the first displacement; determining whether the independent visitor has arrived at the first tail position; in the case that the independent visitor has arrived at the first tail position, determining the state of the independent visitor at the simulation moment as waiting; in the case that the independent visitor has not arrived at the first tail position, determining the state of the independent visitor at the simulation moment as walking.
[0025] Optionally, for the independent visitor whose current state is waiting, determining the state of the independent visitor at the simulation time instant comprises: judging whether the updated patience value is greater than 0; in the case that the updated patience value is greater than 0, determining the state of the independent visitor at the simulation time instant as waiting; in the case that the updated patience value is not greater than 0, determining the state of the independent visitor at the simulation time instant as leaving.
[0026] Optionally, for the independent visitor whose current state is waiting, the decay rate of the patience value of the independent visitor over time is determined based on the following parameters: temperature, humidity, noise, crowd density and current queue length.
[0027] Optionally, the decay rate of the patience value of the independent visitor over time is determined based on the following formula: , wherein, represents the patience value of the independent visitor; represents the base decay rate; represents the queue pressure coefficient; represents the current queue length; represents the environmental impact factor; represents the individual comprehensive environmental sensitivity coefficient of the independent visitor; represents the temperature coefficient; represents the humidity coefficient; represents the noise coefficient; represents the density coefficient; represents the decay rate of the patience value of the independent visitor over time; represents the temperature; represents the humidity; represents the noise; represents the crowd density. Optionally, for the visitor group whose current state is walking, determining the state and position of the visitors in the visitor group at the simulation time instant comprises: determining a second displacement of the visitor group according to the current position of the decision maker of the visitor group and the second tail position of the service counter corresponding to the visitor group; updating the positions of the visitors in the visitor group according to the second displacement; judging whether the visitor group has reached the second tail position; in the case that the visitor group has reached the second tail position, determining the state of the visitors in the visitor group at the simulation time instant as waiting; in the case that the visitor group has not reached the second tail position, determining the state of the visitors in the visitor group at the simulation time instant as walking.
[0028] Optionally, for the visitor group whose current state is walking, determining the state and position of the visitors in the visitor group at the simulation time instant comprises: determining a second displacement of the visitor group according to the current position of the decision maker of the visitor group and the second tail position of the service counter corresponding to the visitor group; updating the positions of the visitors in the visitor group according to the second displacement; judging whether the visitor group has reached the second tail position; in the case that the visitor group has reached the second tail position, determining the state of the visitors in the visitor group at the simulation time instant as waiting; in the case that the visitor group has not reached the second tail position, determining the state of the visitors in the visitor group at the simulation time instant as walking.
[0029] Optionally, for the decision maker's current state being a waiting visitor group, determining the state of the visitors in the visitor group at the simulation moment comprises: judging whether the updated group patience value is greater than 0; in the case that the updated group patience value is greater than 0, determining the state of the visitors in the visitor group at the simulation moment as waiting; in the case that the updated group patience value is not greater than 0, determining the state of the visitors in the visitor group at the simulation moment as leaving.
[0030] Optionally, for the decision maker's current state being a waiting visitor group, the decay speed of the group patience value of the visitor group over time is determined based on the following parameters: the decay speed of the patience value of the visitors in the visitor group over time, an environmental influence factor.
[0031] Optionally, the decay speed of the group patience value of the visitor group over time is determined based on the following formula: wherein, represents the decay speed of the group patience value of a visitor group over time; represents the basic decay speed of the group patience value of a visitor group over time; represents the total number of visitors in a visitor group ; represents an environmental influence factor of a visitor in a visitor group ; represents a basic decay rate; represents a queue pressure coefficient; represents a current queue length; represents an average environmental influence factor of a visitor group ; represents an acceleration decay factor; represents a panic effect factor; represents a personal patience value of a visitor . In a third aspect, the present application further provides a machine readable storage medium, which has instructions stored thereon, the instructions being used to cause a machine to execute the above-mentioned queuing simulation method.
[0032] In a third aspect, the present application further provides a machine readable storage medium, which has instructions stored thereon, the instructions being used to cause a machine to execute the above-mentioned queuing simulation method.
[0033] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the executable instructions to implement the queuing simulation method described above.
[0034] According to the technical solution of this application, for each simulation moment, new tourists arriving at that simulation moment are generated, and new tourist parameters are configured for each generated new tourist, including an identifier, status, patience value, and location. Based on the proportion of tourists in the group corresponding to the simulation moment, the generated new tourists are divided into new independent tourists and new tourist groups. For each new independent tourist, a corresponding service counter is determined; for each new tourist group, a corresponding service counter is determined; and the status of tourists and service counters at the simulation moment is determined. Thus, queuing simulation is achieved, and the simulation distinguishes between independent tourists and tourist groups, taking into account the influence of tourists traveling in groups, thereby improving the rationality of queuing simulation. Furthermore, the queuing simulation method is not limited to any particular scenario and can adapt to personalized needs in different scenarios, improving the scalability and flexibility of queuing simulation.
[0035] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description
[0036] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application, and the illustrative embodiments and descriptions thereof are used to explain this application. In the drawings: Figure 1 This is a flowchart of a queuing simulation method according to a preferred embodiment of this application; Figure 2 This is a schematic diagram of the overall simulation operation process according to the preferred embodiment of this application; Figure 3 This is a schematic diagram illustrating the status update of an independent tourist according to a preferred embodiment of this application; Figure 4 This is a schematic diagram illustrating the update of tourist group status according to a preferred embodiment of this application; Figure 5 This is a schematic diagram of the service desk status update process according to a preferred embodiment of this application; Figure 6 This is a schematic diagram of a visitor queuing process based on environmental impact-induced patience value decay according to a preferred embodiment of this application; Figure 7 This is a schematic diagram of the tourist movement process according to a preferred embodiment of this application; Figure 8 This is a graphical interface diagram of a preferred embodiment according to this application. Detailed Implementation
[0037] The technical solution of this application will now be described in detail with reference to the accompanying drawings and embodiments.
[0038] Firstly, the embodiments of this application provide a queuing simulation method.
[0039] Figure 1 This is a flowchart of a queuing simulation method according to a preferred embodiment of this application. Figure 1 As shown, the queuing simulation method includes the following:
[0040] In step S10, it is determined whether the simulation running time is less than or equal to the simulation duration. If yes, step S11 is executed; otherwise, step S17 is executed. In this embodiment, steps S11 to S16 are executed for each simulation moment. The simulation running time is the cumulative running time from the start of the simulation; the simulation moment is the simulation start moment and the moment reached after each time step from the simulation start moment.
[0041] In step S11, the new tourist arriving at the current simulation moment is generated.
[0042] Determine the number of new tourists generated at the current simulation moment.
[0043] Optionally, in this embodiment, visitor parameters can be preset, and the visitor parameters can be used as a basis for decision-making. These preset visitor parameters support both global and dynamic parameter methods.
[0044] When the visitor parameters are set globally, they include the visitor arrival rate, which remains constant for each simulation time step. When the visitor parameters are set dynamically, they include the number of visitors arriving over time; that is, the number of visitors arriving for each time step. In other words, the number of visitors arriving is set based on the number of time steps advanced, with each time step having its own corresponding number of visitors arriving. Thus, each simulation time step has a corresponding number of visitors arriving. It should be noted that at the start of the simulation, the number of time steps advanced is 0.
[0045] When the tourist parameters are set as global parameters, the number of new tourists generated at the current simulation moment is calculated based on the Poisson distribution and the tourist arrival rate. When the tourist parameters are dynamic, the number of new tourists generated at the current simulation moment is determined based on the number of tourists arriving at the current simulation moment and the corresponding number of advancements at the current time step. .
[0046] Generate new tourists for the current simulation time based on the number of new tourists generated at the current simulation time.
[0047] In step S12, based on the proportion of group tourists at the simulation time, the newly generated tourists are divided into new independent tourists and new tourist groups, and new tourist parameters are configured for each newly generated tourist. These new tourist parameters include identifier, status, and location.
[0048] When the visitor parameters are set as global parameters, they can also include group size (maximum and minimum number of people in a single group), the location range where visitors are generated, and the proportion of visitors in a group. Tourist walking speed range and tourist patience value range. When tourist parameters are used dynamically, they can also include time-stored group size (maximum and minimum number of people in a single group), tourist generation location, and group tourist ratio. Tourist walking speed range, tourist patience value range, i.e., group size (maximum and minimum number of people in a single group) for each time step, tourist generation location, and group tourist ratio. The parameters include the range of visitor walking speed and the range of visitor patience. Additionally, the dynamic parameter method supports importing CSV files, allowing visitor parameters to be stored in a CSV file.
[0049] Based on the tourist parameters, determine the proportion of group tourists corresponding to the current simulation moment; based on the proportion of group tourists and the number of new tourists generated, determine the number of new independent tourists and the number of tourists in the new group, and then divide the generated new tourists into new independent tourists and new group tourists, for example, randomly; for new group tourists, divide them into new tourist groups according to the group size corresponding to the current simulation moment.
[0050] In this embodiment, a visitor's state can be walking (heading to the service desk), waiting, being served, or leaving. The initial state of a newly generated visitor is walking. The identifier only needs to be able to distinguish the visitor; for example, it could be a sequence number set according to the order of appearance, such as `id`.
[0051] For each new tourist group, a decision-maker is randomly selected. A location is assigned to each new tourist. The locations of tourists in a new group are distributed 1 meter apart, with the location of the decision-maker in their respective new tourist group as the core. Optionally, in this embodiment, when assigning locations to each new independent tourist and the decision-maker of a new tourist group, the locations can be randomly assigned within the tourist-generated location range.
[0052] Optionally, in this embodiment, the new tourist parameters may further include walking speed. Specifically, a walking speed is randomly assigned to each new tourist based on the range of tourist walking speeds corresponding to the current simulation moment.
[0053] In step S13, the corresponding service desk is determined for each new individual tourist.
[0054] In step S14, a corresponding service desk is determined for each new group of tourists.
[0055] In step S15, the status of tourists and the service desk at the simulation moment is determined. It should be noted that the tourists described here include new independent tourists and old independent tourists generated at the current simulation moment, as well as new group tourists and old group tourists generated at the current simulation moment.
[0056] In step S16, advance by one time step, and then execute step S10.
[0057] In step S17, the simulation ends.
[0058] It should be noted that, Figure 1 The order of the steps shown is merely an example, and the order of some steps can be adjusted. For example, steps S13 and S14 can be swapped.
[0059] Optionally, in this embodiment of the application, determining the corresponding service counter for each new independent tourist may include the following:
[0060] For each service counter, the first comprehensive cost for a new independent tourist to choose a service counter is determined based on the first distance between the new independent tourist and the service counter and the first estimated waiting time of the new independent tourist at the service counter.
[0061] Based on the initial overall cost of each of all service counters, determine the service counter corresponding to the new independent tourist. For example, select the service counter with the lowest initial overall cost.
[0062] In this way, when tourists choose a service counter, various factors are taken into account, and factors such as distance and waiting time are weighed comprehensively, which further improves the rationality of the queue simulation.
[0063] Optionally, in this embodiment of the application, for the service desk For any new independent visitor, the first comprehensive cost is incurred from the new independent visitor to the service desk. First distance First distance cost coefficient ,desk First estimated waiting time First waiting time cost coefficient Decision. New independent tourists will be assigned to the service counter with the lowest overall cost. The specific formula is as follows: in, This represents the set of all service counters.
[0064] Optionally, in this embodiment of the application, a distance cost coefficient may be used. =0.1, take the waiting time cost coefficient. =1.
[0065] Optionally, in this embodiment of the application, the service desk First estimated waiting time You can use the help desk Queue size and service counter It is determined by multiplying the individual service time.
[0066] Optionally, in this embodiment, determining the corresponding service counter for each new tourist group may include the following: determining the corresponding service counter based on the decision-maker of the new tourist group.
[0067] Optionally, in this application embodiment, for each new tourist group, determining the corresponding service desk based on the decision-maker of the new tourist group may include the following:
[0068] For each service counter, a second comprehensive cost is determined based on the second distance between the decision-makers of the new tourist group and the service counter, and the second estimated waiting time of the decision-makers of the new tourist group at the service counter.
[0069] Based on the second overall cost corresponding to each of all service counters, determine the service counter corresponding to the new tourist group. For example, select the service counter with the lowest second overall cost.
[0070] In this way, when tourists choose a service counter, various factors are taken into account, and factors such as distance and waiting time are weighed comprehensively, which further improves the rationality of the queue simulation.
[0071] Optionally, in this embodiment, the decision-maker selects the service counter with the lowest overall cost for the group of tourists to lead all tourists in the group into the queue.
[0072] For the service desk For any new tourist group, the second comprehensive cost is calculated from the decision-maker of the new tourist group to the service desk. The second distance Second distance cost coefficient ,desk Second estimated waiting time Second waiting time cost coefficient and group size amplification factor Determine the service desk. Select the second service desk with the lowest overall cost; all members in the group simultaneously select the result. The specific formula is as follows: in, The number of new tourists active within the new tourist group; This represents the set of all service counters.
[0073] Optionally, in this embodiment of the application, a distance cost coefficient may be used. =0.1, take the waiting time cost coefficient. =1.
[0074] Optionally, in this embodiment of the application, determining the state of tourists and the service desk at the simulation moment may include the following:
[0075] For an independent tourist currently walking, determine their state and position at the simulation moment. For an independent tourist currently waiting, update their patience value and determine their state at the simulation moment.
[0076] Given that the decision-maker's current state is a walking group of tourists, determine the state and position of each tourist within the group at the simulation moment.
[0077] For a group of tourists whose current state is waiting, update the group patience value of the tourist group and determine the state of the tourists in the tourist group at the simulation moment.
[0078] For each service counter, perform the following: If the current status of the service counter is busy and the service time exceeds the service efficiency, set the status of the currently serving tourist to "left" at the simulation time, and reset the service time to zero. If there are tourists queuing at the service counter, set the status of the tourist at the front of the queue to "being served" at the simulation time, start timing the service time of the service counter, and set the status of the service counter to "busy" at the simulation time. If there are no tourists queuing at the service counter, set the status of the service counter to "idle" at the simulation time. If the current status of the service counter is busy and the service time does not exceed the service efficiency, increase the service time of the service counter by one time step. If the current status of the service counter is idle, and there are tourists queuing at the service counter, set the status of the tourist at the front of the queue to "being served" at the simulation time, start timing the service time of the service counter, and set the status of the service counter to "busy" at the simulation time. If there are no tourists queuing at the service counter, set the status of the service counter to "idle" at the simulation time.
[0079] Optionally, in this embodiment of the application, determining the state and position of an independent tourist at the simulation moment, for an independent tourist whose current state is walking, may include the following:
[0080] The first displacement of an independent tourist is determined based on the position of the last person in the first queue at the service counter. Optionally, the magnitude of the first displacement is calculated according to the independent tourist's walking speed and time step, and the direction of the first displacement is determined based on the independent tourist's current position and the position of the last person in the first queue at the service counter. The position of the independent tourist is updated based on the first displacement. It is then determined whether the independent tourist has reached the position of the last person in the first queue. Specifically, the updated position of the independent tourist is compared with the position of the last person in the first queue to determine whether the independent tourist has reached the position of the last person in the first queue. If the independent tourist has reached the position of the last person in the first queue, the independent tourist's state at the simulation time is determined to be waiting. If the independent tourist has not reached the position of the last person in the first queue, the independent tourist's state at the simulation time is determined to be walking.
[0081] Optionally, in this embodiment of the application, determining the state of an independent tourist at the simulation moment for an independent tourist whose current state is waiting may include the following:
[0082] Determine if the updated patience value is greater than 0. If the updated patience value is greater than 0, determine the independent tourist's state at the simulation time as "waiting". If the updated patience value is not greater than 0, determine the independent tourist's state at the simulation time as "leaving". Optionally, in this embodiment, if the independent tourist's current state is "waiting", the waiting time is updated.
[0083] Optionally, in this embodiment, if the independent tourist's current state is walking, before determining the independent tourist's first displacement, it is determined whether a preset time interval has elapsed since the last service desk decision, for example, the preset time interval could be 20 seconds. The service desk decision determines the service desk corresponding to the independent tourist. If the preset time interval has elapsed, the service desk corresponding to the independent tourist is re-determined; specifically, a cost-optimal algorithm is used to re-determine which service desk to go to, as described in the above embodiments. If the preset time interval has not elapsed, the first displacement is determined based on the determined service desk to go to.
[0084] Optionally, in this embodiment, after an individual tourist's status is determined to be waiting, a patience value is assigned. This patience value can be determined based on specific circumstances. For example, it can be randomly generated based on the range of tourist patience values in the tourist parameters corresponding to the current simulation time. For instance, the range of tourist patience values could be 1800-2700. The patience value decays over time while queuing, and when it is exhausted, the tourist chooses to leave the queue and abandon the service. Different patience value update models can be used for individual tourists and groups of tourists.
[0085] Optionally, in this application embodiment, for an independent tourist whose current state is waiting, the rate at which the patience value of the independent tourist decays over time is determined based on the following parameters: temperature, humidity, noise, crowd density, and current queue length.
[0086] Optionally, in this embodiment, the rate of decay of an individual tourist's patience value over time is determined based on the following formula: in, Indicates independent tourists Patience level; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates environmental impact factors; Independent tourists The individual's comprehensive environmental sensitivity coefficient; Indicates the temperature coefficient; Indicates the humidity coefficient; Indicates the noise figure; Represents the density coefficient; Indicates independent tourists The rate at which patience value decays over time; Indicates temperature; Indicates humidity; Indicates noise; Indicates population density.
[0087] The simulation process for independent tourists can be referenced. Figure 7 As shown.
[0088] Optionally, in this embodiment of the application, determining the state and position of tourists within the tourist group at the simulation moment, given that the decision-maker's current state is a walking tourist group, may include the following:
[0089] The second displacement of the tourist group is determined based on the current position of the decision-maker and the second tail position of the service counter corresponding to the tourist group. Optionally, the magnitude of the second displacement is calculated according to the minimum walking speed and time step of the tourists in the tourist group, and the direction of the second displacement is determined based on the current position of the decision-maker and the second tail position of the service counter, thus determining the second displacement. The positions of the tourists in the tourist group are updated based on the second displacement. It is then determined whether the tourist group has reached the second tail position. Specifically, this is determined by comparing the decision-maker's position with the second tail position. If the tourist group has reached the second tail position, the state of the tourists in the tourist group at the simulation time is set to waiting. Furthermore, the tourists in the tourist group enter the queue in a random order. If the tourist group has not reached the second tail position, the state of the tourists in the tourist group at the simulation time is set to walking.
[0090] Optionally, in this embodiment of the application, determining the state of tourists within the tourist group at the simulation moment, given that the decision-maker's current state is a waiting tourist group, may include the following:
[0091] Determine if the updated group patience value is greater than 0. If the updated group patience value is greater than 0, determine the state of the tourists in the tourist group at the simulation time as "waiting". If the updated group patience value is not greater than 0, determine the state of the tourists in the tourist group at the simulation time as "leaving". Optionally, in this embodiment, if the current state of the decision-maker in the tourist group is "waiting", the waiting time is updated.
[0092] Optionally, in this embodiment, if the decision-maker of the tourist group is currently walking, before determining the second displacement of the tourist group, it is determined whether a preset time interval has elapsed since the last service desk decision. For example, the preset time interval could be 20 seconds. The service desk decision is to determine the service desk corresponding to the tourist group. If the preset time interval has elapsed, the service desk corresponding to the tourist group is re-determined. Specifically, the decision-maker of the tourist group re-determines which service desk to go to based on a group cost-optimal algorithm, as described in the above embodiments. If the preset time interval has not elapsed, the second displacement is determined based on the determined service desk to go to.
[0093] Optionally, in this embodiment, after the state of tourists in a tourist group is determined to be waiting at the simulation time, a patience value is assigned to each group of tourists in the tourist group. The patience value can be determined according to specific circumstances. For example, based on the range of tourist patience values in the tourist parameters corresponding to the current simulation time, a patience value is randomly generated according to the range of tourist patience values. For example, the range of tourist patience values is 1800-2700. The initial group patience value of a tourist group is determined based on the initial patience values of all group tourists in that tourist group.
[0094] Optionally, in this application embodiment, for a group of tourists whose current state is waiting, the rate of decay of the group patience value over time is determined based on the following parameters: the rate of decay of the patience value of tourists within the group over time, and the environmental impact factor.
[0095] In this embodiment, the possibility of tourists leaving midway due to excessively long waiting times is considered, and the behavior of tourists during the queuing process is simulated in greater detail, further improving the rationality of the queuing simulation. Furthermore, the dynamic influence of the environment on tourist behavior is considered, further enhancing the rationality of the queuing simulation.
[0096] Optionally, in this embodiment, the rate of decay of the tourist group's patience value over time is determined based on the following formula: in, Indicates tourist groups Group patience value The rate of decay over time; Indicates tourist groups Group patience value The basic decay rate over time; Indicates tourist groups The total number of tourists in the country; Indicates tourist groups tourists Environmental impact factors; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates tourist groups The average environmental impact factor; Indicates the acceleration decay factor; Indicates the panic effect factor; Indicates tourists The individual's patience level.
[0097] Group Tourist Patience Model: Each member within a tourist group possesses individual patience and shared group patience. Individual patience is calculated according to the individual patience model (see the implementation method described above), while group patience decays at a rate lower than that of an independent tourist. If any member in the group exhausts their individual patience, the decay of group patience accelerates. When group patience is exhausted, the entire group leaves the queue.
[0098] The initial value of shared patience in a group is the average initial patience value of the group members multiplied by a coefficient of 1.2. .
[0099] Groups share a common group decay rate, with a base decay rate 0.8 times that of individual visitors. Accelerated decay mechanism: If a member loses patience, the group's patience decays faster. Furthermore, when a member loses patience and the average sensitivity is >1.5, it will be accelerated even further. The specific formula for the accelerated decay factor is as follows: Panic effect triggering: A panic effect is triggered when the average environmental impact factor is greater than 2.0, accelerating the decay of patience. The specific formula for the panic effect factor is as follows: Ultimate population decay: Specifically, the decline in patience among group tourists can be referenced... Figure 6 As shown.
[0100] Optionally, in this embodiment, simulation parameters can be input, including basic simulation parameters, environmental parameters, service desk parameters, and visitor parameters. Specifically, a graphical interface can be developed for inputting simulation parameters, such as... Figure 8 As shown.
[0101] The basic simulation parameters include the simulation range area, simulation duration, time step, and simulation random seed. The simulation random seed affects the randomly generated values of all range input parameters.
[0102] Environmental parameters include temperature, humidity, and noise. These parameters can be configured as global parameters or dynamic parameters. When using global parameters, the temperature, humidity, and noise levels are the same at every simulation moment. When using dynamic parameters, the parameters include temperature, humidity, and noise stored over time. Dynamic parameters support importing CSV files; the CSV file should contain dynamic temperature, humidity, and noise values stored according to timestamps.
[0103] The service desk parameters include the number of service desks, the location of each service desk, and the service time of each service desk.
[0104] Figure 2 This is a schematic diagram of the overall simulation operation flow according to a preferred embodiment of this application. The following is in conjunction with… Figure 2 The technical solutions provided by the embodiments of this application are described by way of example.
[0105] In step S201, input the simulation parameters.
[0106] In step S202, the simulation begins.
[0107] The simulation then loops, including generating new visitors, updating visitor status, and updating the service desk status.
[0108] In step S203, it is determined whether the simulation running time t is less than or equal to the simulation duration. If yes, then step S204 is executed; otherwise, step S219 is executed.
[0109] In step S204, a new tourist arriving at the current simulation moment is generated. Specifically, refer to the content described in the above embodiment.
[0110] In step S205, new independent tourists and new tourist groups are divided according to the proportion of group tourists.
[0111] In step S206, each new tourist group randomly elects a decision-maker.
[0112] In step S207, the decision-maker of the new tourist group decides which service desk to go to based on a group cost optimization algorithm. Then, step S209 is executed.
[0113] In step S208, each new independent tourist decides which service counter to go to based on a cost-optimal algorithm. Then, step S209 is executed.
[0114] In step S209, it is determined whether there are any tourists whose status has not been updated. If yes, proceed to step S210; otherwise, proceed to step S215.
[0115] In step S210, tourists are selected in order of their visitor IDs.
[0116] In step S211, it is determined whether the tourist belongs to a tourist group. If yes, proceed to step S213; otherwise, proceed to step S212.
[0117] In step S212, the status of the independent visitor is updated, specifically, referring to... Figure 3 As shown. Then, step S209 is executed. In step S213, it is determined whether the tourist is the decision-maker of the tourist group. If yes, proceed to step S214; otherwise, proceed to step S209.
[0118] In step S214, the group visitor status is updated. Specifically, refer to... Figure 4 As shown. Then, step S209 is executed.
[0119] In step S215, it is determined whether there are any service desk statuses that have not been updated. If yes, proceed to step S216; otherwise, proceed to step S218.
[0120] In step S216, select the service desk in order of service desk ID.
[0121] In step S217, the service desk status is updated. Specifically, refer to... Figure 5 As shown.
[0122] In step S218, the simulation time step is increased by one time step.
[0123] In step S219, the simulation results are output. After the simulation is completed, the final results are output, such as the total number of tourists, average waiting time, and average service time.
[0124] Optionally, in this embodiment, state information during the simulation process can be output periodically, such as the number of tourists in different states and the busyness of the service counter. The busyness of the service counter can be characterized by queue length.
[0125] Figure 3 This is a schematic diagram illustrating the status update of an independent tourist according to a preferred embodiment of this application. In this embodiment, for any independent tourist, the status can be updated according to the following:
[0126] Determine if the independent visitor's current state is walking. The current state is the state determined at the previous simulation moment. If yes, check if 20 seconds have passed since the last service desk decision. If not, determine if the independent visitor's current state is waiting.
[0127] If an independent tourist is currently walking and more than 20 seconds have passed since the last service desk decision, a new service desk is decided based on a cost-optimal algorithm. Then, the independent tourist's state and location are determined, as described in the above implementation. Specifically, if the determined state is waiting, an initial patience value is generated for the independent tourist.
[0128] If the independent tourist's current state is walking and no more than 20 seconds have passed since the last service desk decision, determine the independent tourist's state and location. If the determined state is waiting, generate the independent tourist's initial patience value.
[0129] If the current state of an independent tourist is waiting, the waiting time is updated, and the patience value is updated accordingly. If the updated patience value is not greater than 0, the independent tourist's state at the simulation time is determined to be "departed".
[0130] Figure 4 This is a schematic diagram illustrating the status update of a tourist group according to a preferred embodiment of this application. In this embodiment, for any tourist group, the status can be updated according to the following:
[0131] Determine if the decision-maker in the tourist group is currently walking. If yes, check if 20 seconds have passed since the last service desk decision. If not, check if the decision-maker is currently waiting.
[0132] If the decision-maker in the tourist group is currently walking and more than 20 seconds have passed since the last service desk decision, the group decision-maker re-determines which service desk to go to based on a group cost-optimal algorithm. Then, the status and location of the tourists within the group are determined, as described in the above implementation. Specifically, if the determined status is waiting, an initial patience value for the tourist is generated.
[0133] If the decision-maker in the tourist group is currently walking and the last time the service desk made a decision was less than 20 seconds ago, determine the status and location of the tourists within the tourist group, as described in the above implementation method. Specifically, if the determined status is waiting, generate the tourist's initial patience value.
[0134] If the decision-maker in the tourist group is currently in a waiting state, the waiting time is updated, and the group's patience value is updated accordingly. If the updated group patience value is not greater than 0, the status of the tourists in the tourist group is set to "left".
[0135] In this embodiment, the status of tourists is updated in real time, including walking (towards the service desk), waiting, being served, and leaving. The walking and waiting status of individual tourists is updated independently, while the walking and waiting status of groups of tourists is updated synchronously for each group. To avoid coupling, the determination of whether a tourist is in a service status is handled by the service desk update module.
[0136] Figure 5 This is a schematic diagram of the service desk status update process according to a preferred embodiment of this application. In this embodiment, for any service desk, the status can be updated according to the following:
[0137] Determine if the service desk is busy.
[0138] If the service desk is busy, determine if the current service time exceeds the service efficiency limit. If the current service time does not exceed the service efficiency limit, increase the service time by one time step.
[0139] If the service desk is busy and its current service time exceeds its service efficiency, the status of the currently serving tourist at the service desk will be set to "left" at the simulation time, and the service time of the service desk will be reset to zero. Subsequently, if there are tourists queuing at the service desk, the status of the tourist at the front of the queue will be set to "served" at the simulation time, and the service time of the service desk will start to run. At the same time, the status of the service desk at the simulation time will be set to "busy". If there are no tourists queuing at the service desk, the status of the service desk at the simulation time will be set to "idle".
[0140] If the service counter is idle, and there are tourists queuing at the service counter, the tourist at the front of the queue will be set to be served at the simulation time and the service time of the service counter will be started. At the same time, the service counter will be set to busy at the simulation time. If there are no tourists queuing at the service counter, the service counter will be set to idle at the simulation time.
[0141] The technical solutions provided by the embodiments of this application will be described exemplarily below with specific examples.
[0142] This application simulates the ticket checking facilities at the entrance of a theme park during the May Day holiday. The theme park entrance has a plaza 20m long and 50m wide. Ten ticket checking windows are arranged side-by-side on the right side of the plaza. Visitors enter the plaza from the left and check their tickets at the ticket checking facilities on the right to enter the theme park. The simulation parameters are set as follows: (1) Basic simulation parameters: Simulation area 1000m² 2 The simulation lasted for 2 hours (7200 seconds) with a simulation step size of 0.5 seconds. (2) Tourist parameters: The tourist arrival rate is 2400 people / hour. Based on the tourist questionnaire survey results, the group ratio is set to 60%. Tourists are randomly generated between (0,0) and (0,20). The patience value is 900~2700 (15min~45min) by default. (3) The number of service counters is 10, the service rate is 30 seconds / person, and the service counters numbered 1-10 are set at an average interval between (50, 1) and (50, 19); (4) Set environmental parameters: Set the environmental parameters according to historical meteorological data: temperature 28℃, humidity 75%, noise 70dB.
[0143] Run the simulation program to generate independent tourists and tourist groups, calculating the time for each simulation step. Tourists choose a service station and proceed based on an independent or group decision-making mechanism. During the walk, the service station selection is re-evaluated every 20 seconds. Tourists join a queue upon reaching a service station, and the service stations serve them sequentially. Tourists (or groups) leave the queue when their patience runs out. To simplify the calculation process, a specific group is selected to model its lifecycle activities during the simulation. Assume a family of three is born at t=1800s: father ID 1801 (position (0,0), walking speed 1.5m / s, patience 1800), mother ID 1802 (position (0,1), walking speed 1.4m / s, patience 2000), and child ID 1803 (position (0,0.5), walking speed 1.0m / s, patience 900). The father, ID 1801, acts as the tourist and the group decision-maker. The queue lengths for the 10 service stations at this point are calculated.
[0144] The group selects service station number 9, which has the lowest cost, and begins moving towards the back of the queue. The direction of movement is calculated based on the decision-maker's coordinates, and the position of the back of the queue is adjusted in real time at each simulation step. The moving speed is taken as the minimum walking speed in the group, i.e., the children's walking speed of 1.0 m / s.
[0145] At time t=1820s, assume the father has reached (18, 3). The queue length at the service counter has changed due to the completion of current service and the arrival of new tourists at the end of the queue. This group recalculates the cost and selects a new service counter.
[0146] At this point, the cost of service counter number 9 is still the lowest, so continue moving towards the back of the queue at service counter number 9.
[0147] At time t=1840, this group of tourists makes another service counter selection decision, and the calculation process is the same as above. This implementation will not repeat the calculation process here. Assuming that service counter number 9 is still selected, at time t=1845, the group reaches the end of the queue for service counter number 9, and group members join the queue one by one. The patience value begins to be consumed during the queuing process. At this time, the queue length for service counter number 9 is 15 people, and the person being served has been serving for 10 seconds.
[0148] At t=2425.5s, the child with ID 1803 ran out of personal patience, and the group environment factor was greater than 1.5. At this time, the group's shared patience was consumed at an accelerated rate of 3.50 group patience per second. Since there was still shared patience remaining, the group as a whole remained in the queue.
[0149] At time t=2345, the father finishes his service and his status is marked as "left".
[0150] At time t=2375, the child's service is completed, and the status is marked as "left".
[0151] At time t=2405, the mother finished her service and her status was marked as "away". At this time, all members in the group were in the "away" state, and the group status was marked as "inactive".
[0152] During the simulation, the system outputs real-time data on the number of new visitors per second, the number of people walking, the number of people queuing, the number of people leaving, the number leaving due to impatience, and the number leaving due to service completion. It also outputs the queue length at each service station. At time t=7200, the simulation completes, and the system outputs statistical data such as the maximum queue length at each service station, the overall average queue length, the average waiting time for visitors, and the visitor departure rate.
[0153] Simulations using the method and system described in this application can yield information such as visitor flow, service counter workload, and average visitor waiting time under a given configuration, providing decision support for park management. For example, simulation results may show that a particular service counter has a long queue and an excessively long average waiting time. In such cases, managers can consider increasing the number of service counters, adjusting the efficiency of service personnel, and expanding the queuing space in front of the service counters to optimize the visitor experience.
[0154] This application describes the development of a queuing simulation system that integrates dynamic decision-making mechanisms, spatial location modeling, and real-time status updates to accurately predict queue sizes, thereby serving the service facilities and environmental design of large event parks. 1) It accurately simulates the entire process of visitors in large events / parks, from arrival, route selection, queuing to service completion; 2) It dynamically optimizes the matching strategy between visitors and service counters, reducing overall waiting time and walking costs; 3) It outputs multi-dimensional statistical data (such as average waiting time and service counter load) to assist in resource allocation decisions.
[0155] The technical solution provided in this application can be applied to queue management optimization in scenarios such as large event venues, theme parks, and transportation hubs. It achieves high-precision passenger flow prediction and dynamic resource allocation through a hybrid simulation model. It can be used for the design of service window sizes for large events or park ticket checking and security checks.
[0156] This application relates to a visitor queuing simulation method applicable to large-scale events (such as concerts, exhibitions, and sporting events) or parks (such as theme parks, scenic spots, and commercial complexes). It can simulate the entire process of visitor arrival, service counter selection, queuing, and service completion through computer simulation, providing event organizers or park managers with design and decision support for environmental optimization, resource optimization, and visitor flow management.
[0157] This application provides a dynamic queuing simulation method and system for large-scale events or parks, and its beneficial effects mainly include the following aspects: 1) When tourists choose a service counter, the behavior of individual tourists and group tourists is modeled separately. Factors such as distance and waiting time are taken into account when tourists choose a service counter. The optimal service counter is selected by calculating the comprehensive cost, so that the tourists' choices are more reasonable and more in line with the actual large-scale events and the tourist scenarios in the park.
[0158] 2) The simulation of tourists' state transitions and behaviors was carried out in detail. For example, tourists will re-evaluate their choice of service desk during the walking process. The simulation also took into account the impact of tourists' patience value on queuing, which decreases with time and environmental factors, thus improving the accuracy of the simulation.
[0159] 3) The system has good scalability and flexibility. It can adapt to the needs of different large-scale events or parks by adjusting simulation parameters, providing managers with more valuable simulation results and helping to assist in park environmental design, service desk scale setting, layout design, personnel scheduling decisions, etc.
[0160] Secondly, this application also provides a queuing simulation device, which includes: a processing module, configured to perform the following for each simulation moment: generate new tourists arriving at the simulation moment; divide the generated new tourists into new independent tourists and new tourist groups according to the proportion of group tourists corresponding to the simulation moment, and configure new tourist parameters for each generated new tourist, wherein the new tourist parameters include an identifier, status, patience value, and location; determine the corresponding service counter for each new independent tourist; determine the corresponding service counter for each new tourist group; and determine the status of the tourists and the service counter at the simulation moment.
[0161] Optionally, for each new independent tourist, a corresponding service counter is determined, including: for each service counter, based on the first distance between the new independent tourist and the service counter and the first estimated waiting time of the new independent tourist at the service counter, determining the first comprehensive cost of the new independent tourist choosing the service counter; and based on the first comprehensive cost of each service counter among all service counters, determining the service counter corresponding to the new independent tourist.
[0162] Optionally, for each new tourist group, a corresponding service desk is determined, including: determining the corresponding service desk based on the decision-maker of the new tourist group.
[0163] Optionally, for each new tourist group, based on the decision-makers of the new tourist group, the corresponding service counter is determined, including: for each service counter, based on the second distance between the decision-makers of the new tourist group and the service counter, and the second estimated waiting time of the decision-makers of the new tourist group at the service counter, determining the second comprehensive cost for the decision-makers of the new tourist group to choose the service counter; and based on the second comprehensive cost corresponding to each service counter among all service counters, determining the service counter corresponding to the new tourist group.
[0164] Optionally, determining the status of tourists and service counters at simulation time includes: for independent tourists whose current status is walking, determining the status and location of the independent tourist at simulation time; for independent tourists whose current status is waiting, updating the patience value of the independent tourist and determining the status of the independent tourist at simulation time; for a group of tourists whose current status is walking, determining the status and location of tourists within the group at simulation time; for a group of tourists whose current status is waiting, updating the group patience value of the group and determining the status of tourists within the group at simulation time; for each service counter, performing the following: if the current status of the service counter is busy and the service time of the service counter exceeds the service efficiency, determining the status of the tourist currently being served by the service counter as "left" at simulation time, and setting the service counter's... The service time is reset to zero. If there are tourists queuing at the service counter, the tourist at the front of the queue is designated as being served at the simulation time, the service time of the service counter is started, and the service counter is designated as busy at the simulation time. If there are no tourists queuing at the service counter, the service counter is designated as idle at the simulation time. If the current status of the service counter is busy and the service time of the service counter has not exceeded the service efficiency, the service time of the service counter is increased by one time step. If the current status of the service counter is idle, and there are tourists queuing at the service counter, the tourist at the front of the queue is designated as being served at the simulation time, the service time of the service counter is started, and the service counter is designated as busy at the simulation time. If there are no tourists queuing at the service counter, the service counter is designated as idle at the simulation time.
[0165] Optionally, for an independent tourist whose current state is walking, the state and position of the independent tourist at the simulation moment are determined, including: determining the first displacement of the independent tourist based on the position of the last place in the first queue of the service counter corresponding to the independent tourist; updating the position of the independent tourist based on the first displacement; determining whether the independent tourist has reached the position of the last place in the first queue; if the independent tourist has reached the position of the last place in the first queue, determining the state of the independent tourist at the simulation moment as waiting; if the independent tourist has not reached the position of the last place in the first queue, determining the state of the independent tourist at the simulation moment as walking.
[0166] Optionally, for an independent tourist whose current state is waiting, the state of the independent tourist at the simulation time is determined, including: determining whether the updated patience value is greater than 0; if the updated patience value is greater than 0, the state of the independent tourist at the simulation time is determined to be waiting; if the updated patience value is not greater than 0, the state of the independent tourist at the simulation time is determined to be leaving.
[0167] Optionally, for independent tourists whose current state is waiting, the rate at which their patience value decays over time is determined based on the following parameters: temperature, humidity, noise, crowd density, and current queue length.
[0168] Optionally, the rate at which the patience value of an individual tourist decays over time is determined based on the following formula: , ,in, Indicates independent tourists Patience level; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates environmental impact factors; Independent tourists The individual's comprehensive environmental sensitivity coefficient; Indicates the temperature coefficient; Indicates the humidity coefficient; Indicates the noise figure; Represents the density coefficient; Indicates independent tourists The rate at which patience value decays over time; Indicates temperature; Indicates humidity; Indicates noise; Indicates population density.
[0169] Optionally, for a group of tourists whose current state is walking, the state and position of the tourists in the tourist group at the simulation time are determined, including: determining the second displacement of the tourist group based on the current position of the decision-maker and the second tail position of the service desk corresponding to the tourist group; updating the position of the tourists in the tourist group based on the second displacement; determining whether the tourist group has reached the second tail position; if the tourist group has reached the second tail position, determining the state of the tourists in the tourist group at the simulation time as waiting; if the tourist group has not reached the second tail position, determining the state of the tourists in the tourist group at the simulation time as walking.
[0170] Optionally, for a group of tourists whose current state is waiting, the state of the tourists in the tourist group at the simulation time is determined, including: determining whether the updated group patience value is greater than 0; if the updated group patience value is greater than 0, the state of the tourists in the tourist group at the simulation time is determined to be waiting; if the updated group patience value is not greater than 0, the state of the tourists in the tourist group at the simulation time is determined to be leaving.
[0171] Optionally, for a decision-maker whose current state is a waiting group of tourists, the rate at which the group's patience value decays over time is determined based on the following parameters: the rate at which the patience value of each tourist in the group decays over time, and the environmental impact factor.
[0172] Optionally, the rate of decay of the tourist group's patience value over time is determined based on the following formula: in, Indicates tourist groups Group patience value The rate of decay over time; Indicates tourist groups Group patience value The basic decay rate over time; Indicates tourist groups The total number of tourists in the country; Indicates tourist groups tourists Environmental impact factors; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates tourist groups The average environmental impact factor; Indicates the acceleration decay factor; Indicates the panic effect factor; Indicates tourists The individual's patience level.
[0173] The specific working principle and benefits of the queuing simulation device provided in this application are similar to those of the queuing simulation method provided in this application, and will not be repeated here.
[0174] Thirdly, this application also provides a machine-readable storage medium storing instructions that cause a machine to execute the queuing simulation method described above.
[0175] Fourthly, this application also provides an electronic device comprising: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the executable instructions to implement the queuing simulation method described above.
[0176] The preferred embodiments of this application have been described in detail above. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solution of this application, and these simple modifications all fall within the protection scope of this application.
[0177] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not describe the various possible combinations separately.
[0178] Furthermore, various different implementations of this application can be combined in any way, as long as they do not violate the spirit of this application, they should also be regarded as the content disclosed in this application.
Claims
1. A queuing simulation method, characterized in that, The queuing simulation method includes: For each simulation time step, perform the following: Generate the new tourists who arrive at the simulated time; Based on the proportion of group tourists corresponding to the simulation time, the newly generated tourists are divided into new independent tourists and new tourist groups, and new tourist parameters are configured for each newly generated tourist, wherein the new tourist parameters include identifier, status and location; For each new, independent visitor, a corresponding service desk should be designated; For each new group of tourists, a corresponding service desk will be designated; Determine the status of visitors and the service desk at the simulated moment.
2. The queuing simulation method according to claim 1, characterized in that, For each new, independent visitor, identify the appropriate service counter, including: For each service counter, based on the first distance between the new independent tourist and the service counter and the first estimated waiting time of the new independent tourist at the service counter, a first comprehensive cost for the new independent tourist to choose the service counter is determined; The service counter corresponding to the new independent tourist is determined based on the first comprehensive cost corresponding to each service counter among all service counters.
3. The queuing simulation method according to claim 1, characterized in that, For each new group of tourists, a corresponding service desk will be designated, including: The appropriate service desk is determined based on the decision-makers of the new tourist group.
4. The queuing simulation method according to claim 3, characterized in that, For each new tourist group, based on the decision-maker of that new tourist group, a corresponding service desk is determined, including: For each service counter, a second comprehensive cost for the decision-maker of the new tourist group to choose the service counter is determined based on a second distance between the decision-maker of the new tourist group and the service counter, and a second estimated waiting time for the decision-maker of the new tourist group at the service counter; The service counter corresponding to the new tourist group is determined based on the second comprehensive cost corresponding to each service counter among all service counters.
5. The queuing simulation method according to claim 1, characterized in that, Determine the status of visitors and the service desk at the simulated moment, including: For an independent tourist who is currently walking, determine the state and position of the independent tourist at the simulation moment; For an independent tourist whose current state is waiting, update the patience value of the independent tourist and determine the state of the independent tourist at the simulation moment; Given that the decision-maker's current state is a walking group of tourists, determine the state and position of the tourists within the tourist group at the simulation moment; For a group of tourists whose current state is waiting, update the group patience value of the tourist group and determine the state of the tourists in the tourist group at the simulation time. For each service desk, perform the following: If the current status of the service counter is busy and the service time of the service counter exceeds the service efficiency, the status of the tourists currently being served by the service counter at the simulation time is determined to be "left", the service time of the service counter is reset to zero, if there are tourists queuing at the service counter, the status of the tourist at the front of the queue at the simulation time is determined to be "served", the service time of the service counter is started, and the status of the service counter at the simulation time is determined to be "busy", if there are no tourists queuing at the service counter, the status of the service counter at the simulation time is determined to be "idle". If the current status of the service desk is busy and the service time of the service desk does not exceed the service efficiency, the service time of the service desk will be increased by one time step. If the current state of the service counter is idle, and there are tourists queuing at the service counter, then the state of the tourist at the front of the queue at the simulation time is determined to be served, the service time of the service counter is started, and the state of the service counter at the simulation time is determined to be busy. If there are no tourists queuing at the service counter, then the state of the service counter at the simulation time is determined to be idle. Preferably, for an independent tourist whose current state is walking, determining the state and position of the independent tourist at the simulation moment includes: The first displacement of the independent tourist is determined based on the position of the last person in the first queue at the service counter corresponding to the independent tourist. Update the position of the individual tourist based on the first displacement; Determine whether the individual tourist has reached the end of the first queue; If the independent tourist has reached the end of the first queue, the state of the independent tourist at the simulation time is determined to be waiting; If the independent tourist has not reached the end of the first queue, the state of the independent tourist at the simulation time is determined to be walking; Preferably, for an independent tourist whose current state is waiting, determining the state of the independent tourist at the simulation moment includes: Check if the updated patience value is greater than 0; If the updated patience value is greater than 0, the state of the independent tourist at the simulation moment is determined to be waiting; If the updated patience value is not greater than 0, the state of the independent tourist at the simulation moment is determined to be "leaving". Preferably, for an independent tourist whose current state is waiting, the rate at which the patience value of the independent tourist decays over time is determined based on the following parameters: temperature, humidity, noise, crowd density, and current queue length; Preferably, the rate of decay of the patience value of the individual tourist over time is determined based on the following formula: in, Indicates independent tourists Patience level; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates environmental impact factors; Indicates independent tourists The individual's comprehensive environmental sensitivity coefficient; Indicates the temperature coefficient; Indicates the humidity coefficient; Indicates the noise figure; Represents the density coefficient; Indicates independent tourists The rate at which patience value decays over time; Indicates temperature; Indicates humidity; Indicates noise; Indicates population density; Preferably, for a decision-maker whose current state is a walking tourist group, determining the state and position of tourists within the tourist group at the simulation moment includes: The second displacement of the tourist group is determined based on the current location of the decision-maker of the tourist group and the second tail position of the service desk corresponding to the tourist group. Update the positions of tourists within the tourist group based on the second displacement; Determine whether the tourist group has reached the end of the second queue; If the tourist group has reached the second tail position, the status of the tourists in the tourist group at the simulation time is determined to be waiting; If the tourist group has not reached the second tail position, the state of the tourists in the tourist group at the simulation time is determined to be walking; Preferably, for a group of tourists whose current state is waiting, determining the state of the tourists within that group at the simulation moment includes: Determine if the updated group patience value is greater than 0; If the updated group patience value is greater than 0, the status of the tourists in the tourist group at the simulation time is determined to be waiting; If the updated group patience value is not greater than 0, the status of the tourists in the tourist group at the simulation time is determined to be "leaving". Preferably, for a group of tourists whose current state is waiting, the rate of decay of the group's patience value over time is determined based on the following parameters: the rate of decay of the patience value of each tourist in the group over time, and environmental impact factors. Preferably, the rate of decay of the tourist group's patience value over time is determined based on the following formula: in, Indicates tourist groups Group patience value The rate of decay over time; Indicates tourist groups Group patience value The basic decay rate over time; Indicates tourist groups The total number of tourists in the country; Indicates tourist groups tourists Environmental impact factors; Indicates the basic attenuation rate; Indicates the queue pressure coefficient; Indicates the current queue length; Indicates tourist groups The average environmental impact factor; Indicates the acceleration decay factor; Indicates the panic effect factor; Indicates tourists The individual's patience level.
6. A queuing simulation device, characterized in that, The queuing simulation device includes: The processing module is used to perform the following operations for each simulation time step: Generate the new tourists who arrive at the simulated time; Based on the proportion of group tourists corresponding to the simulation time, the newly generated tourists are divided into new independent tourists and new tourist groups, and new tourist parameters are configured for each newly generated tourist, wherein the new tourist parameters include identifier, status and location; For each new, independent visitor, a corresponding service desk should be designated; For each new group of tourists, a corresponding service desk will be designated; Determine the status of visitors and the service desk at the simulated moment.
7. The queuing simulation device according to claim 6, characterized in that, For each new, independent visitor, identify the appropriate service counter, including: For each service counter, based on the first distance between the new independent tourist and the service counter and the first estimated waiting time of the new independent tourist at the service counter, a first comprehensive cost for the new independent tourist to choose the service counter is determined; The service counter corresponding to the new independent tourist is determined based on the first comprehensive cost corresponding to each service counter among all service counters.
8. The queuing simulation device according to claim 6, characterized in that, For each new group of tourists, a corresponding service desk will be designated, including: The appropriate service desk is determined based on the decision-makers of the new tourist group.
9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the queuing simulation method according to any one of claims 1-5.
10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the queuing simulation method according to any one of claims 1-5.