pulp icon indicating copy to clipboard operation
pulp copied to clipboard

`timeLimit` arg not available in MOSEK api

Open davidggphy opened this issue 3 years ago • 4 comments

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

davidggphy avatar Aug 06 '22 12:08 davidggphy

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

pchtsp avatar Aug 24 '22 14:08 pchtsp

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.

davidggphy avatar Aug 24 '22 21:08 davidggphy

#576 has been merged @pchtsp

davidggphy avatar Dec 03 '22 14:12 davidggphy

If this issue is solved better to close this issue @davidggphy

samithkavishke avatar Apr 02 '24 22:04 samithkavishke