djgroen / flee

flee agent-based modelling code
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

Flee creates circular route suggestions, and underresolves routes at higher awareness levels #74

Closed djgroen closed 1 year ago

djgroen commented 1 year ago

I discovered this bug yesterday night, and solved it this morning.

Essentially, the agent's current location was not included in the list of origin_locations, causing route suggestions like ->B->A to be possible when the AwarenessLevel is higher than 1.

In addition, the routefinding branching would be terminated whenever any previous location touched upon by the algorithm was hit, which caused routes to be wrongly eliminated when the AwarenessLevel is higher than 1.

These issues resulted in malfunctions when the AwarenessLevel is higher than 1, but did not affect the behavior for values 1 or 0.