Mooving agent trough a path in a parking

34 views
Skip to first unread message

Edouard KILIMOU

unread,
May 25, 2019, 8:00:29 PM5/25/19
to GAMA
I try to move my car-type agents, one after the other, at the beginning of the path to follow in a parking lot to park at an available place. I tried the following code as an attached file but alas.
I created the road, parking and node agents from shapefiles obtained with QGis. Can help me understand the manipulation of the list of agents obtained through a shapefile in this case when I want to perform a reflex on a specific element of the list.
Best regards
TPGAMA.zip

Srirama Bhamidipati

unread,
May 27, 2019, 10:33:41 AM5/27/19
to GAMA
hi 

Not very clear what you mean. But if you have a list of parking spots (polygons) as agents, you can have a bool variable in that agent that detects if there is any car inside this polygon (true/false). 
And then you can use one_of and use where  to filter polygons where the bool is false. Then you can set car target to this empty parking agent.

Srirama
Reply all
Reply to author
Forward
0 new messages