{"id":37072678,"url":"https://github.com/hackathonners/vania","last_synced_at":"2026-01-14T08:32:10.448Z","repository":{"id":88160665,"uuid":"86072920","full_name":"Hackathonners/vania","owner":"Hackathonners","description":"A module which fairly distributes a list of arbitrary objects among a set of targets, considering weights.","archived":false,"fork":false,"pushed_at":"2017-06-20T08:43:24.000Z","size":54,"stargazers_count":77,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-07T20:32:59.373Z","etag":null,"topics":["distribution","fairness","linear","model","module","programming","task"],"latest_commit_sha":null,"homepage":"https://blog.hackathonners.org/our-new-baby-fair-distributor-b31bf66c05d1","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hackathonners.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-24T13:47:21.000Z","updated_at":"2025-04-06T15:10:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"e752a3fb-db87-430a-b0f2-aa03458cc82a","html_url":"https://github.com/Hackathonners/vania","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Hackathonners/vania","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackathonners%2Fvania","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackathonners%2Fvania/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackathonners%2Fvania/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackathonners%2Fvania/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hackathonners","download_url":"https://codeload.github.com/Hackathonners/vania/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hackathonners%2Fvania/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:31:27.429Z","status":"ssl_error","status_checked_at":"2026-01-14T08:31:19.098Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distribution","fairness","linear","model","module","programming","task"],"created_at":"2026-01-14T08:32:09.653Z","updated_at":"2026-01-14T08:32:10.434Z","avatar_url":"https://github.com/Hackathonners.png","language":"Python","readme":"# Project Vania - A Fair Distributor\n**Fair Distributor** is a module which [fairly](#our-meaning-of-fairness) distributes a list of arbitrary **objects** through a set of **targets**.\n\nTo be more explicit, this module considers 3 key components:\n* **object**: some kind of entity that can be assigned to something.\n* **target**: the entity that will have one (or more) **objects** assigned to it.\n* **weight**: represents the cost of assigning a given **object** to a **target**.\n\nA collection of each of these components is given as input to the module.\nUsing linear programming, the **weights** of the **targets** relative to the **objects** are taken into consideration and used to build the constraints of an Integer Linear Programming (ILP) model. An ILP solver is then used, in order to distribute the **objects** through the **targets**, in the *fairest way possible*.\n\nFor instance, this module can be used to fairly distribute:\n* A set of tasks (objects) among a group of people (targets) according to their preferences to do each task (weights).\n* A set of projects (objects) among development teams (targets) according to their skill-level (weights) on the required skills for each project.\n\n\n## Our Meaning of Fairness\n\nWe define **Fairness** as:\n * The total **weight** of distributing all **objects** through the **targets** should be minimal.\nThis enforces that the least amount of shared effort is made.\n\n_Optionally_, the following rule can be applied (enabled by default):\n * The difference between the individual **weight** of each **target** is minimal.\nThis enforces the least amount of individual effort.\n\n## Documentation\n\nYou can find all the documentation in the following link:\nhttps://hackathonners.github.io/vania\n\n## Download and Install\n\nInstall the latest stable version of this module:\n\n    $ pip install vania\n\nTo work with the source code, clone this repository:\n\n    $ git clone git://github.com/hackathonners/vania.git\n\n## Usage\nTo start using the **Fair Distributor**, you need first to import it, by doing this:\n```python\nfrom vania.fair_distributor import FairDistributor\n```\nNow, just feed it with your problem variables, and ask for the solution.\nTo better explain how you can do it, lets consider a specific example.\n\nSuppose that you are managing a project, which contains **4** tasks: _Front-end Development_, _Back-end Development_, _Testing_, and _Documentation_.\nThere is a need to assign these **4** tasks through a set of **3** teams: _A_, _B_ and _C_.\nYou have the expected number of hours each team needs to finish each task:\n\n|        |*Front-end Development*|*Back-end Development*|*Testing*|*Documentation*| \n|--------|-----------------------|----------------------|---------|---------------|\n|_Team A_|          1h           |          2h          |    3h   |       2h      |\n|_Team B_|          3h           |          1h          |    4h   |       2h      |\n|_Team C_|          3h           |          4h          |    1h   |       1h      |\n\nHere, we consider tasks as **objects**, teams as **targets** and the hours expressed in each cell are the **weights**.\n\nIt is necessary to create a data structure for each component. **Objects** and **targets** are lists, while **weights** is a collection, which contains for each target the cost of assigning every object to it, and is represented as a matrix.\nThe structures for this example would be as follow:\n\n```python\ntargets = ['Team A', 'Team B', 'Team C']\nobjects = ['Front-end Development', 'Back-end Development', 'Testing', 'Documentation']\nweights = [\n    [1, 2, 3, 2],\t\t# hours for Team A to complete each task\n    [3, 1, 4, 2],\t\t# hours for Team B to complete each task\n    [3, 4, 1, 1]\t\t# hours for Team C to complete each task\n]\n```\n\nNow, just feed the **Fair Distributor** with all the components, and ask for the solution:\n```python\ndistributor = FairDistributor(targets, objects, weights)\nprint(distributor.distribute())\n```\n\nAnd here is the solution!\n```python\n# Output\n{\n    'Team A': ['Front-end Development'],        # Team A does the Front-end Development\n    'Team B': ['Back-end Development'],         # Team B does the Back-end Development\n    'Team C': ['Testing', 'Documentation']      # Team C does the Testing and Documentation\n}\n```\n\nHere is the final code of this example:\n```python\nfrom vania.fair_distributor import FairDistributor\n\ntargets = ['Team A', 'Team B', 'Team C']\nobjects = ['Front-end Development', 'Back-end Development', 'Testing', 'Documentation']\nweights = [\n    [1, 2, 3, 2],\t\t# hours for Team A to complete each task\n    [3, 1, 4, 2],\t\t# hours for Team B to complete each task\n    [3, 4, 1, 1]\t\t# hours for Team C to complete each task\n]\n\ndistributor = FairDistributor(targets, objects, weights)\nprint(distributor.distribute())\n```\n\n## Contributions and Bugs\n\nFound a bug and wish to report it? You can do so here: https://github.com/Hackathonners/vania/issues.\nIf you'd rather contribute to this project with the bugfix, awesome! Simply Fork the project on Github and make a Pull Request.\n\nPlease tell us if you are unfamiliar with Git or Github and we'll definitely help you make your contribution.\n\n## Authors\n\nHackathonners is **_a group of people who build things_**.\n\nYou can check us out at http://hackathonners.org.\n\n## License\n\nThe Fair Distributor is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\nCopyright (C) 2017 Hackathonners\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackathonners%2Fvania","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackathonners%2Fvania","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackathonners%2Fvania/lists"}