djgroen / flee

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

Reading UNHCR data to Flee when doing conflict-driven spawning #86

Closed ynxue closed 11 months ago

ynxue commented 11 months ago

I ran Flee simulation for mali2012 with the following simulation settings:

log_levels:
  agent: 0
  camp: 0
  init: 0
spawn_rules:
  conflict_driven_spawning:
    spawn_mode: "pop_ratio"
    displaced_per_conflict_day: 0.001
  take_from_population: True
  conflict_spawn_decay: [1.0,1.0,1.0,0.5,0.1]
move_rules:
optimisations: 

Results: all the values of last 6 columns in out.csv are 0s.

Day,Date,Fassala-Mbera sim,Fassala-Mbera data,Fassala-Mbera error,Mentao sim,Mentao data,Mentao error,Bobo-Dioulasso sim,Bobo-Dioulasso data,Bobo-Dioulasso error,Abala sim,Abala data,Abala error,Mangaize sim,Mangaize data,Mangaize error,Niamey sim,Niamey data,Niamey error,Tabareybarey sim,Tabareybarey data,Tabareybarey error,Total error,refugees in camps (UNHCR),total refugees (simulation),raw UNHCR refugee count,refugees in camps (simulation),refugee_debt
0,2012-02-29,9259,9265,0.0006,0,0,0.0,0,0,0.0,697,698,0.0014,876,875,0.0011,0,0,0.0,0,0,0.0,0,0,0,0,0,0
1,2012-03-01,9253,9653,0.0414,0,0,0.0,0,0,0.0,697,691,0.0087,875,874,0.0011,0,0,0.0,0,0,0.0,0,0,0,0,0,0
2,2012-03-02,9253,10040,0.0784,0,0,0.0,0,0,0.0,698,684,0.0205,874,874,0.0,0,0,0.0,1,0,0.0,0,0,0,0,0,0
3,2012-03-03,9250,10427,0.1129,0,0,0.0,0,0,0.0,697,677,0.0295,873,874,0.0011,2,0,0.0,1,0,0.0,0,0,0,0,0,0
4,2012-03-04,9247,10815,0.145,0,0,0.0,0,0,0.0,696,670,0.0388,874,873,0.0011,2,0,0.0,1,0,0.0,0,0,0,0,0,0
5,2012-03-05,9253,11202,0.174,0,0,0.0,0,0,0.0,696,663,0.0498,874,873,0.0011,2,0,0.0,1,0,0.0,0,0,0,0,0,0
......
djgroen commented 11 months ago

@ynxue. I think I may have addressed this, but forgot to link it to this issue.

Could you check this commit please? https://github.com/djgroen/flee/commit/215e05135cbde9acdbdf4fc112751fc88e898ba2

ynxue commented 11 months ago

@ynxue. I think I may have addressed this, but forgot to link it to this issue.

Could you check this commit please? 215e051

@djgroen It works! I've tested the commit and everything seems to be functioning as expected. Thanks for your help and support!