I have a code that you input the different sizes of modules (rectangular shapes in the form of width, height ) to, and it provides the optimum places for those modules dependent on certain constraints. The objective function is to minimize the area.
For example, when I input "(4, 5) (3, 7) (6, 4) (7, 7)", meaning the width of the first module is 4 and height is 5 it gives me (x_1, y_1)....(x4, y4) of the adjusted modules based on these [constraints][1].
The first two constraints say that the modules should be inside the floorplan W and Y. The next 4 are non-overlap constraints meaning that the modules shouldn't overlap. And, the last two say that the modules should be in the first quadrant.
Does anyone know if there is any existing linear constraints formulation for this type of placement constraint?
One of the no-overlap constraint has the form similar to:
x(i) + w(i) ≤ x(j) + M*δ(i,j,1)
Replace this by
x(i) + w(i) + xmargin ≤ x(j) + M*δ(i,j,1)
where xmargin
is the extra horizontal space required between objects i
and j
.