OPL studio interface

After completing this module the student should:



For this lesson you are strongly encouraged to try the video, as much of the information is visual.


When you launch OPL Studio, you will be prompted to select a workspace. A workspace is a folder where your model projects are stored. You may have multiple such workspaces on your computer, but for now you are recommended to start with one.


You should see the video for a demonstration.

Creating a new project

Click the arrow down icon in the upper right cornor. -> OPL Project -> Select a name and click finish

Creating a model

Right click the project -> Choose new -> Model

Creating a run configuration

Right click the project -> Choose new -> Run Configuration

Running your model

Drag the model to the run configuration and confirm. -> Right click the run configuration -> Choose "Run this"


Create a model with a name of your choosing, insert the following text into the model, and run it.

int i = 10;

dvar float x1;
dvar int x2;
dvar float x3;

minimize i*x1 + 2*x2 - x3;
subject to {
  x1+x2+x3 == 10;
  x1 >= 0;
  x2+x3 >= 2;
  x1+x2 >= x3;