[][src]Struct graphplan::plangraph::PlanGraph

pub struct PlanGraph<'a, ActionId: Eq + Hash + Ord + PartialOrd + Clone + Debug, PropositionId: Eq + Hash + Ord + PartialOrd + Clone + Debug + Display> {
    pub goals: HashSet<&'a Proposition<PropositionId>>,
    pub actions: HashSet<&'a Action<'a, ActionId, PropositionId>>,
    pub layers: Vec<Layer<'a, ActionId, PropositionId>>,
    pub mutex_props: HashMap<usize, HashSet<PairSet<&'a Proposition<PropositionId>>>>,
    pub mutex_actions: HashMap<usize, HashSet<PairSet<&'a Action<'a, ActionId, PropositionId>>>>,
}

Fields

goals: HashSet<&'a Proposition<PropositionId>>actions: HashSet<&'a Action<'a, ActionId, PropositionId>>layers: Vec<Layer<'a, ActionId, PropositionId>>mutex_props: HashMap<usize, HashSet<PairSet<&'a Proposition<PropositionId>>>>mutex_actions: HashMap<usize, HashSet<PairSet<&'a Action<'a, ActionId, PropositionId>>>>

Methods

impl<'a, ActionId: Eq + Hash + Ord + PartialOrd + Clone + Debug, PropositionId: Eq + Hash + Ord + PartialOrd + Clone + Debug + Display> PlanGraph<'a, ActionId, PropositionId>[src]

pub fn new(
    initial_props: HashSet<&'a Proposition<PropositionId>>,
    goals: HashSet<&'a Proposition<PropositionId>>,
    actions: HashSet<&'a Action<ActionId, PropositionId>>
) -> Self
[src]

pub fn push(&mut self, layer: Layer<'a, ActionId, PropositionId>)[src]

pub fn extend(&mut self) -> &mut Self[src]

Extends the plangraph to depth i+1 Inserts another action layer and proposition layer

pub fn depth(&self) -> usize[src]

Returns the depth of the planning graph

pub fn has_possible_solution(&self) -> bool[src]

A solution is possible if all goals exist in the last proposition layer and are not mutex

pub fn has_leveled_off(&self) -> bool[src]

The graph is considered to have "leveled off" when proposition layer P and an adjacent proposition layer Q are equal

Trait Implementations

impl<'a, ActionId: Debug + Eq + Hash + Ord + PartialOrd + Clone, PropositionId: Debug + Eq + Hash + Ord + PartialOrd + Clone + Display> Debug for PlanGraph<'a, ActionId, PropositionId>[src]

Auto Trait Implementations

impl<'a, ActionId, PropositionId> RefUnwindSafe for PlanGraph<'a, ActionId, PropositionId> where
    ActionId: RefUnwindSafe,
    PropositionId: RefUnwindSafe

impl<'a, ActionId, PropositionId> Send for PlanGraph<'a, ActionId, PropositionId> where
    ActionId: Sync,
    PropositionId: Sync

impl<'a, ActionId, PropositionId> Sync for PlanGraph<'a, ActionId, PropositionId> where
    ActionId: Sync,
    PropositionId: Sync

impl<'a, ActionId, PropositionId> Unpin for PlanGraph<'a, ActionId, PropositionId>

impl<'a, ActionId, PropositionId> UnwindSafe for PlanGraph<'a, ActionId, PropositionId> where
    ActionId: RefUnwindSafe,
    PropositionId: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.