Hi Laura,
Do you have a counter in your code that resets the day of year value to 1 on January 1st each year? If not, that should do the trick. Here is some example code
Globals [day]
To setup
Set day 1
End
to go
<model actions>
Ifelse day <=365[
[Set day day + 1]
[set day 1]
End
If you do, could you please paste the rest of the code so we can take a look at it?
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
netlogo-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/netlogo-users/b4b065cb-a159-4c6d-9bcf-e53d6312661an%40googlegroups.com.

;; do season-specific stuff(if-else( season-number = 0 ) [ go-spring ]( season-number = 1 ) [ go-summer ]( season-number = 2 ) [ go-winter ]( season-number = 3 ) [ go-fall ])
Hi Laura,
I’d approach this by creating a calendar procedure where you define the day of year and the season. This will make it generic, so you don’t have to keep adding numbers to your season bracket. Then, you call your calendar procedure in your go procedure. I’ve written an example below
Globals[day eating-season?]
To setup
Set day 0
End
To calendar
Set day day + 1
If day >= 366 set day 1
;define eating season
Ifelse day >= 50 and day <= 182 ;determines when the eating season is
[set eating-season? TRUE] ;if it’s eating season, then this variable is set to TRUE
[set eating-season? FALSE] if it’s not the eating season, then this variable is set to FALSE
End ;to calendar
To go
Calendar ;calls calendar procedure
Ifelse eating-season?
[ask turtles [ ;procedures called during the summer
move-cows
check-if-dead
eat-grass
]
]
[regrow-grass ;[procedures called during the winter
ask turtles [
live-through-winter
check-if-dead
]
]
Tick
End ;to go

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/CAPeEv2SJxYr7L9ZugK047u53EE%2Bajrc1aqamJ9AmsndEKpXPpA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/CY1P111MB1301A589D3A7F64FC8305EDD8E8C9%40CY1P111MB1301.NAMP111.PROD.OUTLOOK.COM.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/CAPeEv2SJxYr7L9ZugK047u53EE%2Bajrc1aqamJ9AmsndEKpXPpA%40mail.gmail.com.
Hi Everyone,how do you restrict the movement of about 20 turtles to the center of the patch/environment?
On Nov 10, 2021, at 1:51 PM, James Steiner <grego...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/CADiHOG4dqh9ybSnsDoZrKBOVy%3DG2Wa3vEcAEwBs4Wf%2BtE3cUDw%40mail.gmail.com.