Introduction to the Documentation Hub

Illustration on a dark street grid: a blue zone of connected points is linked through a round hub with a layers icon to a lime zone and an orange zone, each with points joined by dashed lines

This hub is the documentation of the JOpt product family. It covers the first setup, the modeling basics, one guide per feature, examples by level, and integration and deployment. To get a container running right away, start with Getting started or the sandbox quickstart.

The JOpt product family

This hub covers the four JOpt products:

ProductWhat it isDocs
JOpt.CoreThe Java library that computes the plans for routing, scheduling and resource planning under real-world constraints; your Java application uses it as a Maven dependencyJOpt.Core overview
JOpt.TourOptimizerThe REST server around the JOpt core: a Spring Boot application in a container imageJOpt.TourOptimizer overview
JOpt.GeoCoderRouterThe geo service: geocoding, distance and driving-time matrices and routes for TourOptimizer; today it runs only inside the JOpt Platform stackJOpt.GeoCoderRouter
JOpt.SolveThe browser application of the JOpt Platform stack: build a scenario on a map, optimize it and look at the routesJOpt.Solve
JOpt.Core is the Java library that computes the plans; your Java application uses it as a Maven dependency. JOpt.TourOptimizer is the REST server around the JOpt core, a Spring Boot application in a container image. JOpt.Solve, the browser application of the JOpt Platform stack, and any other REST client call TourOptimizer. JOpt.GeoCoderRouter supplies geocodes, distance and driving-time matrices and routes to TourOptimizer; today it runs only inside the JOpt Platform stack, next to TourOptimizer.

The diagram opens full size on click.

JOpt.TourOptimizer is one container image that runs in one of two modes. In trusted mode your own backend handles sign-in, tenants and licenses. In auth mode the JOpt Platform stack handles them, and GeoCoderRouter supplies the geo data inside the stack.

JOpt.TourOptimizer is one image. In both modes it has the same REST API, jobs with a job queue and several copies, completion webhooks, admission checks with reason codes, and the JOpt core. Trusted mode is the default: no sign-in, the backend sends the tenant and the license, MongoDB is optional and needed for jobs, synchronous runs and live streams are available. Auth mode runs in the JOpt Platform stack: users sign in with Keycloak, the tenant comes from the token, the license of each tenant comes from the stack, and stored results are always encrypted.

The diagram opens full size on click.

Where to start

You want toStart here
Run a TourOptimizer container and a first optimizationGetting started
Code in a browser IDE without a local Java, Maven or IDE setup; the sandboxes run in DockerSandbox quickstart
Try the Angular demo client in the browser (StackBlitz)Angular demo client
Learn the modeling elements: nodes, resources, time windows, working hoursBasic elements
Follow a first optimization step by stepFirst optimization

How the hub is organized

Getting Started

The quickstart pages, the basic tutorials and the FAQ.

JOpt.Core

The JOpt.Core overview compares the lines of the core per Java version and helps to pick one. The Java 17 line, the Java 25 line, the core releases and the legacy lines follow.

Features & Examples

The three example levels with sample topics: basic for onboarding, advanced for modeling and production, expert for customization
LevelFocusExamples
BasicFundamentals and core modeling patternsBasic examples
AdvancedConstraints from practice and combinations of featuresAdvanced examples
ExpertCustom restrictions and costs, warm starts with your own solution, the algorithm pipeline, early stop on convergenceExpert examples
RESTJSON input for the REST service, built in Java and run locallyREST examples

Every example has its own page, and its source code is on GitHub in Java-TourOptimizer-Examples.

JOpt.TourOptimizer (REST Server)

The REST server around the JOpt core, the same in both modes: the JOpt.TourOptimizer overview, API and clients, Jobs, Checks and limits and Settings.

System Integration

Choose a mode compares the two modes of JOpt.TourOptimizer. The Trusted Mode pages run it behind your own backend, and the JOpt Platform pages describe the stack that runs it in auth mode, with JOpt.GeoCoderRouter.

Integration options

JOpt components are available via:

  • Docker / REST API: language-agnostic integration via OpenAPI 3. For JOpt.TourOptimizer (Docker image dnaevolutions/jopt_touroptimizer:2.1.0), the examples include generated clients for Java, Python and C#, and the Angular demo client in TypeScript. See JOpt.TourOptimizer overview.
  • Native Java dependency: the JOpt core as a Maven dependency in your Java application, without a server. The lines, their Java versions and the Maven coordinates are on JOpt.Core overview.
Three ways to integrate: a self-hosted REST API in a container, a managed SaaS API, and the Java library as a dependency

How JOpt.TourOptimizer works

This part explains the problem JOpt.TourOptimizer solves and how its algorithms work together. The algorithms run in the JOpt core, in your own Java application or inside JOpt.TourOptimizer. An introduction video on YouTube covers the same topic.

Preview of the JOpt introduction video

The problem

A dispatcher assigns tasks or shipments to mobile resources: who visits which customer, in which order and within which time windows. Working-time rules, driver skills, transport rules, customer preferences and agreed appointment times apply at the same time, and some of them conflict. For a small problem a skilled dispatcher can plan by hand. For a large or complex one, planning without an algorithm is practically impossible.

What cost means

JOpt.TourOptimizer looks for the plan with the lowest cost. The cost is made of:

  • the resource costs set with setCost: a fixed cost, a cost per distance and a cost per time (see Resources, cost model);
  • penalties for violated constraints, weighted with JOptWeight properties such as JOptWeight.WorkingTime;
  • optionally CO2 emissions, weighted with JOptWeight.CO2Emission (see CO2 emission).

Three algorithms in sequence

JOpt.TourOptimizer runs three algorithms one after the other. Each starts from the result of the one before. The example algorithm selection shows how to choose the construction algorithm and the phases.

Construction

A deterministic construction algorithm builds a feasible or near-feasible starting solution. One of JOpt's construction algorithms is inspired by the savings algorithm, a common approach to the capacitated vehicle routing problem. The guide Clustering during construction describes the default construction algorithm.

Simulated annealing

Simulated annealing changes the routes and the order of stops to lower the cost. It accepts some worse solutions on the way, with a probability controlled by a starting temperature and a cooling rate, so that it can leave a local minimum (JOpt.Algorithm.PreOptimization.SA.StartingTemperature, JOpt.Algorithm.PreOptimization.SA.CoolingRate, JOpt.Algorithm.PreOptimization.SA.NumIterations). On complex problems it can still settle in a local minimum.

Genetic evolution

The genetic algorithm continues from the simulated annealing result with a population of solutions (JOpt.JOptPopulationSize) over a number of generations (JOptExitCondition.JOptGenerationCount). It explores many variants in parallel and carries the best solutions into each next generation. Random operators add variation; guided operators steer changes toward a lower cost, similar to local search. In the default flow it is the last phase.


Added: 2026-01-03 (JOpt core 7.5.2-j17) | Last updated: 2026-11-27