Scientific Programming
153 subscribers
158 photos
30 videos
138 files
442 links
Tutorials and applications from scientific programming

https://github.com/Ziaeemehr
Download Telegram
استفاده از پکیج DifferentialEquations.jl در پایتون
#diffeqpy
Solving differential equations in Python using DifferentialEquations.jl

- Discrete equations (function maps, discrete stochastic (Gillespie/Markov) simulations)
- Ordinary differential equations (ODEs)
- Split and Partitioned ODEs (Symplectic integrators, IMEX Methods)
- Stochastic ordinary differential equations (SODEs or SDEs)
- Random differential equations (RODEs or RDEs)
- Differential algebraic equations (DAEs)
- Delay differential equations (DDEs)
- Mixed discrete and continuous equations (Hybrid Equations, Jump Diffusions)

برای نصب از دستور

pip3 install diffeqpy
استفاده کنید. برای استفاده از پکیج لازم هست که Julia بر روی سیستم نصب شده و در مسیرهای سیستم قرار داده شده باشد. (در انتها بیشتر توضیح دادم)
در محیط پایتون این دستور رو وارد کنید:
import diffeqpy
diffeqpy.install()
سپس :
from diffeqpy import de
اگر خطایی دیدید همانطور که خطا راهنمایی می کنه از این دستورات در محیط interactive پایتون استفاده کنید:

from julia.api import Julia
jl = Julia(compiled_modules=False)

چون من از قبل Julia رو نصب کرده بودم شاید یک سری خطاها برای من نشان داده نشد.
برای نصب Julia فایل باینتری رو دانلود و extract کردم. در یک مسیر دلخواه قرار دادم و مسیر را داخل bashrc قرار دادم.
این ویديو شاید کمک کنه برای نصب جولیا.
در کل فرآیند نصب خیلی دردناک نبود و حدود ۵ دقیقه طول کشید.

@Scientific_programming
☘️ I have added many examples, mostly about "Kuramoto model" (ODE, SDE) to the workshop Julia repository.
But the examples can be easily transformed to any arbitrary set of differential equations.
🌱 Feel free to look.
The speed up is usually one order of magnitude faster that scipy.odeint, numba and much faster that pure python equivalent.
#julia
#python
#diffeqpy
@scientific_programming