OPL models (Decision Optimization)
You can build OPL models in Decision Optimization experiment UI in Cloud Pak for Data.
To create an OPL model in the experiment UI select Create>OPL in the model selection window. You can also import OPL models from a file or import a scenario zip file containing the OPL model and the data. If you import from a file or scenario zip file, the data must be in .csv format. You can however import other file formats that you have as project assets into the experiment UI. You can also import data sets including connected data into your project from the model builder in the Prepare data view.
Inputs and Outputs
Product with the
attributes name, demand, insideCost, and outsideCost, your OPL
model must contain the following:
tuple TProduct {
key string name;
float demand;
float insideCost;
float outsideCost;
};
{TProduct} Product = ...;/// solution
tuple TPlannedProduction {
key string productId;
float insideProduction;
float outsideProduction;
}You can find this example OPL model for a pasta production problem in the Model_Builder folder of the DO-samples. You can download and extract all the samples. Select the relevant product and version subfolder.