Input output data

You can access the input and output data you have defined in the model builder using the following dictionaries.

The data that you have imported in the Prepare data view in the model builder is accessible from the input dictionary. You must define each table using the syntax inputs['tablename']. For example, here food is an entity defined to be taken from the table called diet_food:
food = inputs['diet_food']
Similarly, to show tables in the Explore solution view of the model builder you must specify them using the syntax outputs['tablename']. For example,
outputs['solution'] = solution_df
defines an output table called solution which is defined by the entity solution_df in the Python model.

You can find this Diet example in the DO-samples in the Decision Optimization GitHub. To import and run (solve) it in the model builder see Solving and analyzing a model: the diet problem.

You can read the full API documentation on RawGit.