|
PBeFS
Parallel Best-First Search
|
Header file for the class template SPAStar, Simple Parallel A*: all the workers share one OPEN and one CLOSED list. More...
#include <atomic>#include <memory>#include <mutex>#include <type_traits>#include <vector>#include "PBeFS/astar/ConcurrentClosed.h"#include "PBeFS/astar/HDAStar.h"Go to the source code of this file.
Classes | |
| class | SPAStar< D, Executor, Open > |
| Simple Parallel A*: one OPEN and one CLOSED list shared by the workers. More... | |
Namespaces | |
| namespace | PBeFS_di_unipi_it |
| namespace for the Parallel Best-First Search library | |
Header file for the class template SPAStar, Simple Parallel A*: all the workers share one OPEN and one CLOSED list.
The search follows Algorithm 2 of Fukunaga et al. (2017), with the notation of the page "Best-first search and A*" of the documentation; the lock \( L \) protects OPEN and the counter busy of the workers that are expanding, the fields of the nodes that change are protected by the locks of CLOSED [see ConcurrentClosed.h], and the incumbent \( z \) is atomic:
The expansion at lines 20 to 25 runs without the lock of OPEN, and therefore \( p \) nodes are expanded at once, some of them before the node that would give them a cheaper path; this is why a node may be reopened at lines 22 and 23 also with a consistent heuristic. The test at line 10 is exact, since OPEN and busy are read under the same lock and a worker lowers busy only after having pushed its successors (line 26): OPEN without a node of \( f < z \) and no worker busy mean that no node of \( f < z \) exists anywhere, which is the condition of the page "Parallel A*" for an optimal \( z \).