Comments (4)
OK, that we can do! Let's choose #
as line comment syntax. Will you make a PR for this? This function needs to be modified to ignore the comments:
It takes the instance text as a string. Lines that are empty when stripped or lines that start with #
should be ignored. All other lines are returned as a list.
from vrplib.
(I'd not mind implementing this, but I think it needs a bit of discussion first)
from vrplib.
I think this is useful to have, but we need to think a bit more about the comment syntax.
Ideally, we use something that minimizes the impact of this change and is also future-proof.
For the case where we only allow comments on distinct lines, we have a lot more freedom, since it's not expected that any data or specification line will start with ;
, #
or //
. But when we also want to handle the case where we ignore everything after the comment line syntax, we have to deal with many more variations. I can imagine that some instances use ;
or #
in the COMMENT specification. One issue with //
is that it is used in URLs: for example, a COMMENT specification may include an URL to the web page that is hosting the instance.
Could you maybe provide an example on how you would like to use comments in the PyVRP test instances? If it suffices to have comments only on separate lines, then I think we should implement //
as comment line syntax. But if you think it'd be really useful to have comments on "data" lines as well, then we might need to think a bit more about the syntax. Maybe triple forward slashes ///
?
from vrplib.
I think just line comments are fine, I don't really see a need for comments at the end of data lines. So something like "every line that starts with a ;
is a comment" could work.
from vrplib.
Related Issues (20)
- Check if TSPLIB95 can be read
- Optional distance computation for large instances
- Ignore -1 in depot section HOT 1
- Specify instance and solution formats in README
- Supersede TSPLIB HOT 1
- Prize-collecting and benchmark instances HOT 5
- Validate instance and solution data
- UnicodeDecodeError when reading SINTEF solution file HOT 2
- Raise warning when empty instance/solution
- Documentation HOT 4
- Distance Matrix Rounding HOT 4
- Deprecate downloading instances
- Ragged arrays
- Extend VRPLIB format with arc list
- Handle rounding conventions HOT 1
- VRPLIB v2 HOT 2
- Reindex sections based on indices
- Parse large instances with 15K or 30K nodes HOT 1
- Ordering issue in VRPLIB files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vrplib.