Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the following code will throw an error
This is because tsplib95 will miss the EOF in its regex if the user does not follow it by a blank space. This does not just affect tour loading but if you put extra info in a comment field which comes last then the EOF would be loaded in with the comment which is weird. I have fixed this by adding a new non-capturing group to the regex which will catch the EOF if it is at the very end. This match does have the consequence that the last keyword may then be None and so I have also addressed that.
Also, a small nit is that in the original TSP_LIB files, they do not add an extra -1 when there is just one tour.