Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vrpinstances

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vrpinstances

enriches json vrp instances and offers benchmark instances

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

#VRP Instances This module parses .vrp instances in .json format and returns a custom format with distance matrix. Only euclidian distance is available. The module also has a list of CVRP Instances: Set A and B from Augerat et al..

Usage

You can use vrptojson to parse .vrp files.

const vrp = require("vrpInstances");
const instance = vrp.parse(vrpFileInJs);

Example output for the test instance file in vrptojson

{ best: 100,
  n: 5,
  distances:
   { '1':
      { '1': 0,
        '2': 14.142135623730951,
        '3': 14.142135623730951,
        '4': 14.142135623730951,
        '5': 14.142135623730951 },
     '2':
      { '1': 14.142135623730951,
        '2': 0,
        '3': 28.284271247461902,
        '4': 20,
        '5': 20 },
     '3':
      { '1': 14.142135623730951,
        '2': 28.284271247461902,
        '3': 0,
        '4': 20,
        '5': 20 },
     '4':
      { '1': 14.142135623730951,
        '2': 20,
        '3': 20,
        '4': 0,
        '5': 28.284271247461902 },
     '5':
      { '1': 14.142135623730951,
        '2': 20,
        '3': 20,
        '4': 28.284271247461902,
        '5': 0 } },
  demand: { '1': 0, '2': 10, '3': 10, '4': 10, '5': 10 },
  coords: ...,
  c: 100,
  depot: 1 }

You can also get instances of the Augerat et al. A and B set directly with

const instance = vrp.get('A-n32-k5');

You can use vrp.listInstances() to see a list of all available instances.

Keywords

FAQs

Package last updated on 01 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc