Skip to main content

Crate multiobjective_search

Crate multiobjective_search 

Source
Expand description

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

FunctionObjectivesHeuristicNotes
boa_star2consistentFastest unidirectional choice for two objectives.
boa_star_approx2consistentBOA* with an additive tolerance on the second objective.
boa_star_eps2consistentBOAε: BOA with a factor 1 + ε on the second objective.
boa_star_anytime2consistentA-BOA*ε: anytime, ever better approximations down to the exact front; _ws adds weighted-sum pruning, _basic is the no-reuse baseline.
pp_a_star_iterative2consistentIterative-PP-A*: PP-A* from scratch over a falling tolerance schedule, the anytime baseline.
pp_a_star2consistentPP-A*: path pairs, factors 1 + ε1 and 1 + ε2 on both objectives.
apex_starany NconsistentA*pex: apex-path pairs, a factor 1 + ε_i per objective.
apex_star_anytimeany NconsistentA-Apex: Apex over a falling tolerance schedule, reusing earlier solutions.
boba_star2computed internallyBidirectional; needs a ReverseGraph and a single goal.
boba_star_with2consistent, both directionsboba_star with caller-supplied heuristics.
emoa_starany NconsistentLazy open list, truncated dominance; O(log n) checks for 3 objectives.
emoa_star_treeany NconsistentEMOA* with the paper’s balanced-tree frontiers.
namoa_star_drany NconsistentNAMOA* with dimensionality reduction.
namoa_star_dr_mvh_lazyany Nadmissible, multi-valuedL-NAMOAdr-mvh: NAMOAdr with a MvHeuristic and lazy dimensionality reduction.
namoa_star_dr_mvhany Nconsistent, multi-valuedNAMOA*dr-mvh: one label per estimate; a baseline, slower than the lazy variant.
namoa_starany NadmissibleClassic baseline; label-setting with ZeroHeuristic.
minsum_maxminsum + bottleneckconsistent on the sumMinimal cost, maximal bottleneck capacity (Martins 1984).
minsum_maxmin_multiN sums + M bottlenecksconsistent on the sumsSeveral maxmin objectives.
min_cost_capacity_ratio, quickest_pathsum + bottleneckconsistent on the sumRatio and quickest-path objectives read off the minsum–maxmin front.
constrained_shortest_path2consistentCheapest path with the second cost within a budget.
two_phase2consistentTwo-phase method: supported solutions by weighted sums (supported_solutions), then the rest.
ReferencePointany NadmissibleInteractive: non-dominated solutions by Chebyshev distance to a movable reference point.
fptas_constrained2noneFPTAS for the constrained shortest path: polynomially many labels, first cost within 1 + ε.
min_ratio_path, min_cost_reliability_ratiorationoneLinear fractional (Dinkelbach, exact signed arithmetic) and cost/reliability ratios.
ranking2consistentThe classic ranking method: loopless paths by first cost.
disjoint_pairscalarnoneSuurballe: 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_searchM hidden, K solutionadmissible in the hidden spaceObjective-aggregation functions over hidden objectives, exact or ε-approximate.
label_correctingany NnoneMulti-objective label correcting (Guerriero and Musmanno).
DynamicSearchany NnoneDynamic MOS: incremental repair after edge changes on a DynamicGraph.
pareto_spanning_treesany NnoneMulti-objective minimum spanning trees; two_phase_spanning_trees for two objectives.
tpa_pathsany NadmissibleTPA: exact anytime box splitting with augmented-Tchebycheff subproblems, well spread early; tpa over any solver.
brute_forceany NnoneExhaustive reference for tests on small graphs.

Supporting types:

§Features

  • std: links std; no API of its own.
  • parallel (implies std): multi-threaded BOBA*, boba_star_parallel and boba_star_with_parallel, and SIP-MOSP (sip_mosp), an asynchronous parallel exact search for any N, 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 M hidden objectives and those into K solution objectives.
AnytimeFront
What an anytime search returns, for N objectives (two by default): the solutions found, the approximation factor they are known to achieve, and whether the search ran to completion.
BenchmarkGraph
A directed graph with N integer objectives per edge, over states 0..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.
DifferentialHeuristic
Differential heuristics (Goldberg and Harrelson 2005) per objective: exact distances from and to a few landmark states, giving for any goal g the consistent lower bound h_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).
DimacsError
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).
DynamicGraph
An explicit directed graph over states 0..nodes whose edges can be added, re-costed and removed. Edge identities are the indices DynamicGraph::add_edge returns; a removed edge keeps its index.
DynamicSearch
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 factor 1 + ε.
Front
A Pareto frontier of N-objective cost vectors.
HeuristicFn
A closure used as a Heuristic; created by heuristic_fn.
IdealPoint
The ideal-point heuristic h_ideal(v) = (h_1(v), ..., h_N(v)), with h_i the exact shortest distance from v to a goal in objective i alone. Consistent and zero on goals; a state that reaches no goal has no estimate (a dead end).
IndexedFront
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).
KnapsackGraph
A multi-objective, multi-constraint 0/1 knapsack as a layered graph.
LabelCount
A graph whose objective slot counts 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.
MvHeuristicFn
A MvHeuristic backed by a closure; see mv_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.
PathPair
Two disjoint paths between the same ends.
PathTchebycheff
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 + h with per-state dominance pruning.
ReferencePoint
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).
RoadGraph
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.
SingleValued
A single-valued Heuristic as a MvHeuristic with 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
DifferentialHeuristic aimed at one goal.
TreeFront
A Pareto frontier of N-objective cost vectors in a balanced tree.
WeightedSum
The weighted-sum heuristic of the paper’s Section 5 for boa_star_anytime_ws: a scalar lower bound heuristic(s) on c1 + weight · c2 of every path from s to a goal.
ZeroHeuristic
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).
AnytimeApex
How A-A*pex starts each iteration (the paper’s Section 4 variants).
ApproxFactor
An approximation factor ε >= 0, kept exactly as a ratio of costs.
DimacsErrorKind
The kinds of DimacsError.
Disjointness
Which elements two paths must not share.
FrontIndex
How an IndexedFront summarizes its vectors.
MergeRule
How apex_star_with picks 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.
EdgeGraph
A Graph whose 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 S to the nearest goal, in cost type C.
MvHeuristic
A multi-valued heuristic (MVH): for every state, a set of cost vectors that bound the remaining cost to a goal from below.
ReverseGraph
A Graph that can also enumerate incoming edges, for bidirectional search.
TchebycheffSolver
A single-objective solver for TPA’s subproblems: the solution with the smallest Scalarization::score over the whole feasible set, with its cost vector, or None if 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 from start to a goal whose aggregated solution costs F_agg(c_ext(π)) are Pareto-optimal, or, with tolerances eps, a set that covers each of them within 1 + eps[i].
apex_mvh
Builds an admissible multi-valued heuristic by Apex backwards from goals with tolerances eps (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 objective i, for any number of objectives N.
apex_star_anytime
A-A*pex: anytime approximate search for any number of objectives, AnytimeApex::Reuse with apex_star_anytime_with.
apex_star_anytime_with
A-A*pex with a chosen variant.
apex_star_with
apex_star with a chosen MergeRule for the representative of merged pairs.
boa_star
Finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_goal.
boa_star_anytime
A-BOA*ε: finds the Pareto-optimal front from start to a state that satisfies is_goal, reporting ever better approximations of it.
boa_star_anytime_basic
Basic-A-BOA*ε, the paper’s baseline: boa_star_anytime without reuse.
boa_star_anytime_ws
A-BOA*ε-w: boa_star_anytime with the paper’s weighted-sum pruning.
boa_star_approx
boa_star with an additive tolerance slack on the second objective: returns a subset of the Pareto-optimal solutions that covers every Pareto-optimal cost vector within slack.
boa_star_eps
BOA*ε: boa_star with a multiplicative tolerance 1 + eps on the second objective.
boba_star
Finds one path for every Pareto-optimal cost vector from start to goal by searching from both ends.
boba_star_parallel
boba_star with the preliminary searches two at a time and the two directions on two threads.
boba_star_with
boba_star with caller-supplied heuristics instead of the internal preliminary searches.
boba_star_with_parallel
boba_star_with with 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 start to a state that satisfies is_goal with the smallest first cost among those whose second cost is at most budget, the smallest second cost breaking ties; None if no path fits the budget.
disjoint_pair
The pair of disjoint paths from start to target with the smallest total scalar cost cost(weight), by Suurballe’s algorithm; None if no two such paths exist.
disjoint_pair_front
The full Pareto-optimal front of disjoint path pairs from start to target, the costs (c1, c2) summed over both paths: one pair per non-dominated total, sorted by cost.
dissimilar_paths
Up to k loopless paths from start to a goal in order of the scalar cost(weight), each sharing at most max_shared edges with every earlier one: the greedy k-shortest dissimilar paths.
emoa_star
Finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_goal, for any number of objectives N.
emoa_star_tree
emoa_star with every truncated frontier in a balanced tree (TreeFront), as in the paper.
fptas_constrained
An FPTAS for the constrained shortest path: a path from start to a goal with second cost at most budget and first cost at most 1 + ε times the optimum constrained_shortest_path finds; None if 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 state y · width + x; blocked cells have no edges.
heuristic_fn
Turns a closure FnMut(&S) -> Option<C> into a Heuristic.
hypervolume
The hypervolume of points: the volume of the region they dominate below reference, exactly (Zitzler and Thiele; the convergence- diversity indicator Domínguez-Ríos et al. use to compare anytime fronts). Points not strictly below reference in every objective add nothing.
label_correcting
Finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_goal, by label correcting.
maximally_disjoint_pairs
The maximally disjoint pairs: the Pareto-optimal trade-offs between the total cost of two paths from start to target and the number of edges they share, as (pair, total cost, shared edges) sorted by cost.
min_cost_capacity_ratio
The path from start to a goal with the smallest ratio of its cost (the sum of the edges’ first components) to its bottleneck capacity (the smallest second component); None if no goal is reachable.
min_cost_reliability_ratio
The path from start to 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; None if 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 start to a goal that minimizes Σ c1 / Σ c2 among those with Σ c2 > 0; None if 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 from start to a state that satisfies is_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 start to a state that satisfies is_goal, with N additive costs to minimize and M bottleneck capacities to maximize (edge weights (sums, capacities)).
mv_heuristic_fn
Wraps a closure |state, out| ... that appends the estimates of state to out as a MvHeuristic.
namoa_star
Finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_goal, for any number of objectives N.
namoa_star_dr
NAMOA*dr: namoa_star with 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 NetMaker graph (Section 4.3) over states 0..nodes with three objectives: a random directed Hamiltonian cycle whose edges get one cost from each of 1..=333, 334..=666 and 667..=1000 in random order, and per state a random extra out-degree from out_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 in 1..=99; no self-loops or duplicates. The paper uses nodes in {10000, 20000, 30000}, out_min = 1, out_max = 10 and locality in {20, 50}.
netmaker_queries
count NetMaker queries (Section 4.3): sources uniform among the first tenth of the identifiers, targets among the last tenth.
objective_correlation
The correlation of objectives a and b over the cost vectors of edges, for integer and decimal costs.
parallel_moa_star
Parallel MOA*: finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_goal, with N threads.
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 objective i.
pp_a_star_iterative
Iterative-PP-A*: pp_a_star run from scratch for every tolerance of schedule, 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 sigma units from start to a goal: the smallest transmission time delay + sigma / capacity, with the delay the sum of the edges’ first components and the capacity the smallest second component; None if no goal is reachable.
random_grid
A random-cost grid Grid_N (Section 4.3): a four-connected width × height grid, every directed edge with N independent costs uniform in 1..=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 state y · 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 start to 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 state v; the paper takes it from external elevation data. Project with BenchmarkGraph::project for the three- and four-objective variants.
sip_mosp
SIP-MOSP: finds one path for every Pareto-optimal cost vector from start to a state that satisfies is_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 ideal and whose costs all lie below nadir (strictly, in every objective), found box by box.
tpa_paths
TPA for shortest paths: the exact Pareto front from start to a state that satisfies is_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 as pareto_spanning_trees.
weakly_dominates
Returns true if a is no worse than b in 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: Front with N = 2.
Bottleneck
The capacity of a path: the smallest capacity of its edges, or None (unbounded) for the empty path.
CostedPair
A disjoint pair with its total cost.
ExactReliability
A path reliability as an exact fraction (num, den), each as 32-bit limbs, least significant first.
Query
A start–goal query.
RankedPath
A path as its states, its edges and its cost.
Reliability
An edge reliability num / den, a probability in (0, 1].
SharedPair
A pair with its total cost and its number of shared edges.
SumsAndWidths
The costs of a path in minsum_maxmin_multi: N sums and M bottlenecks.
TpaResult
What tpa returns: the solutions with their points, and whether the front is complete.
Tree
A spanning tree as its edge indices (ascending) and its cost.
TreeEdge
An undirected edge (u, v, cost) between nodes 0..nodes.
WidePath
A path with its cost and bottleneck capacity.