PyDSTool和Julia:在简单的分叉图

时间:2018-06-19 03:52:06

标签: julia pydstool

预赛

  • Ubuntu 18.04
  • Julia v0.6.3
  • 通过Pkg.add安装PyDSTool(" PyDSTool")
  • Pkg.installed(" PyDSTool")返回v0.4.0
  • Pkg.update()返回点上的所有内容

摘要

通过改变与步骤相关的PyDSTool参数,简单的1维ODE系统的延续给出了稳态的不同稳定性行为。为什么会这样?我该如何解决这个问题?

描述

我做了三个不同的实验。实验1没问题。实验2部分正确。实验3具有逆转稳定性(稳定分支为不稳定,反之亦然)。这是我在朱莉娅的代码:

using DifferentialEquations
using PyDSTool
using Plots; gr()

f = @ode_def GataSystem begin
 dGata3= alpha*S + (k_g*Gata3^2)/((1.0+Gata3)^2)-k*Gata3
end alpha k_g k S

u0 = 0 # initial condition
tspan = [0;30] # integration time
p = [0.02, 5.0, 1.0, 0.0] # parameter array

dsargs = build_ode(f,u0,tspan,p)

ode = ds[:Generator][:Vode_ODEsystem](dsargs)
ode[:set](pars = Dict("S"=>0.0)) #initialize with a parameter (the initial value of the bifurcation parameter)
ode[:set](ics  = Dict("Gata3"=>0.001)) # initial condition: close to a steady state

# experiment 1

PC = ds[:ContClass](ode)
bif = bifurcation_curve(PC,
                        "EP-C",
                        ["S"], #S is the bifurcation parameter
                        max_num_points=3000,
                        max_stepsize=1e-3,
                        min_stepsize=1e-4,
                        stepsize=1e-3,
                        # loc_bif_points=[:LP],
                        # calc_stab=true,
                        save_eigen=true,
                        name="EQ1",
                        print_info=true)

display(plot(bif,(:S,:Gata3)))
display(plot!(xlims=(0,5),xticks=0:0.5:5))
plot!(ylims=(0,3.1),yticks=0:0.5:3)

# experiment 2

PC = ds[:ContClass](ode)
bif = bifurcation_curve(PC,
                        "EP-C",
                        ["S"], #S is the bifurcation parameter
                        max_num_points=4000,
                        max_stepsize=1e-3,
                        min_stepsize=1e-4,
                        stepsize=1e-3,
                        # loc_bif_points=[:LP],
                        # calc_stab=true,
                        save_eigen=true,
                        name="EQ1",
                        print_info=true)

display(plot(bif,(:S,:Gata3)))
display(plot!(xlims=(0,5),xticks=0:0.5:5))
plot!(ylims=(0,3.1),yticks=0:0.5:3)

# experiment 3

PC = ds[:ContClass](ode)
bif = bifurcation_curve(PC,
                        "EP-C",
                        ["S"], #S is the bifurcation parameter
                        max_num_points=4000,
                        max_stepsize=1e-2,
                        min_stepsize=1e-5,
                        stepsize=1e-2,
                        # loc_bif_points=[:LP],
                        # calc_stab=true,
                        save_eigen=true,
                        name="EQ1",
                        print_info=true)

display(plot(bif,(:S,:Gata3)))
display(plot!(xlims=(0,5),xticks=0:0.5:5))
plot!(ylims=(0,3.1),yticks=0:0.5:3)

我对同一系统有三种不同的行为:

Experiment 1

Experiment 2

Experiment 3

0 个答案:

没有答案