coin-or / coin-or/pulp

Setting `primal_feasibility_tolerance` for `pulp.HiGHS` solving

Open
#882 3 comments 0 reactions 0 assignees View on GitHub
HiGHs
Dominant language
Python
Stars
2.5k
Forks
432
PR merge metrics
No merged PRs in 30d

Description

What is your question
-----------------------

I am solving a problem via `pulp.HiGHS` but consistently get a "sub-optimal" solution with the following errors:

```
ERROR: MIP solver claims optimality, but with num/max/sum primal(1/2.38419e-06/2.38419e-06) infeasibilities
ERROR: Setting model status to Solve error
```

It is only ever a super tiny violation which presumably is some mathematical artefact (I hope?) and so I would rather not false-trigger the switch of model status as I am running a huge grid and programmatically interface with summaries of the results. I tried setting `primal_feasibility_tolerance` in many ways (found in HiGHS API) but cannot seem to get it to stick; `solverParams` from the pulp docs doesn't appear to do anything and in fact causes an error if I pass a dict into it.

Any help would be appreciated, might be that I am missing some docs somewhere!

Contributor guide

Open the contributing guide

Research direction

Start at the pulp.HiGHS solver interface and trace how solver parameters are accepted and passed to HiGHS. Reproduce the reported primal infeasibility and test the documented tolerance-setting path; done means the parameter is accepted without an error and affects the resulting solver status.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.