{ "info": { "author": "Benjamin F. Maier", "author_email": "bfmaier@physik.hu-berlin.de", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "couzinswarm\n===========\n\nSimulate fish swarming behavior with the model by `Iain Couzin et\nal. `__\nUse with caution as I can't seem to replicate some behavior (e.g. the\ntorus swarming).\n\nExample\n-------\n\n.. code:: python\n\n from couzinswarm import Swarm\n\n swarm = Swarm()\n r, v = swarm.simulate(1000)\n\nInstall\n-------\n\n.. code:: bash\n\n pip install couzinswarm\n\nElaborate example\n-----------------\n\n.. code:: python\n\n import numpy as np\n import matplotlib.pyplot as pl\n from mpl_toolkits.mplot3d import Axes3D\n from couzinswarm import Swarm\n\n # note: the dimension of space is measure in fish length,\n # such that r = 1 means a length of one fish\n\n swarm = Swarm(\n number_of_fish=20,\n repulsion_radius=1,\n orientation_width=10,\n attraction_width=10,\n # this angle is given in radians\n # up to np.pi (not 360 degrees as in\n # the paper)\n angle_of_perception=np.pi,\n # radians per unit of time\n turning_rate=0.1,\n # fish lengths per unit of time\n speed=0.1,\n # in units of fish length\n noise_sigma=0.1,\n dt=0.1,\n # geometry of box\n box_lengths=[100,100,100],\n # boundary conditions\n reflect_at_boundary = [True, True, True],\n verbose=False,\n )\n\n\n\n fig = pl.figure()\n ax = fig.add_subplot(111, projection='3d')\n\n N_t = 1000\n\n t = np.arange(N_t+1)\n\n # Note that r.shape = v.shape = ( N_fish, N_t+1, 3 )\n positions, directions = swarm.simulate(N_t)\n r, v = positions, directions\n\n for i in range(swarm.number_of_fish):\n ax.plot(r[i,:,0], r[i,:,1], r[i,:,2])\n\n pl.show()", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/benmaier/couzinswarm", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "couzinswarm", "package_url": "https://pypi.org/project/couzinswarm/", "platform": "", "project_url": "https://pypi.org/project/couzinswarm/", "project_urls": { "Homepage": "https://www.github.com/benmaier/couzinswarm" }, "release_url": "https://pypi.org/project/couzinswarm/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "Simulating fish swarming behavior with the model by Iain Couzin et al.", "version": "0.0.3" }, "last_serial": 4940752, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "426724e3536152a12571a21f35d4c886", "sha256": "94eee9783e941a9cd4a09d0e9a2306b7b2977ee44b053c7a70d1353d1265c635" }, "downloads": -1, "filename": "couzinswarm-0.0.1.tar.gz", "has_sig": false, "md5_digest": "426724e3536152a12571a21f35d4c886", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3902, "upload_time": "2019-03-14T13:05:41", "url": "https://files.pythonhosted.org/packages/19/69/c52fac03bc44e7c4904cb3c95057b01d605f1b2e0113c2b5e075c64cd4fa/couzinswarm-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9bcd3711fd70b24f9ceb5f7961f0f7e7", "sha256": "6f360d7f495b97ddc34747288320d0d0bd7df18f252389c3fd6f003f9f7238aa" }, "downloads": -1, "filename": "couzinswarm-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9bcd3711fd70b24f9ceb5f7961f0f7e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6489, "upload_time": "2019-03-14T15:32:01", "url": "https://files.pythonhosted.org/packages/3c/a9/de40eb9ae8be05829a68e9120ebdb5880d3f0e6e1dec8b92cfcbad4fde25/couzinswarm-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "60dce4b71ca65d96a0f5f955fe8400a1", "sha256": "5cece5ae743b88b5bf6d9bee379f7551d9bb50a93c449924a1ccd8ad46075d91" }, "downloads": -1, "filename": "couzinswarm-0.0.3.tar.gz", "has_sig": false, "md5_digest": "60dce4b71ca65d96a0f5f955fe8400a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7190, "upload_time": "2019-03-14T17:10:35", "url": "https://files.pythonhosted.org/packages/02/17/1f25d9cb02465d9edada195aa17bb6f85cea1d2917ff1c64a56566aa9374/couzinswarm-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "60dce4b71ca65d96a0f5f955fe8400a1", "sha256": "5cece5ae743b88b5bf6d9bee379f7551d9bb50a93c449924a1ccd8ad46075d91" }, "downloads": -1, "filename": "couzinswarm-0.0.3.tar.gz", "has_sig": false, "md5_digest": "60dce4b71ca65d96a0f5f955fe8400a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7190, "upload_time": "2019-03-14T17:10:35", "url": "https://files.pythonhosted.org/packages/02/17/1f25d9cb02465d9edada195aa17bb6f85cea1d2917ff1c64a56566aa9374/couzinswarm-0.0.3.tar.gz" } ] }