# Modelling Population Migrationrestart;u := am + bm*m0*x(t) + cm*n0*y(t):
v := an + bn*m0*x(t) + cn*n0*y(t):
eq1 := diff(x(t),t) = 2*A*(sinh(u) - x(t)*cosh(u)):
eq2 := diff(y(t),t) = 2*A*(sinh(v) - y(t)*cosh(v)):
init := x(0) = X, y(0) = Y:
#sol := dsolve({eq1, eq2, init}, {x(t), y(t)});# Cyclic Migration without Regulationparam := A = 1/2, am = 0, bm = 1.2e-4, cm = 0.5e-3,
m0 = 10000, an = 0, bn = -1e-4, cn = 1.2e-3,
n0 = 1000:
save(u, v, param, `system.sav`);init := x(0) = 0, y(0) = 0.01:
eq1 := subs(param, eq1): eq2 := subs(param, eq2):
sol := dsolve({eq1, eq2, init}, {x(t), y(t)}, numeric):
with(plots):
odeplot(sol, [x(t), y(t)], 0..60, numpoints = 300,
view=[-1..1, -1..1]);
odeplot(sol, [t,x(t), y(t)], 0..60, numpoints = 300,
orientation = [70,55], colour = black, axes = normal);init := x(0) = -1, y(0) = 1:
sold := dsolve({eq1, eq2, init}, {x(t), y(t)},numeric):
odeplot(sold, [x(t), y(t)], 0..60, numpoints = 300,
view = [-1..1, -1..1], color = black);# Cyclic Migration with Regulationrestart;with(plots):
read(`system.sav`):
eq1r := diff(x(t), t) = 2*A*(sinh(u) - x(t)*cosh(u)) + r:
eq2s := diff(y(t), t) = 2*A*(sinh(v) - y(t)*cosh(v)) + s:
eq1r := subs(param, eq1r): eq2s := subs(param, eq2s):
initrs := x(0) = 0, y(0) = 0.01:
r := -0.2: s := 0.1:
solrs := dsolve({eq1r, eq2s, initrs}, {x(t), y(t)}, numeric):
odeplot(solrs, [x(t), y(t)], -30..50, numpoints = 200,
view = [-1..1, -1..1], color = black);r := -0.3: s := 0.3:
solrs := dsolve({eq1r, eq2s, initrs}, {x(t), y(t)}, numeric):
odeplot(solrs, [t, x(t), y(t)], 0..100, numpoints = 300,
orientation = [-50, 45], axes = normal, colour = black);# Modelling Strategic Investmentrestart:
eq1 := diff(x(t), t) = 2*A*(sinh(p(t) + q*x(t)) -
x(t)*cosh(p(t) + q*x(t))):
eq2 := diff(p(t),t) = -2*B*(p0*sinh(a*x(t)) +
p(t)*cosh(a*x(t))):
B := 0.8: A := 4*B: a := 4: p0 := 0.5: q := 1.6:
init := x(0) = 0.01, p(0) = 0:
sol := dsolve({eq1, eq2, init}, {x(t), p(t)}, numeric):
with(plots):
odeplot(sol, [x(t), p(t)], 0..10, numpoints = 200,
color = black);
odeplot(sol, [t, x(t), p(t)], 0..10, numpoints = 200,
orientation = [-100, 50], axes = normal, colour = black);