# NOT RUN {
trait_params <- set_trait_model(no_sp = 15)
init_pop <- get_initial_n(trait_params, n0_mult = 0.001)
sim <- project(trait_params, effort = 0, t_max = 50, dt=0.2,
initial_n = init_pop, t_save = 1)
plot(sim)
## Set up industrial fishery that only fishes on species with w_inf <= 500 g
## And where the selectivity of the industrial fishery = w_inf * 0.05
no_sp <- 10
min_w_inf <- 10
max_w_inf <- 1e5
w_inf <- 10^seq(from=log10(min_w_inf), to = log10(max_w_inf), length=no_sp)
knife_edges <- w_inf * 0.05
industrial_gears <- w_inf <= 500
other_gears <- w_inf > 500
gear_names <- rep("Industrial", no_sp)
gear_names[other_gears] <- "Other"
params_gear <- set_trait_model(no_sp = no_sp, min_w_inf = min_w_inf,
max_w_inf = max_w_inf, knife_edge_size = knife_edges,
gear_names = gear_names)
## Only turn on Industrial fishery. Set effort of the Other gear to 0
sim <- project(params_gear, t_max = 20, effort = c(Industrial = 1, Other = 0))
# }
Run the code above in your browser using DataLab