Hello, i try calculate fixed points for one dimensional ODE and get next error:
ERROR: MethodError: no method matching /(::Int64, ::SMatrix{1, 1, IntervalArithmetic.Interval{Float64}, 1})
Closest candidates are:
/(::MutableArithmetics.Zero, ::Any)
@ MutableArithmetics ~/.julia/packages/MutableArithmetics/2vhhw/src/rewrite.jl:70
/(::Any, ::ChainRulesCore.NotImplemented)
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/zgT0R/src/tangent_types/notimplemented.jl:43
/(::ChainRulesCore.NotImplemented, ::Any)
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/zgT0R/src/tangent_types/notimplemented.jl:42
...
Stacktrace:
[1] 𝒦(f::ChaosTools.var"#14#15"{…}, f′::ChaosTools.var"#16#17"{…}, X::IntervalArithmetic.Interval{…}, α::Float64)
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/contractors.jl:38
[2] (::IntervalRootFinding.var"#37#38"{IntervalRootFinding.Krawczyk{…}, Float64})(x::IntervalArithmetic.Interval{Float64})
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/contractors.jl:115
[3] determine_region_status
@ ~/.julia/packages/IntervalRootFinding/gKaGR/src/contractors.jl:153 [inlined]
[4] Krawczyk
@ ~/.julia/packages/IntervalRootFinding/gKaGR/src/contractors.jl:116 [inlined]
[5] Krawczyk
@ ~/.julia/packages/IntervalRootFinding/gKaGR/src/contractors.jl:115 [inlined]
[6] process
@ ~/.julia/packages/IntervalRootFinding/gKaGR/src/roots.jl:56 [inlined]
[7] iterate(search::IntervalRootFinding.DepthFirstSearch{…}, wt::IntervalRootFinding.BBTree{…})
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/branch_and_bound.jl:307
[8] iterate(search::IntervalRootFinding.DepthFirstSearch{…}, wt::IntervalRootFinding.BBTree{…})
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/branch_and_bound.jl:303 [inlined]
[9] branch_and_prune(r::IntervalRootFinding.Root{…}, contractor::IntervalRootFinding.Krawczyk{…}, search::Type{…}, tol::Float64)
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/roots.jl:86
[10] _roots(f::Function, deriv::Function, r::IntervalRootFinding.Root{…}, contractor::Type{…}, strategy::Type{…}, tol::Float64)
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/roots.jl:169
[11] _roots
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/roots.jl:198 [inlined]
[12] roots(f::Function, deriv::Function, X::IntervalArithmetic.Interval{…}, contractor::Type{…}, tol::Float64)
@ IntervalRootFinding ~/.julia/packages/IntervalRootFinding/gKaGR/src/roots.jl:142
[13] fixedpoints(ds::CoupledODEs{…}, box::IntervalArithmetic.Interval{…}, J::Function; method::Type, tol::Float64, warn::Bool, order::Nothing)
@ ChaosTools ~/.julia/packages/ChaosTools/49ZtY/src/stability/fixedpoints.jl:59
[14] fixedpoints(ds::CoupledODEs{…}, box::IntervalArithmetic.Interval{…}, J::Function)
@ ChaosTools ~/.julia/packages/ChaosTools/49ZtY/src/stability/fixedpoints.jl:41
[15] top-level scope
@ ~/work/repo/dynamical-systems/Tsodyks Markram/Article RJND/fast_slow_analys/fast_sub_system.jl:1
Some type information was truncated. Use `show(err)` to see complete types.
Please help me fix this error. Thank you for your help.
Code:
using StaticArrays, DifferentialEquations, DynamicalSystems
E_box = 0..30
function fast_sub_sys_ds(u, p ,t)
Uy = p[4] + p[5] / ( 1.0 + exp( -50.0 * ( p[9] - p[6] ) ) )
dEdt = -u[1] + p[2] * log( 1.0 + exp( (p[3] * Uy * p[8] * u[1] + p[7]) / p[2] ) )
dEdt = dEdt / p[1]
return SVector{1}(dEdt)
end
function jac_fast_sub_sys(u, p, t)
Uy = p[4] + p[5] / ( 1.0 + exp( -50.0 * ( p[9] - p[6] ) ) )
expression_under_exp = (p[3] * Uy * p[8] * u[1] + p[7]) / p[8]
the_exp = exp(expression_under_exp)
EE = -1.0 + the_exp * ( p[3] * Uy * p[8] + p[7] ) / ( 1.0 + the_exp )
EE = EE / p[1]
return SMatrix{1,1}(EE)
end
function get_param_fast_sub_sys()
τ = 0.013; α = 1.58; J = 3.07; U0 = 0.265; ΔU0 = 0.305; ythr = 0.4; I0 = -1.6;
x = 0.0; y = 0.0;
return [ τ, α, J, U0, ΔU0, ythr, I0, x, y]
end
function get_help_fast_sub_sys(params)
indexparams = "τ - 1, α - 2, J - 3, U0 - 4,
ΔU0 - 5, ythr - 6, I0 - 7, x - 8, y - 9";
nameparams = "τ, α, J, U0, ΔU0, ythr, I0, x, y";
keyp = split(nameparams, ", ");
dict = Dict(zip(keyp, params));
return dict, indexparams;
end
parameters = get_param_fast_sub_sys()
u0 = 3.0
tspan = (0.0, 1000.0)
integrator_setting = (alg = Vern9(), adaptive = true, abstol = 1e-9, reltol = 1e-9)
ode_ds = CoupledODEs(fast_sub_sys_ds, u0, parameters, diffeq = integrator_setting)
jac_fast_sub_sys(u0, parameters, 0)
fixedpoints(ode_ds, E_box, jac_fast_sub_sys);