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

Problems with syntax of GAMS
Post Reply
noob
User
User
Posts: 7
Joined: 6 years ago

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

Post by noob »

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
Untitled.png (4.04 KiB) Viewed 4597 times
Last edited by noob 6 years ago, edited 1 time in total.
noob
User
User
Posts: 7
Joined: 6 years ago

Re: parameter value (Help! plz!)

Post by noob »

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"
please help me if can...
Fog Computing - vehicular Network.gms
complete model
(1.32 KiB) Downloaded 317 times
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: parameter value (Help! plz!)

Post by Renger »

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
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
noob
User
User
Posts: 7
Joined: 6 years ago

Re: parameter value (Help! plz!)

Post by noob »

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

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? :cry:

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
User
Posts: 7
Joined: 6 years ago

Re: parameter value (Help! plz!)

Post by noob »

Renger wrote: 6 years 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
you cant imagine how much i appreciate your quick answer sir :oops:

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
User
Posts: 7
Joined: 6 years ago

Re: parameter value (Help! plz!)

Post by noob »

Renger wrote: 6 years 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
Untitled5.png (13.66 KiB) Viewed 4510 times
Untitled4.png
Untitled2.png
Post Reply