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

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

Fields

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

Methods

impl<ActionId: Eq + Hash + Ord + PartialOrd + Clone + Debug> PlanGraph<ActionId>[src]

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

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

pub fn extend(&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 actions_at_layer(
    &self,
    index: usize
) -> Result<BTreeSet<Action<ActionId>>, String>
[src]

pub fn search_with<T>(&mut self, solver: &T) -> Option<Solution<ActionId>> where
    T: GraphPlanSolver<ActionId>, 
[src]

Searches the planning graph for a solution using the solver if there is no solution, extends the graph to depth i+1 and tries to solve again

pub fn format_plan(solution: Solution<ActionId>) -> Solution<ActionId>[src]

Takes a solution and filters out maintenance actions

Trait Implementations

impl<ActionId: Debug + Eq + Hash + Ord + PartialOrd + Clone> Debug for PlanGraph<ActionId>[src]

Auto Trait Implementations

impl<ActionId> RefUnwindSafe for PlanGraph<ActionId> where
    ActionId: RefUnwindSafe

impl<ActionId> Send for PlanGraph<ActionId> where
    ActionId: Send

impl<ActionId> Sync for PlanGraph<ActionId> where
    ActionId: Sync

impl<ActionId> Unpin for PlanGraph<ActionId> where
    ActionId: Unpin

impl<ActionId> UnwindSafe for PlanGraph<ActionId> where
    ActionId: UnwindSafe

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 = !

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.