eefpy -- efficient envy-free practical solver in Python
This is a Python envelope for the C++ library eef-practical-solver-code, by Andrzej Kaczmarczyk. The C++ code accompanies the paper "High-Multiplicity Fair Allocation Made More Practical", by Robert Bredereck, Aleksander Figiel (the main code contributor), Andrzej Kaczmarczyk, Dušan Knop and Rolf Niedermeier, which was presented at AAMAS 2021. The code is protected by GNU GPL v3.0.
The solver, given a collection of indivisible resources, agents and the agents' valuations of resources, finds an allocation meeting some configurable fairness and efficiency properties, or declares that such an allocation meeting the desired desiderata does not exist.
For a description of the supported fairness and efficiency concepts, techniques used by this solver, and the results obtained, see the above-mentioned paper.
Prerequisites
-
eefpydepends oncppyy, which requires C++ GNU. Therefore, it currently works on Linux and does not work on Windows. -
eefpyuses the CPLEX solver by IBM. To get a free academic license, follow this guide: create an IBM id with your university-based email, login, and then click on "Data Science" at the left menu bar. Then, follow the installation guide -- install on Linux.
Installation (pip)
- Run:
pip install eefpy - Navigate to the
solver_cppfolder:cd solver_cpp - Edit the file eefpy/solver_cpp/Makefile: update the
CPLEX_DIRvariable to match the folder in which you installed CPLEX. - Save the Makefile and run:
make eef.so
Installation from source
-
Clone the repository:
git clone https://github.com/ariel-research/eefpy cd eefpy -
Create a Python virtual environment and activate it:
virtualenv venv source venv/bin/activate -
Edit the file eefpy/solver_cpp/Makefile: update the
CPLEX_DIRvariable to match the folder in which you installed CPLEX. -
Install requirements:
pip install -r requirements.txt -
Build and install eefpy from source
pip install -e . -
Edit the file eefpy/solver_cpp/Makefile: update the
CPLEX_DIRvariable to match the folder in which you installed CPLEX. -
Save the Makefile and run:
make eef.so
Usage examples
Run the file examples/lib_examples.py.
Verification
To verify the results, make the solver in the eefpy/solver_cpp/ folder, then run:
eefpy/solver_cpp/main
Copy and paste the text from the files examples/paper_example and examples/example2.
Metadata
Release files for eefpy 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eefpy-0.1.5.tar.gz | 75.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eefpy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 153.9 kB
Release files / eefpy-0.1.5.tar.gz
| Download URL | eefpy-0.1.5.tar.gz |
|---|---|
| Size | 75.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8559776d966e6dbc5b1f59800030a7aea2a61fb455d721a4caf0de4ff4aa6b2f
|
|
BLAKE2b-256 checksum How to use checksums |
2f136688a4a21b420e9282595b0ad20edfeb2757fa1440052cdbbf27edd69797
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.10
|
Release files / eefpy-0.1.5-py3-none-any.whl
| Download URL | eefpy-0.1.5-py3-none-any.whl |
|---|---|
| Size | 78.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
252f6a9cf2e719c08b4345d758cdc14428094b83562cce9af6fc19d440b9d757
|
|
BLAKE2b-256 checksum How to use checksums |
0614818601dfb85c3e061df10440d3c7a69b72a5be68b89b2dac76ca2c3c0b3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.10
|