{ "info": { "author": "Paulo Kuong", "author_email": "paulo.kuong@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4" ], "description": "|Build Status| |Coverage Status| binpacker ======\n\nGeneric Bin Packing Problem Solver.\n\n Given a set of items with weight information and capacity of a bin,\n Binpacker determines which items can fit in the bin with that\n capacity and continues to pack all items in new bins in a way that\n it will utilize the space of each bin. In the other word, Binpacker\n can be used to determine what is the minimum number of bins we can\n use to pack all items with different weights.\n\nRequirements\n------------\n\n- Python 3.4 (tested)\n\nGoal\n----\n\nThe ultimate goal of this library is to provide a generic interface for\nsolving the Bin Packing problem for variety of applications.\n\nCode sample\n-----------\n\nLets say, given the capacity (11) of a bin and a list of packages with\ndifferent weights, we would like to load and unload the packages in a\nway that it utilizes the space of each bin.\n\n.. code:: python\n\n import time\n from binpacker.binpacker import Binpacker\n from binpacker.binpacker import Item\n packer = Binpacker(11)\n packer.items = [\n Item('A',4), Item('B',1), Item('C',2),\n Item('D',6), Item('E',9), Item('F',3),\n Item('G',7), Item('H',2), Item('I',5)\n ]\n j=0\n while True:\n packer.pack_items()\n for i, x in enumerate(packer.bins):\n print('Bin ({}%) {}: {}'.format(x.utilization, i,[i.name for i in x.get_items()]))\n\n print('----------------------------------')\n packer._items.append(Item('Z{}'.format(i),2))\n j += 1\n time.sleep(3)\n\n output:\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (63.64%) 3: ['G']\n ----------------------------------\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (81.82%) 3: ['Z0', 'G']\n ----------------------------------\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (100.0%) 3: ['Z0', 'G', 'Z1']\n ----------------------------------\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (100.0%) 3: ['Z0', 'G', 'Z1']\n Bin (18.18%) 4: ['Z2']\n ----------------------------------\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (100.0%) 3: ['Z0', 'G', 'Z1']\n Bin (36.36%) 4: ['Z2', 'Z3']\n ----------------------------------\n Bin (100.0%) 0: ['H', 'C', 'F', 'A']\n Bin (100.0%) 1: ['I', 'D']\n Bin (90.91%) 2: ['B', 'E']\n Bin (100.0%) 3: ['Z0', 'G', 'Z1']\n Bin (54.55%) 4: ['Z2', 'Z3', 'Z4']\n\n- Note that (xxx%) is the percentage of fullness\n\nContributors\n------------\n\n.. |Build Status| image:: https://travis-ci.org/paulokuong/binpacker.svg?branch=master\n :target: https://travis-ci.org/paulokuong/binpacker\n.. |Coverage Status| image:: https://coveralls.io/repos/github/paulokuong/binpacker/badge.svg?branch=master\n :target: https://coveralls.io/github/paulokuong/binpacker?branch=master", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pkuong/binpacker", "keywords": "algorithm bin packing shipping inventory warehouse transportation distribution parallel", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "binpacker", "package_url": "https://pypi.org/project/binpacker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/binpacker/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/pkuong/binpacker" }, "release_url": "https://pypi.org/project/binpacker/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Distribute weighted tasks equally to workers by solving Bin Packing problem. This package provides an abstraction for user to extend", "version": "0.1.3" }, "last_serial": 2372129, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c8732cb864bf871fbe64728d17c03925", "sha256": "2d8d8e4abe0669c7cc026d99236deeb3926db9d8c33d18f99a0cda87adaa7076" }, "downloads": -1, "filename": "binpacker-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c8732cb864bf871fbe64728d17c03925", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5273, "upload_time": "2016-09-29T19:50:45", "url": "https://files.pythonhosted.org/packages/98/02/519105cfd402ba8317670238fadb7448fd125bc47bec4a7e4d0557dbc16f/binpacker-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4ce5cbb20da994a79cae049e8251e511", "sha256": "1f4d19307d2ee665149e7481b0f473ad6379470d2bb6a6ad7e8ca58af4db6d6f" }, "downloads": -1, "filename": "binpacker-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4ce5cbb20da994a79cae049e8251e511", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5337, "upload_time": "2016-09-29T22:50:45", "url": "https://files.pythonhosted.org/packages/27/e8/d8dc5e28856b37d1a455eef8f5bad6f13eefb1c9412292f9aeca2e223b44/binpacker-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b856bd16e14848587d4d879880a840dc", "sha256": "418042af75aa1bb62de8d7fc26e8bcc0aa377507c034ff3bd995fc958e4238db" }, "downloads": -1, "filename": "binpacker-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b856bd16e14848587d4d879880a840dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5492, "upload_time": "2016-09-29T23:17:23", "url": "https://files.pythonhosted.org/packages/45/4c/35e5d468dedaaf2fde5af9e0570aebbe44e0e478881a5d17e15cfa29e130/binpacker-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b8fb656f94e341fba7a1c585af85675b", "sha256": "512dc92c8a932b553f77d862af0eb59ba9d2d3a2d418aaafa560aee3a598a691" }, "downloads": -1, "filename": "binpacker-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b8fb656f94e341fba7a1c585af85675b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5569, "upload_time": "2016-09-29T23:36:30", "url": "https://files.pythonhosted.org/packages/14/97/feb03920f97ecc1a7e47349f7327eefed0b1227b673e7448daac2597e2bd/binpacker-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8fb656f94e341fba7a1c585af85675b", "sha256": "512dc92c8a932b553f77d862af0eb59ba9d2d3a2d418aaafa560aee3a598a691" }, "downloads": -1, "filename": "binpacker-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b8fb656f94e341fba7a1c585af85675b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5569, "upload_time": "2016-09-29T23:36:30", "url": "https://files.pythonhosted.org/packages/14/97/feb03920f97ecc1a7e47349f7327eefed0b1227b673e7448daac2597e2bd/binpacker-0.1.3.tar.gz" } ] }