'Basic problem with solving differential equation with ODEINT in python

I have implemented solver like below:

def kaiABC(X, t, 
           kut0, kutA, kdt0, kdtA, ktu0, ktuA, ktd0, ktdA,
           kus0, kusA, kds0, kdsA, ksu0, ksuA, ksd0, ksdA, 
           K): # 19 arguments

    Atot = 1.3
    Ctot = 3.4

    (S, T, D) = X 

    U = Ctot - S - T - D
    A = max(0, Atot, 2*S)

    kut = kut0*K/(K+A) + kutA*A/(K+A)
    kdt = kdt0*K/(K+A) + kdtA*A/(K+A)
    ktu = ktu0*K/(K+A) + ktuA*A/(K+A)
    ktd = ktd0*K/(K+A) + ktdA*A/(K+A)
    kus = kus0*K/(K+A) + kusA*A/(K+A)
    kds = kds0*K/(K+A) + kdsA*A/(K+A)
    ksu = ksu0*K/(K+A) + ksuA*A/(K+A)
    ksd = ksd0*K/(K+A) + ksdA*A/(K+A)

    dSdt = kus*U + kdt*D - ktu*T - ktd*T
    dTdt = ktd*T + ksd*T - kdt*D - kds*D
    dDdt = kus*U + kds*D - ksu*S - ksd*S

    return [dSdt, dTdt, dDdt]

and when I have to solve like this:

t = np.linspace(0, 20)

# The initial conditions
S = 0.34
T = 0.68
D = 1.36

X = (S, T, D)

kut0 = 0
kutA = 0.48
kdt0 = 0
kdtA = 0.17
ktu0 = 0.21
ktuA = 0.29
ktd0 = 0
ktdA = 0.21
kus0 = 0
kusA = 0.05
kds0 = 0.31
kdsA = 0
ksu0 = 0.11
ksuA = 0
ksd0 = 0
ksdA = 0.51
K = 0.43

p = (kut0, kutA, kdt0, kdtA, ktu0, ktuA, ktd0, ktdA,
     kus0, kusA, kds0, kdsA, ksu0, ksuA, ksd0, ksdA, 
     K) # 17 arguments

ret = odeint(kaiABC, X, t, args=p)
kut, kdt, ktu, ktd, kus, kds, ksu, ksd = ret.T

I have an error:

ValueError: not enough values to unpack (expected 8, got 3)

In my opinion all argument are in their places. Anyone where is the problem and how to sole it?

Any advices?

Problem related to number of arguments, it is either too low or to much.

Please help, the problem has to be basic.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source