-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored so that classdesc and graphcode are not pushed into ecolab…
… source heirarchy. Random number generator API refactored. Spatial Ecolab model migration operator added
- Loading branch information
1 parent
bf96739
commit bc3a653
Showing
15 changed files
with
125 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule classdesc
updated
9 files
+1 −1 | Makefile | |
+3 −0 | RESTProcess-allCDs.h | |
+3 −0 | dump-allCDs.h | |
+3 −0 | json_pack-allCDs.h | |
+3 −0 | pack-allCDs.h | |
+6 −7 | poly.h | |
+3 −0 | random_init-allCDs.h | |
+3 −0 | typeName-allCDs.h | |
+3 −0 | xml_pack-allCDs.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from ecolab_model import spatial_ecolab as ecolab | ||
from random import random | ||
|
||
from ecolab import array_urand | ||
array_urand.seed(10) | ||
|
||
# initial number of species | ||
nsp=100 | ||
|
||
ecolab.species(range(nsp)) | ||
|
||
numX=10 | ||
numY=10 | ||
ecolab.setGrid(numX,numY) | ||
ecolab.partitionObjects() | ||
ecolab.cell(4,4).density(nsp*[100]) | ||
|
||
ecolab.migration(nsp*[1e-5]) | ||
|
||
from plot import plot | ||
from GUI import gui, statusBar, windows | ||
|
||
def step(): | ||
ecolab.migrate() | ||
ecolab.tstep(ecolab.tstep()+1) | ||
plot('No. species by cell',ecolab.tstep(),ecolab.nsp()()) | ||
plot(f'Density(4,4)',ecolab.tstep(),ecolab.cell(4,4).density(), pens=ecolab.species()) | ||
plot(f'Density(2,2)',ecolab.tstep(),ecolab.cell(2,2).density(), pens=ecolab.species()) | ||
|
||
gui(step) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters