Creating an empty project

Walks you through creating a project "from scratch" and defining a model using the editing capabilities of the IDE.

To start from an empty project:

  1. In the main menu, choose File > New > OPL Project, or click the New icon and select OPL Project.
    New OPL Project menu
  2. The New Project wizard is displayed.
    New Project window

  3. Enter the following information in the New Project window:

    • Type myFirstProject as the Project name of your new project.

    • Enter a destination Project location for the project, other than the OPL examples directory. For example, create a directory named C:\OPL_projects and browse to select the directory.

      A folder with the project name is created in this directory.

    • In the Options field:

      • Enter a Description for the project.

      • Check all the boxes except Create Data, because you will later be adding existing data files to the project rather than creating empty files.

    Your window should look similar to the following screen capture:

    Figure 1. Creating a project
    New Project settings
  4. When you have entered all the information, click Finish.
    Note:

    If a project with the same name already exists in CPLEX® Studio, a message warns you and the Finish button remains greyed out until you enter a unique name.

    The project is created, containing the model and settings files you specified, and appears in the OPL Projects Navigator. The new empty model file is displayed in the Editing Area:

    Figure 2. New project and new empty model in main window
    A newly-created, empty, project in the IDE

    Note that the .mod and .ops extensions are automatically appended to the file names in the OPL Projects Navigator and in Windows Explorer (see File types and Understanding OPL projects).

The OPL Projects Navigator displays a minimal tree containing:

  • an empty .mod file: you are going to fill it with OPL statements in the next step, Adding the model

  • an .ops file containing the default values for MP and CP options, and OPL settings: see Changing an MP option value in this manual and Setting programming options in the IDE Reference.

  • the Run Configurations folder

  • one run configuration (set to default) containing the model and settings files you have just created (see Figure 2).

    Important:

    The only mandatory component in a project or run configuration is a valid model file. A project can contain more than one model, but a run configuration can contain only one model.

See also The main window in the IDE Reference for reference information on the graphical user interface.