djgroen / flee

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

Conflict driven spawning spawns agents without conflict #88

Closed MDI-SCI closed 10 months ago

MDI-SCI commented 11 months ago

When enabling conflict driven spawning, the model keeps spawning the same number of agents even when all conflicts have already taken place. It would be helpful if the model only spawns agents on day that there's actually a conflict taking place, or if there would be a settings that lets the number of agents that are spawned as a consequence of a conflict decay over time

djgroen commented 11 months ago

@MDI-SCI I've tried to reproduce this issue using this test case: https://github.com/djgroen/flee/blob/master/tests/test_conflict_driven_spawning.py

However, I do not get the same bug at all unfortunately. Could you perhaps let me know in which exact case you are getting this issue?

djgroen commented 11 months ago

Okay, I managed to discover the bug and I believe I've fixed it. I also refined the associated test case. Please give it a shot :)