Renewable energy management - IBM/intelligence-suite-supply-chain-solutions GitHub Wiki

Screen Shot 2022-10-04 at 2 31 06 PM Screen Shot 2022-10-04 at 2 31 21 PM

Detail pages:

![Screen Shot 2022-10-03 at 1 12 09 PM](https://user-images.githubusercontent.com/6119806/193640458-63483c21-02b5-4920-aa7d-70142b7a4703.png)

Screen Shot 2022-10-03 at 1 14 31 PM


Prerequisites

This use case assumes you are familiar with implementing solutions in SCIS. You can find relevant tutorials for all of the instructions here in the User interface, Data platform, and Data import-export wikis.

Note - these tutorials are provided as-is for educational purposes only. We do our best to make them fully useable, however there will be gaps as published. If you have suggestions for improvements please submit an issue.


Solution

1. Dashboard functions

The “Energy production” tab contains 4 summary, 1 active filter, 1 filter selection, 1 map, and 4 chart widgets. The “Operations” tab contains contains 1 summary, 1 active filter, 1 filter selection, 1 map, 1 list, 1 starred work queue table, 1 meter, and 1 bar chart widgets.

There are also 2 detail pages. The first is a detail page that allows the user to view all assets in one place; it is the "View all assets" detail page. It can be navigated to by clicking "View all" on the footer link of the Assets table on the Operations tab. The second detail page is the "Asset detail" page that can be navigated to by clicking on a linked Asset ID in the Asset table shown on the Operations tab or on the View all assets detail page.

For description purposes, we will describe a metric indicating an exception or problem as a "KPI" a metric indicating something informational a "measurement". These are the main KPIs and measurements on the dashboard:

Energy Production

KPIs

  • Past 48 hours (chart) - total and predicted energy over the past 48 hours
  • Next 48 hours (chart) - predicted total energy over next 48 hours
  • Past 30 days (chart) - total and predicted energy over the past 30 days
  • Next 30 days (chart) - predicted total energy over next 30 days
  • Plant/asset locations (map) - Map showing plant and asset locations

Measurements

  • Past 48 hours (summary) - Energy produced from assets in the past 48 hours and predicted energy forecast
  • Next 48 hours (summary) - Average wind and energy forecast for the next 48 hours
  • Past 30 days (summary) - Energy produced from assets in the past 30 days and predicted energy forecast
  • Next 30 days (summary) - Average wind and energy forecast for the next 30 days

Operations

KPIs

  • Asset table (list) - Table of first 5 assets with details and link to view all assets page and asset detail page
  • Starred work queues (list) - Link to starred work queues
  • Current conditions (link) - Current location identifier and link to EIS page
  • Plant/asset locations (map) - Map showing plant and asset locations

Measurements

  • Current operating performance (meter) - Summary of over and under energy performance in past 24 hours
  • Energy output quantity by assets (chart) - Total energy output quantity by assets by product part number

View all assets page

KPIs

  • All assets (link) - Table of all assets with details and link to asset detail page

Asset detail page

KPIs

  • Asset details (grid details) - all attributes associated with the selected asset
  • Past 48 hours (chart) - total and predicted energy over the past 48 hours
  • Next 48 hours (chart) - predicted total energy over next 48 hours
  • Past 30 days (chart) - total and predicted energy over the past 30 days
  • Next 30 days (chart) - predicted total energy over next 30 days
  • Plant/asset locations (map) - Map showing plant and asset locations

Measurements

  • Past 48 hours (summary) - Energy produced from assets in the past 48 hours and predicted energy forecast
  • Next 48 hours (summary) - Average wind and energy forecast for the next 48 hours
  • Past 30 days (summary) - Energy produced from assets in the past 30 days and predicted energy forecast
  • Next 30 days (summary) - Average wind and energy forecast for the next 30 days

2. Work queues

  • Low energy duration - Windmills with a forecast of repeated low wind for a certain number of hours in a row.

3. Data model

The business concepts in the Energy management dashboard are driven by the Location, and Product business objects. Supporting information exists in master data objects Product and Location. There are 2 additional business objects that will need to be added as well - Asset and AssetTimeSeries. There are also 4 custom attributes for 2 of these business objects (diameterFloat and heightFloat for Product and currentWindFloat and infoLinkString for Location).


Steps

All json registration content is available in this zip file. Please note - you will need to change the tenantId in all json files to your tenant ID

  1. Load sample data and create custom attributes
  2. Register work queues
  3. Create dashboard widgets
  4. Create dashboards
  5. Test on https://www.supply-chain.ibm.com/

Step 1. Load sample data and create custom attributes

  • Register data import rules to pick up files from object storage (if your tenant does not already have CSV import rules registered)
  • Load sample data to your COS bucket

The first step is to download the data, there are 3 CSV files and 5 JSON files provided.

A. Get your JWT access token.

Documentation provided here.

B. Make the call to create the custom attributes.

You need to create the custom attributes (for more info) in order to ensure that all data will be uploading successfully. For the data provided, you will need to create 4 different custom attributes. For Product you will need diameterFloat and heightFloat. For Location you will need currentWindFloat and infoLinkString.

Use an HTTP tool such as Insomnia.

You will need to make the call to the following URL:

https://api.ibm.com/infohub/run/metadata/api/v1/na/schema/custom-attributes

Request Method: POST

Headers Required:

  • Authorization: Bearer <<JWT>>
  • X-IBM-Client-Id: infohub-<<tenantId>>
  • Content-Type: application/json

Request Body: example:

{
    "tenantId": "<tenant_id>",
    "name":"myAttribute01String",
    "scalarType": "STRING",
    "businessObjectType": "Order"
}

The Request Bodies for the data provided: (Note that you will need to make a new request for each attribute.)

Product

diameterFloat:

{
    "tenantId": "<<tenantId>>",
    "name":"diameterFloat",
    "scalarType": "FLOAT",
    "businessObjectType": "Product"
}

heightFloat:

{
    "tenantId": "<<tenantId>>",
    "name":"heightFloat",
    "scalarType": "FLOAT",
    "businessObjectType": "Product"
}
Location

currentWindFloat:

{
    "tenantId": "<<tenantId>>",
    "name":"currentWindFloat",
    "scalarType": "FLOAT",
    "businessObjectType": "Location"
}

infoLinkString:

{
    "tenantId": "<<tenantId>>",
    "name":"infoLinkString",
    "scalarType": "STRING",
    "businessObjectType": "Location"
}

C. Verify that the attributes are created:

Make a request to the following URL

https://api.ibm.com/infohub/run/metadata/api/v1/na/schema/custom-attributes?tenantId=<<tenantId>>

Request Method: GET

Headers Required:

  • Authorization: Bearer <<JWT>>
  • X-IBM-Client-Id: infohub-<<tenantId>>
  • Content-Type: application/json

The response will be all the custom attributes created for that tenant, you should see all the once created in the last step here.

D. Upload the CSV files

Documentation provided here. After completing the steps you should be able to see the when the import is done and if it was successful in Job Manager for your tenant.

Note: Upload catalog.csv before product.csv and location.csv.

E. Upload the JSON files

Documentation provided here. After completing the steps, you should be able to see the when the import is done and if it was successful in Job Manager for your tenant.


Step 2. Register work queues and actions

POST https://api.ibm.com/infohub/run/metadata/api/v1/na/workqueues
POST https://api.ibm.com/infohub/run/metadata/api/v1/na/

<<>>


Step 3. Create dashboard and detail widgets

POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/widget_definitions
POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/subscriptions/subscribe

Energy production tab

Summary widgets

Active filter widget

Filter selection widget

Map widget

Chart widgets

Operations tab

Summary widget

Starred work queues widget

Meter widget

Active filter widget

Filter selection widget

Map widget

Chart widget

List widget

View all assets page

Asset detail page

Grid details

Charts

Summary

Title

Map

Step 4. Create dashboards and details pages

POST https://api.ibm.com/supplychainui/run/na/api/v1/wms/layout_templates

Energy production tab: template-defaultEnergyProductionLayoutTemplate.json

Operations tab: template-defaultOperationsLayoutTemplate.json

View all assets detail page: template-viewAllAssetsLayoutTemplate.json

Asset detail page: template-assetDetailLayoutTemplate.json


⚠️ **GitHub.com Fallback** ⚠️