Model error

Hi again,


I built a model but it gives Error 171 domain violation for set for each constraints, how I can get over it?


Thanks,
Warm regards


set j # of jobs/1*5/

k # of jobs/15/
l subset /1
5/;

parameters
proctime(j) processing time of each job
weight(j) weight of each job
$load proctime weight
$gdxin
;

binary variables
d(j,k) sequence of job;

variable z objective function value;

equations
obj objective function
pcons(j,k) predecence constraints
jsec(j,l,k) 3 job sequence constraints
dval(j) d(i i)=0 ;

obj… z=e=sum( (j,k), weight(j)*proctime(j)*d(j,k))+sum(j, weight(j)*proctime(j));
pcons(j,k)(ord(j) ne ord(k)).. d(j,k)+d(k,j)=e=1; jsec(j,k,l)(ord(j) ne ord(k) and ord(j) ne ord(l) and ord(k) ne ord(l))…d(k,j)+d(j,l)+d(l,k) =l=2;
dval(j)… d(j,j)=e=0;




\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Nazmi,

You don’t have to define the same set over and over again. “alias” will do that. Try this on you set definition:

set j # of jobs/1*5/
alias (i,j,k);

Parameters…
Variables…
equations…

Hope this helps!


On Mon, Mar 19, 2012 at 12:09 PM, Nazmi Åžener wrote:

Hi again,


I built a model but it gives Error 171 domain violation for set for each constraints, how I can get over it?


Thanks,
Warm regards


set j # of jobs/1*5/

k # of jobs/15/
l subset /1
5/;

parameters
proctime(j) processing time of each job
weight(j) weight of each job
$load proctime weight
$gdxin
;

binary variables
d(j,k) sequence of job;

variable z objective function value;

equations
obj objective function
pcons(j,k) predecence constraints
jsec(j,l,k) 3 job sequence constraints
dval(j) d(i i)=0 ;

obj… z=e=sum( (j,k), weight(j)*proctime(j)*d(j,k))+sum(j, weight(j)*proctime(j));
pcons(j,k)(ord(j) ne ord(k)).. d(j,k)+d(k,j)=e=1; jsec(j,k,l)(ord(j) ne ord(k) and ord(j) ne ord(l) and ord(k) ne ord(l))…d(k,j)+d(j,l)+d(l,k) =l=2;
dval(j)… d(j,j)=e=0;




\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.