# NOT RUN {
# Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e11)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate the LFI for 40cm
bry <- which(NS_params@l_bound<=40 & NS_params@u_bound>40)
length_LFI <- 40
prop <- (length_LFI-NS_params@l_bound[bry])/(NS_params@u_bound[bry]-NS_params@l_bound[bry])
LFI <- calc_LFI(model_run@N[,,101], NS_params@wgt, bry, prop)
# Calculate TyL for the final time step
calc_TyL(wgt=NS_params@wgt, mid=NS_params@mid, N=model_run@N[,,101])
# Calculate the LQ for the final time step
calc_LQ(wgt=NS_params@wgt, u_bound=NS_params@u_bound, N=model_run@N[,,101], prob=0.5)
# }
Run the code above in your browser using DataLab