Skip to main content

SemiReducibleCycle

Struct SemiReducibleCycle 

Source
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

Source

pub fn steps(&self) -> &[CycleStep]

Top-level steps in traversal order.

Source

pub fn derived(&self) -> &[DerivedEdge]

The derived edges CycleStep::Derived refers to.

Source

pub fn weight(&self) -> Ticks

Total cycle weight; negative.

Source

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.

Source

pub fn expanded_len(&self) -> Option<usize>

Number of original edges Self::edges yields, or None if it exceeds usize.

The distinct contingent links whose extreme durations the cycle relies on, ascending.

Trait Implementations§

Source§

impl Clone for SemiReducibleCycle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SemiReducibleCycle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SemiReducibleCycle

Source§

impl Hash for SemiReducibleCycle

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for SemiReducibleCycle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SemiReducibleCycle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.