scipy.odeint-DEintWarning:在此调用上完成了过多的工作

问题描述

我不知道为什么函数ODEINT失败,在matlab中用ode15s尝试并能正常工作。您知道问题的根源吗?


import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint


def ODE2(inp,t):
        LuxR=int(inp[0])
        GFP=int(inp[1])
        
        dLuxRdt=a_LuxR-d_LuxR*LuxR
        a1=a_LuxR*(1+B_LuxR*W_LuxR*LuxR*AHL)
        a2=1+W_LuxR*LuxR*AHL
        dGFPdt=np.int64(a1/a2-d_GFP*GFP)
        return [dLuxRdt,dGFPdt]

a_LuxR=2.01532436e+01
d_LuxR=1.43662296e-02
B_LuxR=5.06038073e+01
W_LuxR=9.98591535e+02
d_GFP=9.93562391e+02


AHL=0.0001
tspan2= np.arange(0,500,1)
init_ODE=[0,0]
out_ODE=odeint(ODE2,init_ODE,tspan2)
out_GFP=out_ODE[:,1]

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)