Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jsprit

> 编程语言
Open source

jsprit is a java based, open source toolkit for solving rich vehicle routing problems

1.8K stars0 likes1 views
WebsiteGitHub

About

jsprit is a java based, open source toolkit for solving rich vehicle routing problems

jsprit

jsprit is a java based, open source toolkit for solving rich Traveling Salesman Problems (TSP) and Vehicle Routing Problems (VRP).

It is lightweight, flexible and easy-to-use, and based on a single all-purpose meta-heuristic currently solving:

  • Capacitated VRP
  • Multiple Depot VRP
  • VRP with Time Windows
  • VRP with Backhauls
  • VRP with Pickups and Deliveries
  • VRP with Heterogeneous Fleet
  • Time-dependent VRP
  • Traveling Salesman Problem
  • Dial-a-Ride Problem
  • Various combinations of these types

Setting up the problem, defining additional constraints, modifying the algorithms and visualising the discovered solutions is straightforward. It is designed for change and extension with a modular architecture and comprehensive test coverage. More features...

The jsprit-project is maintained by GraphHopper.

Requirements

  • Java 21 or higher

Installation

Maven:

xml
<dependency>
    <groupId>com.graphhopper</groupId>
    <artifactId>jsprit-core</artifactId>
    <version>2.0.0</version>
</dependency>

Gradle:

groovy
implementation 'com.graphhopper:jsprit-core:2.0.0'

Quick Start

…

What's New in 2.0

Independent Operator Selection - Configure ruin and insertion strategies separately:

java
VehicleRoutingAlgorithm algorithm = Jsprit.Builder.newInstance(vrp)
    .addRuinOperator(0.4, Ruin.radial())
    .addRuinOperator(0.4, Ruin.random())
    .addRuinOperator(0.2, Ruin.worst())
    .addInsertionOperator(0.7, Insertion.regretFast())
    .addInsertionOperator(0.3, Insertion.best())
    .buildAlgorithm();

Algorithm Event System - Monitor algorithm execution:

java
AlgorithmEventAdapter adapter = new AlgorithmEventAdapter(algorithm);
algorithm.addListener(adapter);
algorithm.addEventListener(event -> {
    if (event instanceof StrategyExecuted e) {
        System.out.println("Strategy: " + e.strategyId());
    }
});

Other improvements:

  • Regret-k insertion (configurable k)
  • MST-based cluster ruin strategy
  • Declarative initial solutions with SolutionSpec
  • Job.Type enum for cleaner type handling

See CHANGELOG.md for full details.

Upgrading from 1.x? See MIGRATION.md.

Documentation

Please visit docs to learn more.

Modules and Dependencies

Please read NOTICE.md to get to know the direct dependencies of each module.

License

This software is released under Apache License v2.

Contribution

Any contribution is welcome. Feel free to improve jsprit and make pull requests. If you want to contribute to jsprit, fork the project and build your fork, make changes, run tests and make a pull request (see GitHub help for details).

See who has contributed here.

Contact

Forum: In the GraphHopper Forum you can discuss jsprit related issues and get answers to your questions.

Issue Tracker: For bugs and feature requests, use the issue tracker.

Email: If you prefer private communication, contact us via mail.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaalgorithmjavatraveling-salesmanvehicle-routing-problem

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言