Assigned set used as domain !

118 views
Skip to first unread message

Tino

unread,
Apr 27, 2016, 4:56:43 PM4/27/16
to gamsworld
Dear Experts,

The following is mt sets definition:

sets
    s         "union of all nodes"              /1001*1015,2001*2015,3001*3015,4001*4015,5001*5015,
                                                          6001*6015,7001*7015,8001*8015,9001*9015,10001*10015,
                                                          11001*11015,12001*12015,13001*13015,14001*14015,15001*15015,
                                                          16001*16015,17001*17015,18001*18015,19001*19015,20001*20015/

    sc(s)     "set must be covered nodes" /1008,1009,2007*2010,3006*3013,4004*4014,5004*5013,6004*6013,
                                                            7004*7013,8005*8013,9005*9012,10005*10012,
                                                           11005*11012,12005*12012,13005*13012,14005*14012,16004*16013,
                                                            17003*17013,18003*18013,19002*19010,20002,20003/

    sd(s)     "set of depot nodes"              /10003,2005,2014,13014,20005/

    sn(s)

    so(s)

    sn(s)= s(s)- sc(s)  ;

    so(s)= s(s)- sd(s) ;

The problem is that I can't use sn(s) or so(s) as domain, and I don't know why!. If I am not allowed to use sn(s) or so(s) as domain, then what is the benefit of Union, Difference or Intersection in GAMS !!!?
The error i recive is Error 187 Assigned set used as domain


Help me please

Renger van Nieuwkoop

unread,
Apr 28, 2016, 2:03:08 AM4/28/16
to gams...@googlegroups.com

Hi Tino

 

Your code runs fine if you put a semicolon after so(s).

The union is an assignment, not part of the declaration of sets.

Cheers

Renger

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Tino

unread,
Apr 28, 2016, 11:48:55 PM4/28/16
to gamsworld
Thanks a lot!!
Reply all
Reply to author
Forward
0 new messages