ValueError:t中的值必须单调递增或单调递减;

时间:2020-09-09 20:24:57

标签: python odeint

我正在尝试使用odeint解决81个ODE,但出现上述错误。我对下面的前几个ODE进行了采样,因为81有点多余。 Y和X来自数据框的列表。

def solv(t,y,x):

    dssDNA_dt = -y[0] * x[0] * x[74] + y[1] * x[4] - y[6] * ((x[63]**y[8])/(y[7]**y[8] + x[63]**y[8])) *x[0] * x[63]
    dssPDNA_dt = y[0] * x[0] * x[74] - y[1] * x[1]
    dRF1_dt = y[1] * x[1] - y[2] * x[2] * x[61] + y[3] * x[3] + y[1] * x[4]
    dRF2_dt = y[2] * x[2] * x[61] - y[3] * x[3] -y[0] * x[3] * x[74]
    dRF2DP3_dt = y[0] * x[3] * x[61] - y[1] * x[4]
    dP5DNA_dt = y[6] * ((x[63]**y[8])/(y[7]**y[8] + x[63]**y[8])) * x[0] * x[63] - y[59] * x[78] * x[5]

    return[dssDNA_dt, dssPDNA_dt, dRF1_dt, dRF2_dt, dRF2DP3_dt, dP5DNA_dt]


t = np.linspace(0,100)
ent = odeint(solv,t,y0,x0)

0 个答案:

没有答案