pulp
pulp copied to clipboard
`timeLimit` arg not available in MOSEK api
Details for the issue
What did you do?
Use MOSEK api and impose timeLimit
solver = pulp.getSolver('MOSEK', timeLimit=300)
or
solver = pulp.apis.MOSEK( timeLimit=300)
Check the code in the repo https://github.com/coin-or/pulp/blob/master/pulp/apis/mosek_api.py and check the variable is not set.
Instead, to make it work I used:
import mosek
solver = pulp.apis.MOSEK(options = {mosek.dparam.mio_max_time:60} )
What did you expect to see?
To correctly impose the time limit using timeLimit argument.
What did you see instead?
Error
Useful extra information
Reference of the use of the API: https://coin-or.github.io/pulp/technical/solvers.html#pulp.apis.MOSEK
The info below often helps, please fill it out if you're able to. :)
What operating system are you using?
- [x] Mac OS:
I'm using python version:
- [x] Other: 3.9
I installed PuLP via:
- [x] pypi (python -m pip install pulp)
Did you also
- [x] Tried out the latest github version: https://github.com/coin-or/pulp
- [x] Searched for an existing similar issue: https://github.com/coin-or/pulp/issues?utf8=%E2%9C%93&q=is%3Aissue%20
Thanks for reporting. Would you do a PR to correct this? If you do, check how other official APIs do this for inspiration: CPLEX or GUROBI
Thanks for reporting. Would you do a PR to correct this? If you do, check how other official APIs do this for inspiration: CPLEX or GUROBI
Done in #576
Please, let me know what other changes should be made.
Thanks for all the work.
#576 has been merged @pchtsp
If this issue is solved better to close this issue @davidggphy