I'm trying to solve a system of DE's using odeint. Here is my complete code: import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt # Parameter estimates r = 2000 # Egg laying rate of queen (days) m_E, m_L, m_P = 0.001, 0.05, 0.1 # Brood mortalitty rates m_H, m_F, m_D = 0.15, 0.3, 0.1 # Adult mortality rates t_E, t_L, t_P = 1/3, 1/6, 1/12 # Maturation rates K = 4000 # Colony size when brood survival rate is half of maximum alpha = 0.70 # Hive recruitment rate beta = 0.25 # Forager recruitment rate phi = 1 - alpha - beta # Drone recruitment rate # Initial conditions E0, L0, P0 = 1000, 500, 250 # Initial brood population sizes H0, F0, D0 = 3000, 1500, 500 # Initial adult bee population sizes -- hivebee, forager, drone # Model xmin = 0 # initial day xmax = 365 # ending day t = np.linspace(xmin, xmax, 250) def model(y, t, alpha, beta, phi): E, L, P, H, F, D = y dEdt = ((r*D**2)/(K + D**2)) - (m_E + t_E)*E dLdt = (E**2)/(t_E*(K + E**2)) - (m_L + t_L)*L dPdt = (L**2)/(t_L*(K + L**2)) - (m_P + t_P)*P dHdt = alpha*(t_P*P) - m_H*H dFdt = beta*(t_P*P) - m_F*F dDdt = phi*(t_P*P) - m_D*D dBdt = (((r*D**2)/(K + D**2)) - (m_E + t_E)*E) + ((E**2)/(t_E*(K + E**2)) - (m_L + t_L)*L) + ((L**2)/(t_L*(K + L**2)) - (m_P + t_P)*P) dAdt = (alpha*(t_P*P) - m_H*H) + (beta*(t_P*P) - m_F*F) + (phi*(t_P*P) - m_D*D) return dEdt, dLdt, dPdt, dHdt, dFdt, dDdt, dBdt, dAdt B0 = E0 + L0 + P0 A0 = H0 + F0 + D0 # Initial conditions for integration y0 = E0, L0, P0, B0, H0, F0, D0, B0, A0 # Integrate sol = odeint(model, y0, t, args = (alpha, beta, phi)) E, L, P, B, H, F, D, B, A = sol.T I keep getting the error "too many values to unpack (expected 6)" with lines 37 and 22 highlighted in the error. Any idea what I'm getting wrong?? Continue reading...