The end goal of Problem Modeling (Optimization Engine) is to produce a problem description to feed the Optimization Engine.
As soon as possible, graphical models produced with this tool are refined to instantiate an actual multi-agent system. This is done through high-level descriptions that are almost textual translations of the graphical models, except that they allow for more details.
In practice, this description is a Groovy map in the Run Logic. A specific API transforms this map into JSON. Then the backend transforms the JSON problem description into an actual multi-agent system.
In this section, all the code snippets are in YAML, since it is basically JSON but readable by a human.
The steps to create a specific model description are:
-
Get to know the structure of the
Run.groovylogic. -
Define the categories hierarchies.
-
Define the spaces.
-
Define the scopes inside each space.
-
Define the variables inside each scope.
-
Define the criteria inside each scope.
The easiest way to write the description space is by following the graphical description. The binding to the data is done through scopes: inputs and outputs of the Optimization Engine are model tables named after the space and scopes to which they pertain (e.g. Problem_ByProduct_All contains the data for the scope All in the space ByProduct).
Understanding the underlying concepts is important. As a reference, see Main Concepts for Optimization Problems.
This section also provides a problem description sample.
Further in this section:
A problem description does not exist in isolation and is delivered along with a Model Logic responsible for providing the mappings, in the form of Model Tables, between this high-level description of the problem and the actual values coming from the partition’s transactional and master data. This step is documented in the next section Problem Tables (Optimization Engine).