npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

genetics-js-mdccvrp

v1.0.5

Published

Solver for the MDCCVRP using evolutionary algorithms

Downloads

17

Readme

Solver for the Multi Depot Cumulative Capacitated Vehicle Routing Problem

npm version

Introduction

The Multi Depot cumulative Capacitated Vehicle routing Problem is an optimizationproblem for vehicle routes which was recently formulated. Its objective is to minimize the arrival time of a fleet of vehicles to a group of clients, taking into account the capacity ofthe vehicles. This problem can be very useful when applied to natural disaster situations, where the arrival time to the possible victims is crucial.

Installation

The package can be installed through npm:

npm install genetics-js-mdccvrp

Usage

There are two ways to use the package, you can either execute the script solve with the CLI or you can integrate the solver in your web application.

CLI

To execute the solver, run the script solve specifying if the algorithm to execute is the memetic or the random algorithm using the commands of the same name with the arguments below.

| Argument | Description | Required | Default | | :------: | ----------------------------- | -------- | ------- | | -f | Instance location | yes | - | | --fs | Fleet size | yes | - | | --cr | Crossover rate | No | 0.8 | | -p | Population size | No | 20 | | -c | Constructive initializer | No | false | | -r | Random initializer | No | true | | --ls | Local search type (LS or ILS) | No | LS | | --ns | Neighborhood size | No | 5 | | -i | Iterations for the ILS | No | 10 | | -g | Maximum generations | No | 100 | | -t | Maximum time of the execution | No | - |

Solver integration

In order to integrate the solver, the algorithm parameters with the type:

SimpleMemeticParams<
 FitnessProportionalSelectionParams<
   RouteIndividual, List<BaseNode>>, BaseRouteCrossoverParams
 >

Then pass them to the algorithm and it can be executed when passed an instance and a fleet size.

import { SimpleMemetic } from 'genetics-js-mdccvrp';

const algorithm = new SimpleMemetic(algorithmParams);

alogorithm.solve(instance, fleetSize);

Implementations

This package has been used to implement the following projects:

Author

License

This project is licensed under the MIT License