mmrbipy: A solver for the min-max regret binary integer programming problem (MMR-BIP)
Project description
mmrbipy: A solver for the min-max regret binary integer programming problem (MMR-BIP)
Installation
In a virtual environment with Python 3.6+, mmrbipy can be installed via
pip install mmrbipy
Using mmrbipy
With a compatible instance file, solve the MMR-BIP from a Python script:
from mmrbipy import Model
# build a model from instance file
mod = Model(problem='kp', filename='../instance/KP/1-70-01-45-20')
# solve by iDS algorithm with best-scenario constraints
mod.solve(algorithm='ids-b', timelimit=100)
# print results
print("objective value: {}".format(mod.objval))
print("time to best: {:.2f}".format(mod.ttb))
# write the results to file
mod.write("result.txt")
Note: Benchmark instances for
- min-max regret knapsack problem
- min-max regret multidimensional knapsack problem
- min-max regret set covering problem
- min-max regret generalized assignment problem
are available in the instance
directory on the project's homepage. For easy access to the example files, we recommend cloning the repository.
Algorithm
To solve the MMR-BIP, mmrbipy provides four algorithms:
- fixed scenario algorithm (fix);
- branch-and-cut algorithm (bc);
- dual substitution algorithm (ds);
- iterated dual substitution algorithm with best-scenario constraints (ids-b);
- iterated dual substitution algorithm with Hamming-distance constraints (ids-h).
Note: The implement are based on gurobypy.
Additional information
For more information about the algorithms used in the solver, see Wu et al. (2022).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mmrbipy-0.1.1.tar.gz
(6.2 kB
view hashes)