public class TransitionSystem
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private ActionSignature |
signature |
private java.util.Set<State> |
states |
private java.util.Set<Transition> |
transitions |
| Constructor and Description |
|---|
TransitionSystem(ActionSignature signature)
Creates a new empty transition system with the given ActionSignature.
|
TransitionSystem(java.util.Set<State> states,
ActionSignature signature)
Creates a new transition system.
|
TransitionSystem(java.util.Set<State> states,
java.util.Set<Transition> transitions,
ActionSignature signature)
Creates a new transition system.
|
| Modifier and Type | Method and Description |
|---|---|
State |
addState(java.util.Set<FOLAtom> fluents)
Creates a new state and adds it to this transition system.
|
void |
addState(State s)
Adds a state to this transition system.
|
void |
addTransition(Transition t)
Adds a given transition to this transition system.
|
ActionSignature |
getSignature()
Returns the action signature of this transition system.
|
State |
getState(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.
|
boolean |
getValue(FOLAtom fluent,
State state)
Returns the value of a fluent in a state in this transition system.
|
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.
|
java.lang.String |
toString() |
private java.util.Set<State> states
private java.util.Set<Transition> transitions
private ActionSignature signature
public TransitionSystem(java.util.Set<State> states, java.util.Set<Transition> transitions, ActionSignature signature)
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.public TransitionSystem(java.util.Set<State> states, ActionSignature signature)
states - A set of states which is contained in this transition system.signature - The action signature for this transition system.public TransitionSystem(ActionSignature signature)
signature - the action signature of this transition systempublic State addState(java.util.Set<FOLAtom> fluents)
fluents - The set of fluents which are to be mapped to true by the new
state.public void addState(State s)
s - a new statepublic State getState(java.util.Set<FOLAtom> fluents)
fluents - public void addTransition(Transition t)
t - a new transitionpublic java.util.Set<State> getStates()
public java.util.Set<Transition> getTransitions()
public boolean getValue(FOLAtom fluent, State state)
fluent - a fluentstate - a statepublic java.lang.String toDotFormat()
public ActionSignature getSignature()
public java.lang.String toString()
toString in class java.lang.Object