Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imprecise interation Count #132

Closed
nht2018 opened this issue Apr 3, 2022 · 5 comments
Closed

Imprecise interation Count #132

nht2018 opened this issue Apr 3, 2022 · 5 comments

Comments

@nht2018
Copy link

nht2018 commented Apr 3, 2022

Hello. When I test CLP on the large-scale dataset MIPLIB, I find that the iteration count output by CLP is imprecise.
For example, here is the log file of the instance "nug15", by using ipm with crossover:

1.18543e+06 elements in sparse Cholesky, flop count 2.03872e+09
Clp0035I 0 Primal 33264000 Dual -2.53893e+08 Complementarity 2.87157e+08 - 0 fixed, rank 1872
Clp0035I 1 Primal 1765901.8 Dual -14992.846 Complementarity 15506970 - 0 fixed, rank 1853
Clp0035I 2 Primal 9174.1151 Dual -14896.688 Complementarity 83297.529 - 0 fixed, rank 1868
Clp0035I 3 Primal 1530.923 Dual -8024.4335 Complementarity 9555.3565 - 0 fixed, rank 1863
Clp0035I 4 Primal 1413.2117 Dual 192.24931 Complementarity 1220.9624 - 0 fixed, rank 1885
Clp0035I 5 Primal 1184.2881 Dual 910.62857 Complementarity 273.65954 - 0 fixed, rank 1883
Clp0035I 6 Primal 1100.7246 Dual 982.29507 Complementarity 118.42957 - 0 fixed, rank 1860
Clp0035I 7 Primal 1068.7214 Dual 1024.2724 Complementarity 44.449026 - 0 fixed, rank 1884
Clp0035I 8 Primal 1059.4771 Dual 1029.2597 Complementarity 30.217356 - 0 fixed, rank 1858
Clp0035I 9 Primal 1048.3282 Dual 1035.8738 Complementarity 12.454383 - 0 fixed, rank 1858
Clp0035I 10 Primal 1045.4956 Dual 1039.111 Complementarity 6.3846278 - 0 fixed, rank 1854
Clp0035I 11 Primal 1043.0106 Dual 1040.2128 Complementarity 2.7978222 - 0 fixed, rank 1849
Clp0035I 12 Primal 1041.9329 Dual 1040.5324 Complementarity 1.4004408 - 0 fixed, rank 1856
Clp0035I 13 Primal 1041.4574 Dual 1040.8076 Complementarity 0.64982487 - 0 fixed, rank 1867
Clp0035I 14 Primal 1041.2291 Dual 1040.8806 Complementarity 0.3485514 - 0 fixed, rank 1856
Clp0035I 15 Primal 1041.132 Dual 1040.9436 Complementarity 0.18863302 - 0 fixed, rank 1869
Clp0035I 16 Primal 1041.001 Dual 1040.9813 Complementarity 0.019706312 - 0 fixed, rank 1886
Clp0035I 17 Primal 1041.001 Dual 1040.9813 Complementarity 0.019698029 - 0 fixed, rank 1868
Clp0035I 18 Primal 1041.001 Dual 1040.9813 Complementarity 0.019687326 - 0 fixed, rank 1861
Clp0035I 19 Primal 1041.0009 Dual 1040.9813 Complementarity 0.019683878 - 0 fixed, rank 1842
Clp0035I 20 Primal 1041.0009 Dual 1040.9813 Complementarity 0.019670652 - 1 fixed, rank 1852
Clp0035I 21 Primal 1041.001 Dual 1040.9815 Complementarity 0.019526852 - 1 fixed, rank 1857
Clp0035I 22 Primal 1041.001 Dual 1040.9815 Complementarity 0.019487992 - 1 fixed, rank 1883
Clp0035I 23 Primal 1040.9997 Dual 1040.9815 Complementarity 0.019464456 - 1 fixed, rank 1846
Clp0035I 24 Primal 1040.9997 Dual 1040.9815 Complementarity 0.019455725 - 2 fixed, rank 1864
Clp0035I 25 Primal 1040.9999 Dual 1040.9827 Complementarity 0.018208115 - 3 fixed, rank 1877
Clp0035I 26 Primal 1040.9956 Dual 1040.9919 Complementarity 0.0040506787 - 3 fixed, rank 1891
Clp0035I 27 Primal 1040.9955 Dual 1040.9919 Complementarity 0.0040121395 - 4 fixed, rank 1868
Clp0035I 28 Primal 1040.9956 Dual 1040.9919 Complementarity 0.0039933469 - 5 fixed, rank 1873
Clp0035I 29 Primal 1040.9955 Dual 1040.9919 Complementarity 0.0039869459 - 5 fixed, rank 1876
Clp0040I Exiting - using solution from iteration 28
Clp0046I At end primal/dual infeasibilities 0.00010983845/10.247667, complementarity gap 8.9120105e+10, objective 1040.9956
Clp0006I 0  Obj 1040.9944 Primal inf 0.0098131056 (76) Dual inf 6.2859078e+16 (2424)
Clp0006I 87  Obj 1040.9941 Primal inf 0.00040410498 (40) Dual inf 7.4479483e+14 (2398)
Clp0006I 199  Obj 1040.9941 Primal inf 8.4355532e-06 (36) Dual inf 2.800466e+14 (1467)
Clp0006I 333  Obj 1040.9941 Primal inf 1.1295903e-06 (7) Dual inf 2.2308e+12 (893)
Clp0006I 460  Obj 1040.9941 Primal inf 1.1295903e-06 (7) Dual inf 2.2308e+12 (887)
Clp0029I End of values pass after 519 iterations
Clp0006I 519  Obj 1040.9941 Dual inf 121.42928 (857)
Clp0003I Stopped - objective value 1040.9941
Clp0006I 0  Obj 1040.9941 Dual inf 121430.14 (857)
Clp0006I 104  Obj 1040.9941 Dual inf 82637.215 (776)
Clp0006I 202  Obj 1040.9941 Dual inf 58098.959 (764)
Clp0006I 307  Obj 1040.9941 Dual inf 24261.364 (599)
Clp0006I 424  Obj 1040.9941 Primal inf 2.8256396e-05 (51) Dual inf 1.3354605e+12 (845)
Clp0006I 541  Obj 1040.9939 Primal inf 1.6703313e-05 (23) Dual inf 2.9899963e+11 (595)
Clp0006I 610  Obj 1040.9939 Primal inf 1.8605973e-08 (1) Dual inf 1.5345426e+10 (122)
Clp0006I 632  Obj 1040.9939
Clp0000I Optimal - objective value 1040.9939
Clp0006I 0  Obj 1040.994
Clp0000I Optimal - objective value 1040.994
Clp0032I Optimal objective 1040.994041 - 0 iterations time 17.022

As shown in the last line, the iteration count is 0. Clp_getIterationCount(unsafe_backend(model)) also returns 0.
I don't think this is a reasonable result.

What I want is to get the exact iteration count of the iterior point methd (does not include crossover steps). Could you please give some advice?

@odow
Copy link
Member

odow commented Apr 3, 2022

I don't have any advice. Clp_getIterationCount likely gets the number of simplex iterations, not barrier solves. Does it return a non-zero count for any other models?

I'd suggest you use HiGHS instead: https://github.com/jump-dev/HiGHS.jl.

@nht2018
Copy link
Author

nht2018 commented Apr 3, 2022

Clp_getIterationCount can return nonzero count for some other model.For example, here is the last line in the log file of the instance "buildingenergy"

Clp0032I Optimal objective 4568681.897 - 29988 iterations time 74.272

Clp_getIterationCount returns 29988

@nht2018
Copy link
Author

nht2018 commented Apr 3, 2022

I think the problem lies in CLP, not in the julia wrapper.

@odow
Copy link
Member

odow commented Apr 3, 2022

If it's upstream in Clp, there's not much we can do. Do you have the MPS file and list of options you provided to Clp?

@odow
Copy link
Member

odow commented Oct 25, 2022

Closing as stale, and because this isn't a bug in Clp.jl.

@odow odow closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants