Class TransitionSystem
- java.lang.Object
 - 
- net.sf.tweety.action.transitionsystem.TransitionSystem
 
 
- 
public class TransitionSystem extends java.lang.ObjectThis class represents an action transition system for a fixed action signature with a set of states and a set of transitions between states. Transition systems are used to capture the meaning of action descriptions. For a collection of action languages defined in terms of transition systems, see: Gelfond, Michael and Lifschitz, Vladimir: Action Languages. ETAI: Electronic Transactions on AI, 1998.- Author:
 - Sebastian Homann
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description private ActionSignaturesignatureprivate java.util.Set<State>statesprivate java.util.Set<Transition>transitions 
- 
Constructor Summary
Constructors Constructor Description TransitionSystem(java.util.Set<State> states, java.util.Set<Transition> transitions, ActionSignature signature)Creates a new transition system.TransitionSystem(java.util.Set<State> states, ActionSignature signature)Creates a new transition system.TransitionSystem(ActionSignature signature)Creates a new empty transition system with the given ActionSignature. 
- 
Method Summary
Modifier and Type Method Description StateaddState(java.util.Set<FolAtom> fluents)Creates a new state and adds it to this transition system.voidaddState(State s)Adds a state to this transition system.voidaddTransition(Transition t)Adds a given transition to this transition system.ActionSignaturegetSignature()Returns the action signature of this transition system.StategetState(java.util.Set<FolAtom> fluents)Returns the state that maps the given fluents to true, if it exists, otherwise null.java.util.Set<State>getStates()Returns all states contained in this transition system.java.util.Set<Transition>getTransitions()Returns all transitions contained in this transition system.booleangetValue(FolAtom fluent, State state)Returns the value of a fluent in a state in this transition system.java.lang.StringtoDotFormat()Returns this transition system in dot-format with collapsed transitions, which may be further processed using a graph drawing library such as graphviz.java.lang.StringtoString() 
 - 
 
- 
- 
Field Detail
- 
states
private java.util.Set<State> states
 
- 
transitions
private java.util.Set<Transition> transitions
 
- 
signature
private ActionSignature signature
 
 - 
 
- 
Constructor Detail
- 
TransitionSystem
public TransitionSystem(java.util.Set<State> states, java.util.Set<Transition> transitions, ActionSignature signature)
Creates a new transition system.- Parameters:
 states- A set of states which is contained in this transition system.transitions- A set of transitions which is contained in this transition system.signature- The action signature for this transition system.
 
- 
TransitionSystem
public TransitionSystem(java.util.Set<State> states, ActionSignature signature)
Creates a new transition system.- Parameters:
 states- A set of states which is contained in this transition system.signature- The action signature for this transition system.
 
- 
TransitionSystem
public TransitionSystem(ActionSignature signature)
Creates a new empty transition system with the given ActionSignature.- Parameters:
 signature- the action signature of this transition system
 
 - 
 
- 
Method Detail
- 
addState
public State addState(java.util.Set<FolAtom> fluents)
Creates a new state and adds it to this transition system.- Parameters:
 fluents- The set of fluents which are to be mapped to true by the new state.- Returns:
 - the new state which maps the given fluents to true.
 
 
- 
addState
public void addState(State s)
Adds a state to this transition system.- Parameters:
 s- a new state
 
- 
getState
public State getState(java.util.Set<FolAtom> fluents)
Returns the state that maps the given fluents to true, if it exists, otherwise null.- Parameters:
 fluents- a set of fluents- Returns:
 - the state that maps the given fluents to true, if it exists, otherwise null.
 
 
- 
addTransition
public void addTransition(Transition t)
Adds a given transition to this transition system.- Parameters:
 t- a new transition
 
- 
getStates
public java.util.Set<State> getStates()
Returns all states contained in this transition system.- Returns:
 - all states contained in this transition system.
 
 
- 
getTransitions
public java.util.Set<Transition> getTransitions()
Returns all transitions contained in this transition system.- Returns:
 - all transitions contained in this transition system.
 
 
- 
getValue
public boolean getValue(FolAtom fluent, State state)
Returns the value of a fluent in a state in this transition system.- Parameters:
 fluent- a fluentstate- a state- Returns:
 - true, iff the fluent is mapped to true by the given state.
 
 
- 
toDotFormat
public java.lang.String toDotFormat()
Returns this transition system in dot-format with collapsed transitions, which may be further processed using a graph drawing library such as graphviz. For more information, see http://www.graphviz.org- Returns:
 - This transition system in dot format.
 
 
- 
getSignature
public ActionSignature getSignature()
Returns the action signature of this transition system.- Returns:
 - the action signature of this transition system.
 
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -