pub trait TransitionSystem<S, A, C, DC>{
// Required methods
fn actions_from(&self, state: &S) -> Iter<'_, A>;
fn transition(&self, state: &S, action: &A) -> S;
fn transition_cost(&self, state: &S, action: &A) -> DC;
fn reverse_actions_from(&self, state: &S) -> Iter<'_, A>;
fn reverse_transition(&self, state: &S, action: &A) -> S;
fn reverse_transition_cost(&self, state: &S, action: &A) -> DC;
fn can_wait_at(&self, state: &S) -> bool;
fn conflict(&self, moves: A2<&Move<S, A, C, DC>>) -> bool;
}
Expand description
Definition of a transition system that contains a set of states and actions, and transition functions that describe the result of any action applied to any state. The reverse transitions must also be described to allow using the reverse search as a heuristic.
Required Methods§
Sourcefn actions_from(&self, state: &S) -> Iter<'_, A>
fn actions_from(&self, state: &S) -> Iter<'_, A>
Returns the actions that can be applied from the given state.
Sourcefn transition(&self, state: &S, action: &A) -> S
fn transition(&self, state: &S, action: &A) -> S
Returns the state resulting from applying the given action to the given state.
Sourcefn transition_cost(&self, state: &S, action: &A) -> DC
fn transition_cost(&self, state: &S, action: &A) -> DC
Returns the cost of applying the given action to the given state (i.e. the duration of the action).
Sourcefn reverse_actions_from(&self, state: &S) -> Iter<'_, A>
fn reverse_actions_from(&self, state: &S) -> Iter<'_, A>
Returns the actions that can be applied to reach the given state.
Sourcefn reverse_transition(&self, state: &S, action: &A) -> S
fn reverse_transition(&self, state: &S, action: &A) -> S
Returns the state resulting from applying the given reverse action to the given state.
Sourcefn reverse_transition_cost(&self, state: &S, action: &A) -> DC
fn reverse_transition_cost(&self, state: &S, action: &A) -> DC
Returns the cost of applying the given reverse action to the given state (i.e. the duration of the action).
Sourcefn can_wait_at(&self, state: &S) -> bool
fn can_wait_at(&self, state: &S) -> bool
Returns true if agents can wait at the given state.