Skip to content

[BUG] Wrong reporting of objective for maximization problem with constant in objective #111

@rg20

Description

@rg20

Describe the bug
The objective is being reported wrong when solving LP maximization problem. It appears that the sign of the constant is not reverted before computing the primal objective. Similar bug is fixed in MIP but the problem persist in LP. This is true for both PDLP and dual simplex

Steps/Code to reproduce bug

echo "NAME
SENSE
MAX
ROWS
 N  OBJ
 L  c1
COLUMNS
    x1        c1        3
    x1        OBJ       1
    x2        c1        2
    x2        OBJ       2
    x3        c1        1
    x3        OBJ       3
RHS
    rhs       c1        2
    rhs       OBJ       4
RANGES
BOUNDS
 LO bounds    x1        0
 PL bounds    x1
 LO bounds    x2        0
 PL bounds    x2
 LO bounds    x3        0
 UP bounds    x3        1
ENDATA" > linear_maximize.mps 

cuopt_cli linear_maximize.mps  

Expected behavior
The objective value should be 8. But cuOpt reports 0.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions