Create a set (or a list) as a set

Problems with syntax of GAMS
Post Reply
abotoba
User
User
Posts: 4
Joined: 8 months ago

Create a set (or a list) as a set

Post by abotoba » 8 months ago

Hi! I want to ask, is there anyway to create a list (or a set) inside of a set? I am dealing with Image and I don't know how to formulate the Kqjk. What I am thinking is, i is element of Kqjk and Kqjk is element of q, therefore index i is element of q. Does anyone have any suggestions?

Many Thanks!
Attachments
Screen Shot 2018-12-07 at 10.52.37 PM.png
this
Screen Shot 2018-12-07 at 10.52.37 PM.png (12.78 KiB) Viewed 372 times

User avatar
Renger
Posts: 358
Joined: 2 years ago

Re: Create a set (or a list) as a set

Post by Renger » 8 months ago

Hi
It would be easier to answer if you would provide the code with the actual elements in those sets.
Cheers
Renger
____________________________________
Enjoy modeling even more: The lazy economist

abotoba
User
User
Posts: 4
Joined: 8 months ago

Re: Create a set (or a list) as a set

Post by abotoba » 8 months ago

Renger wrote:
8 months ago
Hi
It would be easier to answer if you would provide the code with the actual elements in those sets.
Cheers
Renger
Hi @Renger, this is the full code that I want to use:
Image

zi and yq represent binary variables, in which if zi = 1, a service station is built at node i, 0 otherwise. and if yq = 1, flow on path q is feasible.
Basically I have all the data that is needed (the nodes, arcs, potential facility locations, and number of stations to be located). It is just I am really confused on how to integrate the q with Kqjk.
Attachments
Screen Shot 2018-12-10 at 7.45.45 PM.png

Post Reply