Some embodiments of the invention provide a method of routing nets in an integrated-circuit
layout region that has multiple interconnect layers. The method specifies several
routes, where some of the routes utilize vias to traverse multiple interconnect
layers. The method assesses a cost of at least one via proportionately to a cost
that the via introduces in the design of the integrated circuit.