Adding the model

Walks you through entering a model in an OPL project.

You are going to copy-paste the pasta production model into the Editing Area.

To add the pasta production model to the project:

  1. Choose File > Open File in Editor, and browse to
    
    <Install_dir>\opl\examples\opl\production\product.mod
    

    then double-click the filename in the dialog box or select it and click Open.

    Note:

    There are two model files in this project. Make sure that you open product.mod and not production.mod.

    The OPL statements of the product.mod file appear in the Editing Area, in a separate window. If you click the tab of the myFirstProject.mod file, you can see that your empty model is in a different editor.

  2. Click in the product.mod window and press Ctrl-A to select all the text, then Ctrl-C to copy the contents of the file.
  3. Click the tab of the myFirstProject.mod file to redisplay the empty editing window for your own project.
  4. Place your cursor after the header comments and press Ctrl-V to paste the copied statements into the file myfirstproject.mod.

    Note that an asterisk (* ) appears in the tab of this window.

    An asterisk indicates that the file being edited is not saved.

    This indicates that the file is unsaved. Click the Save button Save button to save the file.

  5. Close the open window for the product.mod file in the Editing Area by clicking the Close window button Close window button to the right of its tab. Leave the edit window for the myFirstProject.mod file open for the next exercise.