Message Boards Message Boards

[NB] Epidemic simulation with a polygon container

Posted 2 months ago
2286 Views
|
4 Replies
|
21 Total Likes
|

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


enter image description here

4 Replies

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]]];

Thanks for reporting it, I will fix it!

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]]];

enter image description here -- you have earned Featured Contributor Badge enter image description here

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!

Reply to this discussion