assigning people to places

Hi everyone.

I am working on a model which basically assigns the people to the places.
The coordinates of the places are defined by me, there are 10 places.
Instead of this, I want to define a square which has four corners. All points both inside and border of the square are candidate places for assigning the people. Thus, I can have many many candidate points and the problem would work on a contunious area.
How can i define this square in Gams world?

Hi,

So it seems that you want to optimize the coordinates of your places? In that case you need to make the coordinates of your places variables. Maybe the following helps:

set p     places     / p1*p10 /
    coord cordinates / x,y /
      
variable pos(p,coord);
*asuming the corners of your square are for example (0,0), (0,3), (3,0), (3,3) you have to set variable bounds accordingly.
pos.lo(p,'x') = 0;
pos.up(p,'x') = 3;
pos.lo(p,'y') = 0;
pos.up(p,'y') = 3;

If this does not help, you might want to share some code that illustrates what you would like to model.

Best,
Fred

Hi,

I tried to use this logic but my aim is creating a contunious area as sum of the all places.
For example I have a 1x1 bounded area and the corners: (0,0) (0,1) (1,0) and (1,1).
Inside this bounded area:
There are infinite number of places.
(0, 0.00001) (0, 0.00001) (0, 0.001) ect.

I want to have a code which can think all possible points.
If i write 1*10 as a set, it only gives me 10 points.

Hi,

I don’t get it. If there is an infinite number of places, how should your code be able to “think” all of them?

Fred

Hi,

This is what I am still searching :slight_smile:

My aim is making a continuous area instead of discrete area.