From 612b5a36755dc19ebf21fd07b38ceecee8ead828 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 27 Jan 2018 00:04:05 -0800 Subject: [PATCH] Update to new DiffEq syntax --- src/methods/simulate.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/methods/simulate.jl b/src/methods/simulate.jl index aa9afb3..eebc1f9 100644 --- a/src/methods/simulate.jl +++ b/src/methods/simulate.jl @@ -16,7 +16,7 @@ function simulate{T}(sys::LtiSystem{Val{T},Val{:cont}}, tspan; input = (t,x)->zeros(numinputs(sys)), alg::AbstractODEAlgorithm = Tsit5(), initial::AbstractVector = zeros(numstates(sys)), tstops = Float64[], kwargs...) - f = (t,x,dx)->sys(t,x,dx,input) + f = (dx,x,p,t)->sys(t,x,dx,input) simvar= SimType(initial, zeros(numoutputs(sys)), zeros(numinputs(sys))) f(tspan[1], simvar, zeros(initial)) @@ -41,7 +41,7 @@ function simulate{T}(sys::LtiSystem{Val{T},Val{:disc}}, tspan; input = (t,x)->zeros(numinputs(sys)), initial::AbstractVector = zeros(numstates(sys)), kwargs...) - f = (t,x,dx)->sys(t,x,dx,input) + f = (dx,x,p,t)->sys(t,x,dx,input) simvar = SimType(initial, zeros(numoutputs(sys)), zeros(numinputs(sys))) temp = zeros(simvar.x) f(0.0, simvar, temp) # ensure first step is correct