Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay differential equations need a wrapper on the history function #1

Open
ChrisRackauckas opened this issue Apr 21, 2018 · 1 comment

Comments

@ChrisRackauckas
Copy link
Member

def f(u, h, p, t):
  du1 = 1.1/(1 + 3.16227*(h(p, t-20)[0])**(1.25)) - 10*u[0]/(1 + 40*u[1])
  du2 = 100*u[0]/(1 + 40*u[1]) - 2.43*u[1]
  return[du1,du2]

u0 = [1.05767027/3, 1.030713491/3]
def h(p,t):
  [1.05767027/3, 1.030713491/3]

tspan = (0.0, 100.0)
constant_lags = [20.0]
prob = de.DDEProblem(f,u0,h,tspan,constant_lags=constant_lags)
sol = de.pysolve(prob)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in f
TypeError: 'NoneType' object is not subscriptable
@ChrisRackauckas
Copy link
Member Author

Works via Julia functions for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant