Skip to content

Commit 32e2c26

Browse files
committed
Updated the run_sim function so that the decay rate on movement is
dynamic and not hard-coded at 0.3.
1 parent 1390b9d commit 32e2c26

4 files changed

Lines changed: 3 additions & 2 deletions

File tree

R/run_sim.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ if(is.null(closure)) { closure_list <- NULL}
8686
###################################
8787
print("Calculating movement probabilities")
8888

89-
MoveProb <- lapply(paste0("spp", seq_len(n_spp)), function(s) { move_prob_Lst(lambda = 0.3, hab = hab_init[["hab"]][[s]])})
90-
MoveProb_spwn <- lapply(paste0("spp", seq_len(n_spp)), function(s) { move_prob_Lst(lambda = 0.3, hab = hab_init[["spwn_hab"]][[s]])})
89+
MoveProb <- lapply(paste0("spp", seq_len(n_spp)), function(s) { move_prob_Lst(lambda = pop_init[["lambda"]][[s]], hab = hab_init[["hab"]][[s]])})
90+
MoveProb_spwn <- lapply(paste0("spp", seq_len(n_spp)), function(s) { move_prob_Lst(lambda = pop_init[["lambda"[[s]], hab = hab_init[["spwn_hab"]][[s]])})
9191

9292
names(MoveProb) <- paste0("spp", seq_len(n_spp))
9393
names(MoveProb_spwn) <- paste0("spp", seq_len(n_spp))

tests/FullTest.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ max2 <- max(sapply(1:1000, function(x) { 0.02 * Pop[["Start_pop"]][[1]][[x]] * 1
6565
fleets <- init_fleet(sim_init = sim, VPT = c("spp1" = 100, "spp2" = 200),
6666
Qs = list("fleet 1" = c("spp1" = 0.01, "spp2" = 0.02),
6767
"fleet 2" = c("spp1" = 0.02, "spp2" = 0.01)),
68+
fuelC = list("fleet 1" = 800, "fleet 2" = 600),
6869
step_params = list("fleet 1" = c("rate" = 10, "B1" = 0.1, "B2" = 15, "B3" = max1),
6970
"fleet 2" = c("rate" = 10, "B1" = 0.5, "B2" = 17, "B3" = max2)
7071
),

tests/habitat.png

-14 KB
Loading

tests/habitat_spwn.png

-11 KB
Loading

0 commit comments

Comments
 (0)