Export a model using CPLEX to an LP file

To view the LP file in the IDE, first export a model that uses a CPLEX solver to an LP file.

Here we use the distributed example:

<Install_dir>\opl\examples\opl\models\EconPlanning\econPlanning.mod

Create a new settings file

Right-click on the name of the project, econPlanning, and select New > Settings to open the Settings File wizard.

New > Settings File wizard for econPlanning.ops

Change the export format to LP

In the settings editor, change the export format to LP, then save the settings (.ops) file.

Export format changed to LP

Add the settings file to the default run configuration

The settings file, econPlanning.ops is added to the project. You need to copy this file to the default run configuration.

Right-click on econPlanning.ops in the project and select Add to Run Configuration > Basic Configuration (default)

The settings file econPlanning.ops is copied to the default run configuration.

Settings file added to default run configuration

Run the run configuration

When you run the default run configuration, the . lp file is added to the project.

Right-click on Basic Configuration (default) and select Run this.

The file Basic Configuration.lp is added to the project econPlanning.

BasicConfiguration.lp file in project

Double click Basic Configuration.lp to open the file in the IDE.