Giter VIP home page Giter VIP logo

Comments (3)

leonlan avatar leonlan commented on May 30, 2024

We could do something like np.loadtxt:

https://github.com/numpy/numpy/blob/8cec82012694571156e8d7696307c848a7603b4e/numpy/lib/npyio.py#L1061-L1068

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

In #76 we managed to find a way to verify if an instance is in VRPLIB format or not. We can do the same for Solomon instances. The Solomon instances have a fixed file format:

<NAME>

VEHICLE
NUMBER	CAPACITY
<number> <capacity>

CUSTOMER
CUST. NO 	XCOORD.	YCOORD.	DEMAND	READY TIME	DUE DATE	SERVICE TIME
<data row 1>
...
  • We ignore all empty lines.
  • Then we check if the first line contains "VEHICLE"
  • We check that the second line contains "NUMBER" and "CAPACITY"
  • We check that the third line contains two integer values
  • We check that the fourth line contains "CUSTOMER"
  • The fifth line contains the customer header names, but these are inconsistent in number of spaces. For example, sometimes SERVICE TIME is used and sometimes SERVICE TIME is used. So I'm not sure how to check this.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

Closed by #83.

from vrplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.