SearchResult¶
SearchResult
dataclass
¶
SearchResult(solution: Any, path: list[tuple[Any, Any]] | None, cost: float | None, algorithm: str, nodes_expanded: int, elapsed: float, found: bool, epsilon: float | None = None, slack: list[float] | None = None)
Result returned by every PATHOS algorithm after a solve() call.
Attributes:
| Name | Type | Description |
|---|---|---|
solution |
Any
|
The goal state (or best state found for local search). |
path |
list[tuple[Any, Any]] | None
|
List of (action, state) tuples from initial to solution, or None for algorithms that don't track paths. |
cost |
float | None
|
Accumulated cost to reach the solution, or None if not applicable. |
algorithm |
str
|
Name of the algorithm that produced this result. |
nodes_expanded |
int
|
Number of nodes expanded during search. |
elapsed |
float
|
Wall-clock seconds taken by solve(). |
found |
bool
|
True if a solution was found, False if search exhausted. |
epsilon |
float | None
|
Suboptimality bound on
|
slack |
list[float] | None
|
Per-slot residual capacity for ScheduleSpace solutions. Negative entries indicate the penalty-folded local search accepted an infeasible schedule. None for every other subspace. |