[Clp] problems with time-out when using primal Simplex
John J Forrest
jjforre at us.ibm.com
Fri Nov 7 16:59:11 EST 2008
Kish,
I am unable to reproduce problem. Using the driver below on Netlib pilot87
I get exactly what I expect.
#include <cassert>
#include "OsiClpSolverInterface.hpp"
#include "CoinTime.hpp"
int main (int argc, const char *argv[])
{
OsiClpSolverInterface solver1;
// Read in model using argv[1]
// and assert that it is a clean model
std::string mpsFileName = "../../Data/Sample/p0033.mps";
if (argc>=2) mpsFileName = argv[1];
int numMpsReadErrors = solver1.readMps(mpsFileName.c_str(),"");
assert(numMpsReadErrors==0);
// Do complete search
solver1.setHintParam(OsiDoDualInInitial,false,OsiHintDo);
solver1.getModelPtr()->setMaximumSeconds(5);
double time1 = CoinCpuTime();
solver1.initialSolve();
std::cout<<mpsFileName<<" took "<<CoinCpuTime()-time1<<" seconds"<<std::endl;
solver1.getModelPtr()->setMaximumSeconds(100);
time1 = CoinCpuTime();
solver1.initialSolve();
std::cout<<mpsFileName<<" took "<<CoinCpuTime()-time1<<" seconds"<<std::endl;
return 0;
}
log file
Coin0001I At line 1 NAME PILOT87
Coin0001I At line 2 ROWS
Coin0001I At line 2034 COLUMNS
Coin0001I At line 39720 RHS
Coin0001I At line 39858 BOUNDS
Coin0001I At line 41990 ENDATA
Coin0002I Problem PILOT87 has 2030 rows, 4883 columns and 73152 elements
Coin0008I PILOT87 read with 0 errors
Clp0006I 0 Obj -0.242105 Primal inf 579488 (601) Dual inf 1.42278e+15 (1280)
Clp0006I 295 Obj 1078.33 Primal inf 453763 (724) Dual inf 8.02334e+14 (1062)
Clp0006I 505 Obj 1078.64 Primal inf 191880 (681) Dual inf 7.49466e+12 (1250)
Clp0006I 714 Obj 978.662 Primal inf 136945 (602) Dual inf 4.79848e+12 (1184)
Clp0006I 928 Obj 979.112 Primal inf 84707.9 (549) Dual inf 9.27645e+12 (1409)
Clp0006I 1139 Obj 623.694 Primal inf 30729.5 (487) Dual inf 1.58756e+13 (1494)
Clp0006I 1342 Obj 624.053 Primal inf 12599 (455) Dual inf 1.73809e+13 (1638)
Clp0006I 1565 Obj 624.181 Primal inf 10141.9 (454) Dual inf 1.76026e+13 (1386)
Clp0006I 1810 Obj 624.349 Primal inf 5397.34 (441) Dual inf 8.08064e+13 (1731)
Clp0003I Stopped - objective value -1.14166e+11
/home/jjforre/cbc-clean/Data/Netlib/pilot87.mps.gz took 5.00431 seconds
Clp0006I 0 Obj 624.484 Primal inf 2399.54 (400) Dual inf 1.36931e+15 (1557)
Clp0006I 209 Obj 624.817 Primal inf 469.357 (311) Dual inf 1.54536e+14 (1757)
Clp0006I 434 Obj 625.075 Primal inf 237.115 (276) Dual inf 8.3675e+12 (2137)
Clp0006I 652 Obj 624.517 Primal inf 168.752 (242) Dual inf 1.28041e+12 (1810)
Clp0006I 862 Obj 624.674 Primal inf 142.635 (232) Dual inf 5.25165e+11 (1630)
Clp0006I 1072 Obj 624.066 Primal inf 70.3293 (174) Dual inf 4.40587e+11 (2018)
Clp0006I 1244 Obj 622.088 Primal inf 39.7369 (126) Dual inf 9.14483e+11 (2258)
Clp0006I 1450 Obj 620.602 Primal inf 23.1051 (93) Dual inf 1.43656e+11 (2141)
Clp0006I 1663 Obj 621.165 Primal inf 14.5739 (65) Dual inf 1.02619e+11 (2048)
Clp0006I 1871 Obj 623.926 Primal inf 9.15278 (41) Dual inf 1.22297e+11 (1994)
Clp0006I 2080 Obj 624.384 Primal inf 4.98074 (32) Dual inf 4.68714e+11 (1823)
Clp0006I 2286 Obj 624.128 Primal inf 2.99408 (19) Dual inf 3.5785e+10 (2486)
Clp0006I 2491 Obj 622.915 Primal inf 0.163672 (5) Dual inf 6.67806e+09 (2524)
Clp0006I 2703 Obj 403.761 Dual inf 5173.33 (1848)
Clp0006I 2912 Obj 333.114 Dual inf 1590.33 (1948)
Clp0006I 3120 Obj 328.354 Dual inf 75726.6 (2326)
Clp0006I 3333 Obj 323.229 Dual inf 5968.79 (1924)
Clp0006I 3542 Obj 320.237 Dual inf 6164.68 (1693)
Clp0006I 3751 Obj 316.905 Dual inf 387.733 (1594)
Clp0006I 3964 Obj 315.268 Dual inf 84.3049 (1294)
Clp0006I 4172 Obj 312.584 Dual inf 300.031 (1252)
Clp0006I 4431 Obj 310.209 Dual inf 8252.93 (1388)
Clp0006I 4726 Obj 308.884 Dual inf 4387.65 (1714)
Clp0006I 5017 Obj 306.471 Dual inf 1013.76 (1072)
Clp0006I 5344 Obj 304.878 Dual inf 4342.71 (1389)
Clp0006I 5407 Obj 304.664 Dual inf 49.2382 (1055)
Clp0006I 5618 Obj 303.685 Dual inf 3233.76 (1256)
Clp0006I 5937 Obj 303.026 Dual inf 1536.07 (1141)
Clp0006I 6192 Obj 302.481 Dual inf 931.983 (1355)
Clp0006I 6413 Obj 302.146 Dual inf 118.545 (701)
Clp0006I 6716 Obj 301.819 Dual inf 7.46491 (206)
Clp0006I 6883 Obj 301.716 Dual inf 0.0379725 (44)
Clp0006I 7050 Obj 301.71
Clp0000I Optimal - objective value 301.71
/home/jjforre/cbc-clean/Data/Netlib/pilot87.mps.gz took 42.6507 seconds
John
From: Kish Shen <kisshen at cisco.com>
To: clp at list.coin-or.org
Date: 11/07/2008 01:45 PM
Subject: [Clp] problems with time-out when using primal Simplex
Hi,
I have been doing some timings with Cbc/Clp (trunk branch, downloaded
via svn on 4 Nov), and it seems that when Primal Simplex is used to
solve a linear problem, the time-out setting is ignored.
I use OsiClpSolverInterface to access the Clp solver, and set the method
to Primal Simplex via
Solver->setHintParam(OsiDoDualInInitial, doDual, OsiHintDo, NULL)
where doDual is set to false for Primal Simplex, Solver is a
OsiClpSolverInterface *.
To set the timeout, I use ClpModel's setMaximumSeconds():
Solver->getModelPtr()->setMaximumSeconds(time)
this is done after the setHintParam to select Primal method above.
This timeout seems to work if I am using Dual Simplex (and also for
ClpInterior), but not with Primal. The solver seems to run until the
problem is solved. I initially set the timeout to 300 seconds, and I was
getting problems that took over 1000 seconds to solve returning the
optimal solution. I then set the time-out to 2 seconds, and problems
that took 58 seconds also did not time-out.
I looked at the HTML (generated by DOxygen, I think?) documentation for
setMaximumSeconds, and there seem to be some error, because the text for
the method says `Number of rows', which does not seem to describe the
method. This 'Number of rows' occurs for other methods, such as
setMaximumIterations(), getIterationCount() -- perhaps it is some
`default' string when there is no description? Should it be `No
description' instead?
Thanks and cheers,
Kish
--
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
_______________________________________________
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/20081107/5df01f7a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20081107/5df01f7a/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/clp/attachments/20081107/5df01f7a/attachment-0001.gif>
More information about the Clp
mailing list