JOpt core for Java 25
The Java 25 line of the JOpt core has versions that end in -j25 and needs Java 25 or newer. JOpt.TourOptimizer runs on it, in trusted mode and in auth mode. Performance, threading and operator work go into the Java 25 line. The Java 17 line gets bug fixes and features too; 7.5.3-rc9-j17, for example, added pausable visits. In the JavaDoc the branch of this line is named j25-edge: JavaDoc of the Java 25 line. All lines of the core are compared on JOpt.Core overview.
This page lists what the Java 25 line needs, what changes for a caller who uses the core directly in a Java application, and its measured run time and cost against the Java 17 line. The changes of each version are in Core releases.
What the Java 25 line needs
The diagram opens full size on click.
- A Java 25 runtime or newer. The class files target Java 25; Java 17 and Java 21 runtimes cannot load the jar.
- The obfuscated jar
jopt:jopt.core.pgwith the classifiershaded, from the public Maven repository repo.dna-evolutions.com/releases. The repository needs no login. - Jackson 3 and Log4j on the class path. The jar does not bundle them. The pom of
jopt.core.pglistsjackson-databindandlog4j-coreas dependencies, so Maven resolves them. - A license in the signed scheme
jopt-ed25519-v1. The core checks it offline. Without a license the core runs with its embedded free license; see License guide: element limits.
The Java 25 line reads and writes JSON with Jackson 3, configured to keep the Jackson 2 behaviour of the earlier releases. Its JSON text is the same as on the Java 17 line, apart from the text form of computed quantities, which the Java 25 line writes in a form that reads back to the same value.
<repositories>
<repository>
<id>dna-releases</id>
<url>https://repo.dna-evolutions.com/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>jopt</groupId>
<artifactId>jopt.core.pg</artifactId>
<version>8.0.0-rc4-j25</version>
<classifier>shaded</classifier>
</dependency>
</dependencies>
8.0.0-rc1-j25 sorts before 8.0.0-j25, although it was released after it. Name the version of the Java 25 line in the pom explicitly.What changes for a caller
A caller that moves from the Java 17 line to the Java 25 line sees these changes:
- License setters:
setLicenseJSON(String)andsetLicenseJSON(File)stay; the older license setters are removed. A refused license gives the error codeLICENSE_REFUSED(1100) with aLicenseRefusedException, and the result future completes exceptionally. - Error codes:
ENTITY_CORRUPT_NULLhas the code 1008 andENTITY_CORRUPT_CORRECTION_FAILEDthe code 1009. - Failures end the future: a refused input check or an optimization that throws completes the result future exceptionally. On the Java 17 line a caller could wait for ever in these cases.
- JSON mapper:
ConfigSerialization.objectMapper()returns a Jackson 3ObjectMapper. - Defaults:
JOptWeight.RelationshipsandJOpt.Algorithm.PreOptimization.SA.doForceReselecthave other defaults than on the Java 17 line. With the changed default, the simulated annealing draws another operator after a move that changes nothing. - Saving an optimization: the Java container format is removed. Save and load an optimization with the JSON snapshot.
- Packaging: the jars with dependencies no longer bundle Jackson and Log4j.
Two properties of the Java 25 line are opt-in. Without them the results are the same as before:
JOpt.Algorithm.Operator.2Opt.Parallelruns the 2-opt operator in parallel.JOpt.Algorithm.Operator.TuningModeselects the operator tuning:none,classical(wall-clock based, not reproducible) oradaptive(deterministic; it changes results and took 11 to 20 percent more run time in the measurement).
Measured run time and cost
The figures below come from the benchmark inputs of DNA Evolutions, measured on one machine with 4 cores. The inputs:
TW_MATRIX: nodes with time windows and a distance matrix;TW_NOMATRIX: the same without a matrix.JOINT_REL: groups of nodes at one location with a joint visit duration, plus relations between nodes.JOINT_SYNC: joint visits and pairs of nodes that start in unison.MULTIDAY: a plan of 60 nodes over several days, where early visits are penalized.DISTANCE,BITTYPE,PND,PNDT,REL_ONLY,JOINT_ONLY: identical nodes that differ only in position, skills with expertise levels, pickups and deliveries, pickups and deliveries with tight capacities, only relations, only joint visits.
8.0.0-j25 against 7.5.3-rc5-j17
8.0.0-j25 ran on Java 25, 7.5.3-rc5-j17 on Java 17. Each cell holds the median of 5 runs, measured on an earlier state of 8.0.0-j25, before its new relationship weight and its load fixes. Each build reports its own cost function, and the relation fixes of 8.0.0-j25 changed how JOINT_REL and JOINT_SYNC count, so these two inputs compare loosely. A negative value means lower cost or shorter run time for 8.0.0-j25.
| Input | Nodes | Cost change | Run time change |
|---|---|---|---|
TW_MATRIX | 100 / 200 / 400 / 800 | -8 / -50 / -36 / -15 % | -46 / -46 / -41 / -41 % |
TW_NOMATRIX | 100 / 200 / 400 / 800 | -5 / -15 / -46 / -16 % | -47 / -43 / -44 / -38 % |
JOINT_REL | 100 / 200 / 400 / 800 | +17 / -28 / -56 / +7 % | -41 / -43 / -44 / -43 % |
JOINT_SYNC | 400 | -36 % | -42 % |
MULTIDAY | 60 | 0 % | -19 % |
Performance mode, TW_MATRIX, TW_NOMATRIX and JOINT_REL | 100 and 400 | -1 to -54 % | -35 to -41 % |
- At 800 nodes 7.5.3-rc5-j17 left nodes unassigned (
TW_MATRIX23,JOINT_REL60); 8.0.0-j25 assigned all of them. - Measured on the same Java version, the run time of 8.0.0-j25 is 15 to 28 percent shorter with the default settings and 13 to 21 percent shorter in performance mode.
A second comparison ran on the release code of 8.0.0-j25: 8 runs per cell at 100 nodes and 4 at 400 nodes. A cell counts as a win or a loss only when the difference is beyond 3 percent and statistically significant (p < 0.05).
| Result | Cells |
|---|---|
| Wins (18) | every 400-node cell (cost or violation minutes -10 to -54 %); at 100 nodes TW_MATRIX (-19 %), JOINT_ONLY (-19 %), PND (-14 %), PNDT (7.5.3-rc5-j17 does not finish), JOINT_SYNC against 7.5.3-rc5-j17 with the relationship weight of the Java 25 line (-26 %) |
| Ties (8) | at 100 nodes TW_NOMATRIX, DISTANCE, BITTYPE, JOINT_REL (with either relationship weight), REL_ONLY (with either relationship weight); MULTIDAY 60 |
| Loss (1) | JOINT_SYNC 100 against 7.5.3-rc5-j17 with its own default relationship weight: the effect of the changed default of JOptWeight.Relationships |
No run of a finished cell left a node unassigned, and the run time was shorter in every cell.
Later versions of the Java 25 line
- 8.0.0-rc1-j25: its savings construction reads the route ends once per call, as the Java 17 line does. Against the construction of 8.0.0-j25 (seeded runs, seeds 1 to 5, the same win and loss rule) it gave 9 wins, 13 ties and 2 losses. On
DISTANCEat 800 and 1,000 nodes it is no longer worse than 7.5.3-rc5-j17. - 8.0.0-rc4-j25: the settle step of a node insertion tests the routes of the insertion in parallel. The results are identical to the serial step;
JOINT_SYNCwith 400 nodes was faster in 5 of 5 paired runs (paired median -4.7 %), the other inputs stayed within the noise.
Known trade-offs
REL_ONLY100 against 7.5.3-rc5-j17 with its default relationship weight (24 runs per side): 9.9 percent more violation minutes. Against 7.5.3-rc5-j17 with the relationship weight of the Java 25 line, 8.0.0-j25 is 11.3 percent lower in cost.BITTYPE100: a tie at +4.9 percent cost, with less lateness and about 3 more soft skill mismatches per run.- On some joint-visit inputs one or two more joint-visit groups stay split than with 7.5.3-rc5-j17 (
JOINT_REL100: 5 to 6 against 4). - The two losses of 8.0.0-rc1-j25 against 8.0.0-j25:
DISTANCE400 with 10 resources (+4.2 %) andBITTYPE400 with 11 resources (+8.9 %).
Security
- The main code of the Java 25 line reads no Java-serialized input. The container importer, the last place that did, is removed with the container format in 8.0.0-rc3-j25.
- At the release of 8.0.0-rc3-j25, no library in the dependency tree of the core had a known advisory.
Related pages
- JOpt.Core overview: all lines of the core and which line to pick
- Java 17 line: the current line
- Core releases: the changes of the newest core versions
- JOpt.TourOptimizer overview: the REST server that runs the Java 25 line
- License guide: the license schemes and the element limits
- Optimization properties: the property keys with their defaults
- Performance mode: the mode of the second row group in the first table
- Choose a mode: the core in your JVM, or JOpt.TourOptimizer in trusted mode or auth mode
- JavaDoc: the API reference of the Java 17 line and the Java 25 line
Added: 2026-11-27 | Last updated: 2026-11-27