https://github.com/benmaier/couzinswarm
Simulating fish swarming behavior using the model by Iain Couzin et al.
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: sciencedirect.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (4.9%) to scientific vocabulary
Keywords
Repository
Simulating fish swarming behavior using the model by Iain Couzin et al.
Basic Info
Statistics
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
couzinswarm
Simulate fish swarming behavior with the model by Iain Couzin et al. Use with caution as I can't seem to replicate some behavior (e.g. the torus swarming).
Example
```python from couzinswarm import Swarm
swarm = Swarm() r, v = swarm.simulate(1000) ```
Install
pip install couzinswarm
Elaborate example
```python import numpy as np import matplotlib.pyplot as pl from mpl_toolkits.mplot3d import Axes3D from couzinswarm import Swarm
note: the dimension of space is measure in fish length,
such that r = 1 means a length of one fish
swarm = Swarm( numberoffish=20, repulsionradius=1, orientationwidth=10, attractionwidth=10, # this angle is given in radians # up to np.pi (not 360 degrees as in # the paper) angleofperception=np.pi, # radians per unit of time turningrate=0.1, # fish lengths per unit of time speed=0.1, # in units of fish length noisesigma=0.1, dt=0.1, # geometry of box boxlengths=[100,100,100], # boundary conditions reflectatboundary = [True, True, True], verbose=False, )
fig = pl.figure() ax = fig.add_subplot(111, projection='3d')
N_t = 1000
t = np.arange(N_t+1)
Note that r.shape = v.shape = ( Nfish, Nt+1, 3 )
positions, directions = swarm.simulate(N_t) r, v = positions, directions
for i in range(swarm.numberoffish): ax.plot(r[i,:,0], r[i,:,1], r[i,:,2])
pl.show() ```
Owner
- Name: Benjamin F. Maier
- Login: benmaier
- Kind: user
- Location: Copenhagen
- Company: Technical University of Denmark
- Website: benmaier.org
- Twitter: benfmaier
- Repositories: 101
- Profile: https://github.com/benmaier
Postdoc @suneman 's, generative art, electronic music. DTU Compute & SODAS.
GitHub Events
Total
- Watch event: 1
- Fork event: 1
Last Year
- Watch event: 1
- Fork event: 1
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Benjamin Maier | b****r@g****m | 6 |
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 12 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 3
- Total maintainers: 1
pypi.org: couzinswarm
Simulating fish swarming behavior with the model by Iain Couzin et al.
- Homepage: https://www.github.com/benmaier/couzinswarm
- Documentation: https://couzinswarm.readthedocs.io/
- License: MIT
-
Latest release: 0.0.3
published about 7 years ago
Rankings
Maintainers (1)
Dependencies
- numpy >=1.14
- progressbar2 *