← Back to all sparks
B

biocro

ANALYTICS
Velocity0.0

BioCro Crop and Agroecosystem Simulator

BioCro swapped an unstable iteration for real root finders, changing what its crop models compute.

rcrop-modelingcppnumerical-methodssimulation
Current state
BioCro is a C++ crop growth simulator with an R interface, built from swappable modules for photosynthesis, respiration and development. Version 3.3.0 added multidimensional and one-dimensional root finders to the C++ source and put them to work immediately, replacing the fixed-point iteration used for intercellular CO2 with a Dekker root finder on the grounds that fixed-point iteration is known to be unstable there. Getting to that release also required moving from C++11 to C++17 and updating the bundled boost from 1.71 to 1.89.
Where it's heading
Two threads run together: the biology is being broken into finer interchangeable modules — separate maintenance respiration, alternative linear and logistic SLA methods, a direct development-index module — while the numerics underneath are being made solvable in general. The root finders are explicitly staged to move into the shared biocro/framework repository, so this is groundwork for other models rather than for this package alone.
Prediction
More module-level alternatives that depend on simultaneous-equation solutions are the natural follow-on, and the root finders should migrate out to biocro/framework as the notes state.

Recent moves

  1. 6mo ago

    Compiler warning blocking Linux builds fixed

    Fixes a changes-meaning compiler warning that blocked compilation on some Linux and gcc combinations, and repairs error-message formatting that broke vignette builds. CI checks were added to catch the warning class in future.

    View source ↗
  2. 8mo ago

    C++ root finders added; Ci calculation moved off fixed-point iteration

    ⚡ SPARK

    Adds a general root-finding layer to the C++ source and immediately uses it to replace the unstable fixed-point iteration in the Ci calculation. This changes simulation output and sets up a class of models the package could not previously solve.

    View source ↗
  3. 1y ago

    Maintenance respiration module; SLA split into swappable methods

    Adds a maintenance respiration module with organ-specific coefficients and a Q10 temperature response, splits specific leaf area out of parameter_calculator into interchangeable sla_linear and sla_logistic modules, and adds a direct development-index module. Continued decomposition of the biology into swappable parts.

    View source ↗
  4. 2y ago

    First CRAN-accepted release after a 20 MB to 5 MB cut

    The first version accepted by CRAN, reached by cutting the package from over 20 MB to under 5 MB — thinning regression test data, rounding stored weather, and moving vignettes to web-only. Distribution rather than science, but it is what made the package installable the ordinary way.

    View source ↗
  5. 2y ago

    DESCRIPTION date refreshed for CRAN submission

    Updates the DESCRIPTION date to satisfy CRAN's requirement that it be under a month old. Submission mechanics only.

    View source ↗
  6. 2y ago

    CI workflow debugging tag, not a release

    Not a release: a tag marking a GitHub Actions run used to debug the 'Document quantities' workflow, paired with a second tag for the failing variant. Build-system debugging that landed in the release feed.

    View source ↗