Queuing behavior simulation method and device, electronic equipment and storage medium
By using an improved ORCA model and virtual obstacle line mechanism, the problem that existing technologies cannot simulate street shopping queuing behavior is solved, and effective simulation of street shopping queuing behavior is achieved, forming queues that conform to order and formation.
Patent Information
- Application Number
- CN202211066927.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-09-01
AI Technical Summary
Existing algorithms for simulating micro-level crowd behavior, such as social force models and ORCA models, cannot effectively simulate street shopping queue behavior, cannot form one or more columns, and cannot meet strict order and formation requirements.
An improved ORCA model is adopted to control pedestrians entering the queue by determining the position of the tail of the queue, and to determine the movement speed based on the ORCA model, and to set up virtual obstacle lines and tail-whipping mechanisms to ensure the order and formation requirements of pedestrians.
It effectively simulates street shopping queuing behavior, forming queues that conform to order and formation, thus meeting the specific needs of shopping queuing.
Smart Images

Figure CN115526029B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer simulation technology, and in particular to a method, apparatus, electronic device, and storage medium for simulating queuing behavior. Background Technology
[0002] Street shopping queuing is a common micro-group behavior. It refers to queuing in open areas or without passageways in non-emergency situations, with strict requirements on the order of movement.
[0003] Currently, the most commonly used algorithm for simulating micro-level crowd behavior is the Social Force Model. The Social Force Model abstracts the process of a pedestrian moving toward a target into the attraction of the target, the forces between pedestrians, and the forces between pedestrians and obstacles. Under the combined action of these forces, the pedestrian is controlled to gradually move toward the target.
[0004] However, social force models are designed to simulate disordered crowd behavior under emergency conditions. They are characterized by the absence of order and formation requirements; the order of pedestrian movement is determined by their own speed, and crowds tend to cluster together, forming arched congestion, making it impossible to form one or more lines. Consequently, they cannot simulate all subsequent queuing behaviors. Therefore, current commonly used social force models cannot simulate street shopping queuing behavior. Summary of the Invention
[0005] This invention provides a queuing behavior simulation method, device, electronic device, and storage medium to solve the problem that existing technologies cannot simulate street shopping queuing behavior.
[0006] This invention provides a queuing behavior simulation method, comprising:
[0007] Determine the position of the end of the queue;
[0008] Control the current pedestrian to enter the queue based on the tail position of the queue, so as to become a member of the current queue;
[0009] If there are members in the team ahead of the current team, determine the position of the member in the team ahead as the target point;
[0010] Based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined by the optimal collision avoidance ORCA model.
[0011] Based on the movement speed of the current team members, the ORCA model is used to control the movement of the current team members toward the target point.
[0012] According to a queuing behavior simulation method provided by the present invention, the step of determining the movement speed of the current queue member based on the position of the current queue member and the position of the queue member in front of it using an optimal collision avoidance (ORCA) model includes:
[0013] Based on the position P0 of the team members in front, the position of the virtual obstacle line is determined using formulas (1) and (2):
[0014] P c =P0-dir u ·(r0+d) (1)
[0015]
[0016] The virtual obstacle line is positioned between the current team member and the team member in front. c dir represents the position of the point in the virtual obstacle line that is closest to the team member in front. u Let r0 be the unit vector representing the direction of movement of the queue, r0 represent the radius occupied by the members in front of the queue, d be the preset spacing, P2 and P3 represent the positions of the two endpoints of the virtual obstacle line, and dir represent the distance between them. p The positive direction of the virtual obstacle line is represented by S, and the length of the virtual obstacle line is S.
[0017] Based on the positions of the current team members and the positions of the virtual obstacle lines, the movement speed of the current team members is determined using the ORCA model.
[0018] According to a queuing behavior simulation method provided by the present invention, the step of determining the movement speed of the current queue member based on the position of the current queue member and the position of the virtual obstacle line using the ORCA model includes:
[0019] Based on the current positions of the team members and the positions of the virtual obstacle lines, the output of the ORCA model is determined using formula (3).
[0020]
[0021] in, The range of selectable speeds for the current team member A1 under the influence of the preceding team member A0 is represented by τ, where τ is a preset time window and v represents the set of speeds. The optimal speed of A1 is represented by u, the avoidance responsibility that A0 and A1 need to share is represented by m, the weight of the avoidance responsibility that A1 needs to share is represented by n, and the direction of the ORCA half-plane is represented by n.
[0022] Based on the output results of the ORCA model Determine the movement speed of the current team members.
[0023] According to a queuing behavior simulation method provided by the present invention, determining the tail position of the queuing queue includes:
[0024] Using formula (4), the tail position Tail of the queue is determined. t :
[0025] Tail t =P+dir·(r L +r N +d) (4)
[0026] Where P represents the position of the last member in the queue or the location of the queue's destination, dir represents the direction of movement of the queue, and r L r represents the radius occupied by the last member of the queue or the radius occupied by the queue destination. N The radius of the current pedestrian's occupation is represented by d, which is a preset spacing.
[0027] According to a queuing behavior simulation method provided by the present invention, controlling the current pedestrian to enter the queuing queue based on the tail position includes:
[0028] In the determined Tail t Without crossing the obstacle line, control the current pedestrian to move towards Tail. t Move, and arrive at Tail t Then enter the queue.
[0029] According to a queuing behavior simulation method provided by the present invention, controlling the current pedestrian to enter the queuing queue based on the tail position includes:
[0030] In the determined Tail t If the obstacle line is crossed, the drift direction dir' is determined based on the current position of the pedestrian;
[0031] Based on dir', the updated tail position Tail is determined using formula (5). t ':
[0032] Tail t '=P+dir'·(r L +r N +d) (5)
[0033] Control the current pedestrian towards Tail t 'Move, and arrive at Tail' t Then enter the queue.
[0034] According to a queuing behavior simulation method provided by the present invention, determining the tail-whip direction dir' based on the current pedestrian's position includes:
[0035] When the current pedestrian is located on the left side of the queue, the positive direction of the obstacle line is determined as the tail-spinning direction dir';
[0036] When the current pedestrian is located on the right side of the queue, the opposite direction of the obstacle line is determined as the drift direction dir';
[0037] Wherein, the positive direction of the obstacle line is the leftward direction along the obstacle line when the direction is from the obstacle line to the queuing destination; the negative direction of the obstacle line is the rightward direction along the obstacle line when the direction is from the obstacle line to the queuing destination.
[0038] The present invention also provides a queuing behavior simulation device, comprising:
[0039] The first determining module is used to determine the position of the end of the queuing queue;
[0040] The first control module is used to control the current pedestrian to enter the queuing line based on the tail position of the line, so as to become a member of the current line;
[0041] The second determining module is used to determine the position of the team member in front as the target point when there is a team member in front of the current team member;
[0042] The third determining module is used to determine the movement speed of the current team member based on the position of the current team member and the position of the team member in front, using the optimal collision avoidance ORCA model.
[0043] The second control module is used to control the current team members to move towards the target point based on their movement speed using the ORCA model.
[0044] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the queuing behavior simulation method as described above.
[0045] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the queuing behavior simulation method as described above.
[0046] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the queuing behavior simulation method as described above.
[0047] The queuing behavior simulation method, device, electronic device, and storage medium provided by this invention can simulate pedestrians who need to join a queue. First, the tail position of the queue is determined so that pedestrians can enter the queue based on the tail position. After entering the queue, the pedestrian becomes a member of the current queue. If there are members in front of the current queue, the position of the members in front of the current queue is determined as the target point. Based on the positions of the current queue members and the members in front of the current queue members, the movement speed of the current queue members is determined through an ORCA model so that the current queue members can move towards the target point based on the movement speed. The queue formed in this way can meet the requirements of order and formation. Therefore, this method can simulate queuing behavior for street shopping. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0049] Figure 1 This is one of the flowcharts illustrating the queuing behavior simulation method provided by the present invention;
[0050] Figure 2 This is a schematic diagram of the virtual obstacle lines set in the queuing behavior simulation method provided by the present invention;
[0051] Figure 3 This is one of the schematic diagrams for determining the tail-whip direction in the queuing behavior simulation method provided by the present invention;
[0052] Figure 4 This is the second schematic diagram of determining the tail-whip direction in the queuing behavior simulation method provided by the present invention;
[0053] Figure 5 This is the second flowchart of the queuing behavior simulation method provided by the present invention;
[0054] Figure 6 This is a schematic diagram of pedestrian state transitions in the queuing behavior simulation method provided by the present invention;
[0055] Figure 7 This is a schematic diagram of the queue formation process in the queuing behavior simulation method provided by the present invention;
[0056] Figure 8This is a schematic diagram of the "walk-stop" behavior and backward transmission effect in the queuing behavior simulation method provided by the present invention;
[0057] Figure 9 This is a block diagram of the queuing behavior simulation device provided by the present invention;
[0058] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0060] Queuing for shopping on the street is a common micro-group behavior, characterized by:
[0061] (1) In non-emergency situations;
[0062] (2) In open areas, there are no strict passage restrictions;
[0063] (3) Pedestrians are subject to strict order constraints and usually proceed in an orderly queue according to the order in which they entered the queue.
[0064] (4) For the sake of social order, during the queuing process, the person behind must not overtake the person in front, and must also stop when the person in front stops moving, and maintain a certain distance.
[0065] (5) When the queue encounters an obstacle, it needs to turn.
[0066] Specifically, street shopping queues gradually form a line based on a first-come, first-served principle. During the queuing process, pedestrians behind cannot overtake those in front. Often, these queues take place in relatively open areas without strict lane restrictions, and are formed spontaneously by the customers themselves according to their order of arrival. Therefore, unlike chaotic crowding queues in emergency situations or queues with strict lane restrictions, these queues are largely determined by the behavior of those queuing, resulting in a unique self-organizing characteristic.
[0067] Currently, the commonly used algorithms for simulating micro-level crowd behavior mainly include the social force model and the optimal reciprocal collision avoidance (ORCA) model.
[0068] The social force model abstracts the process of a pedestrian moving towards a target as the attraction of the target, the forces between pedestrians, and the forces between pedestrians and obstacles. Under the combined action of these forces, the pedestrian gradually moves towards the target. However, the social force model requires a lot of empirical parameters and does not consider collision avoidance mechanisms between pedestrians.
[0069] The ORCA model aims to prevent collisions between pedestrians and between pedestrians and obstacles. It fully considers the allocation of avoidance responsibility among pedestrians to find the relatively optimal walking speed, thereby simulating the process of a pedestrian moving towards a target. The ORCA model's advantage lies in its comprehensive consideration of collision avoidance mechanisms among pedestrians.
[0070] Social force models and ORCA models can simulate disordered crowd congestion behavior under emergency conditions and reproduce classic self-organizing behavioral characteristics such as the arch effect and the diversion of crowds in opposite directions.
[0071] It is evident that, regarding general micro-level population behavior models, both the social force model and the ORCA model are designed to simulate disordered population behavior under emergency conditions. Their inherent problems include:
[0072] (1) There is no strict order control. The order of passage between pedestrians is determined by their own speed. Those who are faster will gradually walk in front.
[0073] (2) Without formation control, the crowd will gather together and form an arched congestion, making it impossible to form one or several columns, and naturally it is impossible to simulate all subsequent queuing shopping behaviors.
[0074] Therefore, general micro-level crowd behavior simulation models such as the social force model or the ORCA model cannot simulate street shopping queuing behavior. Since the ORCA model has a pedestrian collision avoidance mechanism, it has more advantages than the social force model. Therefore, this invention can improve the ORCA model and propose a new algorithm to simulate shopping queuing behavior.
[0075] The queuing behavior simulation method, apparatus, electronic device, and storage medium of the present invention are described below with reference to the accompanying drawings.
[0076] Figure 1 This is one of the flowcharts illustrating the queuing behavior simulation method provided by the present invention, such as... Figure 1 As shown, the method includes steps 101 to 105; wherein:
[0077] Step 101: Determine the position of the end of the queue.
[0078] Specifically, the end of the queue is where the current pedestrian needs to queue.
[0079] Simulating street queuing behavior is essentially simulating how each pedestrian enters the queue and how each pedestrian moves once in the queue.
[0080] Taking the act of queuing for shopping on the street as an example, the destination of the queue can be any shopping point on the sales line, such as a commercial street, and the shopping point can be the entrance of a store.
[0081] New shoppers need to enter the shopping queue from the back of the line, so it is necessary to determine the location of the back of the line and use it as the target point for new shoppers to move towards.
[0082] It should be noted that the position of the end of the queue is not fixed, but changes as pedestrians enter the queue or as members of the queue move.
[0083] Step 102: Control the current pedestrian to enter the queue based on the position at the end of the queue, so as to become a member of the current queue.
[0084] Specifically, after determining the end position of the queue, the current pedestrian can be controlled to enter the queue based on the determined end position, and after entering the queue, the current pedestrian will be treated as a member of the queue. At this time, the current pedestrian's state will change from the state of waiting to enter the queue, GOING_TO_QUEUE_DIRECTLY, to the state of being in the queue, In_QUEUE.
[0085] Step 103: If there are members in the team ahead of the current team, determine the position of the members in the team ahead as the target point.
[0086] Step 104: Based on the positions of the current team members and the positions of the team members ahead, determine the movement speed of the current team members using the optimal collision avoidance ORCA model.
[0087] Step 105: Based on the current team members' movement speed, control the current team members to move towards the target point using the ORCA model.
[0088] Specifically, when there is a member in front of the current queue member, that is, when there is a member in front of the current queue member who is queuing, the position of the member in front of the queue member is determined as the target point, and the movement speed of the current queue member is determined based on the ORCA model. Based on the movement speed of the current queue member, the movement of the current queue member towards the target point is controlled by the ORCA model. For example, the movement of the current queue member towards the target point is controlled by the ORCA model at the determined movement speed of the current queue member.
[0089] Optionally, the current queue member can repeat steps 103 to 105 above until there are no queue members ahead of the current queue member, that is, there are no queue members queuing in front of the current queue member. At this time, it means that the current queue member has become the queue member at the front of the queue. Then, the position of the queue destination can be updated as the target point of the current queue member, and the current queue member can be controlled to move to the updated target point.
[0090] When a member of the current queue reaches the destination, they can transition from the In_QUEUE state to the BUYING state, where they are shopping or checking out. At this point, the member can remain in a standing state until they finish shopping. After this state ends, the member can transition to the LEFT_QUEUE state, where they leave the queue and are no longer a member.
[0091] The movement direction of the queue, or queue direction, can be set to be perpendicular to the sales line, or to other pre-set directions.
[0092] In this embodiment of the invention, pedestrians who need to join a queue can be simulated. First, the position of the end of the queue is determined so that pedestrians can enter the queue based on the end position. After entering the queue, the pedestrian becomes a member of the current queue. If there are members in front of the current queue, the position of the members in front of the current queue is determined as the target point. Based on the positions of the current queue members and the members in front of the current queue members, the movement speed of the current queue members is determined by the ORCA model so that the current queue members can move towards the target point based on the movement speed. The queue formed in this way can meet the requirements of order and formation. Therefore, this method can simulate street shopping queuing behavior.
[0093] Optionally, based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined using an optimal collision avoidance ORCA model, including:
[0094] Based on the position P0 of the team members in front, the position of the virtual obstacle line is determined using formulas (1) and (2):
[0095] P c =P0-dir u ·(r0+d) (1)
[0096]
[0097] The virtual obstacle line is set between the current team member and the team member in front of them, P cdir represents the position of the point in the virtual obstacle line that is closest to the team member in front. u Let r0 be the unit vector representing the direction of movement of the queue, r0 represent the radius occupied by the members in front of the queue, d be the preset spacing, P2 and P3 represent the positions of the two endpoints of the virtual obstacle line, and dir represent the distance between them. p The positive direction of the virtual obstacle line is represented by S, and the length of the virtual obstacle line is S.
[0098] Based on the current positions of team members and the positions of virtual obstacle lines, the movement speed of the current team members is determined using the ORCA model.
[0099] In reality, shopping queues must follow a strict order, exhibiting a unique Leader-Follower characteristic. The member behind the next person in the queue is the Follower, while the member in front of the next person is the Follower's Leader. The Leader's current position is the Follower's target point for the next moment. Furthermore, Followers must not overtake Leaders, maintain a suitable distance from Leaders, and act in unison with Leaders. That is, if the Leader stops moving, the Follower must also stop moving immediately; and if the Leader begins moving, the Follower must also move immediately while maintaining a suitable distance.
[0100] Specifically, Figure 2 This is a schematic diagram of the virtual obstacle lines set in the queuing behavior simulation method provided by the present invention. Please refer to it. Figure 2 The virtual obstacle line is set between P2 and P3. It can be seen that the current team member A1 is the follower of the team member A0 in front. In other words, the team member A0 in front is the leader of the current team member A1. The current position P0 of the team member A0 in front can be the target point of the current team member A1. d is the preset distance. The virtual obstacle line is set to ensure that the current team member A1 does not collide with the team member A0 in front while moving forward, and maintains a distance of at least d behind the team member A0 in front, so as to conform to the actual situation of queuing.
[0101] Then, based on the ORCA model, and on the basis of actual pedestrians and obstacles in the real world, a virtual obstacle line can be added between the front team member A0 and the current team member A1. This virtual obstacle line will prevent the current team member A1 from continuing to move closer to the front team member A0 at a preset distance d, and will continuously and stably maintain this distance.
[0102] It should be noted that the virtual obstacle line is dynamic and will be dynamically constructed as the position of the team member A0 in front changes.
[0103] The specific steps for constructing virtual obstacle lines are as follows:
[0104] Let dir be the vector pointing from the current team member A1 to the previous team member A0. u (x u y u Let ) be the unit vector of dir, and d be the preset spacing. Then, the point P behind the front team member A0 is... c for:
[0105] P c =P0-dir u ·(r0+d) (1)
[0106] With P c Centered on P, the virtual obstacle line passes through P. c The positive direction is dir p (-y u x u If a line segment of length S is defined, then the endpoints P2 and P3 of this line segment can be determined as follows:
[0107]
[0108] After constructing the virtual obstacle line, the position of the virtual obstacle line to be set can be determined by formulas (1) and (2) above, based on the position P0 of the team member in front. Then, based on the position of the current team member and the position of the virtual obstacle line, the movement speed of the current team member can be determined by the ORCA model. The virtual obstacle line is then combined with the real-world pedestrian neighbors and obstacles. The ORCA optimal speed determination algorithm is used to determine the movement speed of the current team member A1.
[0109] When the team member A0 in front moves, the virtual obstacle line moves forward accordingly, and the current team member A1 can move forward with it; when the team member A0 in front stops, the virtual obstacle line also stops, and the current team member A1 stops moving at the virtual obstacle line. Therefore, the actions of the team member A0 in front and the current team member A1, such as stopping and moving, can be kept consistent while maintaining a preset distance d.
[0110] Optionally, based on the position of the current team member and the position of the virtual obstacle line, the movement speed of the current team member is determined using the ORCA model, including:
[0111] Based on the current positions of the team members and the positions of the virtual obstacle lines, the output of the ORCA model is determined using formula (3).
[0112]
[0113] in, This represents the selectable speed range of the current team member A1 under the influence of the preceding team member A0. τ is a preset time window, and v represents the speed set, which can be calculated in real time. This speed set can also be understood as the selectable speed set, i.e., the set of all speeds that satisfy this inequality. The optimal speed of A1 is represented by u, the avoidance responsibility that A0 and A1 need to share is represented by m, the weight of the avoidance responsibility that A1 needs to share is represented by n, and the direction of the ORCA half-plane is represented by n.
[0114] Output results based on the ORCA model Determine the movement speed of the current team members.
[0115] Specifically, since the current queue member A1 cannot overtake the queue member A0 in front of him while queuing, or in other words, the queue member A0 in front of him does not need to do anything to avoid the current queue member A1, the current queue member A1 can bear the full responsibility u for collision avoidance with the queue member A0 in front of him during queuing and queue movement; while for other pedestrians not in the queue, a completely equal collision avoidance behavior can be adopted (mu = 1 / 2u).
[0116] Based on the current positions of the team members and the positions of the virtual obstacle lines, we can obtain And parameters such as m, based on these parameters, the output results of the ORCA model can be determined using formula (3).
[0117]
[0118] in, It represents the selectable speed range of the current team member A1 under the influence of the team member A0 ahead, where v represents the speed set. τ is the optimal speed of the forward team member A1, τ is a certain time window, that is, within the time τ, it is necessary to ensure that the forward team member A0 and the current team member A1 do not collide, u is the avoidance responsibility that the forward team member A0 and the current team member A1 need to share, that is, the minimum relative speed change required for the forward team member A0 and the current team member A1 to avoid collision, m is the weight of the avoidance responsibility that the current team member A1 needs to bear, and n is the direction of the ORCA half-plane.
[0119] Where m can be determined by the following formula (6):
[0120]
[0121] Based on the output of the ORCA model Determine the movement speed of current team member A1.
[0122] Similarly, the output of the ORCA model can also be determined. That is, the selectable speed range of the team member A0 in front of the current team member A1, and the movement speed of the team member A0 in front of the current team member A1 is determined based on this.
[0123] Optionally, determining the position of the end of the queue may include:
[0124] Using formula (4), determine the position of the tail of the queue. t :
[0125] Tail t =P+dir·(r L +r N +d) (4)
[0126] Where P represents the position of the last member in the queue or the destination of the queue, dir represents the direction of movement of the queue, and r L r represents the radius occupied by the last member of the queue or the radius occupied by the queue destination. N The radius representing the current pedestrian's occupancy is d, where d is the preset spacing.
[0127] Specifically, in practice, if a new shopper wants to join the queue at time t, the new shopper will determine the position Tail, which is a distance d behind the last member of the queue, based on the current direction of the queue. t And move towards that location, so before controlling new shoppers to perform this behavior, it is necessary to first determine the tail position of the queue. t .
[0128] The methods for determining P and dir are as follows:
[0129] (1) When there are no members in the queue, let P be the location of the destination, for example, the location of the shopping point, and dir be the direction perpendicular to the sales line. In this case, r L =0;
[0130] (2) When there is one member in the queue, let the position of that member be P and the direction perpendicular to the shopping line be dir;
[0131] (3) When there are two or more members in the queue, the position of the last member is P, and the direction of the line connecting P and the members before P is dir. In this case, dir is the direction of movement of the queue.
[0132] Optionally, controlling the current pedestrian to enter the queue based on the position at the end of the queue includes:
[0133] In the determined Tail t Without crossing the obstacle line, control the current pedestrian to move towards Tail t Move, and arrive at Tail t Then they joined the queue.
[0134] Specifically, the aforementioned obstacle lines are, for example, tactile paving or walls, within a defined tail. t Without causing the queue to cross obstacles such as tactile paving or walls, the current pedestrian can be directly controlled to move towards Tail. t Move and reach Tail as the current pedestrian arrives. t Then they joined the queue.
[0135] It should be noted that when Tail t When not crossing the obstacle line, the current pedestrian P N Tail t Tail moves toward the target and repositions itself at every moment during its subsequent march toward the rear of the column. t Continue until you reach the end of the queue and join the line. Since the queue may move at any time, Tail... t It may also change at any time.
[0136] Optionally, controlling the current pedestrian to enter the queue based on the position of the last person in the queue includes:
[0137] In the determined Tail t When the obstacle line is crossed, the drift direction dir' is determined based on the current position of the pedestrian;
[0138] Based on dir', the updated tail position Tail is determined using formula (5). t ':
[0139] Tail t '=P+dir'·(r L +r N +d) (5)
[0140] Control the current pedestrian towards Tail t 'Move, and arrive at Tail' t Then they joined the queue.
[0141] Specifically, this can be done when there are obstacles near the rear of the queue, and the tail is definite. t If the queue extends beyond obstacles such as tactile paving or walls, the tail position of the queue needs to be redefined to better reflect the actual situation. tAt this point, the queue needs to drift, meaning the queue needs to avoid the obstacle line.
[0142] First, the tail-whip direction dir' can be determined based on the current position of the pedestrian, and the updated tail position Tail can be determined using formula (5) based on the tail-whip direction dir'. t '.
[0143] The updated tail position (Tail) is confirmed here. t ', can be considered as the tail position of the queue determined after the tail drift. This tail position will not cause the queue to cross the obstacle line. Therefore, controlling the current pedestrian towards Tail t 'Move and reach Tail when the current pedestrian arrives.' t After entering the queue, the current pedestrian's state will change from GOING_TO_QUEUE_DIRECTLY (waiting to enter the queue) to BENDING (about to perform a drift).
[0144] It should be noted that the state BENDING, which is about to perform a tail-swing action, can also indicate that the current pedestrian has entered the queue. The difference between this state and the state In_QUEUE, which is in the queue, is that the current queue member does not move with the position of the queue member in front as the target point, but moves with the pre-set tail-swing control position as the target point. This can keep the tail-swing shape of the queue from becoming a semi-circle.
[0145] For example, in the current pedestrian P N When a pedestrian enters the queue in a tail-wagging state, we assume that the current pedestrian P... N It will still follow the trajectory of the queue, meaning that when it enters the simulation at time T, it will record the last member P in the queue. L Position L at time T T After reaching the rear of the line, it will move in an L-shape. T As their first goal, and upon reaching L T Then, the current pedestrian P N They will take the member in front of them as the leader and move towards the leader's position, thus truly entering the queue state; and at this time, if the current pedestrian P... N If there are other members of the following team behind the current pedestrian, then the current pedestrian P will be... N Transitioning to the BENDING state, the current pedestrian P N Subsequent Followers will also refer to the current pedestrian P in turn. N When the queue turns a corner, arrive at L first. TThen, they move towards the Leader as their target point to maintain the shape of the queue.
[0146] It should also be noted that at every moment before the current pedestrian enters the queue, the queue may move forward, even at time t. t It may overcome the obstacle, but at time t+1, if the queue moves forward, the tail may be redefined. t It no longer passes over obstacles, and at this point, no tail-spinning phenomenon occurs.
[0147] Optionally, the drift direction dir' is determined based on the current position of the pedestrian, including:
[0148] If the current pedestrian is on the left side of the queue, determine the positive direction of the obstacle line as the drift direction dir';
[0149] If the current pedestrian is on the right side of the queue, determine the opposite direction of the obstacle line as the drift direction dir';
[0150] The positive direction of the obstacle line is the leftward direction along the obstacle line when the obstacle line points to the queuing destination; the negative direction of the obstacle line is the rightward direction along the obstacle line when the obstacle line points to the queuing destination.
[0151] Specifically, the direction of the drift (dir) can be determined by referring to the direction of the obstacle lines and the direction of pedestrians.
[0152] In practice, pedestrians tend to swerve the queue in the direction they came from so that they can walk a shorter distance. That is, if the pedestrian comes from the right side of the queue, the queue will swerve to the right; if the pedestrian comes from the left side of the queue, the queue will swerve to the left.
[0153] Based on this, in this embodiment of the invention, when the current pedestrian is on the left side of the queue, the positive direction of the obstacle line is determined as the tail-swing direction dir'; when the current pedestrian is on the right side of the queue, the opposite direction of the obstacle line is determined as the tail-swing direction dir'.
[0154] The positive direction of the obstacle line is the leftward direction along the obstacle line when the obstacle line points to the queuing destination; the negative direction of the obstacle line is the rightward direction along the obstacle line when the obstacle line points to the queuing destination.
[0155] For example, Figure 3 This is one of the schematic diagrams illustrating the determination of the tail-whip direction in the queuing behavior simulation method provided by this invention. Figure 4This is the second schematic diagram illustrating the determination of the tail-whip direction in the queuing behavior simulation method provided by this invention. Please refer to... Figure 3 and Figure 4 Assume P N P represents the current position of the pedestrian. L Tail is determined to be the position of the last member in the queue. t The area marked by the dashed box in the image is where the pedestrian needs to perform a tail-swinging motion.
[0156] Figure 3 It is P N In the case of being located on the left side of the queue, it can be seen that, in this situation, the positive direction of the obstacle line can be determined as the drift direction dir'. Figure 3 In the middle, the positive direction of the obstacle line is the direction to the left along the obstacle line. Therefore, the updated tail position is Tail. t ';
[0157] Figure 4 It is P N In the case of being located on the right side of the queue, it can be seen that, in this situation, the negative direction of the obstacle line can be determined as the drift direction dir'. Figure 4 In the diagram, the negative direction of the obstacle line is the direction to the right along the obstacle line. Therefore, the updated tail position is Tail. t '.
[0158] The following example, simulating the process of pedestrians queuing for shopping, illustrates the queuing behavior simulation method provided by this invention. Figure 5 This is the second flowchart of the queuing behavior simulation method provided by the present invention, as shown below. Figure 5 As shown, the method includes steps 501 to 506; wherein:
[0159] Step 501: Generate new virtual pedestrians.
[0160] Specifically, at any location P, a pedestrian A is generated to join the queue.
[0161] Step 502: Determine the new tail position of the queue based on the virtual pedestrians.
[0162] Specifically, for the current queue, step 502 includes steps 5021 and 5022; wherein:
[0163] Step 5021: If the queue has already spun out relative to obstacle O, let the last member of the queue be A. L Perform the following steps:
[0164] (1) If A L If it is the first member after the drift, then it is A. LStarting from the path of obstacle O, and taking the path of distance L as a reference, the direction is determined by the distance L. g Using the interpersonal interval as the standard, determine the rear position P of the queue based on the position closest to A. tail , with P tail Guide A towards the queue, with A as the target point.
[0165] (2) If A L If there are other members that have already drifted ahead (let's call them Q), then Q and A are considered together. L The direction of the connecting line is used as the reference direction, with a distance L. g Determine the position P at the rear of the queue based on interpersonal spacing. tail , with P tail As the target point, guide A to move towards the queue.
[0166] Step 5022: If the queue has not yet encountered an obstacle (O) for drifting, the following steps need to be performed:
[0167] (1) Determine the position of the rear of the line
[0168] 1) If there are no members in the queue, then the shopping point S will be used. g Starting from the default shopping direction dir g For reference, with distance L g Determine the position P of the rear of the queue. tail ;
[0169] 2) If there are members in the queue, the last member A will be used. L Starting from position A L With A L The direction formed by the Leader is used as the reference direction. When the Leader is empty, then A is used as the reference direction. L Shopping point S g The direction formed is the reference direction, with A as the reference direction. L Distance L behind g As a standard, determine the new rear position P. tail ;
[0170] (2) Determine whether the tail position of the team needs to drift.
[0171] Using obstacle O as a reference, determine the position P of the rear of the formation. tail Have you passed the obstacle? Then proceed with the following steps:
[0172] 1) No drift is required, i.e., P tail If the obstacle is not overcome, it is taken as the target point for pedestrian A, and A is guided to move towards the group;
[0173] 2) A drift is required, i.e., P tail If the obstacle is overcome, then the current moment A will be... LSave the position as drift control position P c Meanwhile, with A L Starting from point A, and using the direction of obstacle O as a reference, determine the tail position P of the queue based on the closest position to A. tail ', and use it as the target point for A, guiding A to move towards the queue.
[0174] Step 503: Control the pedestrian to move towards the back of the queue and join the queue.
[0175] Specifically, pedestrian A is controlled to move towards the queue with the end of the queue as the target point. During the movement of pedestrian A, step 502 needs to be repeated once for each step to determine the latest end position of the queue at the current moment, until the end position is reached and the person joins the queue.
[0176] After the pedestrians join the queue, A L As the Leader of A, treat A as A L The Follower. And perform the following steps:
[0177] (1) If A joins the queue in a normal state, i.e., in a non-tail-wagging state, then A's Leader is A L The position is the target point for the next moment, guiding A to move forward;
[0178] (2) If A joins the queue in a tail-wagging state, then position P is controlled by the tail-wagging state. c The target point for the next moment is used to guide A forward until it reaches the drift control position P. c Then, take A's Leader—A L The location is the target point, guiding A forward.
[0179] Step 504: Control the movement of pedestrians in the queue.
[0180] Specifically, after pedestrian A joins the queue, a specific target point is selected according to the following rules to control pedestrian A's movement along the queue:
[0181] (1) If A has a Leader, then the position of the Leader is the target point;
[0182] (2) If A does not have a Leader, then the shopping point will be the target point;
[0183] Construct virtual obstacle lines with a specific spacing behind the Leader to ensure that A maintains at least a specific distance from the Leader, and control A's movement and stopping process within the team.
[0184] Step 505: Control pedestrians' shopping checkout process.
[0185] Specifically, when A arrives at a shopping point or near a certain threshold, the process of checking out the shopping is controlled by keeping A there for a specific amount of time.
[0186] Step 506: Control pedestrians to leave the queue.
[0187] Specifically, once A has stayed for the required checkout time, A leaves the queue and A's Follower's Leader is set to null.
[0188] It should be noted that in most cases, the target point of follower A at time T+1 is the position of A's leader at time T. When its leader completes shopping and leaves the queue, the follower moves towards the shopping point as its target point. When pedestrian A moves to a certain threshold range of the shopping point, it enters the shopping / checkout state and stays at that position for a period of time. During this period, A does not update its position until the shopping and payment are completed. A leaves the queue and removes the following relationship between A and its followers. The subsequent follower then becomes the leader of the queue, moves towards the shopping point as its target point, and repeats the shopping and checkout behaviors.
[0189] Based on the state relationship between pedestrians and queuing queues, the state of pedestrians is defined into several states. Please refer to Table 1, which is a table of pedestrian states and definitions.
[0190] Table 1 Pedestrian Status and Definitions
[0191]
[0192] Figure 6 This is a schematic diagram of pedestrian state transitions in the queuing behavior simulation method provided by the present invention, as shown below. Figure 6 As shown, the transition rules between the various states are as follows: When a pedestrian enters the scene, the default state is ①, moving towards the end of the queue. When it is determined that the queue has encountered an obstacle and cannot accommodate the pedestrian, requiring a tail-swing, the pedestrian transitions to state ② and moves towards the end of the queue. During the movement towards the queue, if the queue moves forward and no longer requires a tail-swing, the pedestrian's state switches back to ①, and the transition between ① and ② is repeated until the end of the queue is reached. When entering the queue in state ①, the pedestrian directly switches to state ③. When entering the queue in state ②, the pedestrian needs to pass through state ④ first, i.e., enter the tail-swing process. After passing the bend, the pedestrian enters state ③. When the pedestrian reaches the shopping point, the pedestrian enters shopping state ⑤. After shopping or checking out, the pedestrian leaves the queue and enters state ⑥.
[0193] When pedestrians are moving (whether before or after entering a queue), they need to determine their next target point so that they can continue to move toward that target point at an appropriate speed. Table 2 below shows the table for determining the target point of a pedestrian while moving.
[0194] Table 2. Determining the target point of a pedestrian during their journey.
[0195]
[0196] In this embodiment of the invention, the ORCA model, which lacks order features, is transformed into a model with strict sequence and following features. Furthermore, the algorithm for pedestrians avoiding each other in the ORCA model is modified to allow standing at specific intervals. A tail-wagging algorithm is also proposed for queues encountering obstacles. Based on this embodiment, orderly, normal, and unconstrained queuing shopping behavior can be simulated, including:
[0197] (1) It can simulate the entire process of pedestrians entering a queue, following the queue, walking and stopping, shopping and waiting, and leaving the queue;
[0198] (2) It can simulate the behavior of pedestrians in a queue following the pedestrians in front and stopping, and keeping the same behavior as the pedestrians in front.
[0199] (3) It can simulate the behavior of pedestrians standing at a certain distance behind pedestrians when the pedestrian in front stops walking;
[0200] (4) It can simulate the phenomenon that a queuing queue encounters an obstacle boundary and turns, and as time goes by, the turning point gradually evolves into an arc shape;
[0201] (5) It can simulate the backpropagation effect of the movement and stopping behavior of queuing queues.
[0202] The simulation effect and similarity analysis of the queuing behavior simulation method of the present invention will be described below.
[0203] By comparing the simulation results with actual queuing behavior, the method of this embodiment of the invention can very similarly reproduce real-world queuing shopping behavior:
[0204] (1) The simulation can reproduce typical individual behaviors and the process of queuing formation: typical individual behaviors include entering the queue, standing and waiting, queuing forward, shopping, leaving the queue, etc. The emergence of multiple individual behaviors reproduces the process of queuing formation. During the queuing process, pedestrians strictly follow the order of entering the queue, do not overtake the pedestrians in front, and maintain a certain distance from the pedestrians in front.
[0205] (2) It can reproduce the self-organizing characteristics of the queue turning. When the queue encounters an obstacle, it will turn and continue to queue along the direction of the obstacle line. In the actual queuing process, due to the small space perpendicular to the sales window, when the queue reaches the tactile paving, the queue turns and continues to extend along the tactile paving. This application simulates this behavior well. When encountering the tactile paving, the simulated queue also turns and continues to extend along the boundary of the tactile paving.
[0206] (3) It can simulate the "stop-go-go" behavior of a queue. When the person at the front of the queue stops to shop or pay, the people behind wait in turn. After the person at the front finishes shopping, pays, and leaves the queue, the people behind continue to move forward in turn. This stop-go-go behavior is similar to the real-world stop-go-go behavior, and it has a clear backward transmission characteristic.
[0207] (4) In addition, the embodiments of the present invention can also reproduce some special self-organizing behaviors in the queuing shopping formation, such as the queuing line not presenting a regular right angle when turning, but evolving into an arc shape at the turning point of the queuing line as pedestrians walk; and in the simulated formation, this feature also appears at the corner as time progresses.
[0208] The following describes the simulation effect of the queuing behavior simulation method of the present invention on the queuing formation process.
[0209] Figure 7 This is a schematic diagram of the queue formation process in the queuing behavior simulation method provided by the present invention, as shown below. Figure 7 As shown, the entire process of forming a queue is as follows:
[0210] (1) Pedestrian 1 starts from the starting position at time 0s and walks towards the shopping window. At time 39s, he arrives at the shopping window and stops walking to start shopping. Pedestrian 2 starts from the starting position at time 40s and lines up behind Pedestrian 1 at time 75s, waiting for Pedestrian 1 to finish shopping.
[0211] (2) At 280s, pedestrians 1, 2 and 3 have finished shopping and left the queue. Pedestrians 4, 5 and 6 are queuing in a direction perpendicular to the shopping window. Pedestrian 7 is moving towards the queue. However, since the distance between pedestrian 6 and the tactile paving is not enough to meet the spacing requirements, pedestrian 7 begins to turn the queue towards himself and along the tactile paving. Since the direction of the tactile paving is perpendicular to the queue extending from the window, the queue after the turn is perpendicular to the previous queue.
[0212] (3) Pedestrian 7 arrives at the end of the queue at 310s;
[0213] (4) At 426s, pedestrian 6 arrives at the window and begins shopping. Pedestrian 7 lines up behind him. The subsequent pedestrians stand in formation along the queue after the tail swing. At this time, the tail swing shape of the queue is still mainly vertical.
[0214] (5) At 621s, since the pedestrian behind takes the position of the pedestrian in front as the target position, as the pedestrian continues to move, the tail of the queue begins to form an arc.
[0215] (6) At 1138s, more people appeared in the queue, and the queue grew further. At the same time, the queue maintained its formation.
[0216] The following describes the queuing behavior simulation method of the present invention, including the walking and stopping behavior and the backward propagation effect.
[0217] Figure 8 This is a schematic diagram of the "walk-stop" behavior and backward propagation effect in the queuing behavior simulation method provided by the present invention, as shown below. Figure 8 As shown, the embodiments of the present invention can reproduce the "walk-stop" behavior and backward transmission effect of people in the process of queuing to shop.
[0218] (1) When the first person in the queue, 20, arrives at the shopping point and stands to shop, the people behind him stand behind him in turn to wait. When he finishes shopping and turns to leave the queue, the people behind him are still standing and waiting.
[0219] (2) After pedestrian 20 has moved a certain distance, pedestrian 21 behind starts walking towards the shopping point from a standstill, while pedestrians 22, 23 and subsequent pedestrians are still standing.
[0220] (3) The walking state gradually spreads to the rear, and the pedestrians in the group gradually enter the walking state, while the last pedestrian in the group is still standing.
[0221] (4) Pedestrian 21 arrives at the window and begins to stand and shop, while the pedestrians behind him are still walking.
[0222] (5) The standing posture gradually spreads to the back of the queue, and some pedestrians (such as pedestrian 22) begin to stand and wait;
[0223] (6) The standing state is transmitted backward, and all pedestrians are in a static standing and waiting state until pedestrian 21 finishes shopping and leaves the queue. This "walk-stop" behavior and backward transmission process are repeated in the subsequent queuing process.
[0224] The queuing behavior simulation device provided by the present invention is described below. The queuing behavior simulation device described below can be referred to in correspondence with the queuing behavior simulation method described above.
[0225] Figure 9 This is a block diagram of the queuing behavior simulation device provided by the present invention, as shown below. Figure 9 As shown, the queuing behavior simulation device 900 includes:
[0226] The first determining module 901 is used to determine the position of the end of the queuing queue;
[0227] The first control module 902 is used to control the current pedestrian to enter the queuing queue based on the tail position of the queue, so as to become a member of the current queue;
[0228] The second determining module 903 is used to determine the position of the member in front of the current team as the target point when there is a member in front of the current team.
[0229] The third determining module 904 is used to determine the movement speed of the current team member based on the position of the current team member and the position of the team member in front, using the optimal collision avoidance ORCA model.
[0230] The second control module 905 is used to control the current team members to move towards the target point based on their movement speed using the ORCA model.
[0231] Optionally, the third determining module 904 is specifically used to determine the position of the virtual obstacle line based on the position P0 of the forward team member, using formulas (1) and (2):
[0232] P c =P0-dir u ·(r0+d) (1)
[0233]
[0234] The virtual obstacle line is positioned between the current team member and the team member in front. c dir represents the position of the point in the virtual obstacle line that is closest to the team member in front. u Let r0 be the unit vector representing the direction of movement of the queue, r0 represent the radius occupied by the members in front of the queue, d be the preset spacing, P2 and P3 represent the positions of the two endpoints of the virtual obstacle line, and dir represent the distance between them. p The positive direction of the virtual obstacle line is represented by S, and the length of the virtual obstacle line is S.
[0235] Based on the positions of the current team members and the positions of the virtual obstacle lines, the movement speed of the current team members is determined using the ORCA model.
[0236] Optionally, the third determining module 904 is further specifically used to determine the output result of the ORCA model based on the positions of the current team members and the positions of the virtual obstacle lines, using formula (3).
[0237]
[0238] in, The range of selectable speeds for the current team member A1 under the influence of the preceding team member A0 is represented by τ, where τ is a preset time window and v represents the set of speeds. The optimal speed of A1 is represented by u, the avoidance responsibility that A0 and A1 need to share is represented by m, the weight of the avoidance responsibility that A1 needs to share is represented by n, and the direction of the ORCA half-plane is represented by n.
[0239] Based on the output results of the ORCA model Determine the movement speed of the current team members.
[0240] Optionally, the first determining module 901 is specifically used to determine the tail position Tail of the queuing queue using formula (4). t :
[0241] Tail t =P+dir·(r L +r N +d) (4)
[0242] Where P represents the position of the last member in the queue or the location of the queue's destination, dir represents the direction of movement of the queue, and r L r represents the radius occupied by the last member of the queue or the radius occupied by the queue destination. N The radius of the current pedestrian's occupation is represented by d, which is a preset spacing.
[0243] Optionally, the first control module 902 is specifically used to determine the Tail t Without crossing the obstacle line, control the current pedestrian to move towards Tail. t Move, and arrive at Tail t Then enter the queue.
[0244] Optionally, the first control module 902 is also specifically used to determine the Tail t If the obstacle line is crossed, the drift direction dir' is determined based on the current position of the pedestrian;
[0245] Based on dir', the updated tail position Tail is determined using formula (5). t ':
[0246] Tail t '=P+dir'·(r L +r N +d) (5)
[0247] Control the current pedestrian towards Tail t 'Move, and arrive at Tail' t Then enter the queue.
[0248] Optionally, the first control module 902 is further configured to determine the positive direction of the obstacle line as the tail-swing direction dir' when the current pedestrian's position is on the left side of the queue;
[0249] When the current pedestrian is located on the right side of the queue, the opposite direction of the obstacle line is determined as the drift direction dir';
[0250] Wherein, the positive direction of the obstacle line is the leftward direction along the obstacle line when the direction is from the obstacle line to the queuing destination; the negative direction of the obstacle line is the rightward direction along the obstacle line when the direction is from the obstacle line to the queuing destination.
[0251] In this embodiment of the invention, the device can simulate pedestrians who need to join a queue. First, the first determining module determines the position of the end of the queue, so that the first control module controls the pedestrian to enter the queue based on the end position. After entering the queue, the pedestrian becomes a member of the current queue. If there are members in front of the current queue, the second determining module determines the position of the members in front of the queue as the target point. Then, the third determining module determines the movement speed of the current queue members based on the positions of the current queue members and the members in front of the queues using an ORCA model, so that the second control module controls the current queue members to move towards the target point based on the movement speed. The queue formed in this way can meet the requirements of order and formation. Therefore, the device can simulate street shopping queuing behavior.
[0252] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 10 As shown, the electronic device 1000 may include: a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communications interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute a queuing behavior simulation method, which includes:
[0253] Determine the position of the end of the queue;
[0254] Control the current pedestrian to enter the queue based on the tail position of the queue, so as to become a member of the current queue;
[0255] If there are members in the team ahead of the current team, determine the position of the member in the team ahead as the target point;
[0256] Based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined by the optimal collision avoidance ORCA model.
[0257] Based on the movement speed of the current team members, the ORCA model is used to control the movement of the current team members toward the target point.
[0258] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0259] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the queuing behavior simulation method provided by the above methods, the method comprising:
[0260] Determine the position of the end of the queue;
[0261] Control the current pedestrian to enter the queue based on the tail position of the queue, so as to become a member of the current queue;
[0262] If there are members in the team ahead of the current team, determine the position of the member in the team ahead as the target point;
[0263] Based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined by the optimal collision avoidance ORCA model.
[0264] Based on the movement speed of the current team members, the ORCA model is used to control the movement of the current team members toward the target point.
[0265] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the queuing behavior simulation method provided by the methods described above, the method comprising:
[0266] Determine the position of the end of the queue;
[0267] Control the current pedestrian to enter the queue based on the tail position of the queue, so as to become a member of the current queue;
[0268] If there are members in the team ahead of the current team, determine the position of the member in the team ahead as the target point;
[0269] Based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined by the optimal collision avoidance ORCA model.
[0270] Based on the movement speed of the current team members, the ORCA model is used to control the movement of the current team members toward the target point.
[0271] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0272] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0273] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A queuing behavior simulation method, characterized in that, include: Determine the position of the end of the queue; Control the current pedestrian to enter the queue based on the tail position of the queue, so as to become a member of the current queue; If there are members in the team ahead of the current team, determine the position of the member in the team ahead as the target point; Based on the positions of the current team members and the positions of the team members ahead, the movement speed of the current team members is determined by the optimal collision avoidance ORCA model. Based on the current team members' movement speed, the ORCA model is used to control the current team members to move towards the target point; The process of determining the movement speed of the current team member based on the position of the current team member and the position of the team member ahead, using an optimal collision avoidance (ORCA) model, includes: Based on the position of the members of the forward team The positions of the virtual obstacle lines are determined using formulas (1) and (2): (1) (2) The virtual obstacle line is positioned between the current team member and the team member in front of them. This represents the position of the point on the virtual obstacle line that is closest to the member of the team ahead. Let be the unit vector representing the direction of movement of the queue. The radius representing the area occupied by the members of the forward team. For preset spacing, and These respectively represent the positions of the two endpoints of the virtual obstacle line. Characterizing the positive direction of the virtual obstacle line, The length of the virtual obstacle line; Based on the positions of the current team members and the positions of the virtual obstacle lines, the movement speed of the current team members is determined using the ORCA model.
2. The queuing behavior simulation method according to claim 1, characterized in that, The step of determining the movement speed of the current team members based on their positions and the positions of the virtual obstacle lines using the ORCA model includes: Based on the current positions of the team members and the positions of the virtual obstacle lines, the output of the ORCA model is determined using formula (3). : (3) in, Characterized by the members of the front team The current team members are affected. Selectable speed range, For the preset time window, Characterizing the set of velocities, Characterization The optimal speed, Characterization and The responsibility for avoidance that needs to be shared Characterization The weight of the avoidance responsibility to be borne. The direction of the ORCA half-plane; Based on the output results of the ORCA model Determine the movement speed of the current team members.
3. The queuing behavior simulation method according to any one of claims 1 or 2, characterized in that, Determining the position of the tail of the queue includes: The position of the tail of the queue is determined using formula (4). : (4) in, This indicates the position of the last member in the queue or the location of the queue's destination. Characterizes the direction of movement of the queue. The radius representing the area occupied by the last member of the queue or the radius representing the destination of the queue. The radius representing the current pedestrian's occupancy. This is the preset spacing.
4. The queuing behavior simulation method according to claim 3, characterized in that, The control of the current pedestrian to enter the queue based on the tail position includes: In a definite When the obstacle line is crossed, the drift direction is determined based on the current position of the pedestrian. ; based on The updated tail position is determined using formula (5). : (5) Control the current pedestrian direction Move, and arrive Then enter the queue.
5. The queuing behavior simulation method according to claim 4, characterized in that, The tail-whip direction is determined based on the current position of the pedestrian. ,include: When the current pedestrian's position is to the left of the queue, the positive direction of the obstacle line is determined as the drift direction. ; When the current pedestrian's position is to the right of the queue, the opposite direction of the obstacle line is determined as the drift direction. ; Wherein, the positive direction of the obstacle line is the leftward direction along the obstacle line when the direction is from the obstacle line to the queuing destination; the negative direction of the obstacle line is the rightward direction along the obstacle line when the direction is from the obstacle line to the queuing destination.
6. A queuing behavior simulation device, characterized in that, include: The first determining module is used to determine the position of the end of the queuing queue; The first control module is used to control the current pedestrian to enter the queuing line based on the tail position of the line, so as to become a member of the current line; The second determining module is used to determine the position of the team member in front as the target point when there is a team member in front of the current team member; The third determining module is used to determine the movement speed of the current team member based on the position of the current team member and the position of the team member in front, using the optimal collision avoidance ORCA model. The second control module is used to control the current team members to move towards the target point based on their movement speed using the ORCA model. The process of determining the movement speed of the current team member based on the position of the current team member and the position of the team member ahead, using an optimal collision avoidance (ORCA) model, includes: Based on the position of the members of the forward team The positions of the virtual obstacle lines are determined using formulas (1) and (2): (1) (2) The virtual obstacle line is positioned between the current team member and the team member in front of them. This represents the position of the point on the virtual obstacle line that is closest to the member of the team ahead. Let be the unit vector representing the direction of movement of the queue. The radius representing the area occupied by the members of the forward team. For preset spacing, and These respectively represent the positions of the two endpoints of the virtual obstacle line. Characterizing the positive direction of the virtual obstacle line, The length of the virtual obstacle line; Based on the positions of the current team members and the positions of the virtual obstacle lines, the movement speed of the current team members is determined using the ORCA model.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the queuing behavior simulation method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the queuing behavior simulation method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the queuing behavior simulation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Crowd behavior simulation method and device, electronic equipment and storage medium
CN114155271A
Queuing system and methods
US20030102956A1