Highs with python-mip is slow
- Dominant language
- Linear Programming
- Stars
- 600
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Hello, everyone
Firstly, thanks for the great package and also for adding support for Highs.
However, it seems that creating a optimization model with Highs is rather slow.
**Describe the bug**
Adding variables to a Highs optimization model is slow.
**To Reproduce**
```
import sys
import mip as pm
from timeit import default_timer as dt
def main(solver):
m = pm.Model(solver_name=solver)
ini = dt()
x = {i: m.add_var() for i in range(10000)}
print(f"{dt() - ini} seconds to add vars", flush=True)
if __name__ == '__main__':
main(sys.argv[1])
```
**Expected behavior**
GRB: 0.021987227955833077 seconds to add vars
CBC: 0.026054809102788568 seconds to add vars
Highs: 6.408406416885555 seconds to add vars
**Desktop (please complete the following information):**
- Operating System, version: Ubuntu 23.10
- Python version: 3.11.6
- Python-MIP version (we recommend you to test with the latest version): 1.16tc0
Thanks again!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.