Page 1 of 1
parameter value (Help! plz!)(anyone?)
Posted: Thu Feb 08, 2018 3:03 pm
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 (4.04 KiB) Viewed 4622 times
Re: parameter value (Help! plz!)
Posted: Thu Feb 08, 2018 3:58 pm
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...
Re: parameter value (Help! plz!)
Posted: Thu Feb 08, 2018 4:43 pm
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
Re: parameter value (Help! plz!)
Posted: Thu Feb 08, 2018 5:54 pm
by noob
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
Re: parameter value (Help! plz!)
Posted: Thu Feb 08, 2018 7:23 pm
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
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
Re: parameter value (Help! plz!)
Posted: Fri Feb 09, 2018 2:20 am
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