Scheduling and Resource Allocation

JSR331 Scheduler

To define and solve scheduling and resource allocation problems, Java Solver utilizes JSR331 Scheduler developed by OpenRules, Inc. JSR331 Scheduler is an implementation of a generic scheduling Java API built on the top of the JSR331 constraint programming API available from this GitHub repository as the project org.jcp.jsr331.scheduler.

It is also available through the MVN Repository and can be included in any Maven-based project as an embedded component of the JSR331 by adding the following dependency:

The above scheme represents the major scheduling and resource allocation concepts implemented in JSR331 Scheduler. This representation of scheduling and resource allocation problems follows the concept model introduced in the great product called “ILOG Scheduler” written by Claude LePape and Jean-Francois Puget in 1990s. This presentation explains how to use JSR331 Scheduler.

Sample Problems

The examples of scheduling and resource allocation problems which can be defined and solved with JSR331 Scheduler are provided in the public GitHub project org.jcp.jsr331.tck.cp  in the folder “org.jcp.jsr331.scheduler.samples“.

Let’s consider a simple scheduling examples when we plan to construct a house. The construction requires the following activities with fixed durations and precedence constraints:

Arrows represent temporal constraints like “Carpentry starts after the end of Masonry”. The numbers near each activity represent its durations (in days).

This problem implement in the Java class “ScheduleActivities.java” in the folder “org.jcp.jsr331.scheduler.samples“. Here is its problem definition:

 

Here is a problem resolution part:

It demonstrates how to find one solution, an optimal solutions, or many solutions.