pub fn filter_state(&self, state: SPState) -> SPState {
        // Planning index
        let mut to_keep = vec![SPPath::from_slice(&["runner", "plans", "1"])];
        // We want to keep any paths contained in our formal model.
        to_keep.extend(self.model.get_state_paths());
        // As well as the state of any operations in the model.
        to_keep.extend(self.operations.iter().map(|o|o.path().clone()).collect::<Vec<_>>());

        // TODO. temporary effect flags
        self.model.transitions.iter().for_each(|t| {
            if t.type_ == TransitionType::Effect {
                to_keep.push(t.path().add_parent("effects"));
            }
        });

        state.filter_by_paths(&to_keep)
    }
/// Only keep parts of the state that are relevant to this planner.
Only keep parts of the state that are relevant to this planner.
Only keep parts of the state that are relevant to this planner .
pub fn filter_state(&self, state: SPState) -> SPState {
        // Planning index
        let mut to_keep = vec![SPPath::from_slice(&["runner", "plans", "1"])];
        // We want to keep any paths contained in our formal model.
        to_keep.extend(self.model.get_state_paths());
        // As well as the state of any operations in the model.
        to_keep.extend(self.operations.iter().map(|o|o.path().clone()).collect::<Vec<_>>());
        // TODO. temporary effect flags
        self.model.transitions.iter().for_each(|t| {
            if t.type_ == TransitionType::Effect {
                to_keep.push(t.path().add_parent("effects"));
            }
        });
        state.filter_by_paths(&to_keep)
    }
pub fn filter_state ( & self , state : SPState ) -> SPState { // Planning index let mut to_keep = vec ! [ SPPath from_slice ( [ " " " " " " ] ) ] ; // We want to keep any paths contained in our formal model. to_keep . extend ( self . model . get_state_paths ( ) ) ; // As well as the state of any operations in the model. to_keep . extend ( self . operations . iter ( ) . map ( | o | o . path ( ) . clone ( ) ) . collect :: < Vec < _ > > ( ) ) ; // TODO. temporary effect flags self . model . transitions . iter ( ) . for_each ( | t | { if t . type_ == TransitionType :: Effect { to_keep . push ( t . path ( ) . add_parent ( " " ) ) ; } } ) ; state . filter_by_paths ( & to_keep ) }
Only keep parts of the state that are relevant to this planner.
Only keep parts of the state that are relevant to this planner .
&self
state
SPState