## parameter value (Help! plz!)(anyone?)

Problems with syntax of GAMS
noob
User
Posts: 7
Joined: 10 months ago

### parameter value (Help! plz!)(anyone?)

Cloud you help me please? i am truly new to the gams and hopeless!!
How can I make R1 and R2 get their coordinates from {(1,1),(2,2),(3,3),(4,4)}? the code is attached below
Untitled.png (4.04 KiB) Viewed 834 times
Last edited by noob on Mon Feb 12, 2018 3:21 am, edited 1 time in total.

noob
User
Posts: 7
Joined: 10 months ago

### Re: parameter value (Help! plz!)

the complete code and model is attached here
i want members of rsu set to get their coordinates from members of set "p potential sites"
Fog Computing - vehicular Network.gms
complete model

Renger
Posts: 221
Joined: 2 years ago

### Re: parameter value (Help! plz!)

Hi

It is not clear to me what you exactly want: Something like
Xcoord Ycoord
RSU1 P1.X P1.Y
?

But you have 8 RSU and 9 potential sites.

Otherwise you could introduce a mapping between RSU and P:

mapRSU_P(rsu,p)
/RSU1.P1,
RSU2.P2,
/

loop(mapRSU_O(rsu,p),
coord(RSU, "Xcoord") = xpoint(p);
coord(RSU, "Ycoord") = ypoint(y);
);
Cheers
Renger

noob
User
Posts: 7
Joined: 10 months ago

### Re: parameter value (Help! plz!)

thank you so much for your quick answer sir... you cant imagine how much i appreciate it

what i realy want to do is to find the best place for RSUs to achieve the least cost

the location of RSUs cant just be anything and RSUs have to get their coordinates form a predetermined places AKA "potential sites p" set

lets say we have four candidate places {(1,1),(2,2),(3,3),(4,4)} and three RSUs (rsu1*rsu3) how can i do this?

it is not necessary to use all RSUs in the model

i was hoping beyond hope someone would help me here and thankful you did... i appreciate it so much

noob
User
Posts: 7
Joined: 10 months ago

### Re: parameter value (Help! plz!)

Renger wrote:
10 months ago
Hi

It is not clear to me what you exactly want: Something like
Xcoord Ycoord
RSU1 P1.X P1.Y
?

But you have 8 RSU and 9 potential sites.

Otherwise you could introduce a mapping between RSU and P:

mapRSU_P(rsu,p)
/RSU1.P1,
RSU2.P2,
/

loop(mapRSU_O(rsu,p),
coord(RSU, "Xcoord") = xpoint(p);
coord(RSU, "Ycoord") = ypoint(y);
);
Cheers
Renger

what i realy mean is this
we have some RSUs that we want to select some of them (or all of them if necessary) and place them in some Predetermined places AKA the set
"p potential sites" that we have the coordinates of them... the main goal is to minimize the cost of infrastructure
so some of the candidate places may be chosen to put RSUs on them... the solver should return those chosen places
i was hoping beyond hope that someone would help me to do this ... it means a lot to me

noob
User
Posts: 7
Joined: 10 months ago

### Re: parameter value (Help! plz!)

Renger wrote:
10 months ago
Hi

It is not clear to me what you exactly want: Something like
Xcoord Ycoord
RSU1 P1.X P1.Y
?

But you have 8 RSU and 9 potential sites.

Otherwise you could introduce a mapping between RSU and P:

mapRSU_P(rsu,p)
/RSU1.P1,
RSU2.P2,
/

loop(mapRSU_O(rsu,p),
coord(RSU, "Xcoord") = xpoint(p);
coord(RSU, "Ycoord") = ypoint(y);
);
Cheers
Renger

in other words:

we have some RSUs that we want to select some of them (or all of them if necessary) and place them in some Predetermined places AKA the set
"p potential sites" that we have the coordinates of them... the main goal is to minimize the cost of infrastructure
so some of the candidate places may be chosen to put RSUs on them... the solver should return those chosen places
any kind of help means a lot to me
Attachments
Untitled5.png (13.66 KiB) Viewed 747 times