Skip to content

FDDESystem with multiple lags #77

@finmod

Description

@finmod

The delayChen is running fine whereas the delaySolow gives the following error:

#using FractionalDiffEq, Plots
#α=[0.94, 0.94, 0.94]; ϕ=[0.2, 0, 0.5]; τ=0.009; T=1.4; h=0.001
#function delaychen!(dy, y, ϕ, t)
#	a=35; b=3; c=27
#	dy[1] = a*(y[2]-ϕ[1])
#	dy[2] = (c-a)*ϕ[1]-y[1]*y[3]+c*y[2]
#	dy[3] = y[1]*y[2]-b*ϕ[3]
#end
#prob = FDDESystem(delaychen!, ϕ, α, τ, T)
#sol=solve(prob, h, DelayABM())

# Solow model with time delay FDDESystem
using FractionalDiffEq, Plots
q = [0.7, 0.7, 0.7]           # order 
ϕ = [4.0152, 0.1383, 1.7788]  # initial value of delayed variable
τ = [0., 2.0, 0.]             # delays
tspan = (0., 150)              # final time
h = 0.01                      # step length

function delaysolow!(dy, y, ϕ, t)
	α = 0.6; p = 0.06; w = 0.
	dy[1] = 0.05*(1.0 - ϕ[1]/8.)*ϕ[1]
	dy[2] = 0.4*y[3]*y[2]^(α)*y[1]^(1-α) - 0.2*ϕ[2]
	dy[3] = p*ϕ[3] + w*ϕ[1] + h*ϕ[2]
end
prob = FDDESystem(delaysolow!, ϕ, q, τ, tspan)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions