I need help with a python/jupyter project
Simulation Model
To explore the consequences of establishing habitat corridors between the patches, you decide to build a Python framework that will allow you to simulate the movement of individuals through time (simulated as discrete steps) and track what happens to the populations. Your framework will include three types of classes: an Individual class, a Population class, and a Landscape class. Individuals exist in populations, and populations exist in a landscape. In each time step of your simulation, individuals can stay in the population where they started, or move to a new population. The probabilities that individuals stay or leave are stored in a table called a dispersal matrix (more detail below). Individuals need to (at a minimum) have a phenotype attribute, populations need to (at a minimum) have a list of Individuals, and Landscapes need to (at a minimum) have a list of Populations and a dispersal matrix. The dispersal matrix consists of the probabilities that an individual disperses between populations, or stays in place, each time step. For Warbling Babblers, these probabilities correspond to their probability of moving in a week (Fig. 1). If an individual moves from one population to another, you should remove it from the list of individuals in the population where it started, and add it to the list of individuals in the population where it went. There are multiple ways to use the probabilities in the dispersal matrix to decide if an individual moves in each time step, but one function you may find helpful is random.choices(â¦) from the random module. Population constructors should create a new list for individuals in that population, and Populations should have methods to add and remove individuals, as well as to calculate and print the frequency of phenotypes among individuals. Landscape constructors should create a new list for the populations in that landscape, and Landscapes should have a method that uses the probabilities in the dispersal matrix to determine if an individual moves or stays each time step. Either the Population or Landscape constructors should set the starting population sizes. The total number of individuals across all populations should stay constant, but individual populations may change size.
All three classes may contain other attributes or methods as you see fit! Some elements of this framework are similar to recent assignments, so you may find inspiration in the code you wrote earlier. One additional piece of advice is to test each classʼs constructor and methods as you write them. When simulations begin, all the individuals in a population should have the same phenotype. As individuals move back and forth between populations through the time steps (weeks), you will want to track the trajectory of phenotype frequencies and population sizes. To do this, you will need to write (at least one) function to create these plots. This function can either be a method of one of your classes, or it can be independent. I recommend overlaying phenotype frequencies or population sizes for different populations on a single plot for easy comparison. For example, you might create one plot for phenotype frequencies that shows three different lines for three different populations, and another, similar plot for population sizes.
Get Help With a similar task to - I need help with a python/jupyter project
Related Questions
Tutlance Experts offer help in a wide range of topics. Here are some of our top services:
- Math homework help
- Nursing homework help
- Statistics homework help
- Nursing coursework help
- Capstone project writing services
- Essay writers for hire
- Case study writing help
- Buy college papers online
- Buy college research papers
- College homework help
- Professional resume writing services
- Programming homework help
- Coursework writing help
- Term paper writing help
- Biology homework help
- Do my physics homework
- Dissertation data analysis help
- PhD Dissertation writing services
- Chemistry homework help
Post your project now for free and watch professional experts outbid each other in just a few minutes.