You may download the latest JSR-331 sources and executables from these two zip-files:
- org.jcp.jsr331.tck.cp.zip – it includes samples of constraint satisfaction problems ready to be executed with constraint solvers. For example, double-click on “runBins.bat” to execute the problem from src\main\java\org\jcp\jsr331\samples\Bins.java
- org.jcp.jsr331.tck.linear.zip – it includes samples of constraint satisfaction problems with only linear constraints ready to be executed with LP solvers. For example, double-click on “runInsideOutsideProduction.bat” to execute the problem from src\main\java\org\jcp\jsr331\samples\runInsideOutsideProduction.java
To switch between solvers, you only need to reset the variable SOLVER inside these bat- files. All included solvers are described in the profiles of the pom.xml files inside these projects.
Get it from GitHub. You may download the latest JSR-331 sources and executables from the public GibHub repository – just click on the button “Clone or download” and select “Download ZIP”. When you unzip the downloaded file jsr331-master.zip, it will contain the above two folders.
Use it in your Maven Projects. JSR-331 has been 100% mavenized and is available for automatic download from the public MVN Repository. To add JSR331 to your Maven project, you should simply add the JSR-331 dependencies to your pom.xml file. JavaSolver provides a good example of how it can be done – just take a look at its pom.xml file.