Вы находитесь на странице: 1из 2

Problem:

Demonstrate more flexible modeling of entity movement in free space. This uses Travel step to illustrate various
options. These features are generally used when you want to show more realistic movement of pedestrians and
people. These concepts are often used in agent-based modeling.
Categories:
People, Add-on Process Logic, Path
Key Concepts:
SteeringRule, Pedestrian, People, Agent, Travel Step
Assumptions:
We are modeling with the Standard Library but would like to use process logic to attain additional realism in
modeling people movement.
Technical Approach:
The Steering Behavior options on the Travel step only work in Free Space. We will supplement the Standard Library
objects with process logic that will Transfer the entity into free space, initiate realistic movement with the Travel
step, then Transfer the entity onto its target destination. We will repeat this process with three different
configurations to illustrate optional ways of using the Travel Step:
A. Using a simple path (a line) and specify on the Travel step the width of the travel path (e.g. how far from
the line) in which entity can travel.
B. Follow along a network (but still in free space) and use the defined width of each path to constrain the
entity travel.
C. Enhance option B using a rule to have entities avoid colliding with each other.
Details for Building the Model:
Option A Setup
Place a Source (SourceA), two BasicNodes (BasicNodeA1 and BasicNodeA2), and a Sink (SinkA) in the
Facility window. Connect with Paths.
Place a ModelEntity object (DefaultEntity) and change its Initial Network to No Network (Free Space) so
that all movements will be made in Free Space, instead of on the network.
Change InterArrivalTime of SourceA to Random.Exponential(.03).
In the Process Window, Create Process and name OutputSourceA_Exited
Add a Transfer Step with From set to CurrentNode and To set to FreeSpace
On the OK branch add a Travel step with Steering behavior set to Follow Network Path. This indicates
that even though the entity is now in free space (not on the network), we want to use the drawn network
paths to guide its movement.
Also on the Travel step:
o Set Starting Node to Output@SourceA to tell the entity where on the network to start.
o Set Ending Node to Input@SinkA to tell the entity where on the network to end.
o Set Path Width to 4 meters to let the entity travel 2 meters to either side of the line.
Add a second Transfer Step to the end of the process with From set to FreeSpace, To set to Node, and
Node Name set to Input@SinkA.
Moving back to the Facility window click on the output node of the source (Output@SourceA) and in the
Add-On Process Triggers Category set Exited to Output_SourceA_Exited
At this point you should be able to run the model. You will see that instead of following the line exactly that
entities will stray within the 4 meters surrounding the line. But it will still get its direction from the network almost
as though it is really on the network. But it is not on the network (it is in free space) so it will not respect any of the
options specified on the paths.
Option B Setup
Execute all of the steps in Option A with the following changes:
Wherever an A appears in a name make it a B
For the three paths, change the path Width (under the General category > Physical Characteristics > Size)
to 6, 3, and 2 respectively. You can also set the color of the Paths using the Color button on the
Drawing ribbon.
On the Travel step:
o Leave Path Width set to its default of Candidate.Link.Size.Width which lets the entity react to
the width of the path it is traveling on.
o Set Update Time Interval to 0.3 to indicate your sensitivity to it straying off the path. You can
experiment with this number. A smaller number will provide better animation performance, but
it will do so at the cost of execution speed.
Option C Setup
Execute all of the steps in Option B with the following changes:
Wherever an B appears in a name make it a C
On the Travel step:
o Set Avoid Collisions to True to indicate that you want the entities to try to avoid colliding with
each other.
You should now be able to run the model and see how the three sets of options compare to each other. You can
adjust the various parameters to customize the performance.
Embellishments:
The Steering Rules for the Travel step are implemented in user code. More advanced users can use the example C#
code found in the Examples\UserExtensions folder to implement their own, more complex or customized rules.
An alternate approach to using the Travel step in processes in the way illustrated above is to instead customize the
process logic included in the ModelEntity definition.

Вам также может понравиться