Created
April 23, 2020 13:48
-
-
Save khannay/3be17638be78d91bef1c119b31d0bc29 to your computer and use it in GitHub Desktop.
LotkaVolterra Layer Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DifferentialEquations, Flux, Optim, DiffEqFlux, Plots | |
u0 = [1.0,1.0] | |
tstart=0.0 | |
tend=10.0 | |
sampling=0.1 | |
model_params= [1.5,1.0,3.0,1.0] | |
function model(du,u,p,t) | |
x, y = u | |
α, β, δ, γ = p | |
du[1] = dx = α*x - β*x*y | |
du[2] = dy = -δ*y + γ*x*y | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment