pub struct SemiReducibleCycle { /* private fields */ }Expand description
A semi-reducible negative cycle: requirement bounds and contingent extremes that no dynamic strategy can satisfy together.
Stored in compact form: the top-level Self::steps chain like an STN cycle, and each
CycleStep::Derived stands for a DerivedEdge listed once in Self::derived, whose
own steps may again be derived. The compact form has at most one entry per derived edge,
so it stays polynomial (O(n^3) steps for n points); Self::edges expands it lazily
into original edges, which can be exponentially many: an indivisible cycle can need
3 * 2^k - 2 edges for k links (the magic loops of Hunsberger, ICAART 2013), with
repetitions.
In the expansion the head of each edge is the tail of the next, and the head of the last is
the tail of the first. Summing the edge weights (lower-case edges at the minimum duration,
upper-case edges at minus the maximum) gives Self::weight, which is strictly negative.
Morris (2006) showed that an STNU is dynamically controllable iff its labelled distance
graph has no such cycle: the lower-case edges on it can be reduced away (the agent cannot
exploit an early end it has not seen yet), which leaves a negative cycle of requirements
and waits.
The cycle is a certificate in the sense of NegativeCycle: keeping
only the requirement bounds it names (and all contingent links) still gives a network that
is not dynamically controllable, which the tests check against independent checkers. It is
not necessarily simple or minimal.
Implementations§
Source§impl SemiReducibleCycle
impl SemiReducibleCycle
Sourcepub fn derived(&self) -> &[DerivedEdge]
pub fn derived(&self) -> &[DerivedEdge]
The derived edges CycleStep::Derived refers to.
Sourcepub fn edges(&self) -> impl Iterator<Item = LabelledEdge> + '_
pub fn edges(&self) -> impl Iterator<Item = LabelledEdge> + '_
The original edges in traversal order, expanding derived edges lazily (memory proportional to the nesting depth).
The count can be exponential in the number of links; see Self::expanded_len.
Sourcepub fn expanded_len(&self) -> Option<usize>
pub fn expanded_len(&self) -> Option<usize>
Number of original edges Self::edges yields, or None if it exceeds usize.
Sourcepub fn contingent_links(&self) -> Vec<ContingentId>
pub fn contingent_links(&self) -> Vec<ContingentId>
The distinct contingent links whose extreme durations the cycle relies on, ascending.