Skip to content

Commit

Permalink
testing with a new matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rklasky committed Jan 23, 2024
1 parent 632ac1f commit 51d561c
Show file tree
Hide file tree
Showing 7 changed files with 3,604 additions and 3,602 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.

16 changes: 9 additions & 7 deletions tests/testthat/test-rpath.R
Original file line number Diff line number Diff line change
Expand Up @@ -928,16 +928,18 @@ testthat::test_that("Rpath Unit Tests", {

# Looks like this is causing the error...try re-writing it
#
ForcedBio <- copy(REcosystem_scene_jitter$forcing$ForcedBio)
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]]
numMonths <- nrow(ForcedBio)
# print(paste0(modNum," ",i," ",SEED_OFFSET," ",aSpecies))
speciesBiomass <- REcosystem_scene_jitter$start_state$Biomass[aSpecies]
ForcedBio[,aSpecies] <- speciesBiomass + i
# ForcedBio[,aSpecies] <- createJitterVectorFromValue(speciesBiomass, numMonths, modNum*i*SEED_OFFSET, "Months","Biomass (mt/km²)",paste0(theTypeData,' with ','Jittered',' Noise - ',aSpecies))
ForcedBioMatrix[,aSpecies] <- 10
}
REcosystem_scene_jitter$forcing$ForcedBio <- copy(ForcedBio)
REcosystem_scene_jitter$forcing$ForcedBio <- copy(ForcedBioMatrix)

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

0 comments on commit 51d561c

Please sign in to comment.