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

PR for checking conflicts merging spatial_demography into transloc_new_genetics_spatial_demog_merge #80

Open
wants to merge 39 commits into
base: transloc_new_genetics_spatial_demog_merge
Choose a base branch
from

Conversation

JetteReeg
Copy link
Collaborator

Need to merge only flags #RS_THREADSAFE and #SPATIALDEMOG
Both are specific for R package and won't work for batch interface for now as they take 2D and 3D matrices as inputs for all landscape and spatially varying demographic scale layers.

  1. Integrate both features while keeping the option of having a file input for the spatially varying demographic rates
    • transforming the #RS_THREADSAFE and #SPATIALDEMOG into a parameter/switch
    • SPATIALDEMOG should also be available without #RS_THREADSAFE
  2. adapting SPATIALDEMOG feature also for file inputs (especially needed for batch interface)
  3. only then, work on batch interface

malchowa and others added 30 commits October 18, 2021 17:08
Started implementing it in patch.cpp/h and species.cpp/h
…parameters.h

Used NLAYERS for setting the localDemoScaling parameter in Patch.cpp
Added setFecLayer() and getFecLayer() functions in Species.cpp (same for surv+dev)
Started to work at the reproduction function in Population.cpp/h, still buggy
…y varying parameters:

In patch.cpp/h: added function to get the local demographic scaling vector

In Population.cpp: added new code for getting the scaled fecundity, survival and development in reproduction and survival functions

In population.h: added the adapted reproduction and survival functions

In subcommunity.cpp: added the adapted rreproduction and survival functions, added localDemoScaling variable
…for next replicate; also mend some warnings about unused variables
- changed initial value of localDemoScaling to 1.0 instead of 0.0
in SubCommunity.cpp:
- added spatialdemog makro in getStats() function
in Population.cpp:
- added spatialdemog makro in getStats() function (wherever fec was set)
- include ifelse condition in reproduction function to test whether fecundity is spatially varying and whether the assigned layer is valid
- include ifelse condition in survival function to test whether development/survival is spatially varying and whether the assigned layer is valid
- added spatial varying rate for all reproduction types
in population.h:
- added getStats function for SPATIALDEMOG macro
in Species.cpp:
- added boolean for spatial varying fec, surv and dev
- initialised as false
- moved fec[i][j] to inside of the #else //RS_Contain+//SEASON
in Species.h:
- added boolean for spatial varying fec, surv and dev
- added function to return the value
…use pdf files for figures -> need to fix it or decide to delete 'word option'
Merge branch 'spatial_variance_demo' of github.com:RangeShifter/RangeShiftR into spatial_variance_demo

# Conflicts:
#	RangeShiftR/R/output_handling.R
…s if parameter should not be spatially varying

Rinterface.cpp: set setFecLayer/setDevLayer/setSurvLayer independent from eachother; otherwise it would use default values as soon as the first condition is false
…nd SurvLyer as well as demogScaleLayers, their reception on C side and R docu
Changed boundaries for demoscaling in patch.cpp (0-1 instead of 0-100)
…s.na() to vector version anyNA(); update copyright year
@JetteReeg JetteReeg self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant