adevs
Class Digraph

java.lang.Object
  extended by adevs.Devs
      extended by adevs.Network
          extended by adevs.Digraph

public class Digraph
extends Network

This is a digraph model for connecting multiple input/multiple output systems. This Digraph is a Java implementation of the SimpleDigraph class that appears in the C++ simulation package.


Nested Class Summary
static class Digraph.PortValue
          Input and output for the Digraph and its components must be PortValue objects.
 
Constructor Summary
Digraph()
          Construct a network without components.
 
Method Summary
 void add(Devs model)
          Add a model to the network.
 void couple(Devs src, int src_port, Devs dst, int dst_port)
          Couple the source model to the destination model.
 void getComponents(java.util.Collection<Devs> c)
          Puts the network's set of components into c.
 void route(java.lang.Object x, Devs model, java.util.Collection<Event> r)
          Route an event according to the network's couplings.
 
Methods inherited from class adevs.Devs
getNativePeer, model_transition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Digraph

public Digraph()
Construct a network without components.

Method Detail

add

public void add(Devs model)
Add a model to the network.

Parameters:
model - The DEVS model that will be a component of the network

couple

public void couple(Devs src,
                   int src_port,
                   Devs dst,
                   int dst_port)
Couple the source model to the destination model.


getComponents

public void getComponents(java.util.Collection<Devs> c)
Puts the network's set of components into c.

Specified by:
getComponents in class Network
Parameters:
c - A Collection to which will be added the model's components

route

public void route(java.lang.Object x,
                  Devs model,
                  java.util.Collection<Event> r)
Route an event according to the network's couplings.

Specified by:
route in class Network
Parameters:
x - The value of the event to be routed
model - The source of the event
r - An empty collection to be filled with (target,value) pairs
See Also:
Network