neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
고성능 ODE·DAE 솔버, 신경 ODE·과학 머신러닝 포함
High performance ordinary differential equation (ODE) and differential-algebraic equation (DAE) solvers, including neural ordinary differential equations (neural ODEs) and scientific machine learning
개발 도구Julia · PythonGitHub @SciML직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
High performance ordinary differential equation (ODE) and differential-algebraic equation (DAE) solvers, including neural ordinary differential equations (neural ODEs) and scientific machine learning (SciML)
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
OrdinaryDiffEq.jl is a component package in the DifferentialEquations ecosystem. It holds the
ordinary differential equation solvers and utilities. While completely independent
and usable on its own, users interested in using this
functionality should check out DifferentialEquations.jl.
Assuming that you already have Julia correctly installed, it suffices to import
OrdinaryDiffEq.jl in the standard way:
OrdinaryDiffEq v7 bumps to SciMLBase v3 and RecursiveArrayTools v4 with breaking changes across all sublibraries. See NEWS.md for the full migration guide.README 전문 보기 ↗OrdinaryDiffEq.jl is a component package in the DifferentialEquations ecosystem. It holds the ordinary differential equation solvers and utilities. While completely independent and usable on its own, users interested in using this functionality should check out DifferentialEquations.jl.
Assuming that you already have Julia correctly installed, it suffices to import OrdinaryDiffEq.jl in the standard way:
import Pkg;
Pkg.add("OrdinaryDiffEq");
OrdinaryDiffEq v7 bumps to SciMLBase v3 and RecursiveArrayTools v4 with breaking changes across all sublibraries. See NEWS.md for the full migration guide.
OrdinaryDiffEq.jl is part of the SciML common interface, but can be used independently of DifferentialEquations.jl. The only requirement is that the user passes an OrdinaryDiffEq.jl algorithm to solve. For example, we can solve the ODE tutorial from the docs using the Tsit5() algorithm:
using OrdinaryDiffEq
f(u, p, t) = 1.01 * u
u0 = 1 / 2
tspan = (0.0, 1.0)
prob = ODEProblem(f, u0, tspan)
sol = solve(prob, Tsit5(), reltol = 1.0e-8, abstol = 1.0e-8)
using Plots
plot(
sol, linewidth = 5, title = "Solution to the linear ODE with a thick line",
xaxis = "Time (t)", yaxis = "u(t) (in μm)", label = "My Thick Line!", # legend = false
)
plot!(sol.t, t -> 0.5 * exp(1.01 * t), lw = 3, ls = :dash, label = "True Solution!")
That example uses the out-of-place syntax f(u,p,t), while the in-place syntax (more efficient for systems of equations) is shown in the Lorenz example:
using OrdinaryDiffEq
function lorenz!(du, u, p, t)
du[1] = 10.0 * (u[2] - u[1])
du[2] = u[1] * (28.0 - u[3]) - u[2]
du[3] = u[1] * u[2] - (8 / 3) * u[3]
return
end
u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz!, u0, tspan)
sol = solve(prob, Tsit5())
using Plots;
plot(sol, idxs = (1, 2, 3))
Very fast static array versions can be specifically compiled to the size of your model. For example:
using OrdinaryDiffEq
using StaticArrays: SA
function lorenz(u, p, t)
return SA[10.0 * (u[2] - u[1]), u[1] * (28.0 - u[3]) - u[2], u[1] * u[2] - (8 / 3) * u[3]]
end
u0 = SA[1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz, u0, tspan)
sol = solve(prob, Tsit5())
For "refined ODEs", like dynamical equations and SecondOrderODEProblems, refer to the DiffEqDocs. For example, the harmonic oscillator equations can be solved using symplectic methods. The harmonic oscillator is described by:
$$\ddot{x} + \omega^2 x = 0$$
which is equivalent to the first-order system:
$$\dot{x} = v$$ $$\dot{v} = -\omega^2 x$$
using OrdinaryDiffEq
function harmonic_oscillator!(dv, v, u, p, t)
ω = p[1]
dv[1] = -ω^2 * u[1]
return
end
ω = 2.0 # angular frequency
initial_position = [1.0]
initial_velocity = [0.0]
tspan = (0.0, 10.0)
prob = SecondOrderODEProblem(harmonic_oscillator!, initial_velocity, initial_position, tspan, [ω])
sol = solve(prob, VelocityVerlet(), dt = 1 / 100)
using Plots
plot(sol, idxs = (1, 2), label = "Phase space", xaxis = "Position", yaxis = "Velocity")
For more complex dynamical systems, such as the Hénon-Heiles potential, symplectic integrators preserve the structure of Hamiltonian dynamics. In DiffEqTutorials.jl we show how to solve these equations of motion:
function HH_acceleration!(dv, v, u, p, t)
x, y = u
dv[1] = dx = -x - 2 * x * y
dv[2] = dy = y^2 - y - x^2
return
end
initial_positions = [0.0, 0.1]
initial_velocities = [0.5, 0.0]
prob = SecondOrderODEProblem(HH_acceleration!, initial_velocities, initial_positions, tspan)
sol2 = solve(prob, KahanLi8(), dt = 1 / 10);
Other refined forms are IMEX and semi-linear ODEs (for exponential integrators).
For the list of available solvers, please refer to the DifferentialEquations.jl ODE Solvers, Dynamical ODE Solvers, and the Split ODE Solvers pages.