cesaraustralia / Dispersal.jl

Tools for simulating organism dispersal
Other
21 stars 3 forks source link

added tests for human, inwards, outwards, allee modules #4

Closed jamesmaino closed 5 years ago

rafaqz commented 5 years ago

That's awesome. Just failing in human dispersal: https://travis-ci.org/rafaqz/Dispersal.jl/jobs/467941982#L843

One thing we should do is make all the testset titles a little more descriptive of what we are testing. But it's no biggie.

We should probably do a few more integration tests as well, at least testing that chaining submodels together works as expected.

rafaqz commented 5 years ago

Oh right that 6 is in the standard equation. A well named utility function is the way to do that

On Mon, 17 Dec. 2018, 11:21 am jamesmaino <notifications@github.com wrote:

@jamesmaino commented on this pull request.

In src/human.jl https://github.com/rafaqz/Dispersal.jl/pull/4#discussion_r242003914:

@@ -43,6 +43,7 @@ precalc_human_dispersal(human::A, cellsize, take, human_exponent, dist_exponent) h, w = size(human) indices = broadcastable_indices(Int32, human) dist = (distances(human) .* cellsize) .^ dist_exponent

  • dist[1] = cellsize/6 * (sqrt(2) + log(1 + sqrt(2))) # mean distance from cell centre

I had to look up what magic numbers were. oh right. maybe a function would be better? The equation finds the mean distance from the centre of a square to any surrounding point within the square.

https://math.stackexchange.com/questions/15580/what-is-average-distance-from-center-of-square-to-some-point

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rafaqz/Dispersal.jl/pull/4#discussion_r242003914, or mute the thread https://github.com/notifications/unsubscribe-auth/ACaqeb1Ts10a7E19jTxdpJzNHvvKBu6kks5u5uN5gaJpZM4ZTTs7 .