> thank you all,it worked well,but i have another question: > i have a parameter Ec: AB BC CD DE:= > AB 0 1 1 0 > BC 1 0 1 1 > CD 1 1 0 1 > DE 0 1 1 0;
> and it means that for example nodes AB and BC are connected, and AB and > CD are also connected. Ec has a 1 value for each two nodes that are > connected. > the problem is that i want to define a var x like this: > var x {u in Vc, v in Vc} binary >=0; ""if (u,v) in Ec"" > and we have: Vc := AB BC CD DE; > i mean i want to have var x just for those pairs of Vc that have value 1 > in Ec, i want to define something like this: > if EC[u,v]==1 then var x {u in Vc, v in Vc} binary >=0; > but i don't know how to write if clauses. > i'd be really grateful if you could help me with this problem too. var x{u un Vc, v in Vc: EC[u,v] = 1}, binary; _______________________________________________ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk