Package com.uppaal.model.system
Class Transition
java.lang.Object
com.uppaal.model.system.Transition
public class Transition extends Object
Transition represents a discrete transition of the system.
Each transition has a source and target states, and a set of edges involved
in the transition.
A sample code to save a trace (sequence of transitions) into a XTR file:
ArrayList<Transition> trace = new ArrayList<Transition>();
... // simulate and add successive transitions
System.out.println(trace.get(0).getTarget().toXTRFormat());
for (int i = 1; i < trace.size(); i++) {
System.out.println(trace.get(i).toXTRFormat());
}
System.out.println(".\n");
-
Constructor Summary
Constructors Constructor Description Transition(SymbolicState source, SystemEdge[] edges, SymbolicState target)
Transition(SymbolicState source, SystemEdge[] edges, SymbolicState target, String edgeDescription)
-
Method Summary
Modifier and Type Method Description SystemEdge
getEdge(int i)
String
getEdgeDescription()
SystemEdge[]
getEdges()
int
getSize()
SymbolicState
getSource()
SymbolicState
getTarget()
boolean
involvesProcess(int process)
String
toServerFormat()
Convert to format used to send to server.String
traceFormat()
Convert to visual format used in simulator.void
writeXTRFormat(Writer writer)
Convert to format used in XTR files.
-
Constructor Details
-
Transition
-
Transition
public Transition(SymbolicState source, SystemEdge[] edges, SymbolicState target, String edgeDescription)
-
-
Method Details
-
traceFormat
Convert to visual format used in simulator. -
toServerFormat
Convert to format used to send to server. -
writeXTRFormat
Convert to format used in XTR files.- Throws:
IOException
-
getSource
-
getTarget
-
getEdges
-
getEdge
-
getSize
public int getSize() -
involvesProcess
public boolean involvesProcess(int process) -
getEdgeDescription
-