Jump to content

Recommended Posts

Posted

Hi I want to calculate at certain moment of a simulation the number of entities crossing an area of the facility window. With this calculation I would get a value such as etities/area.

how can i do it?

Posted

If you have an easy way to keep track of arrivals and departures to the area (e.g., perhaps they arrive and depart via specific nodes), then the most efficient way is to increment and decrement a state as they arrive and depart.


If your entities are just traveling in free space, a more computationally intensive approach might be required. Periodically or on-demand you would Search all entities and examine the x,y,z, location of each one compared to the coordinates of the area and record each entity that is in the area.


Somewhere in between these two approaches might be to add logic to each entity so that it "knows" when it is entering and leaving this area and increments/decrements a state accordingly.

×
×
  • Create New...