{ "info": { "author": "Chun Nien", "author_email": "contact@chunnien.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# qpso\nA Python implementation of quantum particle swarm optimization (QPSO).\n\n pip install qpso\n\nThis is a black-box optimization package built upon the quantum paricle swarm\noptimization [1].\n\n## Quickstart\nThe usage of this package is very simple.\nFor example, the following code shows how to solve a 10-dimensional opmitzation\nproblem by using QPSO with Delta potential well (QDPSO) proposed in [1].\n\n```python\nimport numpy as np\nfrom qpso import QDPSO\n\n\ndef sphere(args):\n f = sum([np.power(x, 2.) for x in args])\n return f\n\n\ndef log(s):\n best_value = [p.best_value for p in s.particles()]\n best_value_avg = np.mean(best_value)\n best_value_std = np.std(best_value)\n print(\"{0: >5} {1: >9} {2: >9} {3: >9}\".format(\"Iters.\", \"Best\", \"Best(Mean)\", \"Best(STD)\"))\n print(\"{0: >5} {1: >9.3E} {2: >9.3E} {3: >9.3E}\".format(s.iters, s.gbest_value, best_value_avg, best_value_std))\n\n\nNParticle = 40\nMaxIters = 1000\nNDim = 10\nbounds = [(-2.56, 5.12) for i in range(0, NDim)]\ng = 0.96\ns = QDPSO(sphere, NParticle, NDim, bounds, MaxIters, g)\ns.update(callback=log, interval=100)\nprint(\"Found best position: {0}\".format(s.gbest))\n```\n\n## Bibliography \n\n[1] Jun Sun, Bin Feng and Wenbo Xu, \"Particle swarm optimization with particles having quantum behavior,\" Proceedings of the 2004 Congress on Evolutionary Computation (IEEE Cat. No.04TH8753), Portland, OR, USA, 2004, pp. 325-331 Vol.1.\ndoi: 10.1109/CEC.2004.1330875\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ngroup/qpso", "keywords": "optimization qpso swarm", "license": "", "maintainer": "", "maintainer_email": "", "name": "qpso", "package_url": "https://pypi.org/project/qpso/", "platform": "", "project_url": "https://pypi.org/project/qpso/", "project_urls": { "Homepage": "https://github.com/ngroup/qpso" }, "release_url": "https://pypi.org/project/qpso/0.0.1/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "A Python implementation of quantum particle swarm optimization (QPSO).", "version": "0.0.1" }, "last_serial": 4648298, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "91f38864957db6703e5acffb006d8866", "sha256": "4c9cd1162335d1fedcfec8132c2813c88c81f8d4507128a25d1f4cb31f76dab3" }, "downloads": -1, "filename": "qpso-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "91f38864957db6703e5acffb006d8866", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4056, "upload_time": "2018-12-31T15:20:36", "url": "https://files.pythonhosted.org/packages/c7/9f/b3f491c02b35d6109c623363c397c689702c7b3678044c122b7ef5db620d/qpso-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00ad57a1a18c9d1a83fa20e9cb93eb28", "sha256": "ec94246bfce5c1d7679ddd1b28c5170a8fb5d0b630605683e571cbcf0e2c88c5" }, "downloads": -1, "filename": "qpso-0.0.1.tar.gz", "has_sig": false, "md5_digest": "00ad57a1a18c9d1a83fa20e9cb93eb28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3249, "upload_time": "2018-12-31T15:20:41", "url": "https://files.pythonhosted.org/packages/2e/0d/bb91d3d5b142873f011bbb9afff1683a0ea83ecb3f7e080d680003e28f50/qpso-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91f38864957db6703e5acffb006d8866", "sha256": "4c9cd1162335d1fedcfec8132c2813c88c81f8d4507128a25d1f4cb31f76dab3" }, "downloads": -1, "filename": "qpso-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "91f38864957db6703e5acffb006d8866", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4056, "upload_time": "2018-12-31T15:20:36", "url": "https://files.pythonhosted.org/packages/c7/9f/b3f491c02b35d6109c623363c397c689702c7b3678044c122b7ef5db620d/qpso-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00ad57a1a18c9d1a83fa20e9cb93eb28", "sha256": "ec94246bfce5c1d7679ddd1b28c5170a8fb5d0b630605683e571cbcf0e2c88c5" }, "downloads": -1, "filename": "qpso-0.0.1.tar.gz", "has_sig": false, "md5_digest": "00ad57a1a18c9d1a83fa20e9cb93eb28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3249, "upload_time": "2018-12-31T15:20:41", "url": "https://files.pythonhosted.org/packages/2e/0d/bb91d3d5b142873f011bbb9afff1683a0ea83ecb3f7e080d680003e28f50/qpso-0.0.1.tar.gz" } ] }