Skip to content

traitecoevo/framecpp

Repository files navigation

framecpp

Forest flammability via FRaME mechanics, reimplemented in C++/Rcpp and generalised from discrete strata to continuous plant size distributions — with classic FRaME behaviour retained as an exact special case.

Part of the AusTraits plant-family. Couples to plant and the AusTraits Plant Dictionary (APD); inputs may be full parameters, trait-resolved, field data, or plant output.

framecpp — the C++/Rcpp member of the FRaME model family, alongside frame_r (the R bridge) and frame_scala (the reference implementation).

Status: the classic (discrete-strata) FRaME fire model is fully ported and validated bit-exact against frame v0.5.3 on a corpus of golden references (layered, round/flat-leaf, and survey-derived non-layered communities), and runs ~500× faster than the JVM version (no per-run JVM + SQLite round-trip). The continuous generalisation is next. See dev/plan.md for the roadmap and dev/STATUS.md for the running log.

Quick start

devtools::load_all()   # or install & library(framecpp)

# run the whole single-site model on a bundled example community
ex  <- readRDS(system.file("extdata", "ref_mild.rds", package = "framecpp"))
res <- run_fire_model(ex$params)
res$run1$ros           # rate of spread per stratum

See vignette("framecpp") for a worked walk-through, make help for build/test/ parity/benchmark targets, and vignettes/articles/frame-model.qmd for the code-derived model description.

Layout

Path Contents
R/, src/ R interface + the C++/Rcpp core
inst/extdata/ golden references (ref_*.rds, ref_timings.rds)
data-raw/ scripts that capture the references from frame (+ raw .db)
tools/parity/ differential + golden parity harnesses vs frame
dev/ project docs (plan, status, setup, frame compatibility patches)
vignettes/ getting-started vignette + the model-description article

About

A fast, self-contained C++/Rcpp reimplementation of the FRaME forest-flammability model (Zylstra et al.) — bit-exact with frame v0.5.3, ~500× faster (no JVM/SQLite round-trip), generalising discrete strata to continuous plant size distributions. Part of the AusTraits plant-family.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors