Skip to content

Commit d5415ec

Browse files
chraibischroedtert
andauthored
Some editing of routing page
Co-authored-by: schroedtert <t.schroedter@fz-juelich.de>
1 parent 82c3a34 commit d5415ec

File tree

2 files changed

+46
-41
lines changed

2 files changed

+46
-41
lines changed

docs/source/_static/routing/route-planning.svg

Lines changed: 4 additions & 3 deletions
Loading

docs/source/concepts/routing.rst

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,32 @@ The illustration of such a network can be seen below:
3030
:alt: A graphical representation of a directed graph.
3131

3232
Graphical representation of the underlying routing network of a more complex simulation.
33-
Each circle represents a intermediate stage, and the arrows the corresponding connections.
33+
Each circle represents an intermediate stage, while the arrows the corresponding connections.
3434

3535
In the following sections, we will explain how to set-up such routing networks in *JuPedSim*.
3636

3737
Stages
3838
------
3939

40-
A stage in *JuPedSim* is an intermediate target the agent wants to reach.
40+
In *JuPedSim*, a stage refers to an interim target that the agent aims to reach.
4141
When a stage is reached, the agent will wait for its completion and then continue to the next stage.
4242
A stage may already count as completed when the stage is reached or when some condition is fulfilled.
43-
These different kind of stages will be explained below.
43+
The various types of stages will be explained below.
4444

4545
Waypoint
4646
^^^^^^^^
4747

48-
The most fundamental kind of stage is a :class:`Waypoint <jupedsim.stages.WaypointStage>`, it represents a target the agent need to reach.
48+
The most fundamental kind of stage is a :class:`Waypoint <jupedsim.stages.WaypointStage>`. It represents a target the agent needs to reach.
4949
For the way finding, the agent always targets the Waypoint directly.
50-
A Waypoint counts as completed when the agents reach a specified distance from the defined Waypoint.
51-
The figure belows shows how a Waypoint is used in the simulation, here the center (orange) is the Waypoint and the blue area marks which an agent needs to reach to complete the stage.
50+
A Waypoint is considered completed once agents arrive within a designated distance from the defined Waypoint.
51+
The figure below shows how a Waypoint is used in the simulation. Here the center (colored orange) represents the Waypoint, and the surrounding blue area indicates the zone an agent must enter to complete the stage.
5252

5353
.. figure:: /_static/stages/waypoint.svg
5454
:width: 20%
5555
:align: center
5656
:alt: A dot representing the Waypoint, with an circle around it, depicting the area an agent needs to enter to complete the stage.
5757

58-
Representation of a :class:`Waypoint <jupedsim.stages.WaypointStage>` (orange) with the given distance (orange line).
58+
Representation of a :class:`Waypoint <jupedsim.stages.WaypointStage>` (colored orange) with the given distance (orange line).
5959

6060
A Waypoint at :math:`(0.6, -1.4)` with an accepted distance of 2m can be added to the simulation via:
6161

@@ -66,8 +66,8 @@ A Waypoint at :math:`(0.6, -1.4)` with an accepted distance of 2m can be added t
6666
Exit
6767
^^^^
6868

69-
An other stage is an :class:`Exit <jupedsim.stages.ExitStage>`, which as the name describe, model exits of the simulation.
70-
It marks an area, at which agents will be marked for removal from the simulation when they reach it.
69+
An other stage type is the :class:`Exit <jupedsim.stages.ExitStage>`. As the name suggests, this stage models the exits within the simulation.
70+
The `ExitStage` designates an area where agents are marked for removal from the simulation upon their arrival.
7171
The removal itself is done at the beginning of the next iteration step.
7272
As a target the agents will aim for the center of the exit polygon.
7373

@@ -80,7 +80,7 @@ As a target the agents will aim for the center of the exit polygon.
8080
:align: center
8181
:alt: A polygon representing the exit area is shown in blue, with the center highlighted in orange.
8282

83-
Representation of an :class:`Exit <jupedsim.stages.ExitStage>` (blue). The agents will aim for the center (orange).
83+
Representation of an :class:`Exit <jupedsim.stages.ExitStage>` (colored blue). The agents will aim for the center (colored orange).
8484

8585
An exit located in the polygon :math:`(-0.2, -1.9), (0.2, -1.9), (0.2, -1.7), (-0.2, -1.7)` can be added to the simulation via:
8686

@@ -95,29 +95,29 @@ An exit located in the polygon :math:`(-0.2, -1.9), (0.2, -1.9), (0.2, -1.7), (-
9595
9696
.. warning::
9797

98-
As the pedestrians currently aim for the center of the exit area, defining wide exits may lead to unexpected behavior.
99-
In some case it might be more suitable to define multiple exits instead one wide one.
98+
Currently, pedestrians in the simulation are programmed to target the center of the exit area.
99+
Therefore, creating wide exits could potentially lead to unpredictable behavior.
100+
In certain situations, it may be more appropriate to establish multiple exits rather than a single wide one.
100101

101102
Waiting Queue
102103
^^^^^^^^^^^^^
103104

104105
It is not only possible to steer agents with waypoints, it is also possible to let them wait in queues.
105106
*JuPedSim* offers :class:`Queues <jupedsim.stages.NotifiableQueueStage>` where the agents will wait at predefined positions.
106-
The provided positions are ordered by their order of definition, and agents will wait on the first empty spot.
107+
The positions given are arranged according to the sequence in which they are defined, and agents will wait at the first available spot.
107108
When agents leave the queue, the other agents will move up in their waiting positions until they reach the front.
108-
To release agents from the queue, a signal needs to be send to the queue, signaling that the first n agents can leave it.
109+
In order to allow agents to leave the queue, a signal must be sent to it, indicating that the first `n` agents in the queue are permitted to exit.
109110

110111
.. note::
111112

112-
When there are more agents arriving at the queue then waiting positions are available, all overflow agents will wait at the last waiting position.
113-
113+
If the number of agents arriving at the queue exceeds the available waiting positions, all additional agents beyond capacity will wait at the last designated waiting position.
114114

115115
.. figure:: /_static/stages/queue.svg
116116
:width: 80%
117117
:align: center
118118
:alt: A series of dots represent the different waiting positions, connected with arrows which show in which direction the agents will move up.
119119

120-
Representation of an :class:`Queue <jupedsim.stages.NotifiableQueueStage>` (dots).
120+
Representation of the :class:`Queue <jupedsim.stages.NotifiableQueueStage>` (dots).
121121
The first position is marked orange and the last position light-blue.
122122
The movement of the agents to move up the queue is indicated by the red arrows.
123123

@@ -157,16 +157,16 @@ If a waiting set is inactive when an agents targets it, the first defined waitin
157157
158158
.. note::
159159
160-
When more agent target the waiting set, than available waiting spots, the overflow agents will wait at the last entered waiting position.
160+
When the number of agents targeting the waiting set exceeds the available waiting spots, the agents in excess will wait at the position where the last agent entered the waiting area.
161161
162162
163163
.. figure:: /_static/stages/waiting_set.svg
164164
:width: 80%
165165
:align: center
166166
:alt: A waiting set is represented by a number of unevenly distributed circles. Two circles are highlighted.
167167
168-
Representation of an :class:`WaitingSet <jupedsim.stages.WaitingSetStage>`.
169-
The first (orange) and last defined position (blue) are highlighted.
168+
Representation of the :class:`WaitingSet <jupedsim.stages.WaitingSetStage>`.
169+
The first (colored orange) and last defined position (colored blue) are highlighted.
170170
171171
In the following, you can see how to add a waiting set to a simulation and how to activate and deactivate it:
172172
@@ -198,9 +198,9 @@ Journeys
198198
199199
Multiple stages can be combined into what in *JuPedSim* is called a Journey.
200200
201-
202201
For creating more complex routes in *JuPedSim* multiple stages can be combined to a so called Journey.
203-
For
202+
203+
For example:
204204
205205
.. code-block:: python
206206
@@ -220,20 +220,22 @@ For
220220
Transitions
221221
-----------
222222
223-
Now, we have Journey with a set of stages which have no connection to each other.
224-
But for creating the complete routing set-up we need to define theses connections, the so called Transitions.
225-
They define, which stage an agents target after its current one is completed.
226-
*JuPedSim* offers different types of connections directly to model some decision making processes.
223+
We currently have a Journey composed of various stages that are not interconnected.
224+
To establish a comprehensive routing setup, we need to define the connections between these stages, known as Transitions.
225+
226+
Transitions specify which stage an agent will target next after completing its current stage.
227+
*JuPedSim* offers different types of connections to directly model certain decision making processes.
227228
228229
.. note::
229230
230231
When adding the transitions to your journeys make sure, that :ref:`Exits <Exit>` are only added at the end of a trip.
231-
Otherwise the agents will be removed from the simulation when they reach the exit and will not continue to the next stage.
232+
Otherwise the agents will be removed from the simulation when they reach the exit and will not advance to the next stage.
232233
233234
Fixed transition
234235
^^^^^^^^^^^^^^^^
235236
236-
The simplest kind of transition is to define that the agent will continue its journey with one specific next stage.
237+
The most basic form of transition is to define that the agent will proceed on its journey with one specific subsequent stage.
238+
237239
238240
.. figure:: /_static/transitions/fixed.svg
239241
:width: 40%
@@ -252,16 +254,16 @@ Round-robin transition
252254
253255
It is also possible to model a decision making process and split the agents at a stage, with a round-robin transition.
254256
Here, the agents will proceed in a weighted round-robin manner.
255-
E.g., when defining a round robin transition with three outgoing stages and the corresponding weights 10, 5, 1, the first 10 agents to make a choice will continue with the first given stage.
257+
E.g., when defining a round-robin transition with three outgoing stages and the corresponding weights 10, 5, 1, the first 10 agents to make a choice will continue with the first given stage.
256258
The next 4 with the second one, and the next agent will continue with the third stage.
257-
Then the circle starts again at stage one.
259+
260+
After this, the cycle restarts with the first stage.
258261
259262
.. figure:: /_static/transitions/round_robin.svg
260263
:width: 40%
261264
:align: center
262265
263-
How to create such a round-robin transition as described above see here:
264-
266+
To create a round-robin transition as described above, you can follow these steps:
265267
.. code-block:: python
266268
267269
journey.set_transition_for_stage(
@@ -286,7 +288,7 @@ When multiple stages have the same number of agent targeting the first defined w
286288
:width: 40%
287289
:align: center
288290
289-
A least targeted transition can be added to a journey with:
291+
A least-targeted transition can be added to a journey with:
290292
291293
.. code-block:: python
292294
@@ -305,9 +307,11 @@ A least targeted transition can be added to a journey with:
305307
Way finding
306308
===========
307309
308-
Depending on the principles explained above each agent gets a target assigned, there they head to.
309-
Now, the route towards this goal needs to be determined.
310-
For distinguishing the route *JuPedSim* triangulates the geometry and computes the distance between two points through the triangulation.
310+
Each agent in the simulation is assigned a specific target destination towards which they will head.
311+
The next crucial step is to determine the route that these agents will take to reach their assigned goals.
312+
This involves calculating the most efficient or desired paths from their current locations to their targets within the simulation environment.
313+
314+
To determine the route, *JuPedSim* triangulates the geometry and computes the distance between two points through the triangulation.
311315
Here, it will compute the distance between the centers of two neighboring triangles.
312316
When multiple paths lead to the target, the shortest one will be preferred.
313317
@@ -320,8 +324,8 @@ How the path is distinguished for different target points, you can see in the an
320324
.. warning::
321325
322326
As the distance is computed along the centers of the triangles, it may happen, that not the shortest-path on the ground is taken.
323-
This is a known issue of the *JuPedSim*'s routing, it will be fixed in the near future.
324-
To avoid is behaviour intermediate waypoints can be added to the simulation.
327+
This is a known issue of the *JuPedSim*'s routing, that will be fixed in the near future.
328+
To avoid this behaviour intermediate waypoints can be added to the simulation.
325329
326330
.. image:: /_static/routing/expected_routing.png
327331
:width: 40%

0 commit comments

Comments
 (0)