Red Hat Training

A Red Hat training course is available for Red Hat Decision Manager

Chapter 5. Running the Business Optimizer examples

Red Hat Business Optimizer includes a number of examples to demonstrate a variety of use cases.

Prerequisite

Download and install Red Hat Decision Manager from the Red Hat Customer Portal.

Procedure

  1. Download the rhdm-7.0.0.GA-add-ons.zip file from the Red Hat Decision Manager section of the Red Hat Customer Portal.
  2. Extract the Red Hat Business Optimizer engine from the rhdm-7.0.0.GA-planner-engine.zip file.
  3. In the rhdm-7.0.0.GA-planner-engine folder, open the examples directory and use the appropriate script to run the examples:

    Linux or Mac:

    $ cd examples
    $ ./runExamples.sh

    Windows:

    $ cd examples
    $ runExamples.bat

Select and run an example from the GUI application window:

plannerExamplesAppScreenshot
Note

Red Hat Business Optimizer itself has no GUI dependencies. It runs just as well on a server or a mobile JVM as it does on the desktop.

5.1. Running the Red Hat Business Optimizer examples in an IDE (IntelliJ, Eclipse, or Netbeans)

Use the following procedure to run the Red Hat Business Optimizer examples in IntelliJ or Netbeans:

Procedure

  1. Open the file examples/sources/pom.xml as a new project.

    The Maven integration will take care of the rest of the installation.

Use the following procedure to run the Red Hat Business Optimizer examples in Eclipse:

Procedure

  1. Open a new project for the directory examples/sources.
  2. Add all the JARs to the classpath from the directory binaries and the directory examples/binaries , except for the file examples/binaries/optaplanner-examples-*.jar.
  3. Add the Java source directory src/main/java and the Java resources directory src/main/resources.
  4. Create a run configuration:

    • Main class: org.optaplanner.examples.app.OptaPlannerExamplesApp
    • VM parameters (optional): -Xmx512M -server
    • Working directory: examples/sources
  5. Run the run configuration.