/timefold-solver

Planning optimization made easy. The open source AI solver.

Primary LanguageJavaApache License 2.0Apache-2.0

timefold logo

Planning optimization made easy.
timefold.ai

Maven artifact License JVM support Commit Activity

Stackoverflow GitHub Discussions GitHub Issues

Get started with Timefold Solver

Build from source

  1. Install JDK 17+ and Maven 3+, for example with Sdkman:

    $ sdk install java
    $ sdk install maven
  2. Git clone this repository:

    $ git clone https://github.com/TimefoldAI/timefold-solver.git
    $ cd timefold-solver
  3. Build it from source:

    $ mvn clean install -Dquickly
  4. Run the examples:

    $ cd examples
    $ mvn exec:java
  5. 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: ai.timefold.solver.examples.app.TimefoldExamplesApp

    • VM options: -Xmx2G (memory only needed when using the big datasets in the examples)

    • Program arguments: (none)

    • Working directory: $MODULE_DIR$ (must resolve to examples directory)

    • Use classpath of module: timefold-solver-examples

Contribute

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

The CI checks against your PR to ensure that it doesn’t introduce errors. If the CI identifies a potential problem, our friendly PR maintainers will help you resolve it.

Code style

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.

Build the Timefold Solver project

Use one of the following ways to build this project:

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

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

  • 🧾 build-doc: mvn clean install in the docs directory creates asciidoctor documentation docs/target/html_single/index.html (~2 min)

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

Timefold Solver was forked on 20 April 2023 from OptaPlanner, which was entirely Apache-2.0 licensed (a permissive license).

Timefold Solver is a derivative work of OptaPlanner, which includes copyrights of the original creator, Red Hat Inc., affiliates and contributors, that were all entirely licensed under the Apache-2.0 license. Every source file has been modified.