coin-or / Cbc.old

This is a mirror of the subversion repository on COIN-OR
https://projects.coin-or.org/Cbc
Other
89 stars 30 forks source link

[Trac #125] max problem reports reduced cost with wrong sign #79

Open s-c-e opened 5 years ago

s-c-e commented 5 years ago

image

When solving a MAX problem and a variable is pushed to its LOWER bound cbc is reporting a positive value for the reduced cost. I believe in practice it should be reported as negative. For the following three complementary cases, cbc seems to report the correct sign for the reduced cost

max problem -> var at UB -> (+) r.c. min problem -> var at LB -> (+) r.c. min problem -> var at UB -> (-) r.c.

The problematic case (which occurs when using the LP file interface) can be tested using the following simple LP file:

max
obj:
-1.000000 x(1)

s.t.

bounds
   -1 <= x(1) <= 1
end

This happens in 2.7, 2.8, and trunk. Below is my contact info:

name: Gabe email: gabehack@…

=================================

I don't like how some of that formatting came out. See below for what are the working cases...

max problem -> var at UB -> (+) r.c.

min problem -> var at LB -> (+) r.c.

min problem -> var at UB -> (-) r.c.