Create a Decision Optimization job

The general procedure described here illustrates the integration between the technologies that enable Decision Optimization in IBM Planning Analytics.

About this task

To execute your own optimization within IBM Cloud Pak® for Data as a Service, you must create a project, a connection, data assets, the Decision Optimization experiment, and a model within the project. You can then deploy these assets (model, data assets and connection) to the deployment space. The model can then be deployed and a job created.

Each of the steps listed here includes a link to the comprehensive documentation on IBM Docs that fully explains and illustrates the required action.

Procedure

  1. Create a project.

    If you don’t already have one, create a new project within Cloud Pak for Data as a Service. Open the Projects page, then click New project +. See Creating a project for full detail on how to create in Cloud Pak for Data as a Service.

  2. Create a connection.
    1. Within the project, click Add to project +, then click Connection.
    2. Click Planning Analytics in the list of available connections.
      create connection page
    3. Enter the following connection information on the Connection overview page.
      TM1 server API root URL
      The TM1 Database endpoint is created by concatenating https://+hostname+/tm1/api/+tm1_database_name+/api/v1. For example: https://planning-analytics.ibmcloud.com/tm1/api/PlanningSample/api/v1/ connects to Planning Analytics database named PlanningSample (or Planning Sample – spaces can be trimmed out of the url).
      Authentication Type
      Choose Basic or CAM. CAM provides secured communications with your database.
      Username
      This is the non-interactive ID identified in the Welcome Kit. Ensure this user has permissions for the database you are connecting to.
      Password
      This is the password of the non-interactive ID.

      See Adding connections to projects for full details on adding a connection.

  3. Create a data asset.
    1. Within the project, click Add to project +, then click Connected data when you are prompted to choose an asset type.
    2. Select the connection you created in Step 2.
    3. On the New connected data asset screen, click Select source.
      New data asset screen
    4. Navigate to the cube, then the view that you wish to expose as this data asset. This view will later be used as an input and/or output for your decision optimization job.
      For full details on creating a data asset, see Adding data from a connection to a project.
  4. Create a Decision Optimization experiment.
    1. Within the project, click Add to project +, then click Decision Optimization.
    2. Create the experiment and create a new deployment space if one doesn’t exist yet. You can then import the data assets you set up earlier as inputs in the Prepare data stage,
    3. Create the model (for example, author Python source code).
      For details on how to author an optimization model, see Decision Optimization experiment views and scenarios.

      A tutorial that walks you through the creation of a model is available at Solving and analyzing a model.

  5. Save the model for deployment.
    1. After you successfully run the model, you can save the model for deployment by clicking the Save for deployment option next to the scenario.
      save model for deployment
  6. Promote the model to the deployment space.
    With a model now created as an asset in your project space, you can promote it and all associated assets (data assets and connections) to the deployment space you created earlier.
    1. Click the Option button option button for the model
    2. Click Promote.
      Promote model example
  7. Deploy the model.
    1. Navigate to the deployment space using the link provided in the message that appears after promotion. Alternatively, you can select the Deploy action for the newly promoted model.
      Example of Deploy action
    2. Select the appropriate specification for this new deployment. For complete details on how to deploy assets, see Deploying assets.
  8. Create a job.
    1. From the newly deployed model in your deployment space, click the Create job + button.
    2. Complete the wizard that appears, entering all appropriate information.
      Of particular note is the Choose data stage of the wizard, where you can now link your input and output views. Previously, the data for these views were effectively offline in the project space; creation of this job operationalizes the connection such that every execution is a live connection to Planning Analytics for the associated data assets.

      See Running jobs for further details on creating and running jobs.