pub struct PlanGraph {
pub goals: HashSet<Proposition>,
pub actions: HashSet<Action>,
pub layers: Vec<Layer>,
pub mutex_props: HashMap<usize, HashSet<PairSet<Proposition>>>,
pub mutex_actions: HashMap<usize, HashSet<PairSet<Action>>>,
}
Fields
goals: HashSet<Proposition>
actions: HashSet<Action>
layers: Vec<Layer>
mutex_props: HashMap<usize, HashSet<PairSet<Proposition>>>
mutex_actions: HashMap<usize, HashSet<PairSet<Action>>>
Implementations
sourceimpl PlanGraph
impl PlanGraph
pub fn new(
initial_props: HashSet<Proposition>,
goals: HashSet<Proposition>,
actions: HashSet<Action>
) -> Self
pub fn push(&mut self, layer: Layer)
sourcepub fn extend(&mut self)
pub fn extend(&mut self)
Extends the plangraph to depth i+1 Inserts another action layer and proposition layer
pub fn actions_at_layer(&self, index: usize) -> Result<BTreeSet<Action>, String>
sourcepub fn search_with<T>(&mut self, solver: &T) -> Option<Solution>where
T: GraphPlanSolver,
pub fn search_with<T>(&mut self, solver: &T) -> Option<Solution>where
T: GraphPlanSolver,
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
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PlanGraph
impl Send for PlanGraph
impl Sync for PlanGraph
impl Unpin for PlanGraph
impl UnwindSafe for PlanGraph
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more