An automated rostering service powered by OptaPlanner
Install Docker and run the following on the command line:
docker build -t ctrl-shift-standalone .
docker run -p 8080:8080 --rm -it -e SPRING_PROFILES_ACTIVE=dev ctrl-shift-standaloneThis takes a few minutes on the first time. The application will be automatically populated with test data.
Build the project with maven in the project’s root directory:
mvn clean install -DskipTests -DskipITsAfter building the project, run the application with:
java -jar optaweb-employee-rostering-standalone/target/optaweb-employee-rostering-standalone-*-exec.jarThen open http://localhost:8080/ to see the web application.
Alternatively, run npm start in optaweb-employee-rostering-frontend to start the frontend in one terminal,
and run mvn spring-boot:run in optaweb-employee-rostering-backend to start the backend in another terminal.
After building the project above, run the benchmark application with:
java -jar optaweb-employee-rostering-benchmark/target/optaweb-employee-rostering-benchmark-*.jarNote: make sure to run the project application and benchmark application on different ports if they are run simultaneously.
After benchmarking is complete, a benchmark report will be generated in the local/benchmarkReport directory.
Open the index.html file in your browser to view the benchmark results.
To configure the benchmarker, modify the employeeRosteringBenchmarkConfig.xml file found in the
optaweb-employee-rostering-benchmark/src/main/resources directory. Make sure to rebuild the project after modifying the
config file for the benchmarker changes to be applied.
Refer to the OptaPlanner Docs for more information on benchmark tweaking.
$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk8
$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
$ which java
/usr/bin/javaBoth IntelliJ and Eclipse formatters are available here: https://github.com/kiegroup/droolsjbpm-build-bootstrap/tree/master/ide-configuration
Configure your IDE to run the main class, which is in
org.optaweb.employeerostering.OptaWebEmployeeRosteringApplication in optaweb-employee-rostering-backend repository.
You will need a local SMTP server to receive emails containing the one-time password.
# Start
$ sudo postfix start
# Stop
$ sudo postfix stop
# Status
$ sudo postfix status