<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Hi,</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I'm working with a computational biology problem where the input is a string.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I would like to create variables for pairs of positions (i,j : i<j) in this string where a matching is possible.</div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">
<p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">
</p><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)">parameters:</span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"> s[] := ("u", "c", "c", "a", "g", "c", "a", "g", "g", "a", "a", "a", "g", "c");</span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"> interactions := set( "au", "cg", "gc", "gu", "ug", "ua" );</span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"><br></span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)">variables:</span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"> { i in 1..count(s[]),j in 1..count(s[]), i<j && s[i]+s[j] in interactions : x[i,j] : binary; }</span></p><span style="color:rgb(0,0,255)">
</span><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">The error appeared after I inserted <span style="color:rgb(0,0,255)">&& s[i]+s[j] in interactions .<font color="#000000"> The intent of this part was to limit the creation of these variables only for valid matches (specified in interactions).</font></span></p><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"><font color="#000000"><br></font></span></p><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"><font color="#000000">Could someone tell me what is wrong ?</font></span></p><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"><font color="#000000"><br></font></span></p><p style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,255)"><font color="#000000">Thanks <br></font></span></p><p style="margin:0px;text-indent:0px"><br></p></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-family:monospace,monospace">=============================================================<br>Haroldo Gambini Santos<br>Computing Department<br>Universidade Federal de Ouro Preto - UFOP<br>email: haroldo [at ] <a href="http://iceb.ufop.br" target="_blank">iceb.ufop.br</a><br>home/research page: <a href="http://www.decom.ufop.br/haroldo/" target="_blank">www.decom.ufop.br/haroldo</a><br><br><br>It has long been an axiom of mine that the little things are infinitely<br>the most important.<br> -- Sir Arthur Conan Doyle, "A Case of Identity"<br></span></div></div></div>
</div>