[Clp] non-zero dual infeasibility at the end of Clp with barrier method
William H. Patton
pattonwh at comcast.net
Tue Oct 30 18:13:32 EDT 2012
I try searching on the 2 messages.
CBC\Clp-1.14.7\Clp\src
Searching for: complementarity gap for the final
ClpMessage.cpp(84): {CLP_BARRIER_END, 46, 1, "At end primal/dual
infeasibilities %g/%g, complementarity gap %g, objective %g"},
ClpPredictorCorrector.cpp(940): handler_->message(CLP_BARRIER_END,
messages_)
context
* // If quadratic use last solution**
** // Restore quadratic objective if necessary**
** if (saveObjective) {*
delete objective_;
objective_ = *saveObjective*;
objectiveValue_ = 0.5 * (primalObjective_ + dualObjective_);
}
handler_->message(*CLP_BARRIER_END,* messages_)
<< static_cast<double>(sumPrimalInfeasibilities_)
<< static_cast<double>(*sumDualInfeasibilities*_)
<< static_cast<double>(*complementarityGap_*)
<< static_cast<double>(objectiveValue())
<< CoinMessageEol;
and Complementarity for the interior progress.
ClpMessage.cpp(73): {CLP_BARRIER_ITERATION, 35, 1, "%d Primal %g Dual %g
Complementarity %g - %d fixed, rank %d"},
ClpPredictorCorrector.cpp(246): handler_->message(CLP_BARRIER_ITERATION,
messages_)
context
* complementarityGap_ =
complementarityGap(numberComplementarityPairs_,**
** numberComplementarityItems_, 0);*
handler_->message(CLP_BARRIER_ITERATION, messages_)
<< numberIterations_
<< static_cast<double>(primalObjective_ * objScale
- dblParam_[ClpObjOffset])
<< static_cast<double>(dualObjective_ * objScale -
dblParam_[ClpObjOffset])
<< static_cast<double>(complementarityGap_)
<< numberFixedTotal
<< cholesky_->rank()
<< CoinMessageEol;
I suspect that the Barrier quadratic use of KKT is ignored for the final.
It seems above that the quadratic restore at *final *fails to recompute
the *complementarityGap_*
Try more code review to see what it takes to stuff the prior one away
somewhere like *saveObjective* say *save_**complementarityGap_ *
or perhaps just try adding the bold line above
before the*CLP_BARRIER_END,* case.
At end primal/dual infeasibilities 0/*547812.72,* complementarity gap
31.492848,
Looks like *save_sumDualInfeasibilities_* will also be needed from the
log.
ClpSimplexNonlinear.cpp(42): ClpObjective * saveObjective = NULL;
ClpSimplexNonlinear.cpp(55): saveObjective = objective_;
ClpSimplexNonlinear.cpp(186): if (saveObjective) {
ClpSimplexNonlinear.cpp(188): objective_ = saveObjective;
ClpPredictorCorrector.cpp(114): ClpObjective * saveObjective = NULL;
ClpPredictorCorrector.cpp(123): saveObjective = objective_;
ClpPredictorCorrector.cpp(153): if (saveObjective) {
ClpPredictorCorrector.cpp(155): objective_ = saveObjective;
ClpPredictorCorrector.cpp(935): if (saveObjective) {
ClpPredictorCorrector.cpp(937): objective_ = saveObjective;
So practically this means to just ignore the final messages and go with
the last line prior to
Exiting
.
15 Primal -1.8559771e+11 Dual -1.8559771e+11 Complementarity
0.093779229 - 55 fixed, rank 1122
Exiting - using solution from iteration 14
William
On 10/30/2012 2:11 PM, Stephanie Jakus wrote:
> Dear Clp mailing list,
>
> My results when using the Clp barrier method are troubling because,
> while the complementarity gap steadily decreases, the solver reports:
> "At end primal/dual infeasibilities 0/547812.72." Why might a
> primal-dual interior point method end with non-zero dual
> infeasibility? Thanks very much in advance for your help.
>
> Sincerely,
> Stephanie Jakus
>
> Coin LP version 1.14.5, build Nov 10 2011
> command line - /Clp/clp -import
> /cygdrive/c/Clp/mps_files/clp_input.mps -presolve off -cross off
> -printi all -directory /cygdrive/c/Clp/clp_output -barr -solu
> solfile.txt
> At line 8 NAME Model
> At line 9 ROWS
> At line 472 COLUMNS
> At line 1173 RHS
> At line 1405 QUADOBJ
> Problem Model has 461 rows, 200 columns and 1200 elements
> At line 1606 ENDATA
> Model was imported from /cygdrive/c/Clp/mps_files/clp_input.mps in 0 seconds
> 102891 elements in sparse Cholesky, flop count 5.20638e+07
> 0 Primal 1.0987224e+14 Dual -1.1363736e+16 Complementarity
> 4.5987811e+14 - 0 fixed, rank 1122
> 1 Primal 6.0855063e+11 Dual -7.700622e+14 Complementarity
> 4.0678514e+13 - 0 fixed, rank 1122
> 2 Primal 1.3082029e+11 Dual -1.9298626e+14 Complementarity
> 7.6610156e+12 - 0 fixed, rank 1122
> 3 Primal 4.6315105e+10 Dual -1.9592583e+13 Complementarity
> 6.9005659e+11 - 0 fixed, rank 1122
> 4 Primal -8.6905913e+10 Dual -1.8205962e+12 Complementarity
> 5.9771431e+10 - 0 fixed, rank 1122
> 5 Primal -1.6152714e+11 Dual -3.9216081e+11 Complementarity
> 7.870926e+09 - 0 fixed, rank 1122
> 6 Primal -1.7909989e+11 Dual -2.4456859e+11 Complementarity
> 2.2414622e+09 - 0 fixed, rank 1122
> 7 Primal -1.8420608e+11 Dual -1.9517877e+11 Complementarity
> 3.739759e+08 - 0 fixed, rank 1122
> 8 Primal -1.8542753e+11 Dual -1.8626013e+11 Complementarity 28116783 -
> 0 fixed, rank 1122
> 9 Primal -1.8558269e+11 Dual -1.8566307e+11 Complementarity 2708118.6
> - 0 fixed, rank 1122
> 10 Primal -1.8559658e+11 Dual -1.856041e+11 Complementarity 253515.82
> - 0 fixed, rank 1122
> 11 Primal -1.8559763e+11 Dual -1.8559833e+11 Complementarity 23581.122
> - 0 fixed, rank 1122
> 12 Primal -1.8559771e+11 Dual -1.8559776e+11 Complementarity 1863.9402
> - 18 fixed, rank 1122
> 13 Primal -1.8559771e+11 Dual -1.8559772e+11 Complementarity 214.33975
> - 55 fixed, rank 1122
> 14 Primal -1.8559771e+11 Dual -1.8559771e+11 Complementarity 1.1391258
> - 55 fixed, rank 1122
> 15 Primal -1.8559771e+11 Dual -1.8559771e+11 Complementarity
> 0.093779229 - 55 fixed, rank 1122
> Exiting - using solution from iteration 14
> At end primal/dual infeasibilities 0/547812.72, complementarity gap
> 31.492848, objective -1.8559771e+11
> Optimal objective -1.855977106e+11 - 15 iterations time 0.372
> _______________________________________________
> Clp mailing list
> Clp at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/clp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20121030/d4f55571/attachment.html>
More information about the Clp
mailing list