Ways to use Decision Optimization for Watson Studio

To build Decision Optimization models, you can create Python notebooks using DOcplex, a native Python API for Decision Optimization or use the Decision Optimization model builder which has more benefits and features.

There are different ways you can use Decision Optimization, depending on your skills and expertise:

  • With Python notebooks using DOcplex, a native Python API for Decision Optimization. This requires Operational Research (OR) modeling expertise to create variables, objectives, and constraints to represent your problem.
  • With the model builder (an interface which facilitates workflow and provides many other features) to build and run (solve):
    • Python models using DOcplex
    • Modeling assistant models (which enables you to formulate models in natural language). This requires little to no knowledge of OR and does not require you to write Python code. This feature is currently available for certain model types. See Selecting a Decision domain in the Modeling Assistant.
    • OPL models
Figure 1. Modeling and solving with the Decision Optimization model builder
Chart showing workflow and different ways to use the model builder

Decision Optimization model builder features

The model builder is an interface which facilitates workflow where you can easily:
  • Select and edit the data relevant for your optimization problem
  • Run optimization models in a user-friendly environment
  • Generate a notebook from your model, work with it as a notebook, then reload it as a model
  • Compare multiple scenarios
  • Visualize data and solutions for one or several scenarios
  • Save models that are ready for deployment (not currently available in the Beta version)

See Decision Optimization model builder views and scenarios.

The following table highlights how you can perform different functions both with and without the model builder.

Table 1. Decision Optimization with the model builder
To... Jupyter notebook Decision Optimization model builder
Python OPL models Modeling Assistant

Manage data

Import data from Projects

Import data from Projects and edit data in the Prepare data view

Import data from Projects and edit data in the Prepare data view

Import data from Projects and edit data in the Prepare data view

Relationships in your data are intelligently deduced.

Formulate and run optimization models

Create a model formulation from scratch in a Python notebook. using the DOcplex API.

With notebooks individual cells can be run interactively which facilitates debugging.

Create a model formulation from scratch in Python.

Import and view a model formulation from a notebook or file.

Edit the imported Python model directly.

Export your model as a notebook. With notebooks individual cells can be run interactively which facilitates debugging.

Create a model formulation from scratch in OPL.

Import and view a model formulation from an OPL file.

Edit the imported OPL model directly.

Create a model formulation from scratch by selecting from the proposed options expressed in natural language.

Import and view a Modeling Assistant model formulation from a scenario.

Edit the imported model directly.

Create and compare multiple scenarios

Write Python code to handle scenario management.

Create and manage scenarios to compare different instances of model, data and solutions. See Scenario panel.

Create and share reports

Create reports in your notebooks using Python data visualization tools.

Rapidly create reports in the Visualization view using widgets, pages and a JSON editor.

Download your report as a JSON file to share with your team.

Deploy a model

Deploy notebooks using Watson Machine Learning REST API or Python client

Deploy your Decision Optimization prescriptive model and associated master data once and then submit job requests to this deployment with only the related transactional data. This can be achieved using the Watson Machine Learning REST API or using the Watson Machine Learning Python client.