Working with the New Example wizard

Instructions for using the New Example wizard to open the distributed examples.

To open examples in the CPLEX® Studio IDE using the New Example wizard:

  1. Choose File > New > Example to display the first screen of the New Example wizard.
    New Example wizard, first screen
    Note:

    You can also access the New Example wizard by choosing File > Import > Example. This command launches the same wizard as File > New > Example.

  2. Select IBM ILOG OPL Examples and click Next to display the list of examples.
    New Example wizard, second screen, showing OPL examples
  3. When you select an example project, a description of the project is shown at the top of the wizard in the Example Project section.
  4. To sort the list of examples, click one of the tabs:
    • Sorted by Complexity — to display examples grouped by complexity (Basic, Intermediate, Advanced, Demo, etc.)

    • Sorted by Feature — to display examples grouped by feature (OPL Model, OPL Project, OPL Script, etc.)

    • Sorted by Industry — to display examples grouped by industry (Finance, Manufacturing, Transportation, etc.)

    • Sorted by Technique — to display examples grouped by technique (Constraint Programming, Decomposition, Search, etc.)

  5. To filter the display, type the text you are looking for in the type filter text field at the top of the wizard. Only examples that contain the text you enter will be displayed.
  6. To obtain help for an example, select the example and press F1 or click the Help icon Help icon on the New Example wizard.
  7. To select a destination for the opened project, type a path into the Choose copy location field or use the Browse button to search for one. The default location is your workspace.
  8. Click Finish.

The example appears in the OPL Projects Navigator. Expand the project and double-click the model name to display the model contents.

Tip:

Once you begin working with the New Example wizard, if you already know the name of the example you are searching for and you always open examples in your default IDE workspace, you will find that the fastest way to use it is:

  1. On the second screen of the New Example wizard (step #2 above), type the name of the example you are searching for in the filter field.

    The example will be displayed in the selection window.

  2. If the example displayed in the selection window is the one you want, simply press Enter twice to open it in the IDE.