Describes the various ways of opening existing
projects and reusing them in other projects.
In some cases, it is quicker to create
an OPL project by opening and editing an existing one. IBM® ILOG® CPLEX® Studio comes with many code
samples and industry models that you can reuse as a starting point
for your own projects. The Language and Interfaces Examples manual
provides a detailed description of the optimization issues they express,
as well as a quick access to the files.
The following
procedures suggest how you can open and reuse either the examples
supplied with CPLEX Studio,
or your own existing projects.
To reuse an existing project, first
you should open and copy it:
- From the IDE, choose ,
or right-click in the OPL Projects Navigator and choose from the menu.
- To select one of the distributed examples
for copying and reuse, navigate to the folder under <Install_dir>\opl\examples that
contains the model you want to reuse, and open it in CPLEX Studio.
To
select one of your own projects for copying and reuse, navigate to
the folder that contains it and open it.
Note: This procedure is only for OPL 6.x projects. For importing projects from previous releases of
OPL, see the OPL Migration Guide.
- In the OPL Projects Navigator, right-click
on the project name and choose Copy from
the menu:
You could also select the
project name and press Ctrl + C.
- Right-click again and choose Paste from the menu, or press Ctrl
+ V.
- A Copy Project popup window appears.
Change the Project name to something
other than the original project name or one of the other project names
currently open in OPL, change the Location if
necessary, and click OK.
The new project appears in the OPL Projects Navigator.
- Right-click the original project (the
one you just copied) and choose Delete from
the menu. When the popup asks you if you want to delete all contents,
choose Do not delete contents.
You can now modify the copied project
as you want.
Note: You can use the menu command to open a
dialog box that allows you to open files and import them into an existing
project.
You can also drag existing files from a Windows Explorer window and drop
them onto the project folder in your OPL Projects Navigator. This
is always a copy operation, not a move.