<br>i have one constraint that i dont know how model, ie,  inside of my constrainr i want to subtraction the elements of a set with one&#39;s data&#39;s, for example <br><br>MP_set V; // set of vertices<br>MP_set F; // set of frequencies<br>
<br>MP_subset&lt;1&gt; vert(V);<br>MP_subset&lt;1&gt; freq(F);<br><br>vert.insert(1); ... vert.insert(3);<br>freq.insert(16); freq.insert(30); ... freq.insert(916);<br><br>MP_subset&lt;2&gt; <br>Eeq(I,I), // Arc between the vertice vi and vj for Equation<br>
Ein(I,I); // Arc between the vertice vi and vj for Innequation<br><br>MP_data <br>deq(Eeq), // distance between the vertice vi and vj for Equation<br>din(Ein); // distance between the vertice vi and vj for Innequation<br>
<br>MP_subset&lt;2&gt; vertFreq(I,F);<br>forall(varD(v,do1)*dom_i(do1,f), vertFreq.insert(v,f)); // Assign the frequencies to each vertice <br><br>MP_binary_variable Xvf(vertFreq), y(freq);<br><br>MP_constraint <br>assignOneFreq(vert), // only one freq to every vertice<br>
freqToAllVert(freq), // freq could be to assign to all the vertices<br>cstToVertEeq(freq,Eeq), // assign two freq which |f +- g| = d(E(vi,vj))<br><br>// MY CONSTRAINTS<br><br>assignOneFreq(vert(v)) = sum(freq(f), Xvf(vertFreq(v,f))) == 1;<br>
<br>freqToAllVert(freq(f)) = sum(vert(v), Xvf(vertFreq(v,f))) &lt;= I.size()*y(freq(f)); <br><br>// ************** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THIS IS MY PROBLEM, I DONT KNOW HOW BUILD THIS &nbsp;&nbsp;&nbsp;&nbsp;***********<br>// I WANT TO DO IS: <br>/* <br>assign to frequency &quot;f&quot; to a vertice &quot;vi&quot; or &quot;vj&quot; if for all &quot;f&quot; that belong to the set of Frequencies and for two vertices adjacents &quot;vi&quot; or &quot;vj&quot; that belong to the set of Vertices, exits one constraint that satisfed: to assign &quot;f&quot; to &quot;vi&quot; or &quot;vj&quot; only if the frequency had one distance to them of more o minus &quot;dij&quot; ( ie, f +- d(E(vi,vj) )<br>
*/<br><br>cstToVertEeq(freq(F), Eeq(vi,vj)) = Xvf(vertFreq(vj,F)) == Xvf(vertFreq(vi, F-deq(Eeq(vi,vj)) )) + Xvf(vertFreq(vi, F+deq(Eeq(vi,vj)) ));<br><br>// THIS CONSTRAINT &quot;cstToVertEeq&quot; IN THE VERSION 1.0.2 REPORT ME ONE ERROR, <br>
<br>please help me to correct this constraint, Its very important&nbsp;i&nbsp;dont&nbsp;have&nbsp;time <br><br>Thank<br><br>