title: Is it possible include a sum expresion in the scope of execute (postprocessing OPL)?
body: <p>I wrote an OPL model with a variable defined as x[s,r,v,l] with many constraints that works fine.
  .</p>
  <pre><code>range V = 1..17;                        
  range S = 1..20;                        
  range LP=1..2;                          
  range RT=1..8;
  
  dvar float+ x[S][RT][V][LP];
  .
  .
  .
  </code></pre>
  <p>Likewise, I defined the execute (output section) after constraints, like this:</p>
  <pre><code>execute Output{\
   writeln(&quot;---------------------Timeline---------------------------------&quot;);\
    for(var s in S){\
          writeln(&quot;Week &quot; + s);\
          for(var l in LP){\
              for (var v in V){\
               if (sum(r in RT)(x[s,r,v,l]) &gt; 0) {\
              writeln(&quot;            Line &quot;+l+&quot;  Producing product &quot;+v+&quot;   &quot;+sum(r in RT)x[s,r,v,l]+&quot; tons   &quot;+sum(r in RT) x[s,r,v,l] / Pi_l[l]+&quot; hours    &quot;);\
              }\
              }\
          }\
      }\
  }
  </code></pre>
  <p>But it doesn't work. Is there any way to do this? (or modify syntax to get a right sentence)</p>