About cookies on this site Our 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 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.
Last updated: Aug 12, 2024
You can access the input and output data you defined in the experiment UI by using the following dictionaries.
For Python DOcplex models, the data that you imported in the Prepare data
view in the experiment UI is accessible from the input dictionary. To
access your imported data you must define each table with the following syntax
inputs['tablename']
. For example, in this line of code, food is an entity that is
defined from the table called diet_food
:
food = inputs['diet_food']
Similarly, to show tables in the Explore solution view of the experiment UI you must specify them using the syntax
outputs['tablename']
. For example,
defines an output table that is calledoutputs['solution'] = solution_df
solution
. The entity solution_df
in the Python model defines this
table.You can find this Diet example in the Model_Builder folder of the DO-samples. To import and run (solve) it in the experiment UI, see Solving and analyzing a Decision Optimization model: the diet problem.
Was the topic helpful?
0/1000