Replies: 1 comment
-
This can be achieved by taking the intersection of your rectangle and the walkable area, see: https://shapely.readthedocs.io/en/stable/reference/shapely.intersection.html#shapely.intersection Example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When setting up agent distribution in specific areas, it's crucial to ensure that spawning zones don't overlap with obstacles.
Consider a scenario where agents are evenly spread across an entire geometry, including obstacles. This is achieved effectively using the following function, which treats obstacles as part of the geometry:
distribute_agents(spawning_area=walkable_area)
In contrast, a more common situation involves distributing agents within a designated spawning_area. An example of this would be:
distribute_agents(spawning_area=spawning_area)
This method, however, may result in agents appearing inside obstacles.
The question arises: Should the jps.distribution functions automatically account for obstacles within spawning areas? Or is it more appropriate for users to meticulously select spawning areas, even though it may be less convenient?
Beta Was this translation helpful? Give feedback.
All reactions