Decision Optimization notebook tutorial change the Decision Optimization scenario
To solve with different versions of your model or data, you can create new scenarios in
the Decision
Optimizationexperiment UI. In this tutorial, create a
new scenario and change the data. You can also create a new scenario and change the
model.
About this task
Copy link to section
You can change your input data to examine the effects on the model. For example, you might
exclude hot dogs from the solution to generate a vegetarian variant of the diet.
Procedure
Copy link to section
To create a new scenario:
Click the Open scenario pane icon to open the
Scenario pane.
Use the Create Scenario drop-down menu to create a new scenario from the
current one.
Rename the duplicate scenario.
For example, change Scenario 1
copy to Scenario 2), and click Create.
Working in your new scenario, in the Prepare dataview, open the diet_food data
table in full mode.
Locate the entry for Hotdog at row 9, and set the qmax value
to 0 to exclude hot dog from possible solutions.
Switch to the Build modelview and run the model again.
You can see the impact of your changes on the solution by switching from one scenario to the
other.
Results
Copy link to section
The vegetarian variant of the diet excludes hot dog from the solution but adds raisin bran
and adjusts quantities of other foods.
In the Visualization view, the solution is displayed for the current scenario
in the Solution page. To add another chart to display the previous scenario,
click the Chart icon and then edit it. In the Chart Widget Editor that opens, give this chart a name
and select Scenario 1 from the Select scenario
drop-down menu. Remove the current scenario by clearing the Always show the current
scenario checkbox. Select solution in the
Table section.
Click
Save and close the Chart Widget Editor. You now have two bar charts that
display the two scenarios in your Visualization view.
You can change the type of chart and its display attributes. For example, to see the
raisin bran in the bar chart, change the width to 1000 in the JSON tab of the Chart widget
editor.
You can view summary information for all your scenarios at a glance in the
Overview pane. By selecting
a scenario and clicking the three dots, you can perform actions such as duplicate, rename, generate
a Python notebook, export the scenario, or save it
for deployment, for any selected scenario in this view. See Viewing all scenarios in a Decision Optimization experiment
for more information on how to configure this pane.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.