此内容没有您所选择的语言版本。
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
-
Download the
rhdm-7.0.0.GA-add-ons.zipfile from the Red Hat Decision Manager section of the Red Hat Customer Portal. -
Extract the Red Hat Business Optimizer engine from the
rhdm-7.0.0.GA-planner-engine.zipfile. In the
rhdm-7.0.0.GA-planner-enginefolder, open theexamplesdirectory and use the appropriate script to run the examples:Linux or Mac:
cd examples ./runExamples.sh
$ cd examples $ ./runExamples.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow Windows:
cd examples runExamples.bat
$ cd examples $ runExamples.batCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Select and run an example from the GUI application window:
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.
Use the following procedure to run the Red Hat Business Optimizer examples in IntelliJ or Netbeans:
Procedure
Open the file
examples/sources/pom.xmlas 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
-
Open a new project for the directory
examples/sources. -
Add all the JARs to the classpath from the directory
binariesand the directoryexamples/binaries, except for the fileexamples/binaries/optaplanner-examples-*.jar. -
Add the Java source directory
src/main/javaand the Java resources directorysrc/main/resources. Create a run configuration:
-
Main class:
org.optaplanner.examples.app.OptaPlannerExamplesApp -
VM parameters (optional):
-Xmx512M -server -
Working directory:
examples/sources
-
Main class:
- Run the run configuration.