This depends on your formulation. The problem appears to me to be a mixed-integer nonlinear optimization problem. The locations can be modeled through a binary vector whose length equals the number of candidate locations. The entries of this vector are either ones (if a device is located) or zeros (if a device is not located). This vector will dynamically change from one iteration to the following and from one particle to the next. Meanwhile, the sizes will be represented in another vector whose length equals the number of candidate locations as well. If an entry of the location vector is zero, the corresponding entry of the size vector MUST be zero as well. Other entries of the size vector are non-negative real values. This is one way of doing it. Good luck.