Closed GoogleCodeExporter closed 9 years ago
Looking closer, some animals do not exhibit this problem. I think the issue may
be
based on the fact that the calculation uses 12 AM of a different date.
If you look above, the date does not change from 11/14 to 11/15 for sleep time.
So
11:29 PM of 11/14 gets rounded to 12 AM of 11/15, BUT the sleep time date does
not
increment (it remains 11/14). Thus, the sleep time is correct, but the date is
1 day
behind and is never reached.
I'll look some more, but it appears that this has nothing to do with the home
range
trigger (just happened to be the animal I looked at) and is an issue with
incrementing 'date' when calculating time to sleep (or time to awake, I would
guess).
Original comment by nmcc...@purdue.edu
on 16 Nov 2009 at 2:03
Original comment by nmcc...@purdue.edu
on 16 Nov 2009 at 2:06
[deleted comment]
Disregard the post just before this. I was looking at the wrong results. I have
deleted it as well.
We now have a new problem with calculating the active and sleeping cycles (this
one
is with revision 248). When we compare the current time to the sleep time we
choose
to sleep everytime (see examples below). This results in awake periods that are
never more than a single timestep:
09:50:42:514: inside change active state
09:50:42:514: must be awake
09:50:42:514: Sleep time is 11/13/2009 12:00:00 AM 01:40:31.2300000
09:50:42:514: curr time is 11/12/2009 06:00:00
09:50:42:514: time to go to sleep
...
09:50:46:810: inside change active state
09:50:46:810: must be awake
09:50:46:810: Sleep time is 11/12/2009 12:00:00 AM 20:44:49.3580000
09:50:46:810: curr time is 11/12/2009 06:00:00
09:50:46:810: time to go to sleep
...
09:53:21:859: inside change active state
09:53:21:859: must be awake
09:53:21:859: Sleep time is 11/16/2009 12:00:00 AM 14:03:16.9490000
09:53:21:859: curr time is 11/15/2009 06:00:00
09:53:21:859: time to go to sleep
We have a similar problem with wake times (although a bit different). In this
case
if the dates differ (i.e. we are supposed to wake up sometime after today) we
correctly stay sleeping but if the dates are the same we always choose to wake
(see
examples below):
Good:
09:51:04:418: inside change active state
09:51:04:418: must be asleep
09:51:04:418: Waketime is 11/13/2009 07:14:54.9470000
09:51:04:418: curr time is 11/12/2009 14:00:00
(The animal keeps sleeping)
Bad:
09:51:11:448: inside change active state
09:51:11:448: must be asleep
09:51:11:448: Waketime is 11/13/2009 11:29:32.8180000
09:51:11:448: curr time is 11/13/2009 02:00:00
09:51:11:448: time to wake up, I am going home = False
I have attached the xml I used (I just changed timestep lengths to shorten run
time). It uses all of the same maps as the above xml.
Original comment by bpa...@purdue.edu
on 3 Dec 2009 at 3:27
Attachments:
Need to verify this is fixed with revision 249
Original comment by bpa...@purdue.edu
on 4 Dec 2009 at 12:06
Original comment by ran...@mwwb.net
on 5 Dec 2013 at 12:51
Original issue reported on code.google.com by
nmcc...@purdue.edu
on 16 Nov 2009 at 1:23Attachments: