Trying Decision Optimization on Cloud beta: part 3, OPL
JeanFrancoisPuget 2700028FGP Visits (6634)
We have been using CPLEX on the cloud in a previous post. Let us now look at models written with our OPL modeling language. Using a high level modeling language such as OPL can be more productive. It also enables the use of cons
We assume from now on that we have both an IBM ID and a valid registration for IBM Decision Optimization on Cloud. If not, then please refer to the onboarding steps described here.
Let us go to the Deci
Let's sign in, which should lead us to the welcome page again. This time, we see a drop solve tab we can click on.
This leads us to the drop solve page we have been using with CPLEX previously. This time we will use OPL files. As for CPLEX case, we can either click on the gray area to open a file browser, or, more fun, simply drag files onto that area. Let's do it with a simple OPL model file that resides on my local machine.
As soon as the file is dropped, upload begins. Then the solve automatically starts. If our server is overloaded you will see a pending message. Don't worry, your job is queued and will be executed as soon as possible.
During the execution of the job, or after completion you can click on the info tab of the job.
We can get the full log by selecting one of the tabs at the bottom.
We can also download the results by selecting the Results tab at the top. We get a text file with content similar to what we would get when using OPL locally. The result contains values for all the decision variables, plus a summary of the quality of the solution as shown below. i won't paste the full result file here as it is too long.
Let us now use an OPL project where we separated the model part from the data part. They reside in two files on our local machine. We simply have to select both files and drop them together on the gray area.
As soon as we drop the files, upload begins, then solve starts automatically. As before we can access information about the solve using one of the existing tabs. The only visible difference with the previous case is that the row says "1 more file".
The results not only show a summary of the solution quality and the engine log, and results as OPL Studio would show them. It starts with information you would get when using OPL locally, as human readable text.. The results filet also contains the results as a tuple set, after the // SCHEMA token. This would be easier to parse than the plain text that precedes it.
We can also add a parameter file if we want to. We simply have to select it along the other files, then drag and drop all files at once. We can also drop all the files of an existing OPL project. In that case, the default configuration of the project is run.
We now see that there are several files taken into account.
Let us now look at a constraint programming OPL project. Same as before, we drag and drop project files into the gray area. After upload solve starts automatically. We can open the information tab while it is running.
The information displayed is a bit different as in the CPLEX case to reflect that this is a constraint programming problem.
Same as above, after completion the log and results can be downloaded using the appropriate tabs.
Let me conclude with a warning. The current trial does not support all of OPL. The limits were put in place to control the use of cloud resources. We may lift some of them in the future, but here are the current limits.
While these limits may seem drastic, they force users to write models that are easier to integrate within a cloud application. You can find a set of models that conform to the above limits on the FAQ & Samples page. It is accessible via a tab in the upper right corner of the drop solve page.
The sport scheduling models used in this blog entry come from that page.
This concludes our exposure of Decision Optimization on Cloud. Please use the "Contact Us" tab on the left pane to report issues and to provide feedback. This trial is for you, and your feedback is key to make sure we will deliver a service that suits your needs.
Update on Feb 23, 2015.
Arrays of scalar values are now supported as input data. This was not the case when we launched the beta.
Accepting arrays as input increases the compatibility with our on premise version of OPL, i.e. the one supported in IBM CPLEX Optimization Studio. Most of the examples shipped with it can now be executed on Decision Optimization on Cloud.