Cast as Integer Program
hi = 1 if route for i-th net goes horizontally first, then vertically. 0 otherwise.
vi = 1 if route for i-th net goes vertically first, then horizontally.
For each boundary b in array:
B0 = {i | net i passes through b if hi = 1}
B1 = {i | net i passes through b if vi = 1}