Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A Model Class is used to describe what a Model Object will look like in the UI, which logics it uses, what are their calculations, etc.the central configuration point of the Optimization module. It defines the structure and the look and behavior of Model Objects. The user workflow consist of sequence of Steps. In each Step, the user can run a Calculation and then explore and evaluate the results on multiple Tabs.

The Model Class definition is stored in a table with type code MC, which has following fields:

Fields

  • uniqueName*Name Unique name of the Model Class, . It is used in Model Object to reference the Model Class they instantiate. It can be modified Note, that you can modify the uniqueName, but the references won’t be updated automatically.

  • label – Human readable name of the Model Class, displayed to the userusers, when they select which Model Class they want to use for creating a new Model Object.

  • definitionJSON definition of what a Model Object using this Model Class should look like and how it should behave, see belowDefines, how the Model Class instances will look and behave. It stores definitions of Calculations, Steps and Evaluations in a JSON text format.

  • workflowFormulaName – Name of the workflow logic (with workflowType = “model”) which is responsible for initializing building the approval workflow steps, when the user clicks Submit. If not set, when the user submits the model, it is auto-approved and marked as “No Approval Required”.

Model Class Definition

In a Model Class, the definition field is a JSON document that contains three main root elements: calculations, steps and evaluations.

Calculations (calculations)

A list of calculation as defined by the following fields.

Common Fields

  • name* – Name of the calculation, unique in the Model Class.

  • type* – Accepted values:

    • formula – Simple calculation, all actions in the provided logic are done in a sequential order.

    • parallel – Parallel calculation. The calculations done by the logic can be split into more parts (called Items) and the calculation of those Items will be done in parallel.

    • sequence – This calculation does not have a logic, it is only reference to a list of other calculations, which should be executed one by one.

Formula Calculation Fields

  • formulaName* – Unique name of an existing Formula of nature model_calculation, see also Model Calculation Logic .

Sequence Calculation Fields

  • sequence* – List of calculation names defined in this Model Class.

Parallel Calculation Fields

...

. A Calculation defines a calculation process, which can be started from a Step.

Example:

Code Block
languagejson
{
  "definition": {
    "calculations": [
      {
        "name": "calc1",
        "type": "formula",
        "formulaName": "POAI_Test_Calc1"
      },
      {
        "name": "seq",
        "type": "sequence",
        "calculations": [
          "calc2", "calc3"
        ]
      },
      {
        "name": "calc2",
        "type": "formula",
        "formulaName": "POAI_Test_Calc2"
      },
      {
        "name": "calc3",
        "type": "formula",
        "formulaName": "POAI_Test_Calc3"
      },
      {
        "name": "calc4",
        "type": "parallel",
        "formulaName": "POAI_Test_ParallelCalc"
      }
    ]
  }
}

Fields

  • name* – Name of the Calculation, unique within this Model Class.

  • type* – Accepted values:

    • formula – Simple calculation, all actions in the provided logic are done in a sequential order.

    • parallel – Parallel calculation. The calculations done by the logic can be split into more parts (called Items) and the calculation of those Items will be done in parallel.

    • sequence – This calculation does not have a logic, it is only reference to a list of other calculations, which should be executed one by one.

  • formulaName* – Unique name of a Logic. Used only for formula and parallel types.

  • sequence* – List of Calculation names defined in this Model Class. Used only for sequence type.

Steps (steps)

A list of steps as defined by the following fields.

...

A list of tabs as defined by the following fields.

Common Fields

  • name* – Name of the tab, unique in the step.

  • label – Human readable name of the tab, shown in the UI, it defaults to name if not specified.

  • type* – Accepted values:

    • dashboard – The content of the tab will be rendered as a dashboard, i.e. input fields on left side, and portlets on the right side.

    • simple – The content of the tab will show the inputs generated by the logic on the left, and on the right side there will be results from the visible elements NOT as portlets, but rather one after another, as a simple list of values (e.g. similar to quote item calculation results).

    • configurator – The content of the tab will be rendered as the Configurator form, i.e. as a list of various input fields, whose values typically have dynamic dependencies.

    • filtertree – The content of the tab will be rendered as a tree (used for example to visualize the Segmentation Tree in the Negotiation Guidance Accelerator), and when you select/click one node, it will show details of the node on the right side, visualized as calculation results (e.g. similar to quote item calculation results).

...

  • treeName* – Name of the tree to be displayed in the tab. It is used to fetch the tree from the backend.

  • formulaName* – Unique name of an existing Formula of nature model_evaluation to be evaluated when a node of the tree is selected (when the user clicks the node of the tree), see also ​Model Evaluation Logic.

  • selectedNodeIdsInputName* – Name of the input passed to the evaluation formula, containing the array of selected node ID.

Example

Code Block
languagejson
{
  "definition": {
    "steps": [
      {
        "name": "step1",
        "label": "First Step",
        "description": "This step has 1 calculation and 1 tab.",
        "calculation": "calc1",
        "tabs": [
          {
            "name": "tab1",
            "label": "First Tab",
            "type": "dashboard",
            "formulaName": "POAI_Test_Dashboard1"
          }
        ]
      },
      {
        "name": "step2",
        "label": "Second Step",
        "description": "This step has 1 sequence calculation and 3 tabs.",
        "calculation": "seq",
        "tabs": [
          {
            "name": "tab1",
            "label": "First Tab",
            "type": "simple",
            "formulaName": "POAI_Test_Dashboard2"
          },
          {
            "name": "tab2",
            "label": "Configurator Tab",
            "type": "configurator",
            "formulaName": "POAI_Test_Configurator"
          },
          {
            "name": "tab3",
            "label": "Visual Tree",
            "type": "filtertree",
            "treeName": "Segments",
            "formulaName": "POAI_Test_FilterTreeNodeEval",
            "selectedNodeIdsInputName": "selectedNodeIds"
          }
        ]
      }
    ]
  }
}

...

  • name* – Name of the evaluation, unique in the Model Class.

  • formulaName* – Unique name of an existing Formula of nature model_evaluation, see also Model Evaluation Logic .

Example

Code Block
languagejson
{
  "definition": {
    "evaluations": [
      {
        "name": "query_results",
        "formulaName": "POAI_Test_QueryResults"
      }
    ]
  }
}