1.0.5 • Published 3 years ago

genetics-js-mdccvrp v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.

ArgumentDescriptionRequiredDefault
-fInstance locationyes-
--fsFleet sizeyes-
--crCrossover rateNo0.8
-pPopulation sizeNo20
-cConstructive initializerNofalse
-rRandom initializerNotrue
--lsLocal search type (LS or ILS)NoLS
--nsNeighborhood sizeNo5
-iIterations for the ILSNo10
-gMaximum generationsNo100
-tMaximum time of the executionNo-

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

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago