AI constraint solver in Java to optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling, conference scheduling and other planning problems.
3192 917 173 0

:projectKey: org.optaplanner:optaplanner :sonarBadge: image:{projectKey} :sonarLink: link="{projectKey}"

:branch: main

:jenkinsUrl: :branchJenkinsUrl: {jenkinsUrl}/job/{branch} :toolsFolderJenkinsUrl: {branchJenkinsUrl}/job/tools :releaseFolderJenkinsUrl: {branchJenkinsUrl}/job/release


image:["Maven artifact", link=""] image:["Stackoverflow", link=""] image:[ "Join Zulip Chat", link=""] image:["Commit Activity", link=""] image:["Livense", link=""] image:["JVM support", link=""] image:["Maven",link=""] image:["Code size", link=""]

{sonarBadge}&style=for-the-badge&metric=reliability_rating["Reliability Rating", {sonarLink}] {sonarBadge}&metric=security_rating["Security Rating", {sonarLink}] {sonarBadge}&metric=sqale_rating["Maintainability Rating", {sonarLink}] {sonarBadge}&metric=coverage["Coverage", {sonarLink}]

A fast, easy-to-use, open source AI constraint solver for software developers

== Looking for Quickstarts?

OptaPlanner's quickstarts are located in the[optaplanner-quickstarts repository].

== Quick development start

To build and run from source:

$ mvn clean install -Dquickly $ cd optaplanner-examples $ mvn exec:java

To develop with IntelliJ IDEA, Eclipse or VSCode, open the root pom.xml as a new project and configure a Run/Debug configuration like this:

  • Type: Application
  • Main class:
  • VM options: -Xmx2G -server (memory only needed when using the big datasets in the examples)
  • Program arguments: (none)
  • Working directory: $MODULE_DIR$ (must resolve to optaplanner-examples directory)
  • Use classpath of module: optaplanner-examples

== Contributing to OptaPlanner

This is an open source project, and you are more than welcome to contribute :heart:!

=== Time to make a change?

Every change must be submitted through a GitHub pull request (PR). OptaPlanner uses continuous integration (CI). The OptaPlanner CI runs checks against your branch after you submit the PR to ensure that your PR doesn't introduce errors. If the CI identifies a potential problem, our friendly PR maintainers will help you resolve it.

=== Contributing

. Fork it ( . Create your feature branch: (git checkout -b feature). . Commit your changes with a comment: (git commit -am 'Add some feature'). . Push to the branch to GitHub: (git push origin feature). . Create a new pull request.

=== Code standards

Your code is automatically formatted according to the Import and Code Style conventions during every Maven build. CI checks enforce those conventions too, so be sure to build your project with maven before creating your PR:

mvn clean install

For information about how to set up code style checks, see[IDE Setup Instructions].

=== Building your OptaPlanner project

Use one of the following ways to build your OptaPlanner project:

  • :rocket: build-fast: mvn clean install -Dquickly skips any checks and code analysis (~1 min)

  • :hammer: build-normally: mvn clean install runs tests, checks code style, skips documentation (~17 min)

  • :receipt: build-doc: mvn clean install at optaplanner/optaplanner-docs creates asciidoctor documentation target/optaplanner-docs-*/html_single/index.html (~2 min)

  • :mechanical_arm: build-all: mvn clean install -Dfull runs all checks + creates documentation and distribution files (~20 min)

== OptaPlanner CI status

You can check the CI status of the OptaPlanner repositories from the[Chain Status webpage].

=== Jenkins CI Jobs (need VPN access) ===

All Jenkins jobs can be found under the OptaPlanner folder: {jenkinsUrl}

Interesting Jenkins CI jobs (need VPN access):

  • {toolsFolderJenkinsUrl}/job/update-quarkus-all/[Update Quarkus version]
  • {toolsFolderJenkinsUrl}/job/update-drools-optaplanner/[Update Drools version]
  • {releasefolderjenkinsurl}/job/optaplanner-release[Release pipeline] (only available on release branches)
  • {releasefolderjenkinsurl}/job/optaplanner-post-release[Post-Release pipeline] (only available on release branches)