1

I'm trying to get the number of pedestrian agents inside a polygonal node (e.g node1).

I applied the method getnumberofadmittedagents() on the text value,

node1.getnumberofadmittedagents()

but it maintained 0 even when the agents are inside the node. Could you give me some advice on this matter? Thanks in advance.

aurora
  • 21
  • 1
  • 2
  • Hi, could you please add some code to your question? – Yonlif Apr 18 '21 at 14:42
  • Hi. Thanks for the response. I'm using node1.getnumberofadmittedagents() for the text value and it works after I adjusted node properties just as mentioned by Mr Felipe. – aurora Apr 21 '21 at 02:34

1 Answers1

2

To make this getnumberofadmittedagents() work, you need to use access restriction in the node, otherwise the method does nothing.

so in your node properties, just use acess restriction by condition and the condition is false always as follows: access

Felipe
  • 8,311
  • 2
  • 15
  • 31