Domains and subsets

Hi all ! Run into something like this today, code like I attach:

sets
a /15/
b(a) /1
3/
c(a) /4/
d(a) /set.b, set.c/;

variable e(d),z;
equation f(c);

f(c)… e(c) =e= z;

Triggers a domain violation at eq f(c).

What am I missing about domain / subsets ?

My logic is: if set c is part of set d, and I declare variable e over set d, why invoking it over set c should trigger a domain violation ?

Thanks in advance and sorry if I’m not seeing something obvious.
Regards

Claudio


DimIssueTrial.gms (128 Bytes)

Hi Claudio



Just define your equation and variables over the main set : e(a) and f(a) and write your equation as it is.

Cheers



Renger



Von: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] Im Auftrag von Claudio Delpino
Gesendet: Wednesday, March 11, 2015 3:05 PM
An: gamsworld@googlegroups.com
Betreff: Domains and subsets



Hi all ! Run into something like this today, code like I attach:



sets

a /1*5/

b(a) /1*3/

c(a) /4/

d(a) /set.b, set.c/;



variable e(d),z;

equation f(c);



f(c)… e(c) =e= z;



Triggers a domain violation at eq f(c).



What am I missing about domain / subsets ?



My logic is: if set c is part of set d, and I declare variable e over set d, why invoking it over set c should trigger a domain violation ?



Thanks in advance and sorry if I’m not seeing something obvious.

Regards

Claudio


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/d/optout.


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/d/optout.