Skip to main content

Module stn

Module stn 

Source
Expand description

Simple Temporal Networks (STN).

An STN is a set of time points and binary constraints lo <= t_j - t_i <= hi. Its distance graph has an edge i -> j with weight hi and an edge j -> i with weight -lo per constraint. The network is consistent iff the distance graph has no negative cycle (Dechter, Meiri and Pearl 1991).

graph LR
    stn["Stn"] -->|"check_consistency (Bellman-Ford)"| v1["Verdict: Schedule or NegativeCycle"]
    stn -->|"minimal_network (Floyd-Warshall)"| v2["Verdict: MinimalNetwork or NegativeCycle"]
    stn -->|"partial_path_consistency (P3C)"| v4["Verdict: ChordalNetwork or NegativeCycle"]
    inc["IncrementalStn"] -->|"add_constraint, O(n^2)"| v3["Verdict: ConstraintId or NegativeCycle"]

Re-exports§

pub use crate::TimePoint;

Structs§

ChordalNetwork
The minimal constraints of a consistent STN on the edges of a chordal supergraph of its constraint graph, as computed by Stn::partial_path_consistency.
Constraint
A binary constraint lo <= t_to - t_from <= hi.
ConstraintId
Handle of a constraint inside one Stn, in insertion order starting at zero.
CycleEdge
One edge of a negative cycle, named by the constraint bound that supplied it.
IncrementalStn
An STN that keeps its minimal network up to date as constraints are added.
MinimalNetwork
The minimal network of a consistent STN.
NegativeCycle
A negative cycle in the distance graph: the constraints that jointly cannot hold.
Schedule
One assignment of a time to every time point that satisfies all constraints.
Stn
A Simple Temporal Network.

Enums§

Bound
Which bound of a constraint a distance-graph edge encodes.
Verdict
Outcome of a check that answered the question.