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

John J Forrest jjforre at us.ibm.com
Thu Jun 8 06:05:58 EDT 2006


Paulo,

primalPivotResult is just the last part of a primal iteration in Clp (as 
no other solver implements it).  Normally the reduced costs are updated at 
the beginning of the next iteration.  However I agree that if you are 
using primalPivotResult you would expect the reduced costs to be updated. 
I have added an extra parameter to primalPivotResult to update dual 
solution which defaults to false so that nobody will be affected.  Tell me 
if it does not do what you want?

I have always been a little uneasy about the "build your own simplex" 
parts of OsiSolverInterface and assuming that only Clp will ever implement 
it, it may be better to approach it in a different way.  If I knew how 
people use this interface I could add a virtual class to Clp - rather like 
ClpEventHandler which would modify the behavior of Clp without continually 
entering and leaving it.  This would be more robust and faster.

Thoughts?

John Forrest



Paulo Jose da Silva e Silva <pjssilva at ime.usp.br> 
Sent by: coin-lpsolver-bounces at list.coin-or.org
06/08/2006 03:31 AM

To
coin-lpsolver at list.coin-or.org
cc

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






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






_______________________________________________
Coin-lpsolver mailing list
Coin-lpsolver at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-lpsolver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20060608/4db6dfde/attachment.html>


More information about the Clp mailing list