caranha / Koudou

Modular small community simulator
GNU General Public License v3.0
2 stars 2 forks source link

Agents stop eating and sleeping in the evacuation center. #59

Open HouShikon opened 3 months ago

HouShikon commented 3 months ago

After agents successfully evacuated, the Behavior should be set as evacuated. But in this behavior, agents stop doing activities eat_at_evac and sleep_at_evac

image image
caranha commented 3 months ago

It is not clear what you are trying to show at the screenshot. When preparing issues (not for this but for any projects) it is better to upload the files that contain information about the bug (such as log files).

Anyway, when you say agents "stop" doing that activity, does it mean that they were doing those activities earlier in the simulation, and then stopped?

For this issues, I recommend that you also write a list of tasks that you want to do to investigate this bug as comments, so you can write new comments as you investigate the bug and find more information about it.

HouShikon commented 3 months ago

So after the investigation, I believe it's because after agent found the evac_center, the behavior of agent remain evacuate instead of turning into evacuated. I searched it into the location database and it has no result.

image

Because not turning into evacuated, agents are only able to do the activities in behavior_evacuate.csv

image

So they are not able to do activities in behavior_evacuated.csv, including eating and sleeping . image

caranha commented 3 months ago

Okay, what is the part of the code that is wrong? If you change that, does it fix this bug?

HouShikon commented 2 months ago

I believe this bug has two reasons.

  1. In the condition.csv when condition of agents are set to not_at_evac_point and at_evac_point, it will judge if agents are at the evacuation point. But the condition in this file is evac_point,which should be Evacuation_Point. image

After changed to Evacuation_Point, the agents can turn into evacuated correctly. image However , in this point, agents are still not eating and sleeping at evacuation point, even though they are already in evacuated behavior. I searched into database of the records of agents' location, found out agents with evacuated behavior are doing move_to_evac_and_have_target activity. image This activity represents when agents moving to a certain evacuation point, which should happen in evacuate behavior because after agents arrived in evacuation point, the behavior should be changed from evacuate into evacuated. I deleted the move_to_evac_and_have_target activity in behavior_evacuated.csv and run the simulation again and as my except, now agents can sleep and eat at evacuation point. image

image
caranha commented 2 months ago

Are you checking in the code as well, or only in the csv? Sometimes the answer to what you want to fix or the problem in the bug might be in the code.

HouShikon commented 2 months ago

Yes, I did check the code. Before I made changes into csv files, these behavior and activities are actually loaded into the simulation. which means the code on this part worked correctly.