By default, any given input will have grid col/row set to 10/10 until user later defines in the .plc file.
Grid cell density is represented as an 1D array where the length is set to be $grid_col * grid_row$. Each entry of this array represents the current occupied precentage within this cell.
Overlaps gets double counted, so it is possible for a cell density to exceed 1.0.
When a Placement Cost object is initialized, coordinate information and dimension information will be read from the netlist input and used to compute an initial grid cell density.
Once grid cell density is obtained, we take the top 10% of the largest grid cells and compute its average. The density cost will be half of the average value.
## Adjacency Matrix Computation
## Adjacency Matrix Computation
The adjacency matrix is represented as an array of $[N_{hardmacros} + N_{softmacros} + N_{ports}]\times [N_{hardmacros} + N_{softmacros} + N_{ports}]$ elements.
The adjacency matrix is represented as an array of $[N_{hardmacros} + N_{softmacros} + N_{ports}]\times [N_{hardmacros} + N_{softmacros} + N_{ports}]$ elements.
For each entry of the adjacency matrix, it represents the total number of connections between module $i$ and module $j$ subject to all corresponding pins.
For each entry of the adjacency matrix, it represents the total number of connections between module $i$ and module $j$ subject to all corresponding pins. For soft macro pins, weight should be consider a factor to the number of connections.