Skip to content

Commit

Permalink
✨ workd with DifferentialEquations
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Mar 14, 2017
1 parent 2658f4b commit 36ca326
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/simulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ function simulate(p, biomass; start::Int64=0, stop::Int64=500, use::Symbol=:stif
@assert use vec([:stiff :nonstiff])

# Pre-allocate the timeseries matrix
t = (start, stop)
t_keep = collect(start:1:stop)
t = (float(start), float(stop))
t_keep = collect(start:1.0:stop)

# Pre-assign function
f(t, y) = dBdt(t, y, p)
Expand All @@ -49,7 +49,7 @@ function simulate(p, biomass; start::Int64=0, stop::Int64=500, use::Symbol=:stif
output = Dict{Symbol,Any}(
:p => p,
:t => sol.t,
:B => hcat(sol.u...)
:B => hcat(sol.u...)'
)

return output
Expand Down

0 comments on commit 36ca326

Please sign in to comment.