Getting Started

Get started with Choco-solver.

Quick start

Interested in using Choco-solver in your project? Choco-solver is available as a Java library or a Python package.

Java

The only prerequisite for running Choco-solver is to have Java (Oracle JRE 11 or OpenJDK 11) installed on your machine. We strongly recommend to use a build automation tool, like Maven or Gradle, but adding manually the JAR file to the classpath is still an option.

Maven 3+

Copy-paste the artifact description to your pom.xml:

<dependency>
   <groupId>org.choco-solver</groupId>
   <artifactId>choco-solver</artifactId>
   <version>4.10.14</version>
</dependency>

To test snapshot release, you should update your pom.xml with :

<repository>
    <id>sonatype</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

Gradle 6+

Copy-paste the dependency declaration in your build.gradle:

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.choco-solver:choco-solver:4.10.14'
}

As a stand-alone application

When one wants to manually add choco-solver as a dependency of a project, it’s important to pay attention to the following points:

  • In the latest version, the library is available as a single JAR file that defines what is necessary and sufficient to model and solve problems programmatically and includes additional functions to parse FlatZinc, XCSP3, DIMACS or MPS files directly.
  • The archive is released with dependencies. If one wants an archive without any dependencies, it is recommended to use Maven or Gradle.
  • Finally, the javadoc of each version is also available on line.

The next step is simply to add the jar file to the classpath of your application and eventually the javadoc.

Python

We automatically build 64-bit wheels for Python versions 3.6, 3.7, 3.8, 3.9, and 3.10 on Linux, Windows and MacOSX. They can be directly downloaded from PyPI:

pip install pychoco

Community

Stay up to date on the development of Choco solver and reach out to the community with these helpful resources.

Feel free to meet cho-coders : @cprudhom (Charles Prud’homme) and @jgFages (Jean-Guillaume Fages)

Last modified January 26, 2024: Update _index.md (6e13382)