I found some errors in the formula and have changed the code to
using DifferentialEquations
f = @ode_def_bare FoodChain begin
dBB = r*(1-BB/K)*BB - xI*yIB*BI*((BI^h/(BB^h+BI^h))/eIB)
dBI = -xI*BI + xI*yIB*BI*(BI^h/(BB^h+BI^h)) - xT * yTI*BT*((BT^h/(BI^h+BT^h))/eTI)
dBT = -xT*BT + xI*yTI*BT*(BT^h/(BI^h+BT^h)) - q*BT*E
end r K xI yIB h eIB xT yTI eTI q E
u0 = [155.0,107.0,93.0]
tspan = (0.0,10000.0)
p = (1.1, 450 ,0.18 ,10, 1.2, 0.66, 0.06, 10, 0.85, 0.01, 23)
prob = ODEProblem(f,u0,tspan,p)
sol=solve(prob, saveat=0.05)
using Plots
plot(sol,xlabel = "Time" ,ylabel = "Density", lw=0.5, layout = (3,1))
The Stacktrace is
julia> sol=solve(prob, saveat=0.05)
ERROR: MethodError: objects of type Float64 are not callable
Stacktrace:
[1] macro expansion at .\none:3 [inlined]
[2] (::getfield(Main, Symbol("##9#10")))(::Array{Float64,1}, ::Array{Float64,1}, ::Tuple{Float64,In
t64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}, ::Float64) at C:\Users\Helga
\.julia\packages\ParameterizedFunctions\ozDxQ\src\ode_def_opts.jl:249
[3] (::FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any})
(::Array{Float64,1}, ::Array{Float64,1}, ::Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64
,Int64,Float64,Float64,Int64}, ::Float64) at C:\Users\Helga\.julia\packages\ParameterizedFunctions\o
zDxQ\src\maketype.jl:82
[4] initialize!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,
LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSol
veFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,
Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},Float64,Float
64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float
64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float6
4,1},Tuple{Float64,Float64},true,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Flo
at64,Float64,Int64},FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothi
ng,Any,Any},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,fal
se,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,Lin
SolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.Composi
teInterpolationData{FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothi
ng,Any,Any},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDi
ffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,
1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float6
4,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Flo
at64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{FoodChain{getfield(Main,
Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Array{Float64,1},Tuple{Float64,I
nt64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},DiffEqDiffTools.UJacobianWr
apper{FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Fl
oat64,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},LinSol
veFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,
1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Flo
at64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,Li
nSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},FoodChain{getfield(
Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},OrdinaryDiffEq.CompositeCac
he{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq
.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float6
4,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(ident
ity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{FoodChain{getfield(Main, Symbol("##9#10")
),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Array{Float64,1},Tuple{Float64,Int64,Float64,Int6
4,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},DiffEqDiffTools.UJacobianWrapper{FoodChain{g
etfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Float64,Tuple{Float
64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},LinSolveFactorize{typeo
f(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,
1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Flo
at64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{t
ypeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float
64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tupl
e{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE
),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.Les
sThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float6
4,1},Float64,Array{Float64,1}},Array{Float64,1},Float64}, ::OrdinaryDiffEq.Tsit5Cache{Array{Float64,
1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}) at C:\User
s\Helga\.julia\packages\OrdinaryDiffEq\Ih6Ud\src\perform_step\low_order_rk_perform_step.jl:580
[5] initialize!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,
LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSol
veFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},Array{Float64,1},Float64,
Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},Float64,Float
64,Float64,Array{Array{Float64,1},1},OrdinaryDiffEq.ODECompositeSolution{Float64,2,Array{Array{Float
64,1},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{Array{Float6
4,1},Tuple{Float64,Float64},true,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Flo
at64,Float64,Int64},FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothi
ng,Any,Any},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,fal
se,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,Lin
SolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.Composi
teInterpolationData{FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothi
ng,Any,Any},Array{Array{Float64,1},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDi
ffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,
1},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float6
4,1},Array{Float64,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Flo
at64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{FoodChain{getfield(Main,
Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Array{Float64,1},Tuple{Float64,I
nt64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},DiffEqDiffTools.UJacobianWr
apper{FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Fl
oat64,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},LinSol
veFactorize{typeof(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,
1},Array{Float64,1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Flo
at64,1},Array{Float64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,Li
nSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}}}},FoodChain{getfield(
Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},OrdinaryDiffEq.CompositeCac
he{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq
.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float6
4,1},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(ident
ity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{FoodChain{getfield(Main, Symbol("##9#10")
),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Array{Float64,1},Tuple{Float64,Int64,Float64,Int6
4,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},DiffEqDiffTools.UJacobianWrapper{FoodChain{g
etfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Float64,Tuple{Float
64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},LinSolveFactorize{typeo
f(LinearAlgebra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,
1},Val{:central},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Flo
at64,1},Val{:central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{t
ypeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float64}},OrdinaryDiffEq.DEOptions{Float64,Float
64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tupl
e{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE
),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,DataStructures.Les
sThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float6
4,1},Float64,Array{Float64,1}},Array{Float64,1},Float64}, ::OrdinaryDiffEq.CompositeCache{Tuple{Ordi
naryDiffEq.Tsit5Cache{Array{Float64,1},Array{Float64,1},Array{Float64,1},OrdinaryDiffEq.Tsit5Constan
tCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,1},Array{Float64,1},Array{Fl
oat64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(i
dentity)},DiffEqDiffTools.TimeGradientWrapper{FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Not
hing,Nothing,Nothing,Nothing,Any,Any},Array{Float64,1},Tuple{Float64,Int64,Float64,Int64,Float64,Flo
at64,Float64,Int64,Float64,Float64,Int64}},DiffEqDiffTools.UJacobianWrapper{FoodChain{getfield(Main,
Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Float64,Tuple{Float64,Int64,Floa
t64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64}},LinSolveFactorize{typeof(LinearAlgeb
ra.lu!)},DiffEqDiffTools.JacobianCache{Array{Float64,1},Array{Float64,1},Array{Float64,1},Val{:centr
al},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,1},Array{Float64,1},Val{:
central},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearA
lgebra.lu!)},DataType},Rational{Int64},Float64}}) at C:\Users\Helga\.julia\packages\OrdinaryDiffEq\I
h6Ud\src\perform_step\composite_perform_step.jl:38
[6] #__init#203(::Int64, ::Float64, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::No
thing, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Bool, ::Rational{Int64}, ::No
thing, ::Nothing, ::Int64, ::Rational{Int64}, ::Int64, ::Int64, ::Rational{Int64}, ::Bool, ::Int64,
::Nothing, ::Nothing, ::Int64, ::Float64, ::Float64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof
(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFA
ULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::Stri
ng, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Base.Iterators.Pairs
{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::typeof(DiffEqBase.__init), ::
ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Float64,Int64,Float64,Int64,Float64,Fl
oat64,Float64,Int64,Float64,Float64,Int64},FoodChain{getfield(Main, Symbol("##9#10")),Nothing,Nothin
g,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tupl
e{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit
5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlgebra.lu!)},DataType},Rational{Int64},Float6
4}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Type{Val{true}}) at C:\Users\Helga\.julia\pac
kages\OrdinaryDiffEq\Ih6Ud\src\solve.jl:270
[7] (::getfield(DiffEqBase, Symbol("#kw##__init")))(::NamedTuple{(:default_set, :saveat),Tuple{Bool
,Float64}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,T
uple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},FoodChain{getf
ield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.Sta
ndardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(Lin
earAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearAlg
ebra.lu!)},DataType},Rational{Int64},Float64}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Ty
pe{Val{true}}) at .\none:0
[8] #__solve#202(::Base.Iterators.Pairs{Symbol,Real,Tuple{Symbol,Symbol},NamedTuple{(:default_set,
:saveat),Tuple{Bool,Float64}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},tru
e,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},FoodChain{g
etfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.
StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(
LinearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(Linear
Algebra.lu!)},DataType},Rational{Int64},Float64}}, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, :
:Type{Val{true}}) at C:\Users\Helga\.julia\packages\OrdinaryDiffEq\Ih6Ud\src\solve.jl:6
[9] (::getfield(DiffEqBase, Symbol("#kw##__solve")))(::NamedTuple{(:default_set, :saveat),Tuple{Boo
l,Float64}}, ::typeof(DiffEqBase.__solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true
,Tuple{Float64,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},FoodChain{ge
tfield(Main, Symbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.S
tandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(L
inearAlgebra.lu!)},DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,LinSolveFactorize{typeof(LinearA
lgebra.lu!)},DataType},Rational{Int64},Float64}}) at .\none:0
[10] #__solve#2(::Bool, ::Base.Iterators.Pairs{Symbol,Float64,Tuple{Symbol},NamedTuple{(:saveat,),T
uple{Float64}}}, ::Function, ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Float64
,Int64,Float64,Int64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},FoodChain{getfield(Main, S
ymbol("##9#10")),Nothing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProb
lem}, ::Nothing) at C:\Users\Helga\.julia\packages\DifferentialEquations\88DSk\src\default_solve.jl:
15
[11] #__solve at .\none:0 [inlined]
[12] #__solve#1 at C:\Users\Helga\.julia\packages\DifferentialEquations\88DSk\src\default_solve.jl:
5 [inlined]
[13] #__solve at .\none:0 [inlined]
[14] #solve#442 at C:\Users\Helga\.julia\packages\DiffEqBase\nW6r3\src\solve.jl:41 [inlined]
[15] (::getfield(DiffEqBase, Symbol("#kw##solve")))(::NamedTuple{(:saveat,),Tuple{Float64}}, ::type
of(solve), ::ODEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Tuple{Float64,Int64,Float64,Int
64,Float64,Float64,Float64,Int64,Float64,Float64,Int64},FoodChain{getfield(Main, Symbol("##9#10")),N
othing,Nothing,Nothing,Nothing,Nothing,Any,Any},Nothing,DiffEqBase.StandardODEProblem}) at .\none:0
[16] top-level scope at none:0