Error message: Domain violation for set.

I am getting the error: Domain violation for set. I cant figure out what’s going wrong.

Some part of my code is stated as follows:

Declare sets

set i / 16 /;
set s(i) / 1
3 /;
set t(i) / 5*6 /;

alias (i,j);

The adjacency matrix (the arcs set A)

table a(i,j)
4 5 6
1 1 0 0
2 1 0 0
3 0 1 1
4 0 1 1 ;

Node capacity upper bound

parameter bu(i) / 1 300.00
2 300.00
3 300.00
4 300.00
5 100.00
6 200.00 / ;

positive variables f(i,j), y(i,j), x(s,i,t);

f.up(i,j) = min(bu(i),bu(j))*a(i,j);
y.up(i,j) = a(i,j);
x.up(s,i,t) = min(bu(s),bu(i),bu(t))*a(s,i)*a(i,t);

Some Model

solve model minimizing cost using lp;

alias(i,s1);
alias(i,p1);
alias(i,t1);

loop (s1$s(s1),
loop (p1$(a(s1,p1)>0),
loop (t1$(a(p1,t1)>0),

if (x.l(s1,p1,t1) > bu(p1) * y.l(s1,p1),
Do something
);
);
);
);

I get this error message:

171 Domain violation for set

at

if (x.l(s1,p1,t1) > bu(p1) * y.l(s1,p1),
**** $171 $171


Can someone help me with this error. Thanks in advance.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Delfine x over i,i,i.
Cheers
Renger

sent from my iPad

Am 13.02.2014 um 14:55 schrieb “visvalley9@gmail.com” :

I am getting the error: Domain violation for set. I cant figure out what’s going wrong.

Some part of my code is stated as follows:

Declare sets

set i    / 1*6  /;
set s(i) / 1*3  /;
set t(i) / 5*6  /;

alias (i,j);

The adjacency matrix (the arcs set A)

table a(i,j)
4 5 6
1 1 0 0
2 1 0 0
3 0 1 1
4 0 1 1 ;

Node capacity upper bound

parameter bu(i) / 1 300.00
2 300.00
3 300.00
4 300.00
5 100.00
6 200.00 / ;

positive variables f(i,j), y(i,j), x(s,i,t);

f.up(i,j) = min(bu(i),bu(j))*a(i,j);
y.up(i,j) = a(i,j);
x.up(s,i,t) = min(bu(s),bu(i),bu(t))*a(s,i)*a(i,t);

Some Model

solve model minimizing cost using lp;

alias(i,s1);
alias(i,p1);
alias(i,t1);

loop (s1$s(s1),
loop (p1$(a(s1,p1)>0),
loop (t1$(a(p1,t1)>0),

 if (x.l(s1,p1,t1) > bu(p1) * y.l(s1,p1),
   Do something
 );

);
);
);

I get this error message:

171 Domain violation for set

at

if (x.l(s1,p1,t1) > bu(p1) * y.l(s1,p1),
**** $171 $171

Can someone help me with this error. Thanks in advance.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks a lot. That was a simple fix.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.