Search code examples
netlogopath-findingmaze

Netlogo barriers, walls, and drawn lines narrower than a patch


I'm working on a model of an event in a specific building. I have the floorplan. There's one issue: the building is large enough that if I make the walls take up a whole patch, making them easy to factor into pathfinding, the model is too large to run. So I have them narrower, and am treating them as turtles.

But people are still walking through walls. I want them to not walk through walls.

There's an intersection model in the library that means I can tell when someone has already walked into a wall, but that doesn't help with pathfinding. I can also draw lines where the walls are. But I'm not sure how to or even if it's possible to have lines register as locations.

Additionally, if I just use the whole patch that a wall occupies, that means there are no actual viable paths.

So: how can I make a turtle that is less than a tenth of a patch wide impermeable to other turtles using a pathfinding algorithm?


Solution

  • The workaround I tried ended up being the massively increased number of patches, which added granularity to the simulation, which was cool.

    The fix ended up being taking my floorplan and turning it into a png of just the walls and then uploading that and making it so agents couldn't walk through patches that color.