diff --git a/DESCRIPTION b/DESCRIPTION index e62abf1..eff316e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,7 +22,7 @@ Imports: qs2, R6, Rcpp, - terra (>=1.8-42) + terra (>= 1.8-42) Suggests: base64enc, butcher, diff --git a/R/alloc_dinamica.R b/R/alloc_dinamica.R index 66cf257..7d43e9a 100644 --- a/R/alloc_dinamica.R +++ b/R/alloc_dinamica.R @@ -80,9 +80,9 @@ alloc_dinamica_setup_inputs <- function( patcher_table <- alloc_params_full[, .( `From*` = id_lulc_anterior, `To*` = id_lulc_posterior, - Mean_Patch_Size = ifelse(is.na(mean_patch_size), 0, mean_patch_size), + Mean_Patch_Size = ifelse(is.na(mean_patch_size), 1, mean_patch_size), Patch_Size_Variance = ifelse(is.na(patch_size_variance), 0, patch_size_variance), - Patch_Isometry = ifelse(is.na(patch_isometry), 0, patch_isometry) + Patch_Isometry = ifelse(is.na(patch_isometry), 1, patch_isometry) )] patcher_path <- file.path(temp_dir, "patcher_table.csv") diff --git a/inst/tinytest/test_integ_allocation.R b/inst/tinytest/test_integ_allocation.R index 60e9fc1..1eb3129 100644 --- a/inst/tinytest/test_integ_allocation.R +++ b/inst/tinytest/test_integ_allocation.R @@ -30,6 +30,8 @@ expect_message( "Fitting full models for" ) +# switching run to no 1, which is the base estimate for allocation parameters +db$id_run <- 1L # no data for period 4 yet expect_equal(nrow(db$fetch("lulc_data_t", where = "id_period = 4")), 0L) @@ -46,7 +48,7 @@ if (Sys.which("DinamicaConsole") == "") { "Copying anterior.tif to posterior.tif as fallback so we can test." ) } else { - expect_stdout( + expect_message( db$alloc_dinamica( id_periods = 4, gof_criterion = "auc",