Skip to content

Commit d071c05

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents d5210cc + 9181457 commit d071c05

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Fixed bugs
9797
- fixed parallelism computation of dynamic cut selector to use Euclidean norm instead of unsupported argument
9898
- fixed that non-efficious cuts were not filtered out before checking dynamic parallelism in dynamic cut selector
9999
- fixes in nauty.h for 32bit systems
100+
- fixed SCIPgetDualSolVal() for a linear constraint with a single variable
100101

101102
Miscellaneous
102103
-------------

src/scip/scip_sol.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,10 +2673,13 @@ SCIP_RETCODE SCIPgetDualSolVal(
26732673

26742674
activity = SCIPvarGetLPSol(vars[0]) * vals[0];
26752675

2676-
/* return the reduced cost of the variable if the constraint would be tight */
2676+
/* return the reduced cost of the variable divided by the coefficient if the constraint would be tight */
26772677
if( SCIPsetIsEQ(scip->set, activity, SCIPgetRhsLinear(scip, cons))
26782678
|| SCIPsetIsEQ(scip->set, activity, SCIPgetLhsLinear(scip, cons)) )
2679-
(*dualsolval) = SCIPgetVarRedcost(scip, vars[0]);
2679+
{
2680+
assert(vals[0] != 0.0);
2681+
(*dualsolval) = SCIPgetVarRedcost(scip, vars[0]) / vals[0];
2682+
}
26802683
else
26812684
(*dualsolval) = 0.0;
26822685
}

0 commit comments

Comments
 (0)