Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4f0a50b
Prepare new development version
eloch216 May 23, 2025
5eea0d5
Merge pull request #7 from biocro/release-v0.2.0
eloch216 May 23, 2025
9e99946
Fix some typos
eloch216 May 30, 2025
752e717
Merge pull request #8 from biocro/fix-some-typos
eloch216 May 30, 2025
e8c566f
Standardize and simplify method selection
eloch216 May 31, 2025
665a963
Allow custom regularization function
eloch216 May 31, 2025
b8f71c3
Print more startup information
eloch216 May 31, 2025
f55b306
Update NEWS.md
eloch216 May 31, 2025
eb407a9
Merge pull request #10 from biocro/regularization-function
eloch216 Jun 4, 2025
1045477
Catch errors when running model
eloch216 Aug 7, 2025
02f288f
Make separate `debug_print` function
eloch216 Aug 7, 2025
8506915
Add more options for debug mode
eloch216 Aug 7, 2025
7ee5803
Update NEWS and DESCRIPTION
eloch216 Aug 7, 2025
06561b0
Update parameterizing_soybean_biocro.Rmd
eloch216 Aug 7, 2025
92e73da
Merge pull request #11 from biocro/more-error-handling
eloch216 Aug 15, 2025
f59009d
Improve alignment and ordering
eloch216 Aug 15, 2025
2ce4127
Make sure module names are preserved
eloch216 Aug 15, 2025
5d8830b
Update NEWS.md
eloch216 Aug 15, 2025
69f5b57
Update write_model.Rd
eloch216 Aug 15, 2025
245c99e
Merge pull request #12 from biocro/improve-write-model
eloch216 Aug 15, 2025
10cc547
Enable driver-specific initial values and parameters
eloch216 Aug 21, 2025
44f4c80
Fix verbose mode bug
eloch216 Aug 21, 2025
9c021c0
Make printout consistent with others
eloch216 Aug 21, 2025
f5d0e90
Fix bad tests
eloch216 Aug 21, 2025
0398640
Merge pull request #16 from biocro/more-ddp-options
eloch216 Aug 21, 2025
e6c9eae
Use `modifyList`
eloch216 Sep 5, 2025
eedc565
Update links
eloch216 Sep 5, 2025
dc381ba
Merge pull request #17 from biocro/remove-combine-lists
eloch216 Mar 11, 2026
ce1af0c
Increment version
eloch216 Mar 11, 2026
ea7abff
Update DESCRIPTION
eloch216 Mar 11, 2026
9b04b14
Update R-CMD-check.yaml
eloch216 Mar 11, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: '3.6.0'}
- {os: ubuntu-latest, r: '4.1.0'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: BioCroValidation
Version: 0.2.0
Version: 0.3.0
Title: Tools for Validating BioCro Models
Description: A collection of tools for validating BioCro crop growth models.
Authors@R: c(
Expand All @@ -9,7 +9,7 @@ Authors@R: c(
person("BioCroValidation authors", role = "cph")
)
Depends:
R (>= 3.6.0)
R (>= 4.1.0)
Imports:
BioCro (>= 3.2.0)
Suggests:
Expand All @@ -18,10 +18,10 @@ Suggests:
lattice,
knitr,
rmarkdown,
testthat (>= 3.0.0)
testthat (>= 3.2.0)
VignetteBuilder: knitr
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/BioCro/BioCroValidation, https://biocro.github.io/BioCroValidation/
URL: https://github.com/BioCro/BioCroValidation, https://biocro.org/BioCroValidation/
Config/testthat/edition: 3
23 changes: 23 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,29 @@ In the case of a hotfix, a short section headed by the new release number should
be directly added to this file to describe the related changes.
-->

# Changes in BioCroValidation Version 0.3.0 (2026-03-11)

- Fixed typos in the help page for `objective_function`, and in the `add_norm`
function (defined in `R/objective_function_helpers.R`)

- Allowed user-supplied regularization functions

- Allowed driver-specific initial values and parameters

- Errors that occur while running simulations are now caught so they do not
prevent an optimization from finishing

- More options for `debug_mode` are now available; the default setting
(`minimal`) only prints info to the terminal when an issue with a simulation
occurs

- Improved formatting of output from `write_module`, so that initial value and
parameter lists are alphabetized, equals signs are aligned, and module names
are preserved

- Fixed a bug where calling `objective_function` with
`dependent_arg_function = NULL` and `verbose_mode = TRUE` caused an error

# Changes in BioCroValidation Version 0.2.0 (2025-05-23)

- Added 2002 and 2005 SoyFACE biomass and standard deviation data.
Expand Down
26 changes: 18 additions & 8 deletions R/objective_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ objective_function <- function(
)
{
# Check the data-driver pairs
check_data_driver_pairs(base_model_definition, data_driver_pairs)
check_data_driver_pairs(
base_model_definition,
data_driver_pairs,
verbose_startup
)

# Check the arguments to be varied
check_args_to_vary(
Expand Down Expand Up @@ -76,14 +80,16 @@ objective_function <- function(
long_form_data,
normalization_method,
normalization_param,
length(data_driver_pairs)
length(data_driver_pairs),
verbose_startup
)

# Add variance-based weights
long_form_data <- add_w_var(
long_form_data,
stdev_weight_method,
stdev_weight_param
stdev_weight_param,
verbose_startup
)

# Print the long form data, if desired. Do this before checking the data,
Expand All @@ -109,11 +115,15 @@ objective_function <- function(
# Get the data-driver pair weights
ddp_weights <- get_ddp_weights(data_driver_pairs)

# Print the data-driver pair weights, if desired
if (verbose_startup) {
cat('\nThe user-supplied data-driver pair weights:\n\n')
utils::str(ddp_weights)
}
# Print additional startup information, if desired
print_misc_verbose_startup(
ddp_weights,
regularization_method,
dependent_arg_function,
post_process_function,
extra_penalty_function,
verbose_startup
)

# Create the objective function
obj_fun <- get_obj_fun(
Expand Down
Loading
Loading