Simulate dynamics of the source and sink populations under Pulliam (1988)'s model
run_source_sink.Rd
Simulate dynamics of the source and sink populations under Pulliam (1988)'s model
Arguments
- endtime
a number to indicate at what timesetp to end the simulation
- init
a vector of initial population sizes of the source and sink population
- params
a vector of model parameters
See also
plot_source_sink()
for plotting the size of the source and sink
population over time
Examples
# in this example, source and sink population start at the same size,
# the sink population dies out, but is later replenished by immigration
# from the source patch once all source breeding sites are occupied
run_source_sink(endtime = 50, init = c(n0Source = 100, n0Sink = 100),
params = c(pa = 0.6, pj = 0.15, betaSource = 3, betaSink = 1, NSource = 300))
#> [[1]]
#> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#> [26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#>
#> [[2]]
#> [1] 100.0000 105.0000 110.2500 115.7625 121.5506 127.6282 134.0096 140.7100
#> [9] 147.7455 155.1328 162.8895 171.0339 179.5856 188.5649 197.9932 207.8928
#> [17] 218.2875 229.2018 240.6619 252.6950 265.3298 278.5963 292.5261 300.0000
#> [25] 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000
#> [33] 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000
#> [41] 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000 300.0000
#> [49] 300.0000 300.0000
#>
#> [[3]]
#> [1] 100.0000000 75.0000000 56.2500000 42.1875000 31.6406250 23.7304688
#> [7] 17.7978516 13.3483887 10.0112915 7.5084686 5.6313515 4.2235136
#> [13] 3.1676352 2.3757264 1.7817948 1.3363461 1.0022596 0.7516947
#> [19] 0.5637710 0.4228283 0.3171212 0.2378409 0.1783807 7.2861611
#> [25] 20.4646208 30.3484656 37.7613492 43.3210119 47.4907589 50.6180692
#> [31] 52.9635519 54.7226639 56.0419979 57.0314985 57.7736238 58.3302179
#> [37] 58.7476634 59.0607476 59.2955607 59.4716705 59.6037529 59.7028147
#> [43] 59.7771110 59.8328332 59.8746249 59.9059687 59.9294765 59.9471074
#> [49] 59.9603305 59.9702479
#>