37inline double trace_now() {
return std::chrono::duration<double>(std::chrono::steady_clock::now().time_since_epoch()).count(); }
107 long max_leaves = 200'000);
Routability estimate for placement (design doc 04 §3 B R(x), E β·RUDY overflow, G).
Placement legality (design doc 04 §3 D/E): exact integer tests of courtyards, through-hole obstacles,...
WindowResult solve_window(const Problem &p, Placement &pl, const std::vector< int > &parts, const AnnealOptions &o, bool prune=true, long max_leaves=200 '000)
LnsResult lns_improve(const Problem &p, const Placement &start, const AnnealOptions &o, int windows)
std::int64_t anneal_cost(const Problem &p, const Placement &pl, double alpha_cross_mm, double beta=0, const CongestionMap *m=nullptr, double via_mm=0)
Cost used by the annealer, from scratch (reference path): weighted HPWL + α·crossings + β·RUDY overfl...
AnnealResult anneal(const Problem &p, const Placement &start, const AnnealOptions &o)
start must be legal for every movable part.
double trace_now()
Recording clock (video timelapse): steady-clock seconds. Only ever written to recordings.
int exchange_interval
moves per replica between exchange attempts (0 = auto)
std::uint64_t trace_every
record the live state every this many steps (0 = off; video recording)
int exact_window
windows up to this size are repaired exactly (branch and bound)
const CongestionMap * congestion
bool flip
Side assignment (doc 04 §3 C/E, D48): flip moves for parts with Part::may_flip(), and the via estimat...
double effort
moves per run = effort × 4000 × movable parts (at least 20 000)
double flip_rate
share of ordinary moves that are flips (only drawn when flipping is on)
bool refine
start cool and with small moves (the start is already a good placement)
std::vector< int > focus
parts LNS windows are centred on (empty: any movable part)
double time_limit_s
wall-time stop (0 = none); hitting it makes the result timing-dependent
int lns_window
parts per LNS window (≤ 12)
bool tempering
parallel tempering over runs replicas instead of independent runs
double lns_rate
probability that a step is an LNS window instead of an ordinary move
double beta_congestion
Routability: cost of 1 mm of RUDY overflow in mm of signal HPWL (0 = off; resolution 0....
double alpha_cross_mm
one airwire crossing costs as much as this much signal HPWL
double via_mm
one estimated via costs as much as this much signal HPWL
std::uint64_t lns_improved
std::int64_t overflow
RUDY overflow of the result (nm; 0 when β = 0).
std::uint64_t exchanges_tried
std::vector< std::int64_t > run_costs
std::vector< double > trace_t
when each was recorded (trace_now())
std::vector< Placement > trace
the winning run's recorded states (trace_every > 0)
std::uint64_t exchanges_accepted
Large-neighbourhood search from start (legal): windows LNS windows (sizes and seeds from o; the strea...
Exact window (doc 04 §3 F, without CP-SAT): the best placement of parts (others fixed) over a candida...
bool proven
proven: the search finished within max_leaves