Expand description
§Multi-objective search
Multi-objective shortest paths over Pareto frontiers: BOA*, BOBA*, EMOA*, NAMOAdr, Apex and their approximate, anytime and parallel variants.
Given a graph whose edges carry cost vectors, the algorithms find one path for every Pareto-optimal cost vector from a start state to a goal.
§Contents
| Function | Objectives | Heuristic | Notes |
|---|---|---|---|
boa_star | 2 | consistent | Fastest unidirectional choice for two objectives. |
boa_star_approx | 2 | consistent | BOA* with an additive tolerance on the second objective. |
boa_star_eps | 2 | consistent | BOAε: BOA with a factor 1 + ε on the second objective. |
boa_star_anytime | 2 | consistent | A-BOA*ε: anytime, ever better approximations down to the exact front; _ws adds weighted-sum pruning, _basic is the no-reuse baseline. |
pp_a_star_iterative | 2 | consistent | Iterative-PP-A*: PP-A* from scratch over a falling tolerance schedule, the anytime baseline. |
pp_a_star | 2 | consistent | PP-A*: path pairs, factors 1 + ε1 and 1 + ε2 on both objectives. |
apex_star | any N | consistent | A*pex: apex-path pairs, a factor 1 + ε_i per objective. |
apex_star_anytime | any N | consistent | A-Apex: Apex over a falling tolerance schedule, reusing earlier solutions. |
boba_star | 2 | computed internally | Bidirectional; needs a ReverseGraph and a single goal. |
boba_star_with | 2 | consistent, both directions | boba_star with caller-supplied heuristics. |
emoa_star | any N | consistent | Lazy open list, truncated dominance; O(log n) checks for 3 objectives. |
emoa_star_tree | any N | consistent | EMOA* with the paper’s balanced-tree frontiers. |
namoa_star_dr | any N | consistent | NAMOA* with dimensionality reduction. |
namoa_star_dr_mvh_lazy | any N | admissible, multi-valued | L-NAMOAdr-mvh: NAMOAdr with a MvHeuristic and lazy dimensionality reduction. |
namoa_star_dr_mvh | any N | consistent, multi-valued | NAMOA*dr-mvh: one label per estimate; a baseline, slower than the lazy variant. |
namoa_star | any N | admissible | Classic baseline; label-setting with ZeroHeuristic. |
minsum_maxmin | sum + bottleneck | consistent on the sum | Minimal cost, maximal bottleneck capacity (Martins 1984). |
minsum_maxmin_multi | N sums + M bottlenecks | consistent on the sums | Several maxmin objectives. |
min_cost_capacity_ratio, quickest_path | sum + bottleneck | consistent on the sum | Ratio and quickest-path objectives read off the minsum–maxmin front. |
constrained_shortest_path | 2 | consistent | Cheapest path with the second cost within a budget. |
two_phase | 2 | consistent | Two-phase method: supported solutions by weighted sums (supported_solutions), then the rest. |
ReferencePoint | any N | admissible | Interactive: non-dominated solutions by Chebyshev distance to a movable reference point. |
fptas_constrained | 2 | none | FPTAS for the constrained shortest path: polynomially many labels, first cost within 1 + ε. |
min_ratio_path, min_cost_reliability_ratio | ratio | none | Linear fractional (Dinkelbach, exact signed arithmetic) and cost/reliability ratios. |
ranking | 2 | consistent | The classic ranking method: loopless paths by first cost. |
disjoint_pair | scalar | none | Suurballe: the cheapest edge- or state-disjoint pair; supported_disjoint_pairs for two objectives, disjoint_pair_front for the full bi-objective front, maximally_disjoint_pairs for cost against shared edges, dissimilar_paths for k dissimilar paths. Needs an EdgeGraph. |
aggregated_search | M hidden, K solution | admissible in the hidden space | Objective-aggregation functions over hidden objectives, exact or ε-approximate. |
label_correcting | any N | none | Multi-objective label correcting (Guerriero and Musmanno). |
DynamicSearch | any N | none | Dynamic MOS: incremental repair after edge changes on a DynamicGraph. |
pareto_spanning_trees | any N | none | Multi-objective minimum spanning trees; two_phase_spanning_trees for two objectives. |
tpa_paths | any N | admissible | TPA: exact anytime box splitting with augmented-Tchebycheff subproblems, well spread early; tpa over any solver. |
brute_force | any N | none | Exhaustive reference for tests on small graphs. |
Supporting types:
FrontandBiFront: Pareto frontiers,O(log n)queries for two objectives;TreeFront: a balanced-tree frontier for four or more.GraphandReverseGraph: the search-space interface.Heuristic,heuristic_fnandZeroHeuristic: per-objective lower bounds. The trait comes fromsearch-coreand takes&mut self; algorithms take the heuristic by value, so pass&mut hto keep it.MvHeuristic,mv_heuristic_fnandSingleValued: multi-valued heuristics, a set of lower bounds per state.IdealPointandDifferentialHeuristic: heuristic builders, the ideal point from per-objective backward Dijkstras and landmark-based differential heuristics.Cost(fromsearch-core) andDominates: scalar costs and Pareto dominance.Output: solutions sorted lexicographically by cost, plus counters.RoadGraph: a loader for 9th DIMACS Challenge road networks (.grdistance and time files,.cocoordinates).KnapsackGraphandLabelCount: graphs that encode multi-objective knapsacks and the minimum-label objective as additive paths for every search.BenchmarkGraphwithrandom_grid,netmaker,guards_gridandroad_extended: the standardized benchmark suite of Peer et al., generated from its definitions.Epsilon: a rational toleranceε = num / denfor the approximate searches, tested withCost::saturating_times.
§Features
std: linksstd; no API of its own.parallel(impliesstd): multi-threaded BOBA*,boba_star_parallelandboba_star_with_parallel, and SIP-MOSP (sip_mosp), an asynchronous parallel exact search for anyN, and parallel MOA* (parallel_moa_star), one search per objective order.
Without features the crate is no_std with alloc.
Repository: https://github.com/sunsided/multiobjective-search
Structs§
- Aggregation
- The functions that turn edge costs into
Mhidden objectives and those intoKsolution objectives. - Anytime
Front - What an anytime search returns, for
Nobjectives (two by default): the solutions found, the approximation factor they are known to achieve, and whether the search ran to completion. - Benchmark
Graph - A directed graph with
Ninteger objectives per edge, over states0..nodes, as the suite’s instances are. - Correlation
- The Pearson correlation of two objectives over a set of edges, kept exact: its sign and its square as a fraction.
- Differential
Heuristic - Differential heuristics (Goldberg and Harrelson 2005) per objective:
exact distances from and to a few landmark states, giving for any goal
gthe consistent lower boundh_i(v) = max_L max(d_i(L, g) - d_i(L, v), d_i(v, L) - d_i(g, L), 0)by the triangle inequality. It is consistent along every edge whose head can reach the goal (a term undefined for lack of a path is left out). - Dimacs
Error - An error while parsing a DIMACS file, with the 1-based line where it occurred (the line after the last one for errors found at the end).
- Dynamic
Graph - An explicit directed graph over states
0..nodeswhose edges can be added, re-costed and removed. Edge identities are the indicesDynamicGraph::add_edgereturns; a removed edge keeps its index. - Dynamic
Search - An incremental multi-objective search on a
DynamicGraph: every state keeps the Pareto set of path costs from the start (label correcting), and edge changes repair only what they touch. - Epsilon
- A rational approximation tolerance
ε = num / den >= 0, used as the factor1 + ε. - Front
- A Pareto frontier of
N-objective cost vectors. - Heuristic
Fn - A closure used as a
Heuristic; created byheuristic_fn. - Ideal
Point - The ideal-point heuristic
h_ideal(v) = (h_1(v), ..., h_N(v)), withh_ithe exact shortest distance fromvto a goal in objectiveialone. Consistent and zero on goals; a state that reaches no goal has no estimate (a dead end). - Indexed
Front - An immutable set of
N-objective cost vectors, sorted lexicographically, with a range-minimum index (Xu et al., “Asynchronous Parallel Search for Exact Multi-Objective Shortest Paths with Versioned Frontier Snapshots and Indexed Dominance Pruning”, arXiv 2609.11944, Algorithms 4 and 5). - Knapsack
Graph - A multi-objective, multi-constraint 0/1 knapsack as a layered graph.
- Label
Count - A graph whose objective
slotcounts the distinct labels a path uses: the minimum-label path objective (Pascoal et al. 2013), made additive by carrying the set of labels seen in the state. - MvHeuristic
Fn - A
MvHeuristicbacked by a closure; seemv_heuristic_fn. - MvhTable
- A multi-valued heuristic stored as a table: per state, a set of mutually non-dominated estimates. A state without an entry is a dead end.
- Output
- The result of a multi-objective search.
- Path
Pair - Two disjoint paths between the same ends.
- Path
Tchebycheff - The TPA subproblem on a graph: the path to a goal that minimizes the
scalarized score, by best-first search on the score of
g + hwith per-state dominance pruning. - Reference
Point - An interactive reference-point search: an iterator over the
Pareto-optimal solutions from a start to a goal, the one closest to the
reference point first, by the weighted Chebyshev achievement
max_i w_i · (c_i - r_i). - Road
Graph - A road network with
[distance, time]arc costs, loaded from DIMACS files. - Scalarization
- One augmented-Tchebycheff subproblem
P(u, ω)(Algorithm 2, line 7) in exact integer form. - Single
Valued - A single-valued
Heuristicas aMvHeuristicwith one estimate per state, none for a dead end. - SipConfig
- Worker counts, the snapshot index and its thresholds for
sip_mosp. - Solution
- One Pareto-optimal path.
- Stats
- Counters collected during a search.
- Towards
DifferentialHeuristicaimed at one goal.- Tree
Front - A Pareto frontier of
N-objective cost vectors in a balanced tree. - Weighted
Sum - The weighted-sum heuristic of the paper’s Section 5 for
boa_star_anytime_ws: a scalar lower boundheuristic(s)onc1 + weight · c2of every path fromsto a goal. - Zero
Heuristic - The zero heuristic for cost vectors: no estimate, the search is uninformed.
Enums§
- Achievement
- A signed achievement value
max_i w_i · (c_i - r_i). - Anytime
Apex - How A-A*pex starts each iteration (the paper’s Section 4 variants).
- Approx
Factor - An approximation factor
ε >= 0, kept exactly as a ratio of costs. - Dimacs
Error Kind - The kinds of
DimacsError. - Disjointness
- Which elements two paths must not share.
- Front
Index - How an
IndexedFrontsummarizes its vectors. - Merge
Rule - How
apex_star_withpicks the representative path when it merges two apex-path pairs. Both are the paper’s; the choice never affects the guarantee, only how many pairs merge.
Traits§
- Cost
- A non-negative scalar edge or path cost.
- Dominates
- Pareto dominance between cost vectors.
- Edge
Graph - A
Graphwhose edges have identities, for problems that must tell parallel edges apart: disjoint and dissimilar paths. - Graph
- An implicit graph with vector-valued edge weights.
- Heuristic
- An estimate of the cost from a state of type
Sto the nearest goal, in cost typeC. - MvHeuristic
- A multi-valued heuristic (MVH): for every state, a set of cost vectors that bound the remaining cost to a goal from below.
- Reverse
Graph - A
Graphthat can also enumerate incoming edges, for bidirectional search. - Tchebycheff
Solver - A single-objective solver for TPA’s subproblems: the solution with the
smallest
Scalarization::scoreover the whole feasible set, with its cost vector, orNoneif there is none.
Functions§
- achievement
- The achievement of
cost:max_i weights[i] · (cost[i] - reference[i]), the products saturating. - add
- Adds two cost vectors component-wise.
- aggregated_
search (k, m)-MOS-A*: the paths fromstartto a goal whose aggregated solution costsF_agg(c_ext(π))are Pareto-optimal, or, with toleranceseps, a set that covers each of them within1 + eps[i].- apex_
mvh - Builds an admissible multi-valued heuristic by Apex backwards from
goalswith toleranceseps(Wolff et al., Section 6, “Apex-MVH”). - apex_
star - A*pex: finds a set of solutions that covers the Pareto-optimal front
within a factor
1 + eps[i]in each objectivei, for any number of objectivesN. - apex_
star_ anytime - A-A*pex: anytime approximate search for any number of objectives,
AnytimeApex::Reusewithapex_star_anytime_with. - apex_
star_ anytime_ with - A-A*pex with a chosen variant.
- apex_
star_ with apex_starwith a chosenMergeRulefor the representative of merged pairs.- boa_
star - Finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal. - boa_
star_ anytime - A-BOA*ε: finds the Pareto-optimal front from
startto a state that satisfiesis_goal, reporting ever better approximations of it. - boa_
star_ anytime_ basic - Basic-A-BOA*ε, the paper’s baseline:
boa_star_anytimewithout reuse. - boa_
star_ anytime_ ws - A-BOA*ε-w:
boa_star_anytimewith the paper’s weighted-sum pruning. - boa_
star_ approx boa_starwith an additive toleranceslackon the second objective: returns a subset of the Pareto-optimal solutions that covers every Pareto-optimal cost vector withinslack.- boa_
star_ eps - BOA*ε:
boa_starwith a multiplicative tolerance1 + epson the second objective. - boba_
star - Finds one path for every Pareto-optimal cost vector from
starttogoalby searching from both ends. - boba_
star_ parallel boba_starwith the preliminary searches two at a time and the two directions on two threads.- boba_
star_ with boba_starwith caller-supplied heuristics instead of the internal preliminary searches.- boba_
star_ with_ parallel boba_star_withwith the two directions on two threads.- brute_
force - Finds one path for every Pareto-optimal cost vector by enumerating
every simple path from
start, for any number of objectives. - constrained_
shortest_ path - Finds the path from
startto a state that satisfiesis_goalwith the smallest first cost among those whose second cost is at mostbudget, the smallest second cost breaking ties;Noneif no path fits the budget. - disjoint_
pair - The pair of disjoint paths from
starttotargetwith the smallest total scalar costcost(weight), by Suurballe’s algorithm;Noneif no two such paths exist. - disjoint_
pair_ front - The full Pareto-optimal front of disjoint path pairs from
starttotarget, the costs(c1, c2)summed over both paths: one pair per non-dominated total, sorted by cost. - dissimilar_
paths - Up to
kloopless paths fromstartto a goal in order of the scalarcost(weight), each sharing at mostmax_sharededges with every earlier one: the greedy k-shortest dissimilar paths. - emoa_
star - Finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal, for any number of objectivesN. - emoa_
star_ tree emoa_starwith every truncated frontier in a balanced tree (TreeFront), as in the paper.- fptas_
constrained - An FPTAS for the constrained shortest path: a path from
startto a goal with second cost at mostbudgetand first cost at most1 + εtimes the optimumconstrained_shortest_pathfinds;Noneif no path fits the budget. - guards_
grid - A GUARDS-based bi-objective grid (Section 4.4) from a Moving AI map and
guard cells: an eight-connected directed graph over the passable cells,
objectives path length (10 per orthogonal, 14 per diagonal move) and
guard exposure. A cell’s exposure is the number of guards that see it
(Bresenham line of sight through passable cells); an orthogonal move
costs the destination’s exposure, a diagonal one the largest of the
destination and the two side cells, and is allowed only when both side
cells are passable. Cell
(x, y)is statey · width + x; blocked cells have no edges. - heuristic_
fn - Turns a closure
FnMut(&S) -> Option<C>into aHeuristic. - hypervolume
- The hypervolume of
points: the volume of the region they dominate belowreference, exactly (Zitzler and Thiele; the convergence- diversity indicator Domínguez-Ríos et al. use to compare anytime fronts). Points not strictly belowreferencein every objective add nothing. - label_
correcting - Finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal, by label correcting. - maximally_
disjoint_ pairs - The maximally disjoint pairs: the Pareto-optimal trade-offs between the
total cost of two paths from
starttotargetand the number of edges they share, as(pair, total cost, shared edges)sorted by cost. - min_
cost_ capacity_ ratio - The path from
startto a goal with the smallest ratio of its cost (the sum of the edges’ first components) to its bottleneck capacity (the smallest second component);Noneif no goal is reachable. - min_
cost_ reliability_ ratio - The path from
startto a goal that minimizes its cost divided by its reliability, the cost being the sum of the edges’ first components and the reliability the product of their second components;Noneif no goal is reachable. Returns the solution with its reliability as an exact product(num, den)of 32-bit limbs. - min_
ratio_ path - The path from
startto a goal that minimizesΣ c1 / Σ c2among those withΣ c2 > 0;Noneif there is no such path. Goal states end paths, and paths are simple. - minsum_
maxmin - Finds one path for every Pareto-optimal
(cost, bottleneck)pair fromstartto a state that satisfiesis_goal: the cost (the sum of the edges’ first components) as small as possible, the bottleneck (the smallest of their second components) as large as possible. - minsum_
maxmin_ multi - Finds one path for every Pareto-optimal cost from
startto a state that satisfiesis_goal, withNadditive costs to minimize andMbottleneck capacities to maximize (edge weights(sums, capacities)). - mv_
heuristic_ fn - Wraps a closure
|state, out| ...that appends the estimates ofstatetooutas aMvHeuristic. - namoa_
star - Finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal, for any number of objectivesN. - namoa_
star_ dr - NAMOA*dr:
namoa_starwith dimensionality reduction, for consistent heuristics. - namoa_
star_ dr_ mvh - NAMOAdr-mvh: NAMOAdr with a consistent multi-valued heuristic.
- namoa_
star_ dr_ mvh_ lazy - L-NAMOAdr-mvh: NAMOAdr with an admissible multi-valued heuristic and lazy dimensionality reduction.
- netmaker
- A
NetMakergraph (Section 4.3) over states0..nodeswith three objectives: a random directed Hamiltonian cycle whose edges get one cost from each of1..=333,334..=666and667..=1000in random order, and per state a random extra out-degree fromout_min + 1..=out_max(the cycle edge counts as one) filled with edges to states within the locality window[u - locality / 2, u + locality / 2]of its identifier, with costs uniform in1..=99; no self-loops or duplicates. The paper usesnodesin{10000, 20000, 30000},out_min = 1,out_max = 10andlocalityin{20, 50}. - netmaker_
queries countNetMakerqueries (Section 4.3): sources uniform among the first tenth of the identifiers, targets among the last tenth.- objective_
correlation - The correlation of objectives
aandbover the cost vectors ofedges, for integer and decimal costs. - parallel_
moa_ star - Parallel MOA*: finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal, withNthreads. - pareto_
spanning_ trees - The Pareto-optimal spanning trees of an undirected graph, one per non-dominated cost, sorted by cost; empty if the graph is disconnected.
- pp_
a_ star - PP-A*: finds a set of solutions that covers the Pareto-optimal front
within a factor
1 + eps[i]in each objectivei. - pp_
a_ star_ iterative - Iterative-PP-A*:
pp_a_starrun from scratch for every tolerance ofschedule, the anytime baseline of “Anytime Approximate Bi-Objective Search” (anonymous preprint, crl.cs.technion.ac.il), which uses[0.01, 0.001, 0.0001, 0]. - quickest_
path - The quickest path for sending
sigmaunits fromstartto a goal: the smallest transmission timedelay + sigma / capacity, with the delay the sum of the edges’ first components and the capacity the smallest second component;Noneif no goal is reachable. - random_
grid - A random-cost grid
Grid_N(Section 4.3): a four-connectedwidth × heightgrid, every directed edge withNindependent costs uniform in1..=10, plus a source joined to every cell of the leftmost column and a target joined from every cell of the rightmost one, with costs from the same distribution. Cell(x, y)is statey · width + x; the source and target are the last two states, and the query is theirs. The paper uses widths and heights in{300, 350, ..., 600}. - ranking
- Finds one path for every Pareto-optimal cost vector by ranking: loopless
paths from
startto a goal are generated in lexicographic(c1, c2)order (a best-first k-shortest-path enumeration), and a path is kept when its second cost is below every kept one. The enumeration stops after the first cost of the lexicographically(c2, c1)-optimal path, beyond which nothing is efficient. - road_
extended - The DIMACS-Extended objectives (Section 4.2, after Ahmadi et al. 2024)
on a road network given as arcs with
[distance, time]: distance, time, the absolute elevation difference of the endpoints, the sum of the endpoints’ out-degrees (twice their average, to stay integral), and one hop.elevation[v]is the elevation of statev; the paper takes it from external elevation data. Project withBenchmarkGraph::projectfor the three- and four-objective variants. - sip_
mosp - SIP-MOSP: finds one path for every Pareto-optimal cost vector from
startto a state that satisfiesis_goal, with one thread per search and update worker plus a goal worker. - supported_
disjoint_ pairs - The disjoint pairs whose total cost vectors are the vertices of the convex hull of the bi-objective front of disjoint pairs: the extreme supported pairs, sorted by total cost.
- supported_
solutions - Phase 1: the extreme supported solutions, those whose costs are the vertices of the convex hull of the Pareto-optimal front, sorted by cost.
- supported_
spanning_ trees - Phase 1 of
two_phase_spanning_trees: the extreme supported trees, sorted by cost; empty if the graph is disconnected. - tpa
- TPA (Algorithm 2) over any solver: the exact Pareto front of the problem
whose ideal point is
idealand whose costs all lie belownadir(strictly, in every objective), found box by box. - tpa_
paths - TPA for shortest paths: the exact Pareto front from
startto a state that satisfiesis_goal, found well spread over the objective space first and completed if the budget allows. - two_
phase - The two-phase method: every Pareto-optimal cost, one path each, sorted by cost.
- two_
phase_ spanning_ trees - The two-phase method for bi-objective spanning trees (Ramos et al.
1998): phase 1 finds the extreme supported trees by dichotomic search
with weighted-sum Kruskal (weights from neighbouring trees, compared
exactly through
ExactArith, ties lexicographic); phase 2 finds the rest by branch and bound restricted to each triangle between neighbours. Same result aspareto_spanning_trees. - weakly_
dominates - Returns
trueifais no worse thanbin every objective.
Type Aliases§
- Aggregated
- The result of
aggregated_search: the solutions with their aggregated costs, and the hidden cost of each, in the same order. - BiFront
- A Pareto frontier of two-objective cost vectors:
FrontwithN = 2. - Bottleneck
- The capacity of a path: the smallest capacity of its edges, or
None(unbounded) for the empty path. - Costed
Pair - A disjoint pair with its total cost.
- Exact
Reliability - A path reliability as an exact fraction
(num, den), each as 32-bit limbs, least significant first. - Query
- A start–goal query.
- Ranked
Path - A path as its states, its edges and its cost.
- Reliability
- An edge reliability
num / den, a probability in(0, 1]. - Shared
Pair - A pair with its total cost and its number of shared edges.
- Sums
AndWidths - The costs of a path in
minsum_maxmin_multi:Nsums andMbottlenecks. - TpaResult
- What
tpareturns: the solutions with their points, and whether the front is complete. - Tree
- A spanning tree as its edge indices (ascending) and its cost.
- Tree
Edge - An undirected edge
(u, v, cost)between nodes0..nodes. - Wide
Path - A path with its cost and bottleneck capacity.