Automaton.cpp
192 void ompl::control::Automaton::addTransition(unsigned int src, const World &w, unsigned int dest)
217 ompl::control::Automaton::TransitionMap &ompl::control::Automaton::getTransitions(unsigned int src)
363 ompl::control::AutomatonPtr ompl::control::Automaton::DisjunctionAutomaton(unsigned int numProps,
385 /* An avoidance automaton is simply a disjunction automaton with its acceptance condition flipped. */
405 ompl::control::AutomatonPtr ompl::control::Automaton::DisjunctionAutomaton(unsigned int numProps)
void setStartState(unsigned int s)
Sets the start state of the automaton.
Definition: Automaton.cpp:181
TransitionMap & getTransitions(unsigned int src)
Returns the outgoing transition map for a given automaton state.
Definition: Automaton.cpp:216
static AutomatonPtr DisjunctionAutomaton(unsigned int numProps, const std::vector< unsigned int > &disjProps)
Helper function to return a disjunction automaton, which accepts when one of the given propositions b...
Definition: Automaton.cpp:362
static AutomatonPtr AcceptingAutomaton(unsigned int numProps)
Returns a single-state automaton that accepts on all inputs.
Definition: Automaton.cpp:295
static AutomatonPtr CoverageAutomaton(unsigned int numProps, const std::vector< unsigned int > &covProps)
Helper function to return a coverage automaton. Assumes all propositions are mutually exclusive.
Definition: Automaton.cpp:305
bool isAccepting(unsigned int s) const
Returns whether a given state of the automaton is accepting.
Definition: Automaton.cpp:176
unsigned int numStates() const
Returns the number of states in this automaton.
Definition: Automaton.cpp:221
int step(int state, const World &w) const
Runs the automaton for one step from the given state, using the values of propositions from a given W...
Definition: Automaton.cpp:209
bool run(const std::vector< World > &trace) const
Runs the automaton from its start state, using the values of propositions from a given sequence of Wo...
Definition: Automaton.cpp:197
static AutomatonPtr AvoidanceAutomaton(unsigned int numProps, const std::vector< unsigned int > &avoidProps)
Returns an avoidance automaton, which rejects when any one of the given list of propositions becomes ...
Definition: Automaton.cpp:381
unsigned int numTransitions() const
Returns the number of transitions in this automaton.
Definition: Automaton.cpp:226
A shared pointer wrapper for ompl::control::Automaton.
void addTransition(unsigned int src, const World &w, unsigned int dest)
Adds a given transition to the automaton.
Definition: Automaton.cpp:191
void setAccepting(unsigned int s, bool a)
Sets the accepting status of a given state.
Definition: Automaton.cpp:171
unsigned int numProps() const
Returns the number of propositions used by this automaton.
Definition: Automaton.cpp:234
Automaton(unsigned int numProps, unsigned int numStates=0)
Creates an automaton with a given number of propositions and states.
Definition: Automaton.cpp:74
int getStartState() const
Returns the start state of the automaton. Returns -1 if no start state has been set.
Definition: Automaton.cpp:186
int eval(const World &w) const
Returns the automaton state corresponding to a given World in this transition map....
Definition: Automaton.cpp:56
void print(std::ostream &out) const
Prints the automaton to a given output stream, in Graphviz dot format.
Definition: Automaton.cpp:239
unsigned int distFromAccepting(unsigned int s) const
Returns the shortest number of transitions from a given state to an accepting state.
Definition: Automaton.cpp:259
Each automaton state has a transition map, which maps from a World to another automaton state....
Definition: Automaton.h:138
std::string formula() const
Returns a formatted string representation of this World, as a conjunction of literals.
Definition: World.cpp:76
A class to represent a deterministic finite automaton, each edge of which corresponds to a World....
Definition: Automaton.h:131
bool satisfies(const World &w) const
Returns whether this World propositionally satisfies a given World w. Specifically,...
Definition: World.cpp:64
unsigned int addState(bool accepting=false)
Adds a new state to the automaton and returns an ID for it.
Definition: Automaton.cpp:161
static AutomatonPtr SequenceAutomaton(unsigned int numProps, const std::vector< unsigned int > &seqProps)
Helper function to return a sequence automaton. Assumes all propositions are mutually exclusive.
Definition: Automaton.cpp:339
A class to represent an assignment of boolean values to propositions. A World can be partially restri...
Definition: World.h:70