title: Optional parameter with missing value in MiniZinc
body: <p>I am trying to model something similar to a job shop problem.  There are multiple jobs, which can be done in multiple ways, which use a varying number of tasks to accomplish the job.</p>
  
  <p>I have set up this data structure to represent that information:</p>
  
  <pre><code>enum Job;
  enum Option;
  int: maxTasks;
  set of int: TaskIndex = 1..maxTasks;
  
  enum Task;
  
  array[Job, Option, TaskIndex] of opt Task: jobOptions;
  </code></pre>
  
  <p>If <code>jobOptions[j, o, index]</code> exists, it is the <code>index</code>th task of option <code>o</code> of job <code>j</code>.  If it is missing, that option for that job does not use the maximum number of tasks, and this is one of the empty slots.</p>
  
  <p>I am failing to see how I can initialize this array.  If it was a 2d array, I could do</p>
  
  <pre><code>jobOptions = [|
      T1, T2 |
      T3, &lt;&gt;
     |];
  </code></pre>
  
  <p>Since it is 3d, want to do something like</p>
  
  <pre><code>jobOptions = array3d(Job, Option, TaskIndex, [
      % Job 1
      T1, T2, % Option 1
      T3, &lt;&gt;, % Option 2
      % Job 2
      T2, T4, % Option 1
      &lt;&gt;, &lt;&gt;, % No second option
     |];
  </code></pre>
  
  <p>However, this fails, because there are three versions of array3d, which take arrays of <code>(par) int</code>, <code>var int</code> and <code>var opt int.</code>  I need a fourth version, taking <code>(par) opt int</code>, since <code>&lt;&gt;</code> is of type <code>var opt int</code>.</p>
  
  <p>I initially tried to do something like</p>
  
  <pre><code>array[Job] of array[int] of array[int]: jobOptions
  </code></pre>
  
  <p>to make a "non-square" array, but if that if feasible, I was not able to figure out the correct syntax.</p>
  
  <p>Is there a way to initialize a 3d parameter array with missing optional elements?  Alternatively, is there a better way to present this data?</p>