Rollback on by default; --no-rollback keeps every rip-up

Over 8 net orders it left 25 to 30 fewer connections unrouted on the
dense sense boards and 16 to 18 fewer on two PCBench boards, and was
never clearly worse. KiCad DRC on the sense harness: 41 opens to 28.
This commit is contained in:
2026-09-28 16:17:28 -06:00
parent 3462089e09
commit a2e108bc51
6 changed files with 21 additions and 17 deletions
+8 -6
View File
@@ -46,7 +46,7 @@ _FLAG_NAMES = {
"orders": "--orders",
"promote": "--promote-failures",
"access": "--access-cost",
"rollback": "--rollback",
"rollback": "--no-rollback",
}
@@ -168,10 +168,12 @@ def build_parser() -> argparse.ArgumentParser:
"another pin's way out while that pin still has connections to route (default 0: off)",
)
parser.add_argument(
"--rollback",
action="store_true",
help="grid and exact engines: reroute the connections a rip-up displaces at once, "
"and undo the rip-up if fewer connections end up routed",
"--no-rollback",
dest="rollback",
action="store_false",
help="grid and exact engines: keep every rip-up, as before. By default the "
"connections a rip-up displaces are rerouted at once and the rip-up is undone "
"if fewer connections end up routed",
)
parser.add_argument(
"--jobs",
@@ -202,7 +204,7 @@ def main(argv: list[str] | None = None) -> int:
("orders", args.orders is not None),
("promote", args.promote_failures is not None),
("access", args.access_cost is not None),
("rollback", args.rollback),
("rollback", not args.rollback),
)
if asked
]