Epidemic simulation with a polygon container

MODERATOR NOTE: coronavirus resources & updates: https://wolfr.am/coronavirus


3687ezgif.com-optimize.gif

16 Likes

Very nice simulation, very interesting to play around with.

I think in your function createPosition one line should be changed to

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, n - Length[positions]], 
             memberq]]];

in stead of

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, 200 - Length[positions]], 
             memberq]]];
3 Likes

Very nice simulation, very interesting to play around with.

I think in your function createPosition one line should be changed to

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, n - Length[positions]], 
             memberq]]];

in stead of

DeleteDuplicates[
           Join[positions, 
            Select[Round@RandomPoint[region, 200 - Length[positions]], 
             memberq]]];
2 Likes

Thanks for reporting it, I will fix it!

2 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png

Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you, keep it coming, and consider contributing to the The Notebook Archive!

It is a very good resource. I applied this model to my country.