Este conteúdo não está disponível no idioma selecionado.
Chapter 14. Create a Solver in Decision Central
The Solver editor creates a solver configuration that can be run in the Execution Solver or plain Java code after the KJAR is deployed.
You can edit and create Solver configurations in Decision Central.
Prerequisite
Red Hat Decision Manager has been downloaded and installed. Your project has been designed and deployed with all relevant assets configured.
This example uses the provided Employee Rostering sample project to demonstrate Solver features.
Procedure
-
In Decision Central, click Menu
Projects, and click on your project to open it. -
In the Assets perspective, click Create New Asset
Solver configuration In the Create new Solver configuration window, type a name for your Solver and click Ok.
This opens the Solver configuration editor.
In the Score Director Factory configuration section, define a knowledge base that contains scoring rule definitions.
Select one of the knowledge sessions defined within the knowledge base.
The sessions can be managed in the Project perspective in Decision Central by clicking Menu
Projects. NoteRed Hat Business Optimizer uses a default knowledge session if none is specified.
- Click the Validate button to validate the Solver configuration. This will actually build a Solver, which will notify you of most issues in your project without the need to deploy and run it.
By default, the Solver configuration automatically scans for all planning entities and planning solution classes. If none are found (or too many), validation fails.
14.1. Configure Solver termination Copiar o linkLink copiado para a área de transferência!
By default, the planning engine is given an unlimited time period to solve a problem instance.
This might be enforced by some scenarios (for example, real time planning), it is useful to have a mechanism to control total duration of the solving process.
Refer to OptaPlanner documentation for more information on supported termination types.
The Solver can be terminated manually using the Decision Server REST API.
Prerequisite
You have deployed a project and created a Solver in Decision Central.
Procedure
- Open the Solver editor,
- In the Termination section, click Add to create new termination element within the selected logical group.
Select a termination type from the drop-down list. This is added as an input field in the termination configuration.
Termination elements are organized into a tree structure.
The editor supports definition of logical groups (represented by termination type Nested termination), which join multiple termination elements using logical operators (And/Or). The scope of the operator is limited by the logical group in which it is defined.
Click Remove to remove the termination element from the termination tree.
Removing the root element of a logical group removes its child elements.