cday41 / paz-search

Automatically exported from code.google.com/p/paz-search
0 stars 0 forks source link

Incorrect Hourly Mod Loaded Upon Initialization #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
***Note*** This is a low priority issue. I put this issue up more as something 
to be aware of than something that needs to be fixed. At some point it may 
merit addressing but for the time being it is not important. ***

This issue may be dependent on my inputs.

Upon initialization of a season (or initialization due to a reload), the 
incorrect hourly modifier is loaded upon startup.

Attached is an xml to replicate the issue.
The setup:
0500-1300: Animals do not use energy while moving but have a normal chance to 
capture food.

1300-2100: Animals have 0 chance to capture food but lose energy while moving. 
So you see a steady loss of energy.

2100-0500: Animals have no chance to gain or lose energy.

Also attached are an example animal's output and the simulation.txt logfile.

For the 2014Female.txt, the simulation starts at 6 PM/1800, which should be in 
the range where animals lose energy. But you can see that from 1800-1300 the 
next day, the animal does not lose energy and has a normal chance to capture 
food. So hourly modifiers as specified in the xml do not kick in until 1300 the 
second day of the simulation. At that point it works as intended.

In the simulation.txt, look at the beginning of either season (3/15/2013 or 
3/15/2014). In both cases it sets the first nextStartHour at 13. So the hourly 
mod doesn't kick in until 1300 the next day. Additionally, despite the fact 
that the season starts at 1800 and the current time falls within the hourly 
modifier that starts at 1300, this modifier is not loaded until the next day.

Original issue reported on code.google.com by acohe...@gmail.com on 13 May 2014 at 7:56

Attachments: