com.uppaal.model.system
Class Transition

java.lang.Object
  extended by 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
Transition(SystemState source, SystemEdge[] edges, SystemState target)
           
Transition(SystemState source, SystemEdge[] edges, SystemState target, String edgeDescription)
           
 
Method Summary
 SystemEdge getEdge(int i)
           
 String getEdgeDescription()
           
 SystemEdge[] getEdges()
           
 int getSize()
           
 SystemState getSource()
           
 SystemState 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transition

public Transition(SystemState source,
                  SystemEdge[] edges,
                  SystemState target)

Transition

public Transition(SystemState source,
                  SystemEdge[] edges,
                  SystemState target,
                  String edgeDescription)
Method Detail

traceFormat

public String traceFormat()
Convert to visual format used in simulator.


toServerFormat

public String toServerFormat()
Convert to format used to send to server.


writeXTRFormat

public void writeXTRFormat(Writer writer)
                    throws IOException
Convert to format used in XTR files.

Throws:
IOException

getSource

public SystemState getSource()

getTarget

public SystemState getTarget()

getEdges

public SystemEdge[] getEdges()

getEdge

public SystemEdge getEdge(int i)

getSize

public int getSize()

involvesProcess

public boolean involvesProcess(int process)

getEdgeDescription

public String getEdgeDescription()


Copyright © 2012 Uppsala University and Aalborg University. All Rights Reserved.