Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added updated salmon environment tests #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DhruvaBhagwat23
Copy link
Contributor

No description provided.

@cboettig
Copy link
Member

cboettig commented Nov 25, 2024

nice work, this is great. To keep things simple for now, I think we should drop the quasi-equilibrium analysis over the action space for now. (As you see, the dynamics involve oscillations, so the spread between abundances at the last time step doesn't really reflect the equilibrium spread anyway).

Now that we have the dynamics here, we want to explore these a little more.

  • to better visualize the underlying dynamics, lets make all the noise terms (sigmas) very small.
  • For now, let's consider the case with no harvest of either species, and no actions on K.
  • Try running the simulation even longer than the 800 timesteps (e.g. maybe 1600, maybe even longer), to make sure we have the long-run behavior in the low noise regime. Does it cycle or go to a stable size for all three populations? How do the stable sizes (or mean sizes, if it is oscillating) compare to the "K_i" values of each population?
  • Next, we want to start tuning the parameters to see different long-run equilibrium behaviors. We will still ignore the "action" part of the simulation. Just re-run the simulation with different K values for one of the species. How does this alter the dynamics?

@cboettig
Copy link
Member

cboettig commented Dec 2, 2024

@DhruvaBhagwat23 The updated simulations look great.

A few things might further help the visualization.

  • consider recording the mean, min and max values of each species rather than the final value, which will give a better sense of the oscillatory dynamics. (e.g. does increasing the carrying capacity "K" of any given species increase it's mean abundance, the mean abundance of other species, or the 'size' of the oscillations?

  • Another common plot to consider is what we call the "phase plane", which should make the long-run 'stationary' behavior (known as limit cycles) visible. It's hard to draw in 3d, but you can consider planar slices of the phase diagram: Use geom_path() option to make plots X vs Y and X vs Z rather than X,Y,Z over time. This should show the oscillatory pattern as circles or ellipses of a fixed size.

  • Next we want to vary K_x & K_y like you did but over a larger range -- consider values smaller than 1 as well, and see if/how the phase plane changes. We want to start exploring other parameters as well, such as growth rates r_x and r_y. We will probably want to also vary K_x and K_y simultaneously.

Great work on this, these noise-free runs definitely make the underlying dynamics more visible and easier for us to explore parameters. Our goal now is to identify parts of parameter space that match up to the two different "ecological regimes" -- the current situation of a degraded ecosystem (all three species at low abundance), vs a restored or pristine ecosystem, with all at high abundance.

So far, with D = 0.8, the seals strongly prefer lamprey and so it looks to me like as we increase lamprey carrying capacity, most of the benefit 'passes through' the food chain into the seal abundance (or at least the max seal abundance), while the increases to the K of the salmon mostly increase the mean salmon size, since they feel less predation.

We may want to decrease the timescale of the seal dynamics (i.e. small alpha), to indicate these species have longer lives and fewer potential offspring per year, which should mean less dramatic population fluctuations (strictly speaking we could model the age structure explicitly, but I think we can get a good approximation by using very small alpha). @abigailkeller can you take a look over this when you have a chance?

@abigailkeller
Copy link
Contributor

@DhruvaBhagwat23 This is really awesome! Thanks for such great work and visualizations - super helpful.
A couple things:

  1. Definitely agree with @cboettig that it would be useful to record other summary stats for the oscillations, but I'd also add variance. It looks like when you increase lamprey carrying capacity, the lamprey variance increases, and both the seal variance and mean increases (I think). This makes sense, as Carl mentioned: 1) the mean seals are increasing since they are absorbing the increased lamprey numbers, but 2) the variance of both are increasing since the lamprey numbers are growing and crashing with larger magnitudes as K increases.
  2. Also definitely agree that reducing the seal growth rate (alpha) makes sense. Probably something like 0.05.
  3. We can work on this together, but it might make sense to think of the predation rates/preferences as prey-dependent, rather than constant (i.e., D = f(X,Y), rather than D = D). This would involve a bit of reconfiguring the differential equations. I think this could better represent a scenario where lamprey are a "predation offset" for salmon. For example, the pinniped predation rate for salmon could approach zero when you increase the number of lamprey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants