#include <place/anneal_state.hpp>
|
| | Annealer (const Problem &p, const std::vector< std::vector< int > > &pn, const Placement &start, const AnnealOptions &o, int stream) |
| std::int64_t | cost () const |
| std::int64_t | crossings () const |
| std::int64_t | overflow () const |
| const Placement & | current () const |
| double | estimate_t0 (double p0) |
| | Initial temperature: mean uphill delta of random shift moves, accepted with probability p0.
|
| Coord | r0 () const |
| void | run (std::uint64_t moves, std::chrono::steady_clock::time_point deadline, bool has_deadline) |
| | Simulated annealing with a geometric schedule over moves steps (independent-runs mode).
|
| void | sweep (Slot &s, std::uint64_t n) |
| | n steps at the slot's fixed temperature (parallel tempering).
|
| void | step (Slot &s) |
| | One step: an ordinary move at temperature t, or (with probability lns_rate, while LNS is on) an LNS window.
|
| void | set_lns (bool on) |
| | LNS windows are greedy (kept only if better), so they only pay off in the cold part of the schedule: the drivers switch them on for the last kLnsPhase of the budget.
|
| bool | lns_step () |
| | Large-neighbourhood search: rip up a window of parts around a seed part and re-place them (exactly by branch and bound for small windows, else greedily); kept only if the cost strictly falls.
|
| bool | repair (std::vector< int > window) |
| WindowStats | solve_window (std::vector< int > window, bool prune, long max_leaves=200 '000) |
| | Exact optimum of the window over its candidate set (branch and bound; prune = false enumerates every combination: the reference path).
|
| std::vector< int > | window_around (int seed, int k) const |
| void | note_best () |
| const Placement & | best () const |
| const std::vector< Placement > & | trace () const |
| const std::vector< double > & | trace_t () const |
| std::int64_t | best_cost () const |
| std::int64_t | start_cost () const |
| std::uint64_t | moves () const |
| std::uint64_t | accepted () const |
| std::uint64_t | illegal () const |
| std::uint64_t | lns_tried () const |
| std::uint64_t | lns_improved () const |
| bool | time_limited () const |
| bool | movable_empty () const |
| int | movable_part (std::size_t i) const |
| std::size_t | movable_size () const |
| double | next () |
| std::uint64_t | next_u64 () |
| std::int64_t | evaluate (const Move &m) |
| | Move primitives (pl_ is modified by evaluate; follow with revert or commit).
|
| bool | legal (const Move &m) const |
| | n ≤ 2 only
|
| void | revert (const Move &m) |
| void | commit (const Move &m) |
Definition at line 60 of file anneal_state.hpp.
◆ Annealer()
| tmk::place::detail::Annealer::Annealer |
( |
const Problem & | p, |
|
|
const std::vector< std::vector< int > > & | pn, |
|
|
const Placement & | start, |
|
|
const AnnealOptions & | o, |
|
|
int | stream ) |
◆ accepted()
| std::uint64_t tmk::place::detail::Annealer::accepted |
( |
| ) |
const |
|
inline |
◆ best()
| const Placement & tmk::place::detail::Annealer::best |
( |
| ) |
const |
|
inline |
◆ best_cost()
| std::int64_t tmk::place::detail::Annealer::best_cost |
( |
| ) |
const |
|
inline |
◆ commit()
| void tmk::place::detail::Annealer::commit |
( |
const Move & | m | ) |
|
◆ cost()
| std::int64_t tmk::place::detail::Annealer::cost |
( |
| ) |
const |
|
inline |
◆ crossings()
| std::int64_t tmk::place::detail::Annealer::crossings |
( |
| ) |
const |
|
inline |
◆ current()
| const Placement & tmk::place::detail::Annealer::current |
( |
| ) |
const |
|
inline |
◆ estimate_t0()
| double tmk::place::detail::Annealer::estimate_t0 |
( |
double | p0 | ) |
|
Initial temperature: mean uphill delta of random shift moves, accepted with probability p0.
◆ evaluate()
| std::int64_t tmk::place::detail::Annealer::evaluate |
( |
const Move & | m | ) |
|
Move primitives (pl_ is modified by evaluate; follow with revert or commit).
◆ illegal()
| std::uint64_t tmk::place::detail::Annealer::illegal |
( |
| ) |
const |
|
inline |
◆ legal()
| bool tmk::place::detail::Annealer::legal |
( |
const Move & | m | ) |
const |
◆ lns_improved()
| std::uint64_t tmk::place::detail::Annealer::lns_improved |
( |
| ) |
const |
|
inline |
◆ lns_step()
| bool tmk::place::detail::Annealer::lns_step |
( |
| ) |
|
Large-neighbourhood search: rip up a window of parts around a seed part and re-place them (exactly by branch and bound for small windows, else greedily); kept only if the cost strictly falls.
◆ lns_tried()
| std::uint64_t tmk::place::detail::Annealer::lns_tried |
( |
| ) |
const |
|
inline |
◆ movable_empty()
| bool tmk::place::detail::Annealer::movable_empty |
( |
| ) |
const |
|
inline |
◆ movable_part()
| int tmk::place::detail::Annealer::movable_part |
( |
std::size_t | i | ) |
const |
|
inline |
◆ movable_size()
| std::size_t tmk::place::detail::Annealer::movable_size |
( |
| ) |
const |
|
inline |
◆ moves()
| std::uint64_t tmk::place::detail::Annealer::moves |
( |
| ) |
const |
|
inline |
◆ next()
| double tmk::place::detail::Annealer::next |
( |
| ) |
|
|
inline |
◆ next_u64()
| std::uint64_t tmk::place::detail::Annealer::next_u64 |
( |
| ) |
|
|
inline |
◆ note_best()
| void tmk::place::detail::Annealer::note_best |
( |
| ) |
|
◆ overflow()
| std::int64_t tmk::place::detail::Annealer::overflow |
( |
| ) |
const |
|
inline |
◆ r0()
| Coord tmk::place::detail::Annealer::r0 |
( |
| ) |
const |
|
inline |
◆ repair()
| bool tmk::place::detail::Annealer::repair |
( |
std::vector< int > | window | ) |
|
◆ revert()
| void tmk::place::detail::Annealer::revert |
( |
const Move & | m | ) |
|
◆ run()
| void tmk::place::detail::Annealer::run |
( |
std::uint64_t | moves, |
|
|
std::chrono::steady_clock::time_point | deadline, |
|
|
bool | has_deadline ) |
Simulated annealing with a geometric schedule over moves steps (independent-runs mode).
◆ set_lns()
| void tmk::place::detail::Annealer::set_lns |
( |
bool | on | ) |
|
|
inline |
LNS windows are greedy (kept only if better), so they only pay off in the cold part of the schedule: the drivers switch them on for the last kLnsPhase of the budget.
Definition at line 80 of file anneal_state.hpp.
◆ solve_window()
| WindowStats tmk::place::detail::Annealer::solve_window |
( |
std::vector< int > | window, |
|
|
bool | prune, |
|
|
long | max_leaves = 200 '000 ) |
Exact optimum of the window over its candidate set (branch and bound; prune = false enumerates every combination: the reference path).
Applied only if strictly better.
◆ start_cost()
| std::int64_t tmk::place::detail::Annealer::start_cost |
( |
| ) |
const |
|
inline |
◆ step()
| void tmk::place::detail::Annealer::step |
( |
Slot & | s | ) |
|
One step: an ordinary move at temperature t, or (with probability lns_rate, while LNS is on) an LNS window.
◆ sweep()
| void tmk::place::detail::Annealer::sweep |
( |
Slot & | s, |
|
|
std::uint64_t | n ) |
n steps at the slot's fixed temperature (parallel tempering).
◆ time_limited()
| bool tmk::place::detail::Annealer::time_limited |
( |
| ) |
const |
|
inline |
◆ trace()
| const std::vector< Placement > & tmk::place::detail::Annealer::trace |
( |
| ) |
const |
|
inline |
◆ trace_t()
| const std::vector< double > & tmk::place::detail::Annealer::trace_t |
( |
| ) |
const |
|
inline |
◆ window_around()
| std::vector< int > tmk::place::detail::Annealer::window_around |
( |
int | seed, |
|
|
int | k ) const |
The documentation for this class was generated from the following file: