You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are just notes to assist in understanding the model workflow, no comments needed.
infectPlantsAt = list / data.frame of coordinates
which is parsed through packetsFromLocations (which just wraps coordinates into the first element if a list, and adds a 1 to the second element ) additionalNewlyInfectiveList <- infectPlantsAt i.e. list(c("x","y"),1)
Then additionalNewlyInfectiveList is used in function makeSomeInfective() and never used again.
makeSomeInfective
A sporePacket refers to additionalNewlyInfectiveList mentioned above.
sporesInPacket is numeric and 1 on the first run
paddockUninfectiveGrowingPoints a data.table for each 1x1m unit all containing the values -1 at the start.
(a) coords with values less than -0.5 are added to infectiveElementsList (for coords from additionalNewlyInfectiveList) ; then
(b) paddockUninfectiveGrowingPoints (for coords from additionalNewlyInfectiveList) are updated with refUninfectiveGrowingPoints (40 the seeding_rate)
(c) (i) infectionsNew <- paddockUninfectiveGrowingPoints which are then less than sporesInPacket (1 as allocated in packetsFromLocations)(none on first run with coords from additionalNewlyInfectiveList) ) and
(ii) update that paddockUninfectiveGrowingPoints value <- 0
(d) (i) infectionsNew <- sporesInPacket (1) when paddockUninfectiveGrowingPoints is equal or greater than sporesInPacket ( additionalNewlyInfectiveList coords on first run) and
(ii) update paddockUninfectiveGrowingPoints value <- paddockUninfectiveGrowingPoints - infectionsNew (first run: 40 - 1)
These are just notes to assist in understanding the model workflow, no comments needed.
infectPlantsAt = list / data.frame of coordinates
packetsFromLocations
(which just wraps coordinates into the first element if a list, and adds a1
to the second element )additionalNewlyInfectiveList
<-infectPlantsAt
i.e. list(c("x","y"),1)Then
additionalNewlyInfectiveList
is used in functionmakeSomeInfective()
and never used again.makeSomeInfective
sporePacket
refers toadditionalNewlyInfectiveList
mentioned above.sporesInPacket
is numeric and1
on the first runpaddockUninfectiveGrowingPoints
a data.table for each 1x1m unit all containing the values-1
at the start.(a) coords with values less than
-0.5
are added toinfectiveElementsList
(for coords fromadditionalNewlyInfectiveList
) ; then(b)
paddockUninfectiveGrowingPoints
(for coords fromadditionalNewlyInfectiveList
) are updated withrefUninfectiveGrowingPoints
(40 the seeding_rate)(c) (i)
infectionsNew
<-paddockUninfectiveGrowingPoints
which are then less thansporesInPacket
(1 as allocated inpacketsFromLocations
)(none on first run with coords fromadditionalNewlyInfectiveList
) ) and(ii) update that
paddockUninfectiveGrowingPoints
value <-0
(d) (i)
infectionsNew
<-sporesInPacket
(1
) whenpaddockUninfectiveGrowingPoints
is equal or greater thansporesInPacket
(additionalNewlyInfectiveList
coords on first run) and(ii) update
paddockUninfectiveGrowingPoints
value <-paddockUninfectiveGrowingPoints
-infectionsNew
(first run:40 - 1
)paddockInfectiveGrowingPoints
(note: Infective not uninfective) <-paddockInfectiveGrowingPoints
+infectionsNew
(first run:0 + 1
)Therefore on the first run the function makes the following changes to global environment variables
infectiveElementsList
contains coords fromadditionalNewlyInfectiveList
)paddockUninfectiveGrowingPoints
at coords fromadditionalNewlyInfectiveList
contain value 40The text was updated successfully, but these errors were encountered: