djgroen / flee

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

Issues with log levels in flee.py (i.e. camp, init, conflict) when set to 1 in simsetting.yml (FabFlee). #45

Closed cspgdds closed 1 year ago

cspgdds commented 1 year ago
  1. Campor camp?
    
    Traceback (most recent call last):
    File "/home/csstdds/Codes/flee/runscripts/run_par.py", line 78, in <module>
    e.evolve()
    File "/home/csstdds/Codes/flee/flee/pflee.py", line 21, in wrapper
    return func(*args, **kwargs)
    File "/home/csstdds/Codes/flee/flee/pflee.py", line 621, in evolve
    a.finish_travel(time=self.time)
    File "/home/csstdds/Codes/flee/flee/pflee.py", line 21, in wrapper
    return func(*args, **kwargs)
    File "/home/csstdds/Codes/flee/flee/pflee.py", line 104, in finish_travel
    super().finish_travel(time=time)
    File "/home/csstdds/Codes/flee/flee/flee.py", line 184, in finish_travel
    if self.location.Camp is True:
    AttributeError: 'Location' object has no attribute 'Camp'. Did you mean: 'camp'?

Solution: flee.py 
line 184: `if self.location.Camp is True:` change to lower letter `c` -> `if self.location.camp is True:` 
line 516: `if loc.Camp is True:`  change to lower letter `c` -> `if loc.camp is True:`

2. Set all log levels to 1 and out.csv has inconsistencies at the start (see attachment).
[out.csv](https://github.com/djgroen/flee/files/10580180/out.csv)
djgroen commented 1 year ago

Thanks for flagging this up. I now fixed the first problem:

https://github.com/djgroen/flee/commit/fe0259703e8521aa66c7a037c40cc1c370f7647d

djgroen commented 1 year ago

I also made some other redirects now, solving the other issues. @cspgdds could you test it out perhaps?

https://github.com/djgroen/flee/commit/a2667271c4241d45c231ddfc052c8a7964f1d7c6

cspgdds commented 1 year ago

@djgroen, I set all log levels to 1, which produced agents.out.0 and links.out.0, as well as printed 'new total spawn weight' in the terminal.

djgroen commented 1 year ago

Sounds like it works then.