View source: R/model_run_func.R
Function that runs the ABM, for use in ABC etc. This version does NOT run microclimates. Input is the ABC parameters Output are vectors of interest over time.
1 | model_run(lambda, k, phi, alpha_a, alpha_j, eta)
|
lambda |
Shape param for dispersal |
k |
Parameter for mating |
phi |
Parameter for trapping |
alpha_a |
Mortality rate of adult mosquitoes |
alpha_j |
Mortality rate of juvenile mosquitoes |
eta |
Clutch size of each egg-laying event. for debugging: lambda <- param$lambda k <- param$k For my personal use, feel free to comment out for your use. Each row will be a timestep, each column will be the time each step takes PLUS the number of agents. ———————— ADDED 12/11/20: EGG HATCH RATE OF 0.8 AS PER PERRAN ROSS This won't error if length(to.adult) == 0 hopefully ———————— 22-09-20: reduce proportion of females laying eggs per day: CHECK ADDED 14/11/20: TESTING MAKING JUV DEATH RATE HIGHER FOR THOSE WITH WB add to graveyard remove from mozzie dataframe THE BELOW LINE IS THE ORIGINAL to.nat.die TESTING 05/11/20: RELEASED ADULTS WITH HIGHER DEATH RATE HHHHHHH ——– END TESTING 05/11/20 HHHH ———————- For adults/mozzie.dt: everyone has the same EKS update! For juveniles, it's a little bit more involved: Get the temperature deviate for each mozzie Apply the temperature deviate to today's temperature and then convert to Kelvin This is the temperature that will then be fed into the EKM Find EKS score first: for adults, stage = 4 Find the EKS for each adult for today Add to the current enzyme now: for juveniles DOBULE CHECK the below works.... dataframe for optimisation: MATING ATTEMPT NUMBER 3...... I S2G THIS HAS TO BE THE LAST TIME we do a vectorised for loop. the find_a_mate function works on one agent at a time. Get a list of females who can mate. There's a ~30 apply function to find mates Update female's mate ID Update male's gonoCycle Set up stuff to get graveyard data below is prop wb from buffer zone 0 end graveyard data |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.