question

Tomi Kosunen avatar image
0 Likes"
Tomi Kosunen asked Tomi Kosunen commented

ProximitySystem and run speed

Hi

I use ProximitySystem as traffic calculator in a AStar navigation system: FlowItems travel on a AStar/MandatoryPath and when they are close to a "ProximityAgent1", the Proximity event is triggered and I can calculate the number of travellers on the path.

The problem is that when the FlowItems get stuck (in a queue for example), the model runs very slowly. I think, it is because the FlowItems start constantly triggering each others Proximity events. Is it somehow possible to create "un-active" agent, that doesn't scan it's own surroundings but would trigger "active" agent's Proximity event? Or is there some other way to speed up the model? What is the meaning of Agent System Properties -> Proximity Behavior -> on/off selection?

You can test this with the attached model. I tested 4 scenarios (1000 sec simulation):

1) Proximity/Agent logic ON and queue ON: runtime 132 sec (real time)

- run the model as is

2) Proximity/Agent logic ON and queue OFF: runtime 7 sec (real time)

- connect the queue to the sink -> no FlowItem queue

3) Proximity/Agent logic OFF and queue ON: runtime 7 sec (real time)

- Disconnect "Activate Proximity system" in the Process Flow -> the items are no more Agents

4) Proximity/Agent logic OFF and queue OFF: runtime 2 sec (real time)

- 2 + 3

It seems, that combination Agent and queue slows down the model. Is there anything, that can be done?

test_agent.fsm



FlexSim 22.0.0
proximity agent system
test-agent.fsm (34.3 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Tomi Kosunen commented

A very large number of agents will naturally have a significant impact on the model speed. In your model the travellers don't actually do any calculations between themselves. (You have to enter the behavior name ("Proximity Behavior") into the "activateBehavior()" command, not the name of the system.)

The load is caused by only the one red object. The only way I found to reduce it is to simply remove the agents from the system while they are in queue/inactive.

In a more complex model this could be done automatically in entry/exit triggers of the queues (exit -> make agent, entry -> delete agent).

test-agent_1.fsm


test-agent-1.fsm (40.8 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Tomi Kosunen avatar image Tomi Kosunen commented ·
Thanks @Felix Möhlmann We are able to add/remove the Object from the Agent list in our model. It seems to speed up the model.
0 Likes 0 ·