Package casa.lepton

Class OppNetGraphDGS

java.lang.Object
org.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractGraph
org.graphstream.graph.implementations.AdjacencyListGraph
org.graphstream.graph.implementations.MultiGraph
casa.lepton.OppNetGraph
casa.lepton.OppNetGraphDGS
All Implemented Interfaces:
OppNet, OppNetEventsSource, Closeable, AutoCloseable, Iterable<org.graphstream.graph.Node>, Runnable, org.graphstream.graph.Element, org.graphstream.graph.Graph, org.graphstream.graph.Structure, org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.Pipe, org.graphstream.stream.Replayable, org.graphstream.stream.Sink, org.graphstream.stream.Source

public class OppNetGraphDGS extends OppNetGraph
A OppNetGraph read from an input DGS file.
  • Constructor Details

  • Method Details

    • step

      public boolean step()
      Description copied from class: OppNetGraph
      Run a simulation step: move nodes and update edges accordingly, and wait for the next step time
      Overrides:
      step in class OppNetGraph
      Returns:
      false if this step is the last one
    • addNode

      public void addNode(String nodeId, String profile)
      Description copied from interface: OppNet
      Add a new node in the OppNet.
      Specified by:
      addNode in interface OppNet
      Overrides:
      addNode in class OppNetGraph
      Parameters:
      nodeId - the new node id.
      profile - the node's profile name (may be null)
    • deleteNode

      public void deleteNode(String nodeId)
      Description copied from interface: OppNet
      Remove a node from the OppNet.
      Specified by:
      deleteNode in interface OppNet
      Overrides:
      deleteNode in class OppNetGraph
      Parameters:
      nodeId - the id of the node to be deleted.