Skip to content

Commit

Permalink
Remove the delay differential equations for now
Browse files Browse the repository at this point in the history
I didn't really check if they are properly defined and they just sneaked
themselves in there in an earlier version. Let's add these later.
  • Loading branch information
nathanaelbosch committed Dec 23, 2023
1 parent 3d93204 commit ab82462
Showing 1 changed file with 10 additions and 42 deletions.
52 changes: 10 additions & 42 deletions src/chaotic_attractors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -476,49 +476,17 @@ function Duffing()
return prob
end

function MackeyGlass end
originalcode(::typeof(MackeyGlass)) = """
class MackeyGlass(DynSysDelay):
@staticjit
def _rhs(x, xt, t, beta, gamma, n, tau):
xdot = beta * (xt / (1 + xt ** n)) - gamma * x
return xdot
"""
@doc make_docstring(MackeyGlass) MackeyGlass
function MackeyGlass()
function rhs(du, u, p, t)
beta, gamma, n = p
du[1] = beta * (u[2] / (1 + u[2]^n)) - gamma * u[1]
end
u0 = Float64.(ATTRACTOR_DATA["MackeyGlass"]["initial_conditions"])
p = dict_to_componentarray(ATTRACTOR_DATA["MackeyGlass"]["parameters"])
tspan = (0.0, 1.0)
f = ODEFunction(rhs)
prob = DDEProblem(f, u0, tspan, p, constant_lags = [1.0])
return prob
end
# class MackeyGlass(DynSysDelay):
# @staticjit
# def _rhs(x, xt, t, beta, gamma, n, tau):
# xdot = beta * (xt / (1 + xt ** n)) - gamma * x
# return xdot

function IkedaDelay end
originalcode(::typeof(IkedaDelay)) = """
class IkedaDelay(DynSysDelay):
@staticjit
def _rhs(x, xt, t, c, mu, tau, x0):
xdot = mu * np.sin(xt - x0) - c * x
return xdot
"""
@doc make_docstring(IkedaDelay) IkedaDelay
function IkedaDelay()
function rhs(du, u, p, t)
c, mu, x0 = p
du[1] = mu * sin(u[2] - x0) - c * u[1]
end
u0 = Float64.(ATTRACTOR_DATA["IkedaDelay"]["initial_conditions"])
p = dict_to_componentarray(ATTRACTOR_DATA["IkedaDelay"]["parameters"])
tspan = (0.0, 1.0)
f = ODEFunction(rhs)
prob = DDEProblem(f, u0, tspan, p, constant_lags = [1.0])
return prob
end
# class IkedaDelay(DynSysDelay):
# @staticjit
# def _rhs(x, xt, t, c, mu, tau, x0):
# xdot = mu * np.sin(xt - x0) - c * x
# return xdot

# class SprottDelay(IkedaDelay):
# pass
Expand Down

0 comments on commit ab82462

Please sign in to comment.