Creating KPIs

You create a Key Performance Indicator (KPI) to define the performance of a simulation.

About this task

To obtain meaningful comparisons, simulations measure Key Performance Indicators (KPIs) against the results of an execution. KPIs define how you calculate the performance of a simulation, and how the result is presented in the simulation report. You can use multiple KPIs for each simulation.

There are two types of KPI:

Standard KPI
The standard KPI is used to calculate the performance of a simulation, but does not support parallel execution. Add this type of KPI if the selected scenario provider within the DVS format implements IlrScenarioProvider.
KPI Result Aggregator
The KPI Result Aggregator supports parallel execution of a simulation. Add this type of KPI together with an associated standard KPI if the selected scenario provider within the DVS format implements IlrParallelScenarioProvider. The standard KPI in this case performs the calculation of the performance for each of the simulation parts.

When you create a KPI, Rule Designer generates Java™ classes that you must edit to implement the required code. To enable business users to run a simulation and receive a report, you must enable use of the KPI in Decision Center.

Procedure

To create a KPI in the DVS Format editor and make it available to business users:

  1. In the DVS Format editor, click New in the KPI section. Either the KPI Definition dialog or the KPI Result Aggregator Definition dialog opens depending on the type of scenario provider you currently have in the DVS format. Go to step 2 if you need a standard KPI, or step 3 if you need a KPI Result Aggregator.
  2. In the KPI Definition dialog:
    1. In the Display name field, enter the name displayed in the report for that KPI.
    2. In the Class name field, click Create.
    3. In the New DVS KPI dialog, enter a name for the package in which to store the KPI classes in the Package name field.
    4. In the Class name field, enter a name for the main KPI class.
    5. Select a Result type.

      The standard types are Text, Number, and Map. However, you can select the Custom option and create a new class, if you do not want to use the standard KPI results.

    6. In the Decision Center renderer class name field, enter a name for the KPI renderer class.

      The renderer class defines the way the KPI is presented in the Decision Center report.

    7. Click Finish. Rule Designer generates the Java class templates in the src/<PackageName> directory of the DVS project.
    8. In the KPI Definition dialog, click OK.
    Go to step 7.
  3. In the KPI Result Aggregator Definition dialog:
    1. In the Display name field, enter the name displayed in the report for that KPI.
    2. In the Class name field, click Create. The New KPI Result Aggregator wizard opens.
  4. In the New KPI Result Aggregator wizard, click Create new KPI Result Aggregator or Enable parallel execution for an existing KPI, and then click Next. Depending on which option you select, go to step 5 to create a new KPI Result Aggregator and a new standard KPI, or step 6 to create a new KPI Result Aggregator and reuse an existing standard KPI.
  5. In the KPI Result Aggregator implementation classes page:
    1. Enter a name for the package in which to store the KPI classes in the Package name field.
    2. In the Class name field, enter a name for the main KPI class.
    3. Select a Result type. The standard types are Text, Number, and Map. However, you can select the Custom option and create a new class, if you do not want to use the standard KPI results.
    4. In the Decision Center renderer class name field, enter a name for the KPI renderer class. The renderer class defines the way the KPI is presented in the Enterprise console report.
    5. Click Finish. Rule Designer generates the Java class templates in the src/<PackageName> directory of the DVS project.
    6. In the KPI Result Aggregator Definition dialog, click OK.
    Go to step 7.
  6. In the KPI Result Aggregator implementation and associated classes page:
    1. Enter a name for the package in the Package name field in which to store the KPI classes.
    2. In the Class name field, enter a name for the main KPI class.
    3. In the Associated DVS KPI menu select the KPI class to which you want to enable parallel execution.
    4. Click Finish.
    5. In the KPI Result Aggregator Definition dialog, click OK.
  7. Your new KPI shows in the KPI section of the format editor. You must now implement the required code in the Java class templates.

    The DVS Project contains at least one KPI class template, a renderer class template, and a result class template if this option is selected. The KPI Result Aggregator class is generated only if you have a parallel scenario provider in the DVS format.

    Java class template Definition
    MyKPI.java An implementation of IlrKPI that computes the results.

    It computes the results for the simulation parts if combined with a KPI Result Aggregator.

    MyKPIResultAggregator.java An implementation of IlrKPIResultAggregator that computes the aggregated results.
    MyKPIRenderer.java An implementation of IlrScenarioSuiteKPIRenderer that defines how to display the KPI results in the Enterprise console report.
    MyKPIResult.java (optional) An implementation of IlrKPIResult that defines a custom type of KPI results.

    To edit the KPI classes:

    1. In the DVS project, double-click the classes in src/<PackageName>.

      The Java class templates include TODO comments to indicate the required parts.

    2. Open the Tasks view to display the list of TODO tasks in the Java class template.
    3. Replace the TODO comments by the required code.
    4. Save the changes.
  8. After you have implemented your new KPI in Rule Designer, you must make it available to business users in the Enterprise console.

    To make the KPI available in the Enterprise console:

    1. Repackage the SSP and Decision Center archives.
    2. Deploy the repackaged files to your application server.
  9. In the Enterprise console, go to Project > Edit Project Options > Test Suite / Simulation Options to make formats that you create or modify in Rule Designer and deploy to Decision Center accessible to the business user. For more information, see the online help.