0 / 0
Input and output data for Decision Optimization
Last updated: Aug 12, 2024
Decision Optimization input and output data

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,
outputs['solution'] = solution_df
defines an output table that is called 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.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more