Multiple model files in a Decision
Optimization
experiment
views
Last updated: Aug 06, 2024
Multiple model files in a Decision Optimization experiment
You can create a Python or OPL models that use multiple model files
For Python or OPL models, in the Build modelview, you can add multiple files by clicking
the + tab next to MODEL, and selecting Add new empty
or Upload Files (to add any type of file). You can also select Add
engine settings file so that you can customize the default CPLEX and CP Optimizer
settings. These settings are then provided in a Visual editor where you can
select different categories and options.
The MODEL tab must always contain your main model. If you try to upload
another file with the same name, for example model.py, you are prompted to
upload it with new name or replace your main model.
You can also replace a model (current tab only) by clicking the Import icon . If you choose to replace a model by using the Replace
icon , all tabs are deleted.
See the Multifile example in the Model_Builder folder
of the DO-samples.
For Python models, if you generate a notebook that has multiple model files, 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.
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.