pulp icon indicating copy to clipboard operation
pulp copied to clipboard

COIN_CMD warm start inverts objective when sense=LpMaximize

Open qdbp opened this issue 4 years ago • 1 comments

Details for the issue

What did you do?

Warm started an LpMaximize COIN_CMD problem with a heuristic solution.

What did you expect to see?

The heuristic objective has the same sense/sign as the problem objective.

What did you see instead?

Warm start said heuristic has objective value of +4, whereas the signs for the objective output by CBC were negative. If I use LpMinimize and negate the objective function manually, the solver correctly starts at -4 objective from the heuristic and takes it from there. Looks like the right sense might not be passed to writeMps somewhere for the warm start.

qdbp avatar Aug 19 '21 02:08 qdbp

Thanks for the issue report. Do you have an example in the form of reproducible python code or json file of the problem lp you're trying to solve?

On Thu, Aug 19, 2021, 04:58 Evgeny Naumov @.***> wrote:

Details for the issue What did you do?

Warm started an LpMaximize COIN_CMD problem with a heuristic solution. What did you expect to see?

The heuristic objective has the same sense/sign as the problem objective. What did you see instead?

Warm start said heuristic has objective value of +4, whereas the signs for the objective output by CBC were negative. If I use LpMinimize and negate the objective function manually, the solver correctly starts at -4 objective from the heuristic and takes it from there. Looks like the right sense might not be passed to writeMps somewhere for the warm start.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coin-or/pulp/issues/475, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJUZ42V3QEXEI2Q5JOHRW3T5RXNNANCNFSM5CNI3EMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

pchtsp avatar Aug 19 '21 03:08 pchtsp