Skip to main content

Celonis Product Documentation

Configuring the optimization model for the object-centric Material Allocation app

The stock transfers proposed by the Material Allocation app are achieved through constraint-based optimization. This capability is provided using a dedicated backend job called Celoptima. Celoptima consumes the KPIs from your Knowledge Model as input, to identify instances of the MaterialMasterPlant object that have excess supply, to be used as the maximum issuing quantity, or uncovered demand, to be used as the maximum receiving quantity.

materialallocation_km_model1.png

In addition to considering these quantities, the model can be expanded to use additional criteria in its objective function and constraints, for example:

  • Labor cost (fixed or variable, if known)

  • Transportation cost (if known - this requires conversion factors to transport units such as shipping containers to be applied in PQL)

  • Customs rates

  • Regional clusters (for example, where stock transfers are only permitted within the European Union or member states of NAFTA)

  • Custom KPIs that you create to show priority

Note

To get custom constraints and objective functions implemented, you’ll need a dedicated Software Engineer, so these are subject to availability.

materialallocation_km_model2.png
Configuration file for the Celoptima job

To run the Celoptima job, you’ll need to pass a job configuration in JSON format, like this example. In the configuration file, you provide the IDs of the relevant data sources and KPIs, and tell the optimization model what decision variables, constraints, and objective function to use.

{
    "data_pool_id": "OCPM Data Pool ID",
    "data_model_id": "ID of the Data Model for your perspective",
    "space_id": "Studio space ID where the app package is",
    "package_id": "App package ID",
    "knowledge_model_id": "App's Knowledge Model ID",
    "knowledge_model_kpis": {
        "common_material_id_kpi": "IM_Dimension_CeloptimaInput__MaterialID", 
        "common_location_id_kpi": "IM_Dimension_CeloptimaInput__LocationID",
        "common_excess_shortage_kpi": "IM_Dimension_MaterialMasterPlant_CALC__ExcessOrShortage"
    },
    "config_file": {
        "generic_plug_ins": {
            "variables": ["movement_common_to_common"],
            "constraints": ["movement_in_constraint", "movement_out_constraint"]
        },
        "objective_function": "minimize_excess"
    }
}

All the elements shown in the example are required. The in-app documentation has details of all the options for configuration and settings. Here’s an explanation of each element in the job configuration:

  • data_pool_id: The ID of your OCPM Data Pool. The ID is at the end of the URL that you see when accessing the OCPM Data Pool. It looks like this example:

    96c381bd-14ab-4530-aa85-48fc7f0b0a83
  • data_model_id: The ID of the Data Model derived from the perspective for your business process. The Data Model is in the OCPM Data Pool, and its ID is at the end of the URL that you see when accessing the Data Model. In this example, the first ID is for a Data Pool, and the second ID is for the Data Model:

    [...]celonis.cloud/integration/ui/pools/8ba31295-25d2-4048-b412-3b61b063e6b0/
     data-configuration/process-data-models/e057dd62-301c-49a2-8dfc-b16803afb337
  • space_id: The ID of the Studio space holding the Knowledge Model you’re using. This ID is included in the URL for any item in the space, right after the spaces/ directory. In this example, the first ID is for the Studio space, and the second ID is the package ID:

    [...]celonis.cloud/package-manager/ui/studio/ui/spaces/1b8a2e65-b62a-472a-b8bf-657e85749a34/
     nodes/68613574-5a75-4707-bc71-f30218647371/settings?tab=GENERAL
  • package_id: The ID of the package holding the Knowledge Model you’re using. Find this ID by clicking the context menu (the three vertical dots) by the package name, and selecting Settings - in the example for space_id it’s the second ID.

  • knowledge_model_id: The ID of the Knowledge Model you’re using. Find this ID by expanding the package structure till you see the Knowledge Model, then selecting it. In this example, it’s the second ID, right after the nodes/ directory:

    celonis.cloud/package-manager/ui/studio/ui/spaces/1b8a2e65-b62a-472a-b8bf-657e85749a34/
     nodes/f7562d44-390e-4c42-b40d-c1347f396307
  • common_material_id_kpi: The ID of the KPI from the Knowledge Model that specifies the material numbers to be used in allocation. In the out-of-the-box setup for the app, it’s IM_Dimension_CeloptimaInput__MaterialID, but you’ll need to change this if you customized it.

  • common_location_id_kpi: The ID of the KPI that specifies the locations to be used in allocation. In the out-of-the-box setup, it’s IM_Dimension_CeloptimaInput__LocationID.

  • common_excess_shortage_kpi: The ID of the KPI that specifies whether a material-location combination has excess (positive value) or a shortage (negative value). In the out-of-the-box setup, it’s IM_Dimension_MaterialMasterPlant_CALC__ExcessOrShortage.

  • additional_material_id_kpi: (Not used in the default app) The ID of the KPI from the Knowledge Model that specifies the material numbers which can be allocated to a lower granularity than location, for example from a plant to a storage location.

  • additional_dimension_location_id_kpi: (Not used in the default app) The ID of the KPI from the Knowledge Model that specifies the locations which can be allocated to a lower granularity than location, for example from a plant to a storage location.

  • additional_dimension_id_kpi: (Not used in the default app) The ID of the KPI that specifies the additional dimension to be used in allocation.

  • additional_dimension_excess_shortage_kpi: (Not used in the default app) The ID of the KPI that specifies whether a material-location-additional combination has excess (positive value) or a shortage (negative value).

  • variables: This array creates variables that allow movement of materials from a plant where the material is in excess to another plant where the material is in shortage. Choose one or more of these values:

    • movement_common_to_common (move quantity between locations)

    • movement_common_to_project (move quantity from location to wild card primary key - also requires the input parameters prefixed additional_)

    • movement_project_to_project (move quantity between wild card primary keys - also requires the input parameters prefixed additional_)

    • movement_project_to_common (move quantity from wild card primary key to location - also requires the input parameters prefixed additional_)

  • constraints: This array creates the constraints that restrict the potential solution space of the optimization model. Choose one or both of these values:

    • movement_in_constraint (allow locations with uncovered demand to receive materials from locations with that material in excess)

    • movement_out_constraint (allow locations with excess supply to send materials to locations with that material in shortage)

  • objective_function: This array creates the objective function that the model is to optimize. Choose one of these values:

    • minimize_excess (minimize excess supply without considering cost parameters)

    • minimize_excess_with_transfer_cost (minimize excess supply considering labor and transportation cost)

    • minimize_excess_with_priority (minimize excess supply based on a custom prioritization KPI)

Running the Celoptima job

When the Celoptima job has been set up in your Celonis team, you can trigger it using a scheduled Action Flow. You need to run the job at least once to create the optimization table and complete setup of the app.

You can create an Action Flow to trigger the Celoptima job by configuring a single “Make a request” HTTP module. For the instructions to set up and configure Action Flows, see Action Flows.

materialallocation_aflow.png

Define the following parameters for the HTTP request:

  • URL: https://your-team-name.your-cluster.celonis.cloud/machine-learning/api/jobs/celoptima/executions

  • Method: POST

  • Headers:

  • Body Type: Raw

  • Content Type: JSON (application/json)

  • Request Content: Pass the job configuration in JSON format that you created for the Celoptima job

Now run the Celoptima job. The output of the Celoptima job’s optimization model is a new table which is pushed to the input data model called CELOPTIMA_MOVEMENT_COMMON_TO_COMMON.

To get the output from Celoptima into your object-centric perspective, you’ll need to create a custom object based on the CELOPTIMA_MOVEMENT_COMMON_TO_COMMON table, and add it into the custom Inventory Management perspective that you set up for the app. You can’t do this until you’ve run the optimization at least once to produce the table. You’ll find instructions to do this in the step-by-step guide that we sent you when you requested the app from Marketplace.