Java-JOpt-TourOptimizer-Examples
This repository is part of our JOpt-TourOptimizer-Suite for Java. It includes an extensive collection of examples (written in Java). This fully functional Maven project can be cloned and used as a base for starting with JOpt-TourOptimizer. Further, a sandbox can be utilized (requiring a running Docker environment), lifting the challenge to set up an IDE.
Contact
If you need any help, please contact us via our company website www.dna-evolutions.com or write an email to info@dna-evolutions.com.
Outline
The project is subdivided into four major types of examples:
Each of the example-sections has its own README.
Further Documentation and Links
- Further documentation - docs.dna-evolutions.com
- Special features - Overview of special features
- Our official repository - public.repo.dna-evolutions.com
- Our official JavaDocs - public.javadoc.dna-evolutions.com
- Our YouTube channel - DNA Tutorials
- Documentation - DNA's RESTful Spring-TourOptimizer in Docker
- Our DockerHub channel - DNA DockerHub
- Our LinkedIn channel - DNA LinkedIn
The changelog of this repository and the underlying JOpt library is available in CHANGELOG.md.
The FAQ of this repository is available in FAQ.md.
Short Introduction
JOpt is a flexible routing optimization-engine written in Java, allowing to solve tour-optimization problems that are highly restricted, for example, regarding time windows, skills, and even mandatory constraints can be applied.
Click, to open video:
Getting Started with the Examples
You can start using our example in different ways.
- Use our sandbox in your browser (Docker required)
- Clone this repository
- Download the Jar directly or as Dependency
- Download our .NET legacy version
Use our sandbox in your browser (Docker required)
In case you want to get started without the hassle of installing Java, Maven and an IDE, we provide a sandbox. The sandbox is based on code-server and can be used inside your browser, the interface itself is based on Visual Code. The sandbox is available via DockerHub (here). You have to host the sandbox in your Docker environment (Please provide at least 2-4Gb of Ram and 2 Cores). You can pull the sandbox from our DockerHub account (The Dockerfile for creating the sandbox is included in this repository). The latest version of our examples is cloned by default on launching the Docker container, and you can start testing JOpt right away.
Preview (click to enlarge):
Starting the sandbox and persist your changes
You must mount a volume to which the examples of this project are downloaded on the container's startup. After re-launching the container, the latest version of our examples is only cloned if the folder is not already existing, keeping your files safe from being overridden.
Launching a sanbox and mount your current directory ('$PWD') or any other directory you want:
docker run -it -d --name jopt-examples -p 127.0.0.1:8042:8080 -v "$PWD/:/home/coder/project" dnaevolutions/jopt_example_server:latest
Using the sandbox
After starting the container, you can open http://localhost:8042/ with your browser and login with the password:
jopt
During the run of your first example file, some dependencies are downloaded, and it will take some time (below 1 minute depending on your internet connection). In case you need help, contact us.
Please visit our tutorial video (approx. 3 minutes duration) hosted on YouTube on how to use our sandbox.
Clone this repository
Clone this repository, import it as Maven project in your IDE and start any example.
Download the Jar directly or as Dependency
The latest native java library of JOpt-TourOptimizer can be either downloaded via our official nexus repository, from our company website or as a a direct download from here (always links the latest release):
As Dependency (Recommended)
However, it is recommended to use our nexus-endpoint as a repository and download the jars as a dependency into your project. You can also search for older versions of JOpt in our nexus repository.
Snippet for Maven
We are recommending always using the latest version of JOpt.
For adding the JOpt dependency to your pom.xml
you can use the following snippet (for help on how to set dependencies, please visit the official Maven documentation):
<dependency>
<groupId>jopt</groupId>
<artifactId>jopt.core.pg</artifactId>
<version>7.4.8</version>
<classifier>shaded</classifier>
</dependency>
or latest (recommended - including log4j-core fix)
<dependency>
<groupId>jopt</groupId>
<artifactId>jopt.core.pg</artifactId>
<version>7.4.9-rc2</version>
<classifier>shaded</classifier>
</dependency>
We are recommending always using the latest version of JOpt (rc).
JavaDocs
In case you want to add our JavaDocs to your project, further add the following dependency:
<dependency>
<groupId>jopt</groupId>
<artifactId>jopt.core.pg</artifactId>
<version>7.4.8</version>
<classifier>javadoc</classifier>
</dependency>
or latest
<dependency>
<groupId>jopt</groupId>
<artifactId>jopt.core.pg</artifactId>
<version>7.4.9-rc2</version>
<classifier>javadoc</classifier>
</dependency>
(The latest JavaDocs version is also available online as a browsable page.)
Repository
In addition, it is mandatory to add our nexus-server as a repository source (for help, please visit the official Maven documentation).
In your pom.xml
add the following repository:
<repository>
<id>jopt4-maven</id>
<url>https://public.repo.dna-evolutions.com/repository/maven-public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Download our .NET legacy version
We still support a legacy .NET version of JOpt. We utilize IKVM.NET that is effectively a Java framework running on top of the .NET's framework.
The latest release candidate dll (archived as zip) as download (7.4.9-rc2-legacy):
The latest release dll (archived as zip) as download (7.4.8-legacy):
The previous release dll (archived as zip) as download (7.4.6-legacy):
The IKVM.NET framework as download:
Non-Maven projects
In case you use Gradle, SBT, IVY, Grape, Leiningen, Builder, or others, you can browse our nexus-repository, select the desired dependency, and look out for the Usage container. Alternatively, you can use an online conversion tool to convert the Maven dependency into your desired format. Please keep in mind that you will have to add our repository in any case.
Prerequisites
- In your IDE as native Java dependency: Install at least Java 8 and Maven
- In our sandbox: Working Docker environment
- In your IDE as .NET legacy version: IKVM libraries imported in your project and a working .NET 4.X Framework.
Agreement
For reading our license agreement and for further information about license plans, please visit www.dna-evolutions.com.
Authors
A product by dna-evolutions ©