Skip to content

Correctly parse LOWER_ROW edge weight format#135

Merged
leonlan merged 5 commits intomainfrom
fix-tests
Apr 6, 2026
Merged

Correctly parse LOWER_ROW edge weight format#135
leonlan merged 5 commits intomainfrom
fix-tests

Conversation

@leonlan
Copy link
Copy Markdown
Member

@leonlan leonlan commented Apr 5, 2026

Closes #134.

  • I incorrectly assumed LOWER_ROW matrices must be given in strict triangular form, but the values may be spread arbitrarily across lines as long as it matches the expected number of elements for a triangular matrix. Not strictly mentioned as TSPLIB95 specification in the Reinelt 1991 paper, but LKH3's parser also handles these cases.
  • In Bug in distance calculation from flattened matrix #40, the Eilon instance was incorrectly assumed to use a different format based on the paper, and a special case was added to handle it. This was wrong: CVRPLIB treats it as a row-wise, lower triangular matrix, which is now handled correctly without special casing.

@leonlan leonlan changed the title Remove eilon shortcut Correctly parse LOWER_ROW edge weight type Apr 5, 2026
@leonlan leonlan changed the title Correctly parse LOWER_ROW edge weight type Correctly parse LOWER_ROW edge weight format Apr 5, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5d8a8ca) to head (7cb9794).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #135   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          230       215   -15     
=========================================
- Hits           230       215   -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leonlan leonlan requested a review from N-Wouda April 5, 2026 19:22
Copy link
Copy Markdown
Member

@N-Wouda N-Wouda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leonlan leonlan merged commit f27d946 into main Apr 6, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

Bug with LOWER_ROW edge weight

2 participants