Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions docs/src/libs/datadrivensparse/example_04.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,23 @@ using DataDrivenDiffEq
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
using OrdinaryDiffEq
using SciMLBase: NoSpecialize
using LinearAlgebra
using DataDrivenSparse
#md using Plots
#md gr()
using Test #src

@mtkmodel Autoregulation begin
@parameters begin
α = 1.0
β = 1.3
γ = 2.0
δ = 0.5
end
@variables begin
(x(t))[1:2] = [20.0; 12.0]
end
@equations begin
D(x[1]) ~ α / (1 + x[2]) - β * x[1]
D(x[2]) ~ γ / (1 + x[1]) - δ * x[2]
end
end

@mtkcompile sys = Autoregulation()
@parameters α = 1.0 β = 1.3 γ = 2.0 δ = 0.5
@variables (x(t))[1:2] = [20.0, 12.0]
eqs = [
D(x[1]) ~ α / (1 + x[2]) - β * x[1],
D(x[2]) ~ γ / (1 + x[1]) - δ * x[2],
]
@named autoregulation = System(eqs, t)
sys = mtkcompile(autoregulation)

tspan = (0.0, 5.0)
de_problem = ODEProblem{true, NoSpecialize}(sys, [], tspan)
de_problem = ODEProblem(sys, [], tspan)
de_solution = solve(de_problem, Tsit5(), saveat = 0.005);
#md plot(de_solution)

Expand Down
16 changes: 7 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@ const GROUP = get(ENV, "GROUP", "All")
include("./Core/commonsolve.jl")
end
end,
groups = Dict(
"QA" => (;
env = joinpath(@__DIR__, "qa"),
body = function ()
@safetestset "JET Static Analysis" begin
include("qa/jet_tests.jl")
end
end,
),
qa = (;
env = joinpath(@__DIR__, "qa"),
body = function ()
@safetestset "JET Static Analysis" begin
include("qa/jet_tests.jl")
end
end,
),
all = ["Core"],
)
Expand Down
Loading