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

saveat doubles the end point #93

Closed
ChrisRackauckas opened this issue Jan 18, 2019 · 3 comments
Closed

saveat doubles the end point #93

ChrisRackauckas opened this issue Jan 18, 2019 · 3 comments

Comments

@ChrisRackauckas
Copy link
Member

function delay_lotka_volterra(du,u,h,p,t)
  x, y = u
  α, β, δ, γ = p
  du[1] = dx =- β*y)*h(p,t-0.1)[1]
  du[2] = dy =*x - γ)*y
end
h(p,t) = ones(eltype(p),2)
prob = DDEProblem(delay_lotka_volterra,[1.0,1.0],h,(0.0,10.0),[2.2, 1.0, 2.0, 0.4],constant_lags=[0.1])
sol = solve(prob,MethodOfSteps(Tsit5()),saveat=0.1)
length(sol)
length(0:0.1:10.0)
@devmotion
Copy link
Member

@devmotion
Copy link
Member

Nevertheless, IMO the logic of how solutions are created should be simplified if possible... It feels a bit overcomplicated at the moment 😄

@ChrisRackauckas
Copy link
Member Author

Indeed, it's quite complicated.

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

2 participants