Miarmy Crowd Simulation Documentation (English)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Some perception contents support indexing. The perception contents which can be indexed are:

  • Bound
  • Zone
  • Road
  • Wind

On each one of these perception contents, there usually is an attribute XXX ID, such as Bound ID or Road ID. The channel name can be modified to such as bound[2].in, road[0].x or zone[15].d. If the channel name have ID, it can only percept and interact with the perception contents with the same ID, for example, road[3].ox can only fetch results from the road which Road ID is 3.
For example, bound is one kind of them. Please notice there is a Bound ID attribute on each bound.



Bound ID attribute can be any positive value (including 0)


We can simplify use bound[0].in to test whether current agent in bound which Bound ID is 0. So modified from the previous bound example, the results will be:

  • Return 1 for agent A, because only A is inside of bound which ID is 0
  • Return 0 for agent B, C, D and E

 


Bound channel with indexing techniques

 

 

 

  • No labels