pulp icon indicating copy to clipboard operation
pulp copied to clipboard

The solution of PULP_CBC_CMD is not optimal

Open Tiatiaoooo opened this issue 3 years ago • 2 comments

What is your question

I tried to use PULP_CBC_CMD to solve linear equations of size 40K*64, but found that the result is not optimal, although the return status is 1 (I tried to set timeLimit, but it didn't seek to work) can anyone help? solver = pulp.PULP_CBC_CMD(timeLimit=1000, msg=1, warmStart=1) status = Prob.solver(solver) What I'm doing is assigning regions to some points, and given the constrains, regions trend to be assigned to the point closer, but some results do not follow that.

Tiatiaoooo avatar Jan 03 '22 17:01 Tiatiaoooo

can you post the cbc logs?

Often the time limit is only checked in branch and bound so perhaps the solver is still terminating early

stumitchell avatar Jan 03 '22 20:01 stumitchell

Thanks for your replay, here is the cbc logs: At line 2 NAME MODEL At line 3 ROWS At line 24937 COLUMNS At line 6374698 RHS At line 6399631 BOUNDS At line 7987088 ENDATA Problem MODEL has 24932 rows, 1587456 columns and 4762368 elements Coin0008I MODEL read with 0 errors opening mipstart file /var/folders/0n/p5vdcszd2mx6hwbm_6vkd8xw0000gn/T/1105a2ed1ba94c3da1a7c177665a1ca7-pulp.mst. MIPStart values read for 1587456 variables. seconds was changed from 1e+100 to 1000 Option for timeMode changed from cpu to elapsed Presolve 24932 (0) rows, 1587456 (0) columns and 4762368 (0) elements 0 Obj 0 Primal inf 11492.169 (24868) 349 Obj 352.47333 Primal inf 4862.7084 (16772) 698 Obj 436.69318 Primal inf 4075.3687 (15985) 1047 Obj 490.93381 Primal inf 4221.3136 (16420) 1396 Obj 532.95722 Primal inf 3820.3113 (16537) 1745 Obj 550.89545 Primal inf 3442.973 (17118) 2094 Obj 557.51529 Primal inf 3374.3046 (17321) 2443 Obj 563.15789 Primal inf 3174.7655 (17688) 2792 Obj 566.05928 Primal inf 2927.1084 (17445) 3141 Obj 568.8571 Primal inf 2818.4666 (17240) 3490 Obj 571.60482 Primal inf 2738.6477 (17004) 3839 Obj 574.17566 Primal inf 2630.2429 (16537) 4188 Obj 576.45796 Primal inf 2782.8559 (16251) 4537 Obj 578.74139 Primal inf 2540.7631 (16025) 4886 Obj 580.81517 Primal inf 2473.8018 (15743) 5235 Obj 582.78091 Primal inf 2344.2427 (15555) 5584 Obj 584.6063 Primal inf 2287.601 (15374) 5933 Obj 586.51182 Primal inf 2259.3566 (15137) 6282 Obj 588.36553 Primal inf 2188.3119 (14964) 6631 Obj 589.99562 Primal inf 2123.6023 (14704) 6980 Obj 591.33827 Primal inf 2033.4247 (14507) 7329 Obj 592.5746 Primal inf 2039.2548 (14263) 7678 Obj 593.59921 Primal inf 1925.7465 (13999) 8027 Obj 594.46915 Primal inf 1882.9662 (13699) 8376 Obj 595.31234 Primal inf 1857.0551 (13404) 8725 Obj 596.1234 Primal inf 1827.0625 (13159) 9074 Obj 596.95973 Primal inf 1782.5565 (12874) 9423 Obj 597.83893 Primal inf 1749.3022 (12527) 9772 Obj 598.73712 Primal inf 1708.3615 (12194) 10121 Obj 599.62536 Primal inf 1667.7243 (11899) 10470 Obj 600.48074 Primal inf 1621.4564 (11567) 10819 Obj 601.35441 Primal inf 1560.7978 (11261) 11168 Obj 602.14223 Primal inf 1535.92 (11021) 11517 Obj 603.05118 Primal inf 1509.0836 (10752) 11866 Obj 603.89238 Primal inf 1479.0194 (10545) 12215 Obj 604.82353 Primal inf 1476.296 (10254) 12564 Obj 605.72287 Primal inf 1379.2618 (10005) 12913 Obj 606.55936 Primal inf 1361.7025 (9747) 13262 Obj 607.40432 Primal inf 1350.4711 (9405) 13611 Obj 608.2718 Primal inf 1299.401 (9156) 13960 Obj 609.13836 Primal inf 1297.779 (8871) 14309 Obj 609.96053 Primal inf 1357.9395 (8680) 14658 Obj 610.82766 Primal inf 1352.6811 (8478) 15007 Obj 611.72441 Primal inf 1342.0566 (8152) 15356 Obj 612.65073 Primal inf 1328.2864 (7924) 15705 Obj 613.5303 Primal inf 1132.3394 (7667) 16054 Obj 614.45789 Primal inf 1070.1721 (7385) 16403 Obj 615.41887 Primal inf 1034.9917 (7198) 16752 Obj 616.38181 Primal inf 1026.6464 (6953) 17101 Obj 617.28033 Primal inf 1230.3689 (6708) 17450 Obj 618.21331 Primal inf 943.52456 (6469) 17799 Obj 619.15396 Primal inf 910.95145 (6175) 18148 Obj 620.12915 Primal inf 875.13722 (5986) 18497 Obj 621.13022 Primal inf 829.92 (5723) 18846 Obj 621.97919 Primal inf 787.487 (5461) 19195 Obj 622.88374 Primal inf 762.2953 (5173) 19544 Obj 623.74945 Primal inf 707.83153 (4926) 19893 Obj 624.6886 Primal inf 679.147 (4639) 20242 Obj 625.58493 Primal inf 653.74434 (4355) 20591 Obj 626.49202 Primal inf 632.02434 (4063) 20940 Obj 627.52474 Primal inf 552.21432 (3801) 21289 Obj 628.42067 Primal inf 501.32761 (3467) 21638 Obj 629.36384 Primal inf 484.28564 (3155) 21987 Obj 630.34365 Primal inf 451.62064 (2871) 22336 Obj 631.2454 Primal inf 408.96169 (2606) 22685 Obj 632.12059 Primal inf 362.61224 (2286) 23034 Obj 633.06825 Primal inf 315.15615 (2085) 23383 Obj 633.91777 Primal inf 302.63992 (1778) 23732 Obj 634.70674 Primal inf 305.21905 (1496) 24081 Obj 635.5085 Primal inf 287.76273 (1224) 24430 Obj 636.27567 Primal inf 193.27934 (1023) 24779 Obj 637.03386 Primal inf 154.088 (785) 25128 Obj 637.72106 Primal inf 126.41295 (500) 25477 Obj 638.32493 Primal inf 209.28605 (319) 25826 Obj 638.75883 Primal inf 58.680331 (42) 26175 Obj 638.89157 Primal inf 1.3899905 (6) 26187 Obj 638.8916 Optimal - objective value 638.8916 Optimal objective 638.8915961 - 26187 iterations time 6.332 Option for printingOptions changed from normal to all Total time (CPU seconds): 10.73 (Wallclock seconds): 11.21

Tiatiaoooo avatar Jan 04 '22 01:01 Tiatiaoooo