Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes - Mathematica functions: newlyInfective, makeSomeInfective #47

Closed
PaulMelloy opened this issue Feb 16, 2021 · 0 comments
Closed
Labels
documentation Improvements or additions to documentation

Comments

@PaulMelloy
Copy link
Collaborator

PaulMelloy commented Feb 16, 2021

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)
  • finally 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 from additionalNewlyInfectiveList)
  • paddockUninfectiveGrowingPoints at coords from additionalNewlyInfectiveList contain value 40
  • paddock__Infective__GrowingPoints at coords is updated to contain value 1
@PaulMelloy PaulMelloy added the documentation Improvements or additions to documentation label Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant