Don’t hesitate to contact us:
Forum: discuss.graphhopper.com
Email: support@graphhopper.com
After 6 years since the last major release, we’re excited to announce jsprit 2.0, a significant update to the open-source vehicle routing library.
Modern Java Foundation
jsprit now requires Java 21.
Composable Ruin & Recreate Operators
Independently select and weight ruin and insertion strategies:
Jsprit.Builder.newInstance(vrp)
.addRuinOperator(0.3, Ruin.radial(0.3, 0.5, 10, 70))
.addRuinOperator(0.2, Ruin.kruskalCluster())
.addInsertionOperator(0.7, Insertion.regretFast())
.addInsertionOperator(0.3, Insertion.best())
.buildAlgorithm();
New strategies include Ruin.kruskalCluster() (MST-based clustering) and Insertion.regretFast() (optimized regret-k).
VRP-Managed Indices
Job and vehicle indices are now managed by the VRP, not stored on the objects themselves. Previously, building multiple VRPs – whether for comparing solvers or when the job set changed slightly – would mutate indices on the shared objects, causing subtle bugs. Each VRP now maintains its own index mapping, keeping your jobs and vehicles unchanged.
Algorithm Event System
Full observability into the optimization process with typed events like JobInserted, StrategyExecuted, and AcceptanceDecision.
Declarative Initial Solutions
Specify starting solutions cleanly with SolutionSpec:
SolutionSpec.builder()
.addRoute("vehicle1", "job1", "job2", "job3")
.build();
See the CHANGELOG for full details and migration notes. Key breaking changes: