Sample models and notebooks for Decision Optimization
There are several examples presented in this documentation as tutorials and there are many samples provided for IBM Watson Studio.
In this section:
The Decision Optimization GitHub contains a repository of samples for use with IBM Watson Studio. These samples are to be used in the Decision Optimization model builder. This repository also contains Jupyter notebooks which can be imported into Watson Studio.
Examples |
Learn how to ... |
See |
|
---|---|---|---|
Create scheduling models using the Modeling Assistant |
House Construction example |
|
|
Create Python optimization models using the Decision Optimization model builder |
Diet example |
|
|
Multiple scenarios example |
|
||
Create or import DOcplex Python notebooks |
Decision Optimization notebook examples |
|
Decision Optimization model builder samples (Modeling Assistant, Python, OPL)
The following table lists the Decision Optimization samples that are provided in DO-samples in the Decision Optimization GitHub. All these assets use the model builder and contain data.
To run models you must associate a Watson Machine Learning instance with your Watson Studio project and associate a deployment space with your Decision Optimization experiment.
- Download and extract all the DO-samples on to your computer. You can also download just the one sample, but in this case do not extract it.
- Create a project in IBM Watson Studio. Select Create an empty project, enter a project name and click Create.
- In the Overview tab of your project, click add a Machine Learning service and select an existing service instance (or create a new one) and click Select.
- Click Add to Project.
- Select Decision Optimization experiment.
- Select the From file tab in the Decision Optimization experiment pane that opens.
- Click Add file. Then browse to the Model_Builder folder in your downloaded DO-samples. Select the relevant product and version subfolder. Choose your sample .zip file.
- Choose a deployment space from the drop-down menu (or create one) and click Create. If you haven't already associated a Machine Learning service with your project, you must first select Add a service to select or create one, before choosing your deployment space for your experiment.
- Click Create.
Models for Decision Optimization | Problem type | Model type |
---|---|---|
Diet | Blending | Python |
StaffPlanning | Multi-Scenario Planning | Python |
BridgeScheduling | Scheduling | Modeling Assistant |
HouseConstructionScheduling | Scheduling with assignment | Modeling Assistant |
MarketingCampaignAssignment | Resource Assignment (Scenarios 1 - 4) Selection and Allocation (Scenario 4 - Selection) |
Modeling Assistant |
SupplyDemandPlanning | Supply & Demand Planning | Modeling Assistant |
PortfolioAllocation | Selection & Allocation | Modeling Assistant |
PastaProduction | Production | OPL |
Multifiles | Using a model with multiple files. | Python and LP |
Jupyter notebook samples
- Download and extract all the DO-samples on to your computer. You can also download just one sample.
- Create a project in IBM Watson Studio.
- Click Add to Project.
- Select Notebook as your asset type.
- Select the From file tab in the New Notebook pane that opens.
- Name your notebook and browse to select the notebook from the jupyter folder selecting the relevant product and version subfolder in your downloaded DO-samples.
- Click Create Notebook. The notebook is added to your project.
Python notebooks in the Watson Studio Gallery
Decision Optimization Python notebooks are available from the Watson Studio Gallery. To use these in an existing project, open a notebook in the Gallery, click the Add to project button, select your Project and click Create Notebook.