Some embodiments provide a method of routing nets within a region of an
integrated-circuit ("IC") layout. The method uses a first set of lines to
partition the IC region into a plurality of sub-regions. In addition, the
method uses a second set of lines to measure congestion of routes for the
nets within the IC region. According to this method, at least some of the
lines in the second set are different from the lines in the first set.