[Coin-discuss] Quick checking, if the problem is primal feasible

John J Forrest jjforre at us.ibm.com
Fri Jul 14 10:01:15 EDT 2006


Daniel,

If I get time I will look at anomaly in retval.

On trying dual, primal I meant use solver2 not aSolver.

John Forrest



Daniel Stoinski <Daniel.Stoinski at nagler-company.com> 
Sent by: coin-discuss-bounces at list.coin-or.org
07/14/2006 01:57 AM
Please respond to
Discussions about open source software for Operations Research 
<coin-discuss at list.coin-or.org>


To
Discussions about open source software for Operations Research 
<coin-discuss at list.coin-or.org>
cc

Subject
Re: [Coin-discuss] Quick checking, if the problem is primal feasible






John,

I'm really gracefull for your quick answer and the accurate axplanation.

> I can not see any way of getting rid of the initialSolve.  You could
> improve the time somewhat by -
> a) using the presolved problem rather than the initial (and giving hint 
to
> initialSolve not to presolve).

I tried your hint using intialSolve with the presolved model and trying to 

pass a hint not to presolve.

I changed the code now to

static short isPrimalInfeasible(OsiClpSolverInterface& aSolver)
{
  OsiSolverInterface       *solver2;
  OsiPresolve              pinfo;
  short                    retval;

  solver2 = pinfo.presolvedModel(aSolver, 0.0);
  if (solver2 != NULL)
  {
    solver2->setHintParam(OsiDoPresolveInInitial, false, OsiHintTry);
    solver2->initialSolve();
    retval = solver2->isProvenPrimalInfeasible();
    delete solver2;
  }
  else
    retval = 1;
  return retval;
}

Now
    retval = solver2->isProvenPrimalInfeasible();
says always, that the problem is primal feasible, even for guaranteed no 
primal infeasbile problems.
Calling aSolver.initialSolve() and returning 
aSolver.isProvenPrimalInfeasible() worked correctly.

> b) making sure you have a zero objective function (probably - but if 
dual
> quicker then very small and random)
> c) doing tests to see if primal or dual solves faster (see point b))

Calling aSolver.getModelPtr()->primal() instead of aSolver.initialSolve() 
and aSolver.isProvenPrimalInfeasible() was even (not significanlty) 
slower. The same for dual().

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060714/dc1a76e2/attachment.html>


More information about the Coin-discuss mailing list