Generating a notebook from a scenario in a Decision Optimization experiment
You can generate Python notebooks for existing Python or Modeling Assistant models from your Decision Optimization experiment.
Procedure
To generate a Python model from your current scenario:
- From either the scenario pane or from the Overview, click the menu icon for the scenario that you want to generate a notebook from.
- Select Generate notebook.
- Enter a name for the notebook and click Generate.
Results
A Python notebook containing the Decision Optimization model is saved as an asset in your project.
You can then download this notebook to edit and debug it locally. Then when you re-import it into your project, you can import the model from your notebook into your Decision Optimization experiment.
If you have multiple files in the Build model view, these files are automatically referenced in the generated notebook so that you can read them from the notebook. The Python version for your generated notebook depends on the environment that you configured for your scenario. If the environment was automatically created for your scenario, the notebook uses the default Python version 3.11.