Giter VIP home page Giter VIP logo

Comments (11)

leonlan avatar leonlan commented on May 30, 2024 1

@N-Wouda I implemented the write_instance and write_solution functions. Hopefully, they are useful!

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

I made a start for writing instances.

  • Find the original VRPLIB reference
  • Check for inconsistencies across the VRPLIB instances
  • Think about the interface: how do we infer from instance which attributes should be written?

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

See http://www.bernabe.dorronsoro.es/vrp/index.html?/Problem_Instances/VRPLIBDesc.html for the original VRPLIB descrption.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

LKH-3 VRPLIB convention

LKH-3 is very well maintained, so I think it's good to support reading those files as well (perhaps long term but not now?)

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

The VRPLIB format consists of a problem specification part and a data part.

  • The problem specification indicates the type of the problem. This includes the name, comments, problem type, dimensions, edge weight type, and problem-specific scalar information (e.g., capacity, duration limit, ...).
  • The data consists of sections, e.g., coordinates, demands, time windows, etc. For most vehicle routing problems, these are node-related attributes. Each section starts with the section name (e.g., DEMAND_SECTION), then $n$ rows of the corresponding data.
  • The file ends with EOF.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

Both for reading and writing files, we should follow the LKH-3 VRPLIB format.

But the Solomon and GH instances on CVRPLIB do not follow the VRPLIB format. What do I want to do with that? The LKH3 instances do follow the VRPLIB format.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

https://www.sintef.no/projectweb/top/vrptw/100-customers/

LKH-3 calls this "Sintef solution style"

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

I have removed the write module because this wasn't ready yet, and I want to speed up the release of V1. So this is an open issue again.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

See this commit for the (removed) write module 885f9cc#diff-6fa8cb67482a47a8390d40bcd32b10d53f6ffd7a723f412d71a486039267557f.

from vrplib.

N-Wouda avatar N-Wouda commented on May 30, 2024

This is periodically useful for the PyVRP instances as well (I'm running into this now with multi-depot VRP). Do you want to be really strict about what's written? A simple dict -> specification/section type writer is easy enough: every value that's iterable becomes a section, and every value that's not becomes a specification. The onus would then be on the user to ensure that data encodes a valid VRPLIB instances, but to be fair, that's on the user anyway when they're writing instances.

from vrplib.

leonlan avatar leonlan commented on May 30, 2024

Yeah that seems like a good solution to me. I'll try to make this feature later this week.

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.