SOLUTION CHECKER: Cost is not correct
qtbgo opened this issue · 7 comments
Hi, I solve the instance p21-50.dat, the log tell me SOLUTION CHECKER: Cost is not correct, I don't know why?
the follwing is the log.
C:\Users\lenovo>C:\Users\lenovo\source\repos\Project1\Debug\Project1.exe D:\HGS-CARP-master\Instances\MCGRP-TP\p21-50.dat -type 34 -sol d:\1\s.sol -t 3600
Computing distance args
| Start of GA | NbNodes : 500 | NbVehicles : 50 |
NEW BEST FEASIBLE 0 51808 distance : 51808 nbRoutes : 50 capaViol : 0 lengthViol : 0
It 0 | Sol 51808 50 NO-INVALID | Moy 53219 -nan(ind) | Div 0.48718 -nan(ind)
| Val 0.5 0.5 | Pen 42.5 42.5 | Pop 26 0
| NbTotalMovesLS : (RI) 277 | (PI) 0 |
| interSwap 159 | intraSwap 15 | inter2opt 102 | intra2opt 0 |
| CPU Time : 186.993 seconds
NEW BEST FEASIBLE 0 50795 distance : 50795 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 50261 distance : 50261 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 49604 distance : 49604 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 48492 distance : 48492 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 48468 distance : 48468 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 48050 distance : 48050 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47935 distance : 47935 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47791 distance : 47791 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47462 distance : 47462 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47288 distance : 47288 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47261 distance : 47261 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 47180 distance : 47180 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 46910 distance : 46910 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 46738 distance : 46738 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 46279 distance : 46279 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 46166 distance : 46166 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 46162 distance : 46162 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 45800 distance : 45800 nbRoutes : 50 capaViol : 0 lengthViol : 0
It 500 | Sol 45800 50 46247.311 | Moy 46880.36 47241.758 | Div 0.44480667 0.45734667
| Val 0.52 1 | Pen 3.1556709 3.1556709 | Pop 50 45
| NbTotalMovesLS : (RI) 106286 | (PI) 0 |
| interSwap 56311 | intraSwap 2683 | inter2opt 46948 | intra2opt 45 |
| CPU Time : 1385.847 seconds
NEW BEST FEASIBLE 0 45570 distance : 45570 nbRoutes : 49 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 45523 distance : 45523 nbRoutes : 49 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 45400 distance : 45400 nbRoutes : 50 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 45148 distance : 45148 nbRoutes : 49 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 45067 distance : 45067 nbRoutes : 49 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 44780 distance : 44780 nbRoutes : 49 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 44697 distance : 44697 nbRoutes : 49 capaViol : 0 lengthViol : 0
It 1000 | Sol 44697 49 44388.619 | Moy 45228.32 44843.208 | Div 0.45569 0.45653
| Val 0.18 1 | Pen 2.6189713 0.1991652 | Pop 65 30
| NbTotalMovesLS : (RI) 257469 | (PI) 0 |
| interSwap 125682 | intraSwap 3879 | inter2opt 127349 | intra2opt 53 |
| CPU Time : 3060.734 seconds
NEW BEST FEASIBLE 0 44249 distance : 44249 nbRoutes : 49 capaViol : 0 lengthViol : 0
Time Elapsed : 3786367
Number of Iterations : 1238
Writing the best solution : distance : 44249 | nbRoutes : 49 | in d:\1\s.sol
SOLUTION CHECKER: Cost is not correct
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
Hello,
Thanks for your interest in the code and for pointing out this issue!
I ran the code here and was able to reproduce your problem. Possibly, a recent user contribution from 2020 may have disrupted the functionality of the code for these instances with turn penalties.
Let's do two quick checks to diagnose the issue:
-
Just to be sure, verify that have you defined the pre-processor flag "TURN_PENALTIES" (as instructed at
Line 83 in a19d06e
-
Switch to commit 454709b (accessible at https://github.com/vidalt/HGS-CARP/tree/454709be771e33fe3bcaaa5f5ad80e4d530c1457)
After these two actions, do you still face the same problem? If this solves your issue I will try to investigate what went wrong with the more recent commits and fix them, or simply roll back to the legacy version.
1 I defined the pre-processor flag "TURN_PENALTIES"
2 I just tested the commit 454709b (accessible at https://github.com/vidalt/HGS-CARP/tree/454709be771e33fe3bcaaa5f5ad80e4d530c1457). Unforturelately, there are compile errors this this time.
it says it uses uninitialized pointer in insertNoeud(elementPred->myNode,insertionPosition) in LocalSearch.cpp.
Hello,
No problem, I will take a quick look to figure out the issue, some newer compilers are less permissive. Can you indicate to me the version of the compiler that you are currently using?
Hello, please update to the latest commit and let me know if the changes solved your issue. Thanks a lot!
I update to latest commit. but the problem still exists.
see the following log.
C:\Users\lenovo>C:\Users\lenovo\source\repos\Project2\Debug\Project2.exe D:\HGS-CARP-master\Instances\MCGRP-TP\p01-8.dat -type 34 -sol d:\1\s.sol -t 120
| Start of GA | NbNodes : 160 | NbVehicles : 8 |
It 0 | Sol 12299 8 NO-INVALID | Moy 12619.44 -nan(ind) | Div 0.48351042 -nan(ind)
| Val 0.5 0.5 | Pen 42.5 42.5 | Pop 26 0
| NbTotalMovesLS : (RI) 15 | (PI) 0 |
| interSwap 5 | intraSwap 3 | inter2opt 7 | intra2opt 0 |
| CPU Time : 37.458 seconds
NEW BEST FEASIBLE 0 12284 distance : 12284 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 12234 distance : 12234 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 12163 distance : 12163 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 12131 distance : 12131 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11969 distance : 11969 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11888 distance : 11888 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11872 distance : 11872 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11861 distance : 11861 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11607 distance : 11607 nbRoutes : 8 capaViol : 0 lengthViol : 0
NEW BEST FEASIBLE 0 11481 distance : 11481 nbRoutes : 8 capaViol : 0 lengthViol : 0
Time Elapsed : 157224
Number of Iterations : 229
Writing the best solution : distance : 11481 | nbRoutes : 8 | in d:\1\s.sol
SOLUTION CHECKER: Cost is not correct
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
No best known solution (BKS) file has been found, creating a new file
Writing the best solution : distance : 11481 | nbRoutes : 8 | in bks-p01-8.dat
SOLUTION CHECKER: Cost is not correct
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
INFEASIBLE SOLUTION IN CHECKER -- ERASING SOLUTION !!!
I am using visual studio 2019 community version on windows 10.
Thanks a lot for the additional input, I will check this ASAP to track the origin of the issue.
--Thibaut