https://github.com/benmaier/couzinswarm

Simulating fish swarming behavior using the model by Iain Couzin et al.

https://github.com/benmaier/couzinswarm

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

collective-behavior fish-swarms swarms systems-biology
Last synced: 9 months ago · JSON representation

Repository

Simulating fish swarming behavior using the model by Iain Couzin et al.

Basic Info
  • Host: GitHub
  • Owner: benmaier
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 15.6 KB
Statistics
  • Stars: 7
  • Watchers: 1
  • Forks: 5
  • Open Issues: 0
  • Releases: 0
Topics
collective-behavior fish-swarms swarms systems-biology
Created about 7 years ago · Last pushed about 7 years ago
Metadata Files
Readme License

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

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

All Time
  • Total Commits: 6
  • Total Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 12 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 19.1%
Dependent repos count: 21.5%
Stargazers count: 21.6%
Average: 24.1%
Downloads: 47.9%
Maintainers (1)
Last synced: 10 months ago

Dependencies

setup.py pypi
  • numpy >=1.14
  • progressbar2 *