need support for Interactive Trajectory Evolution in unpredefined systems
Closed this issue · 1 comments
My idea is to apply my system in GUI so that I can see the dynamical evolutions.
Here is the example:
using InteractiveDynamics
using DynamicalSystems, GLMakie
using OrdinaryDiffEq
diffeq = (alg = Tsit5(), adaptive = false, dt = 0.001)
ps = Dict(
1 => 1:0.1:30,
2 => 10:0.1:50,
3 => 1:0.01:10.0,
4 => 1:0.01:10.0,
)
lims = (
(-30, 30),
(-30, 30),
(0, 100),
(0,100),
)
function chaotictest(u, p, t)
k1, k2, k3, a = p
x, y, z = u
dx = -k1*(x-y)-k2*y*z
dy = k3*x-y-x*z
dz = -z+x*y+a*sin(0.01*t)
return SVector(dx, dy, dz)
end
u1 = [10,20,40.0]
u2 = [10,0,0]
u3 = [20,10,40.0]
u0s = [u1, u2, u3]
But I dont know when it comes to the parameter diction and the initial values set ,
u1 = [10,20,40.0]
u2 = [10,0,0]
u3 = [20,10,40.0]
u0s = [u1, u2, u3]
p = ps[]
and how to define the system:
ds = ContinuousDynamicalSystem(chaotictest, u0s, p)
I really need your help! I can't find any examples in the guide book as well as your published book, since all the examples are about the predefined systems .
Hoping for your kindness reply!
I am not sure I understand what the problem is. You can make a ContinuousDynamicalSystem
as described here: https://juliadynamics.github.io/DynamicalSystems.jl/dev/ds/general/ and then pass it to interactive_evolution
. Nothing about "Interactve Trajectory Evolution" is only about predefined systems!
You already have the system, so just call interactive_evolution(ds, u0s)