[Coin-lpsolver] Shouldn't primalPivotResult update reduced costs?

Paulo Jose da Silva e Silva pjssilva at ime.usp.br
Wed Jun 7 21:31:38 EDT 2006


Hello,

I have a doubt on the use of primalPivotResult. Shouldn't it update the
reduced costs?

If the answer is yes, please can anyone point out my mistake in the
reasoning below?

I have the following code in a program:

  setObjectiveAndRefresh(_originalObjective); 
  pivotStatus = primalPivotResult(in, 1, out, outStatus, stepSize, NULL);
  printf("1 - %e\n", getReducedCost()[653]);
  setObjectiveAndRefresh(_originalObjective);
  printf("2 - %e\n", getReducedCost()[653]);

If primalPivotResult was updating the reduced cost correctly, I would
expect the second call to setObjectiveAndRefresh to be redundant
(actually a bad thing to do, as it generates some overhead). Moreover, I
would expect the values printed in the printf to be the same. However if
I run the code above I get the following output:

  1 - 0,000000e+00
  2 - -7,825281e-02

Note that the value labeled "2" is the right one (I have confirmed this
by manually updating the reduced cost after the pivot operation).

If primalPivotResult is not supposed to update the reduced cost, is
there a better way to compute it then calling setObjectiveAndRefresh?

Thanks,

Paulo









More information about the Clp mailing list