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

Initialise patch state #304

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1a97662
Add SCM state setter
aornugent Jun 11, 2021
def3ff7
Pass state to SCM collect
aornugent Jun 11, 2021
12fb812
Update make_scm for multiple species
aornugent Jun 27, 2021
fc80dc7
Fix run_scm_error
aornugent Jul 5, 2021
2fdac68
Resolve initial size distribution as well as introduction schedule
aornugent Jul 5, 2021
bf576ee
Merge remote-tracking branch 'origin/develop' into HEAD
devmitch Nov 5, 2021
974c14d
Fix tests for new R API
devmitch Nov 5, 2021
76cbcea
Extra fixes + changes from develop
devmitch Nov 5, 2021
47a9873
Merge branch 'develop' of github.com:traitecoevo/plant into HEAD
devmitch Nov 5, 2021
8746eff
Regenerate Rcpp export files
devmitch Nov 5, 2021
7e0567a
Add cohort counter
aornugent Nov 15, 2021
f130da7
Change make_scm warning
aornugent Nov 15, 2021
478eb82
Add build_schedule complete flag
aornugent Nov 15, 2021
0b857b7
Update initial size dist. tests
aornugent Nov 15, 2021
cf8fcad
Merge branch 'develop' into init-size-dist
aornugent Nov 15, 2021
a7da88e
Use splines to interpolate intial characteristics
aornugent Nov 15, 2021
f68776a
Update initial size tests
aornugent Nov 15, 2021
14bf322
Rebuild RcppR6 and NAMESPACE
aornugent Nov 15, 2021
3d60c2f
Refactor initialisation spline
aornugent Nov 22, 2021
7257c61
Merge branch 'develop' into init-size-dist
aornugent Jan 16, 2022
b1cfbe1
<broken> debugging exploding derivatives
aornugent Jan 20, 2022
e9f604f
Initialise SCM with state, add failure modes for build_schedule
aornugent Feb 18, 2022
206a6f5
Merge branch 'init-size-dist' of https://github.com/traitecoevo/plant…
aornugent Feb 18, 2022
da82dda
Merge branch 'develop' into init-size-dist
aornugent Feb 18, 2022
b00b650
Remove debug gaff.
aornugent Feb 18, 2022
759db19
Add sensitivity analysis for debugging
aornugent Mar 21, 2022
b6a1ac9
Add initial size distribution vignette
aornugent Apr 4, 2022
e9299b2
Add standard pathological example
aornugent Apr 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export(grow_individual_to_size)
export(grow_individual_to_time)
export(hyperpar)
export(individual_list)
export(init_spline)
export(integrate_over_size_distribution)
export(interpolate_to_heights)
export(interpolate_to_times)
Expand All @@ -103,11 +104,13 @@ export(make_hyperpar)
export(make_patch)
export(make_reference_plant)
export(make_reference_plant_FF16)
export(make_scm)
export(make_scm_integrate)
export(make_transparent)
export(max_fitness)
export(max_growth_rate)
export(nlsolve)
export(partition_spline)
export(plant_log_console)
export(plot_size_distribution)
export(rbind_list)
Expand Down
32 changes: 32 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,10 @@ Patch___FF16__FF16_Env__species__get <- function(obj_) {
.Call('_plant_Patch___FF16__FF16_Env__species__get', PACKAGE = 'plant', obj_)
}

Patch___FF16__FF16_Env__total_cohorts__get <- function(obj_) {
.Call('_plant_Patch___FF16__FF16_Env__total_cohorts__get', PACKAGE = 'plant', obj_)
}

Patch___FF16__FF16_Env__ode_size__get <- function(obj_) {
.Call('_plant_Patch___FF16__FF16_Env__ode_size__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -1781,6 +1785,10 @@ Patch___FF16w__FF16_Env__species__get <- function(obj_) {
.Call('_plant_Patch___FF16w__FF16_Env__species__get', PACKAGE = 'plant', obj_)
}

Patch___FF16w__FF16_Env__total_cohorts__get <- function(obj_) {
.Call('_plant_Patch___FF16w__FF16_Env__total_cohorts__get', PACKAGE = 'plant', obj_)
}

Patch___FF16w__FF16_Env__ode_size__get <- function(obj_) {
.Call('_plant_Patch___FF16w__FF16_Env__ode_size__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -1889,6 +1897,10 @@ Patch___FF16r__FF16_Env__species__get <- function(obj_) {
.Call('_plant_Patch___FF16r__FF16_Env__species__get', PACKAGE = 'plant', obj_)
}

Patch___FF16r__FF16_Env__total_cohorts__get <- function(obj_) {
.Call('_plant_Patch___FF16r__FF16_Env__total_cohorts__get', PACKAGE = 'plant', obj_)
}

Patch___FF16r__FF16_Env__ode_size__get <- function(obj_) {
.Call('_plant_Patch___FF16r__FF16_Env__ode_size__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -1997,6 +2009,10 @@ Patch___K93__K93_Env__species__get <- function(obj_) {
.Call('_plant_Patch___K93__K93_Env__species__get', PACKAGE = 'plant', obj_)
}

Patch___K93__K93_Env__total_cohorts__get <- function(obj_) {
.Call('_plant_Patch___K93__K93_Env__total_cohorts__get', PACKAGE = 'plant', obj_)
}

Patch___K93__K93_Env__ode_size__get <- function(obj_) {
.Call('_plant_Patch___K93__K93_Env__ode_size__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -2049,6 +2065,10 @@ SCM___FF16__FF16_Env__set_cohort_schedule_times <- function(obj_, times) {
invisible(.Call('_plant_SCM___FF16__FF16_Env__set_cohort_schedule_times', PACKAGE = 'plant', obj_, times))
}

SCM___FF16__FF16_Env__set_state <- function(obj_, time, state, n) {
invisible(.Call('_plant_SCM___FF16__FF16_Env__set_state', PACKAGE = 'plant', obj_, time, state, n))
}

SCM___FF16__FF16_Env__complete__get <- function(obj_) {
.Call('_plant_SCM___FF16__FF16_Env__complete__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -2133,6 +2153,10 @@ SCM___FF16w__FF16_Env__set_cohort_schedule_times <- function(obj_, times) {
invisible(.Call('_plant_SCM___FF16w__FF16_Env__set_cohort_schedule_times', PACKAGE = 'plant', obj_, times))
}

SCM___FF16w__FF16_Env__set_state <- function(obj_, time, state, n) {
invisible(.Call('_plant_SCM___FF16w__FF16_Env__set_state', PACKAGE = 'plant', obj_, time, state, n))
}

SCM___FF16w__FF16_Env__complete__get <- function(obj_) {
.Call('_plant_SCM___FF16w__FF16_Env__complete__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -2217,6 +2241,10 @@ SCM___FF16r__FF16_Env__set_cohort_schedule_times <- function(obj_, times) {
invisible(.Call('_plant_SCM___FF16r__FF16_Env__set_cohort_schedule_times', PACKAGE = 'plant', obj_, times))
}

SCM___FF16r__FF16_Env__set_state <- function(obj_, time, state, n) {
invisible(.Call('_plant_SCM___FF16r__FF16_Env__set_state', PACKAGE = 'plant', obj_, time, state, n))
}

SCM___FF16r__FF16_Env__complete__get <- function(obj_) {
.Call('_plant_SCM___FF16r__FF16_Env__complete__get', PACKAGE = 'plant', obj_)
}
Expand Down Expand Up @@ -2301,6 +2329,10 @@ SCM___K93__K93_Env__set_cohort_schedule_times <- function(obj_, times) {
invisible(.Call('_plant_SCM___K93__K93_Env__set_cohort_schedule_times', PACKAGE = 'plant', obj_, times))
}

SCM___K93__K93_Env__set_state <- function(obj_, time, state, n) {
invisible(.Call('_plant_SCM___K93__K93_Env__set_state', PACKAGE = 'plant', obj_, time, state, n))
}

SCM___K93__K93_Env__complete__get <- function(obj_) {
.Call('_plant_SCM___K93__K93_Env__complete__get', PACKAGE = 'plant', obj_)
}
Expand Down
42 changes: 41 additions & 1 deletion R/RcppR6.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Generated by RcppR6: do not edit by hand
## Version: 0.2.4
## Hash: de9636dedfdeeee4f8d55758cb5884dd
## Hash: df0775a7d0fee710e2ad39ecf886671d

##' @importFrom Rcpp evalCpp
##' @importFrom R6 R6Class
Expand Down Expand Up @@ -2493,6 +2493,13 @@ Patch <- function(T, E) {
stop("Patch<FF16,FF16_Env>$species is read-only")
}
},
total_cohorts = function(value) {
if (missing(value)) {
Patch___FF16__FF16_Env__total_cohorts__get(self)
} else {
stop("Patch<FF16,FF16_Env>$total_cohorts is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___FF16__FF16_Env__ode_size__get(self)
Expand Down Expand Up @@ -2635,6 +2642,13 @@ Patch <- function(T, E) {
stop("Patch<FF16w,FF16_Env>$species is read-only")
}
},
total_cohorts = function(value) {
if (missing(value)) {
Patch___FF16w__FF16_Env__total_cohorts__get(self)
} else {
stop("Patch<FF16w,FF16_Env>$total_cohorts is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___FF16w__FF16_Env__ode_size__get(self)
Expand Down Expand Up @@ -2777,6 +2791,13 @@ Patch <- function(T, E) {
stop("Patch<FF16r,FF16_Env>$species is read-only")
}
},
total_cohorts = function(value) {
if (missing(value)) {
Patch___FF16r__FF16_Env__total_cohorts__get(self)
} else {
stop("Patch<FF16r,FF16_Env>$total_cohorts is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___FF16r__FF16_Env__ode_size__get(self)
Expand Down Expand Up @@ -2919,6 +2940,13 @@ Patch <- function(T, E) {
stop("Patch<K93,K93_Env>$species is read-only")
}
},
total_cohorts = function(value) {
if (missing(value)) {
Patch___K93__K93_Env__total_cohorts__get(self)
} else {
stop("Patch<K93,K93_Env>$total_cohorts is read-only")
}
},
ode_size = function(value) {
if (missing(value)) {
Patch___K93__K93_Env__ode_size__get(self)
Expand Down Expand Up @@ -3002,6 +3030,9 @@ SCM <- function(T, E) {
},
set_cohort_schedule_times = function(times) {
SCM___FF16__FF16_Env__set_cohort_schedule_times(self, times)
},
set_state = function(time, state, n) {
SCM___FF16__FF16_Env__set_state(self, time, state, n)
}),
active=list(
complete = function(value) {
Expand Down Expand Up @@ -3120,6 +3151,9 @@ SCM <- function(T, E) {
},
set_cohort_schedule_times = function(times) {
SCM___FF16w__FF16_Env__set_cohort_schedule_times(self, times)
},
set_state = function(time, state, n) {
SCM___FF16w__FF16_Env__set_state(self, time, state, n)
}),
active=list(
complete = function(value) {
Expand Down Expand Up @@ -3238,6 +3272,9 @@ SCM <- function(T, E) {
},
set_cohort_schedule_times = function(times) {
SCM___FF16r__FF16_Env__set_cohort_schedule_times(self, times)
},
set_state = function(time, state, n) {
SCM___FF16r__FF16_Env__set_state(self, time, state, n)
}),
active=list(
complete = function(value) {
Expand Down Expand Up @@ -3356,6 +3393,9 @@ SCM <- function(T, E) {
},
set_cohort_schedule_times = function(times) {
SCM___K93__K93_Env__set_cohort_schedule_times(self, times)
},
set_state = function(time, state, n) {
SCM___K93__K93_Env__set_state(self, time, state, n)
}),
active=list(
complete = function(value) {
Expand Down
Loading