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

[MOST IMPORTANT] Interface EAX and LKH via C(++) interface #50

Open
jakobbossek opened this issue May 9, 2020 · 0 comments
Open

[MOST IMPORTANT] Interface EAX and LKH via C(++) interface #50

jakobbossek opened this issue May 9, 2020 · 0 comments

Comments

@jakobbossek
Copy link
Owner

Eventually, we need to interface those solvers via R's C/C++ interface instead of calling them by plain system calls. Actually, after 5 years I had to cope with a weird issue one more time.

x = "path/to/regular/tsp/instance.tsp"
r = runSolver("eax", x, solver.pars = list(cutoff.time = 2))
sh: line 1: 58008 Abort trap: 6           '/Users/bossek/repos/research/tsp/TSPAS/solvers/EAX/main' 1 filedcd134cbf3a6.out 100 30 /Users/bossek/repos/research/tsp/TSPAS/instances/evolved1000/eax---lkh---sophisticated/1000-10.tsp 0 2 8701 0 0 1 0 > /dev/null 2> /dev/null
Fehler in file(file.sol, "r") : kann Verbindung nicht öffnen
Zusätzlich: Warnmeldung:
In file(file.sol, "r") :
  kann Datei 'filedcd134cbf3a6.out_BestSol' nicht öffnen: No such file or directory

Actually, the reason for the crash was that the NAME field in the file WAS TOO LONG! The following is an excerpts from EAX to import TSPlib instances. Here, the 'word' string is limited to 80 chars and everything above leads to a crash! Who decided to go for this restriction to 80 chars!? Took me >1h of lifetime to figure this one out.

char word[ 80 ], type[ 80 ];
...

  ////// read instance //////
  while( 1 ){
    if( fscanf( fp, "%s", word ) == EOF )
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant