Skip to content

Commit

Permalink
using jitter()
Browse files Browse the repository at this point in the history
  • Loading branch information
rklasky committed Jan 23, 2024
1 parent 51d561c commit 6e63a86
Show file tree
Hide file tree
Showing 7 changed files with 3,597 additions and 3,610 deletions.

Large diffs are not rendered by default.

1,198 changes: 599 additions & 599 deletions tests/testthat/data/input/REcosystem_Baseline_AB_ForcedBio_OutCatch_Jitter.dat

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,198 changes: 599 additions & 599 deletions tests/testthat/data/input/REcosystem_Baseline_RK4_ForcedBio_OutCatch_Jitter.dat

Large diffs are not rendered by default.

Large diffs are not rendered by default.

17 changes: 2 additions & 15 deletions tests/testthat/test-rpath.R
Original file line number Diff line number Diff line change
Expand Up @@ -928,23 +928,10 @@ testthat::test_that("Rpath Unit Tests", {

# Looks like this is causing the error...try re-writing it
#
print(paste0("Forced Bio is of type: ",class(REcosystem_scene_jitter$forcing$ForcedBio)))
# ForcedBio <- copy(REcosystem_scene_jitter$forcing$ForcedBio)
oldnames <- colnames(REcosystem_scene_jitter$forcing$ForcedBio)
ForcedBioMatrix = matrix(,nrow=nrow(REcosystem_scene_jitter$forcing$ForcedBio),
ncol=ncol(REcosystem_scene_jitter$forcing$ForcedBio))
colnames(ForcedBioMatrix) <- oldnames
# print(colnames(ForcedBio))
for (i in 1:length(species)) {
aSpecies <- species[[i]]
ForcedBioMatrix[,aSpecies] <- 10
}
REcosystem_scene_jitter$forcing$ForcedBio <- copy(ForcedBioMatrix)
REcosystem_scene_jitter$forcing$ForcedBio <- jitter(REcosystem_scene_jitter$forcing$ForcedBio,factor=5)

# Refactoring these lines
# modifiedBio <- modifyForcingMatrix(modNum,species,'Jittered',theTypeData,REcosystem_scene_jitter$forcing$ForcedBio,REcosystem_scene_jitter)
# REcosystem_scene_jitter$forcing$ForcedBio <- modifiedBio

# REcosystem_scene_jitter$forcing$ForcedBio <- modifyForcingMatrix(modNum, species, 'Jittered', theTypeData, REcosystem_scene_jitter$forcing$ForcedBio, REcosystem_scene_jitter)
}
else if (theTypeData == 'Forced Migrate') {
BaselineJitterDataFrames <- list(REcosystem_Baseline_AB_ForcedMig_OutBiomass_Jitter, REcosystem_Baseline_AB_ForcedMig_OutCatch_Jitter, REcosystem_Baseline_AB_ForcedMig_OutGearCatch_Jitter,
Expand Down

0 comments on commit 6e63a86

Please sign in to comment.