coin-or / pulp

A python Linear Programming API
http://coin-or.github.io/pulp/
Other
2.01k stars 376 forks source link

HiGHS Implementation and Documentation #708

Closed zepedropaulos closed 6 months ago

zepedropaulos commented 7 months ago

PuLP's documentation states that HiGHS_CMD contains a gapRel and threads parameters. However, the built-in HiGHS_CMD does not, on pulp v2.7.0. The version available here (https://github.com/coin-or/pulp/blob/master/pulp/apis/highs_api.py) does contain these parameters, but the version installed via PyPi, does not. The function contains only an option parameter, but it always returns errors when parsing the options. Already tried several things, but none seems to be working:

milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, threads=1))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options="threads=1"))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options=["threads=1"]))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options=["--threads=1"]))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options=["--threads","1"]))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options=["--options_file","highs_options.txt"]))
milp.setSolver(HiGHS_CMD(msg=True, timeLimit=100, path=highs_path, options=["--options_file","highs_options.txt"]))

How are we supposed to parse the options?

pchtsp commented 6 months ago

Thanks for the report. Indeed, we've just released a new pulp version that should solve this. If it doesn't, please re-open it.