[Cmpl] Conditional creation of variables

Haroldo Santos haroldo.santos at gmail.com
Sun Nov 19 15:21:45 EST 2017


Hi,

I'm working with a computational biology problem where the input is a
string.

I would like to create variables for pairs of positions (i,j : i<j) in this
string where a matching is possible.


parameters:

    s[] := ("u", "c", "c", "a", "g", "c", "a", "g", "g", "a", "a", "a",
"g", "c");

    interactions := set( "au", "cg", "gc", "gu", "ug", "ua" );


variables:

    { i in 1..count(s[]),j in 1..count(s[]), i<j && s[i]+s[j] in
interactions : x[i,j] : binary; }



The error appeared after I inserted  && s[i]+s[j] in interactions  . The
intent of this part was to limit the creation of these variables only for
valid matches (specified in interactions).


Could someone tell me what is wrong ?


Thanks



-- 
=============================================================
Haroldo Gambini Santos
Computing Department
Universidade Federal de Ouro Preto - UFOP
email: haroldo [at ] iceb.ufop.br
home/research page: www.decom.ufop.br/haroldo


It has long been an axiom of mine that the little things are infinitely
the most important.
-- Sir Arthur Conan Doyle, "A Case of Identity"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20171119/a298f3b3/attachment.html>


More information about the Cmpl mailing list