Setting up the covering model and data

Describes the model and data files.

To start working with this example:

  1. Use the File > New > Example menu command to open the covering example.

    The IDE displays the covering project in the OPL Projects Navigator.

  2. Open the covering.mod model file in the editing area.

    Scroll to the DISPLAY postprocessing script, in the execute block just after the objective.

    Figure 1. Postprocessing script, covering.mod
    Postprocessing script
  3. Open the covering.dat file.

    The data is initialized in the data file. Notice that 32 workers are available.

    The covering data (covering.dat)

    NbWorkers = 32;
    Tasks = { masonry, carpentry, plumbing, ceiling,
         electricity, heating, insulation, roofing, 
         painting, windows, facade, garden, 
         garage, driveway, moving };
    Qualified = [
       { 1  9 19  22  25  28  31 }
       { 2 12 15 19 21 23 27 29 30 31 32 }
       { 3 10 19 24 26 30 32 }
       { 4 21 25 28 32 }
       { 5 11 16 22 23 27 31 }
       { 6 20 24 26 30 32 }
       { 7 12 17 25 30 31 } 
       {  8 17 20 22 23  }
       {  9 13 14  26 29 30 31 }
       {  10 21 25 31 32 }
       {  14 15 18 23 24 27 30 32 }
       {  18 19 22 24 26 29 31 }
       {  11 20 25 28 30 32 }
       {  16 19 23 31 }
       {  9 18 26 28 31 32 }
    ];
    Cost = [ 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 4 4 4 4 5 5 5 6 6 6 7 8 9 ];