Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Otro

LIFESCI 30B Lab 1 - Feedback Loops and Oscillations.ipynb Kernel: Python 3 (CoCalc) SUMMER 2026 University of California

Puntuación
-
Vendido
-
Páginas
13
Subido en
28-05-2026
Escrito en
2025/2026

A Predator-Prey Model Previously, we studied and simulated the Lotka-Volterra predator-prey model (which you initially saw as the "shark-tuna model"). Now, we will study a different predator-prey model, termed the Holling-Tanner model, that incorporates somewhat different (and more realistic) biological assumptions. As before, we will call our prey population and our predator population . We will assume that, in the absence of predators, the prey population would grow logistically. The expression for this is the familiar . We also want an individual predator’s consumption rate to plateau as increases so that there is a limit to how much predators can eat. This can be done with the function , where is a predator’s maximum consumption rate and is the half-saturation density, the prey density at which consumption is half the maximum rate.

Mostrar más Leer menos
Institución
LIFESCI 30B
Grado
LIFESCI 30B

Vista previa del contenido

4/7/26, 11:52 PM Lab 1 - Feedback Loops and Oscillations.ipynb


Kernel: Python 3 (CoCalc)
Lab 1: Feedback Loops and Oscillations
Instructions for all labs (and programming in other assignments) in this course:
Write comments to help yourself and others looking at your code (including graders!)
understand your code. This should be at least 1 comment for every 5 lines of code in an
exercise, and you can see examples in our example code.
Label axes for all plots.
If you're plotting more than one time series or other items on the same axes, you should make
a legend with descriptive labels and a different color or style for each item.
We encourage you to collaborate with your team members and ask TAs and LAs for help, but
you should make sure you understand what is allowed cheating by reviewing the Academic
Integrity policy in our syllabus (including artificial intelligence).
In [4]: # Name:Gustavo Delgadillo
# I worked on this lab with: Sarai Garcia, Monica Ibrahim, Sandy Saat
# Have you read the instructions above and reviewed the Academic
Integrity policy in our syllabus? yes.

Throughout this course series, you have seen systems that oscillate. The purpose of this lab is to
take a closer look at such systems and to review important Python functions used for simulation
and plotting.

A Predator-Prey Model
Previously, we studied and simulated the Lotka-Volterra predator-prey model (which you initially
saw as the "shark-tuna model"). Now, we will study a different predator-prey model, termed the
Holling-Tanner model, that incorporates somewhat different (and more realistic) biological
assumptions.
As before, we will call our prey population N and our predator population P . We will assume that, in
the absence of predators, the prey population would grow logistically. The expression for this is the
familiar rN (1 − Nk ).





We also want an individual predator’s consumption rate to plateau as N increases so that there is a
limit to how much predators can eat. This can be done with the function f (N ) = CN +hN , where
max ​




Cmax is a predator’s maximum consumption rate and h is the half-saturation density, the prey





density at which consumption is half the maximum rate.





about:blank 1/13

, 4/7/26, 11:52 PM Lab 1 - Feedback Loops and Oscillations.ipynb

We can make plots by using np.linspace to generate a set of x values and then writing a formula
for the y values. We then use the pyplot function plot to generate the plot. Here is an example
that plots f (X) = 625+X
X
. 4
4 ​




Note: most example code in this course will be given as images so you will practice typing it
yourself.




Exercise 1. Plot CN +hN for different values of Cmax and h (at least two values per parameter
max ​




ranging between 1 and 10), changing one value at a time. Use N range of 0-200. You can put your
​ ​




plots on the same or different axes, but make sure to label which graph is which (using a legend as
shown above if you put them on the same axes). Also, label your axes.
In [4]: #write code here
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import odeint

Cmax = 3
Cmax2 = 6
h1 = 3
h2 = 6

N = np.linspace(0,200, 1000)

y1 = (Cmax*N)/(N+h1)
y2 = (Cmax2*N)/(N+h1)
y3 = (Cmax*N)/(N+h2)
y4 = (Cmax2*N)/(N+h2)
about:blank 2/13

Escuela, estudio y materia

Institución
LIFESCI 30B
Grado
LIFESCI 30B

Información del documento

Subido en
28 de mayo de 2026
Número de páginas
13
Escrito en
2025/2026
Tipo
OTRO
Personaje
Desconocido

Temas

$32.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Oldspice Portage Learning
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
1206
Miembro desde
6 año
Número de seguidores
867
Documentos
3735
Última venta
1 día hace
999

Lemme help you murder that paper :) Nursing, Math, Biology, Anatomy etc

3.9

209 reseñas

5
103
4
44
3
30
2
9
1
23

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes