Attractors in nodes
inside a node
allows controlling agent's
location inside a rectangular node or a polygonal node.
- If the node defines the
destination of the agent
movement (is referred, for instance, by MoveTo),
attractors define exact positions inside the node.
- You can set a specific attractor as a
The following blocks allow you to define a destination / location with
- If the node defines
location (is referred by Delay or Queue),
attractors define exact points where agents will
wait inside the node. Agents will go to attractor location for
- You can send agents to attractor by calling one of the moveTo() agent movement
can be put
The agent orientation in the attractor
The attractor's arrow defines the orientation for
agents located in an attractor. This
is generally important when you have 2D or 3D animation and want the
agent animation shapes to face the exact way (e.g. you may
customer to face ATM).
Check out the use of attractors's orientation in the
> Bank Office > Phase 3. Adding tellers
> Set up space
markup for the tellers > Step 5. We will use attractors to
You can change Orientation
properties, or visually define the angle by moving the arrow's end
point in the
You can add attractors one by one, however, if attractors form a
regular structure, it makes sense to add several attractors once using
the special wizard.
To draw one
attractor inside the node
- Drag the Attractor element
palette inside the node.
- Double-click Attractor in
Markup palette. Its icon will turn
into . Now you can add attractors
clicking inside of nodes.
- You add one attractor each time you click inside the node.
new attractors have the default orientation as shown in the
figure above. However, you can change attractor's orientation while
drawing it: do not release the mouse button after the click, but move
it around until you get the orientation you
- To exit the drawing mode, click some area in the
graphical editor outside the node.
- After you finish drawing, all added attractors will be
with their properties open. You may find this useful for
defining orientation for several attractors at once:
add several attractors using the wizard
- Click the node in the
- In the node properties,
button. You will see Attractors dialog
- In the dialog, specify how
many attractors you want to
create. You may do this by expliclitly specifying the Number of attractors,
or filling the whole node with attractors, preserving the specified Space between attractors,
or placing them in a Grid
with cells of specified width and height.
- If you need to restructure
attractors, select the option Delete
attractors and also define
creation mode before you click OK.
If you wish to clear all attractors from the node without creating new
ones there, select this option and specify 0 in creation mode Number of attractors,
then click OK.
Attractors selection order
When you add attractors (either manually or using the wizard),
their creation order also
defines the sequence of the agents' movement destinations. You can
the creation order by looking at the names of the attractors (attractor1, attractor2, ...).
Agents will select attractors one by one according to this
order. In case you need to change the order, you should change
positions of the corresponding attractors but not their names.
– The name of the attractor. The name is used to
identify and access the attractor from code.
– If selected, the attractor is excluded from the
selected, the attractor is visible on the upper level
where this agent lives.
- Position and size
of the attractor.
of the attractor.
– Here you can choose where agents should be directed
when reaching/waiting at the attractor.
You can dynamically modify shape properties at model runtime using the
Returns the X (Y, Z) absolute coordinate of the
The Z coordinate is defined by the corresponding
coordinate of the node / area.
|Returns the X (Y)
coordinate of the attractor
relative to the node / area.
Returns the attractor's orientation
in radians (in the clockwise direction).